@circom:eddsa.sign
Sign a field-element message with EdDSA over Baby Jubjub (Poseidon variant), returning the signature as [R8x R8y S]; destructure it or pass it whole to @circom:eddsa.verify or into circuit inputs.
⚗️ Experimental — available at next.evmcrispr.com.
Returns: array
Syntax
Section titled “Syntax”@circom:eddsa.sign(secret message)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
secret | string | Secret seed the signing key derives from |
message | number | Field-element message to sign (hash larger data first) |
Examples
Section titled “Examples”# Sign a field element and verify the signatureset $msg @circom:field(@hash("vote for 42"))set $sig @circom:eddsa.sign("my secret seed" $msg)set $pub @circom:eddsa.pub("my secret seed")print "Valid:" @circom:eddsa.verify($msg $sig $pub)- The message must be a single field element — hash larger data first (e.g.
@circom:field(@hash("..."))or@circom:field.hash(...)). - Signatures verify off-chain with @circom:eddsa.verify and inside circuits with circomlib's
EdDSAPoseidonVerifier.
See Also
Section titled “See Also”- @circom:eddsa.pub — the matching public key