Skip to main content

Module crypto

Module crypto 

Source

Modules§

ecdsa_k256_keccak
ECDSA (Elliptic Curve Digital Signature Algorithm) signature implementation over secp256k1 curve using Keccak to hash the messages when signing.
eddsa_25519_sha512
Ed25519 (EdDSA) signature implementation using Curve25519 and SHA-512 to hash the messages when signing.
falcon512_poseidon2
A deterministic Falcon512 Poseidon2 signature over a message.

Structs§

EmptySubtreeRoots
Contains precomputed roots of empty subtrees in a Merkle tree.
LeafIndex
The index of a leaf, at a depth known at compile-time.
MerklePath
A merkle path container, composed of a sequence of nodes of a Merkle tree.
MerkleStore
An in-memory data store for Merkelized data.
MerkleTree
A fully-balanced binary Merkle tree (i.e., a tree where the number of leaves is a power of two).
Mmr
A fully materialized Merkle Mountain Range, with every tree in the forest and all their elements.
MmrPeaks
NodeIndex
Address to an arbitrary node in a binary tree using level order form.
PartialMerkleTree
A partial Merkle tree with NodeIndex keys and 4-element Word leaf values. Partial Merkle Tree allows to create Merkle Tree by providing Merkle paths of different lengths.
Poseidon2
Implementation of the Poseidon2 hash function with 256-bit output.
SimpleSmt
A sparse Merkle tree with 64-bit keys and 4-element leaf values, without compaction.
Smt
Sparse Merkle tree mapping 256-bit keys to 256-bit values. Both keys and values are represented by 4 field elements.

Enums§

MerkleError

Functions§

init_merkle_leaf
init_merkle_leaves
init_merkle_store