Skip to content

Commit

Permalink
eddilithium3: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
bwesterb authored and armfazh committed Jul 5, 2024
1 parent 75b28ed commit d26845f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sign/eddilithium3/eddilithium.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (sk *PrivateKey) MarshalBinary() ([]byte, error) {
// UnmarshalBinary the public key from data.
func (pk *PublicKey) UnmarshalBinary(data []byte) error {
if len(data) != PublicKeySize {
return errors.New("packed public key must be of eddilithium4.PublicKeySize bytes")
return errors.New("packed public key must be of eddilithium3.PublicKeySize bytes")
}
var buf [PublicKeySize]byte
copy(buf[:], data)
Expand All @@ -173,7 +173,7 @@ func (pk *PublicKey) UnmarshalBinary(data []byte) error {
// UnmarshalBinary unpacks the private key from data.
func (sk *PrivateKey) UnmarshalBinary(data []byte) error {
if len(data) != PrivateKeySize {
return errors.New("packed private key must be of eddilithium4.PrivateKeySize bytes")
return errors.New("packed private key must be of eddilithium3.PrivateKeySize bytes")
}
var buf [PrivateKeySize]byte
copy(buf[:], data)
Expand Down Expand Up @@ -215,7 +215,7 @@ func (sk *PrivateKey) Sign(
var sig [SignatureSize]byte

if opts.HashFunc() != crypto.Hash(0) {
return nil, errors.New("eddilithium4: cannot sign hashed message")
return nil, errors.New("eddilithium3: cannot sign hashed message")
}

SignTo(sk, msg, sig[:])
Expand Down

0 comments on commit d26845f

Please sign in to comment.