Crate winter_crypto

Crate winter_crypto 

Source
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§

BatchMerkleProof
Multiple Merkle proofs aggregated into a single proof.
DefaultRandomCoin
Pseudo-random element generator for finite fields, which is a default implementation of the RandomCoin trait.
MerkleTree
A fully-balanced Merkle tree.

Enums§

MerkleTreeError
Defines errors which can occur when using Merkle trees.
RandomCoinError
Defines errors which can occur when drawing values from a random coin.

Traits§

Digest
Defines output type for a cryptographic hash function.
ElementHasher
Defines a cryptographic hash function for hashing field elements.
Hasher
Defines a cryptographic hash function.
RandomCoin
Pseudo-random element generator for finite fields.
VectorCommitment
A vector commitment (VC) scheme.

Functions§

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