729921e16e
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
11 lines
417 B
Go
11 lines
417 B
Go
package cybersecurity
|
|
|
|
import "crypto/ed25519"
|
|
|
|
// VerifyEd25519 reports whether sig is a valid Ed25519 signature of msg under pub.
|
|
// pub must be a valid Ed25519 public key (32 bytes as returned by GenerateIdentity).
|
|
// Returns true only if the signature is authentic; false on any mismatch or invalid input.
|
|
func VerifyEd25519(pub, msg, sig []byte) bool {
|
|
return ed25519.Verify(ed25519.PublicKey(pub), msg, sig)
|
|
}
|