No description
Find a file
Victor Lopez 5fd0d692e8
feat: add simple sparse merkle tree
This commit moves the previous implementation of `SparseMerkleTree` from
miden-core to this crate.

It also include a couple of new tests, a bench suite, and a couple of
minor fixes. The original API was preserved to maintain compatibility
with `AdviceTape`.

closes #21
2022-12-14 14:26:01 +01:00
.github feat: add no-std support 2022-11-24 22:10:56 +01:00
benches feat: add simple sparse merkle tree 2022-12-14 14:26:01 +01:00
src feat: add simple sparse merkle tree 2022-12-14 14:26:01 +01:00
.gitignore Initial commit 2022-10-03 14:30:23 -07:00
Cargo.toml feat: add simple sparse merkle tree 2022-12-14 14:26:01 +01:00
CONTRIBUTING.md chore(repo): add contributing guidelines 2022-10-20 18:15:25 +02:00
LICENSE Initial commit 2022-10-03 14:30:23 -07:00
README.md docs: update main README file 2022-12-02 11:25:18 -08:00

Miden Crypto

This crate contains cryptographic primitives used in Polygon Miden.

Hash

Hash module provides a set of cryptographic hash functions which are used by Miden VM and Miden Rollup. Currently, these functions are:

  • BLAKE3 hash function with 256-bit, 192-bit, or 160-bit output. The 192-bit and 160-bit outputs are obtained by truncating the 256-bit output of the standard BLAKE3.
  • RPO hash function with 256-bit output. This hash function is an algebraic hash function suitable for recursive STARKs.

Merkle

Merkle module provides a set of data structures related to Merkle tree. All these data structures are implemented using RPO hash function described above. The data structure are:

  • MerkleTree: a regular fully-balanced binary Merkle tree. The depth of this tree can be at most 64.
  • MerklePathSet: a collection of Merkle authentication paths all resolving to the same root. The length of the paths can be at most 64.

Crate features

This carate can be compiled with the following features:

  • std - enabled by default and relies on the Rust standard library.
  • no_std does not rely on the Rust standard library and enables compilation to WebAssembly.

Both of these features imply use of alloc to support heap-allocated collections.

To compile with no_std, disable default features via --no-default-features flag.

License

This project is MIT licensed.