Expand description
This crate contains cryptographic primitives used in STARK proof generation and verification. These include:
- Hash functions - which are defined using the Hasher trait. The crate also contains two implementations of the trait for BLAKE3 and SHA3 hash functions.
- Merkle trees - which are used as a commitment scheme in the STARK protocol. The MerkleTree implementation supports concurrent tree construction as well as compact aggregation of Merkle paths implemented using a variation of the Octopus algorithm.
- PRNG - which is used to generate pseudo-random elements in a finite field. The RandomCoin implementation uses a cryptographic hash function to generate pseudo-random elements form a seed.
Modules§
- hashers
- Contains implementations of currently supported hash functions.
Structs§
- Batch
Merkle Proof - Multiple Merkle proofs aggregated into a single proof.
- Default
Random Coin - Pseudo-random element generator for finite fields, which is a default implementation of the RandomCoin trait.
- Merkle
Tree - A fully-balanced Merkle tree.
Enums§
- Merkle
Tree Error - Defines errors which can occur when using Merkle trees.
- Random
Coin Error - Defines errors which can occur when drawing values from a random coin.
Traits§
- Digest
- Defines output type for a cryptographic hash function.
- Element
Hasher - Defines a cryptographic hash function for hashing field elements.
- Hasher
- Defines a cryptographic hash function.
- Random
Coin - Pseudo-random element generator for finite fields.
- Vector
Commitment - A vector commitment (VC) scheme.
Functions§
- build_
merkle_ nodes - Returns the internal nodes of a Merkle tree defined by the specified leaves.