Skip to content

Commit

Permalink
Merge pull request #33 from jplomas/main
Browse files Browse the repository at this point in the history
Revert to fix very old QRLLIB bug (of zero impact)
  • Loading branch information
jplomas authored Jul 1, 2024
2 parents 4121b74 + b66ad15 commit fd8be9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xmss/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewQRLDescriptorFromBytes(descriptorBytes []uint8) *QRLDescriptor {

return &QRLDescriptor{
hashFunction: HashFunction(descriptorBytes[0] & 0x0f),
signatureType: common.SignatureType((descriptorBytes[0] >> 4) & 0xF0),
signatureType: common.SignatureType((descriptorBytes[0] >> 4) & 0x0F),
height: (descriptorBytes[1] & 0x0f) << 1,
addrFormatType: common.AddrFormatType((descriptorBytes[1] & 0xF0) >> 4),
}
Expand All @@ -50,7 +50,7 @@ func LegacyQRLDescriptorFromBytes(descriptorBytes []uint8) *QRLDescriptor {

return &QRLDescriptor{
hashFunction: HashFunction(descriptorBytes[0] & 0x0f),
signatureType: common.SignatureType((descriptorBytes[0] >> 4) & 0xF0),
signatureType: common.SignatureType((descriptorBytes[0] >> 4) & 0x0F),
height: (descriptorBytes[1] & 0x0f) << 1,
addrFormatType: common.AddrFormatType((descriptorBytes[1] & 0xF0) >> 4),
}
Expand Down
4 changes: 2 additions & 2 deletions xmss/xmss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func TestIsValidXMSSAddress2(t *testing.T) {
addr, _ := hex.DecodeString("2001430a5152fcc369c309caf3554bd3528161c8")
var address [20]uint8
copy(address[:], addr)
if !IsValidXMSSAddress(address) {
t.Errorf("Failed to flag invalid address")
if IsValidXMSSAddress(address) {
t.Errorf("Dilithium address passed the validXMSSAddress check")
}
}

Expand Down

0 comments on commit fd8be9a

Please sign in to comment.