Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cryptographic Operations

OPCODEDESCRIPTION
sha256SHA256 hash of value A, yields [32]byte
keccak256Keccak256 hash of value A, yields [32]byte
sha512_256SHA512_256 hash of value A, yields [32]byte
sha3_256SHA3_256 hash of value A, yields [32]byte
falcon_verifyfor (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey => {0 or 1}
ed25519verifyfor (data A, signature B, pubkey C) verify the signature of (“ProgData” || program_hash || data) against the pubkey => {0 or 1}
ed25519verify_barefor (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}
ecdsa_verify vfor (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}
ecdsa_pk_recover vfor (data A, recovery id B, signature C, D) recover a public key
ecdsa_pk_decompress vdecompress pubkey A into components X, Y
vrf_verify sVerify the proof B of message A against pubkey C. Returns vrf output and verification flag.
ec_add gfor curve points A and B, return the curve point A + B
ec_scalar_mul gfor curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.
ec_pairing_check g1 if the product of the pairing of each point in A with its respective point in B is equal to the identity element of the target group Gt, else 0
ec_multi_scalar_mul gfor curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + … + BnAn
ec_subgroup_check g1 if A is in the main prime-order subgroup of G (including the point at infinity) else 0. Program fails if A is not in G at all.
ec_map_to gmaps field element A to group G
mimc cMiMC hash of scalars A, using curve and parameters specified by configuration C