Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions sign/eddilithium2/eddilithium.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ func SignTo(sk *PrivateKey, msg []byte, signature []byte) {

// Verify checks whether the given signature by pk on msg is valid.
func Verify(pk *PublicKey, msg []byte, signature []byte) bool {
if len(signature) != SignatureSize {
return false
}
Comment thread
bwesterb marked this conversation as resolved.
if !mode2.Verify(
&pk.d,
msg,
Expand Down
3 changes: 3 additions & 0 deletions sign/eddilithium3/eddilithium.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func SignTo(sk *PrivateKey, msg []byte, signature []byte) {

// Verify checks whether the given signature by pk on msg is valid.
func Verify(pk *PublicKey, msg []byte, signature []byte) bool {
if len(signature) != SignatureSize {
return false
}
if !mode3.Verify(
&pk.d,
msg,
Expand Down
Loading