1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! The Eidos hash construction and its underlying compression function.
//!
//! [`Eidos`](crate::hash::eidos::Eidos) exposes a framed hash construction and a raw compression
//! operation. Complete-hash methods apply domain and length binding, framing, and padding.
//! [`Eidos::compress`](crate::hash::eidos::Eidos::compress) compresses one complete block under a
//! caller-supplied chaining value and adds no framing.
//!
//! Eidos digests occupy a 252-bit packed subspace: the high bit of each odd Eidos compression
//! output lane is cleared before two `u32` lanes are packed into one Goldilocks field element. The
//! resulting generic collision-resistance bound is 126 bits.
pub use ;
pub use Eidos;
pub use ;
pub use ;
/// Number of Felts in one Eidos message block.
pub const BLOCK_LEN: usize = 8;
/// Number of Felts in an Eidos digest.
pub const DIGEST_WIDTH: usize = 4;
/// Number of independent Eidos inputs in one logical packed batch.
///
/// The logical width is fixed across targets. Backends with narrower SIMD registers process the
/// batch in independent sub-batches. Callers should fill tails by repeating a real lane and
/// discard the duplicate outputs.
pub const PACKED_LANES: usize = PACKED_LANES;
/// One packed base-field element, with one independent value per logical packed lane.
pub type PackedFelt = ;
/// Lane-oriented chaining value retained between packed compression calls.
///
/// Packing into field elements is reserved for API boundaries.
type PackedU32ChainingValue = ;
/// One packed Eidos chaining value, with one independent CV per logical packed lane.
///
/// Raw compression accepts arbitrary canonical field elements here; callers must not assume that
/// an input CV already lies in Eidos's 252-bit output subspace.
pub type PackedChainingValue = ;
/// One packed Eidos digest, with one independent digest per logical packed lane.
pub type PackedDigest = PackedChainingValue;
/// One packed Eidos message block, with one independent block per logical packed lane.
pub type PackedBlock = ;