729921e16e
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
11 lines
442 B
Go
11 lines
442 B
Go
package cybersecurity
|
|
|
|
import "crypto/ed25519"
|
|
|
|
// SignEd25519 signs msg with an Ed25519 private key and returns the 64-byte signature.
|
|
// priv must be a valid Ed25519 private key (64 bytes as returned by GenerateIdentity or ed25519.GenerateKey).
|
|
// This function is pure: same inputs always produce the same output (ed25519 is deterministic).
|
|
func SignEd25519(priv, msg []byte) []byte {
|
|
return ed25519.Sign(ed25519.PrivateKey(priv), msg)
|
|
}
|