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

Contains implementations of currently supported hash functions.

Structs

Multiple Merkle paths aggregated into a single proof.

A fully-balanced Merkle tree.

Pseudo-random element generator for finite fields.

Enums

Defines errors which can occur when using Merkle trees.

Defines errors which can occur when drawing values from a random coin.

Traits

Defines output type for a cryptographic hash function.

Defines a cryptographic hash function for hashing field elements.

Defines a cryptographic hash function.

Functions

Returns the internal nodes of a Merkle tree defined by the specified leaves.