Skip to content

@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

@circom:eddsa.sign(secret message)
NameTypeDescription
secretstringSecret seed the signing key derives from
messagenumberField-element message to sign (hash larger data first)
# Sign a field element and verify the signature
set $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.