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§

  • Contains implementations of currently supported hash functions.

Structs§

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

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.
  • Pseudo-random element generator for finite fields.

Functions§

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