Skip to main content

lib_q_stark_mersenne31/
lib.rs

1//! The prime field `F_p` where `p = 2^31 - 1`.
2
3#![no_std]
4
5extern crate alloc;
6
7mod complex;
8mod dft;
9mod extension;
10mod mds;
11mod mersenne_31;
12// mod poseidon2; // Removed: non-NIST hash
13mod radix_2_dit;
14#[cfg(any(test, feature = "test-utils"))]
15mod test_permutation;
16
17pub use dft::Mersenne31Dft;
18pub use mds::*;
19pub use mersenne_31::*;
20// pub use poseidon2::*; // Removed: non-NIST hash
21pub use radix_2_dit::Mersenne31ComplexRadix2Dit;
22#[cfg(any(test, feature = "test-utils"))]
23pub use test_permutation::*;
24
25#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
26mod aarch64_neon;
27#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
28pub use aarch64_neon::*;
29
30#[cfg(all(
31    target_arch = "x86_64",
32    target_feature = "avx2",
33    not(target_feature = "avx512f")
34))]
35mod x86_64_avx2;
36#[cfg(all(
37    target_arch = "x86_64",
38    target_feature = "avx2",
39    not(target_feature = "avx512f")
40))]
41pub use x86_64_avx2::*;
42
43#[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))]
44mod x86_64_avx512;
45#[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))]
46pub use x86_64_avx512::*;
47
48// no_packing module removed - was only used for poseidon2