Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/frontend/gadgets/poseidon/sponge/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ impl IOPattern {
}
}

// A large 128-bit prime, per https://primes.utm.edu/lists/2small/100bit.html.
const HASHER_BASE: u128 = (0 - 159) as u128;
// Large 128-bit constant for sponge construction hashing.
// Using 2^128 - 159, which provides good distribution properties
// for the hasher state computation in sponge operations.
const HASHER_BASE: u128 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFu128 - 158;

#[derive(Clone, Copy, Debug)]
pub(crate) struct Hasher {
Expand Down
Loading