Module crypto

Module crypto 

Source
Expand description

High-level utilities for cryptographic operations used in Starknet.

Structs§

ExtendedSignature
Stark ECDSA signature with v, useful for recovering the public key.
HashFunction
A hash function that is used in Starknet.
Signature
Stark ECDSA signature.
StatefulHasher
A stateful hasher that can be updated with messages and finalized to produce a hash.

Enums§

EcdsaSignError
Errors when performing ECDSA sign operations.
EcdsaVerifyError
Errors when performing ECDSA verify operations.

Functions§

compute_hash_on_elements
Computes the Pedersen hash of a list of Felt.
ecdsa_sign
Signs a hash using deterministic ECDSA on the STARK curve. The signature returned can be used to recover the public key.
ecdsa_verify
Verified an ECDSA signature on the STARK curve.
pedersen_hash
Computes the Starkware version of the Pedersen hash of x and y. All inputs are little-endian.