Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eddilithium3: fix typos #503

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading