Skip to main content

Crate qp_poseidon_core

Crate qp_poseidon_core 

Source

Re-exports§

pub use goldilocks::Goldilocks;
pub use poseidon2::Poseidon2;
pub use poseidon2::POSEIDON2_OUTPUT;
pub use poseidon2::SPONGE_CAPACITY;
pub use poseidon2::SPONGE_RATE;
pub use poseidon2::SPONGE_WIDTH;

Modules§

goldilocks
Minimal Goldilocks field implementation for Poseidon2.
poseidon2
Self-contained Poseidon2 permutation for Goldilocks field (WIDTH=12).
serialization
Serialization utilities for Goldilocks field elements.

Functions§

hash_bytes
Hash bytes to a 32-byte digest.
hash_squeeze_twice
Hash with 512-bit output by squeezing the sponge twice.
hash_to_bytes
Hash field elements to a 32-byte digest.
hash_to_felts
Hash field elements to 4 field elements (native Poseidon2 output).
hash_twice
Double hash: hash(hash(input)), returning bytes.
rehash_to_bytes
Re-hash a 32-byte digest to produce a new 32-byte digest.