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)
}
