anemoi/
lib.rs

1//! This crate provides an implementation of different instantiations
2//! of the Anemoi permutation, and applications to a Sponge mode and a
3//! novel Jive compression mode.
4//!
5//! All hash instantiations are defined using a `Sponge` trait and can both
6//! process sequences of bytes or native field elements.
7
8#![allow(incomplete_features)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![deny(rustdoc::broken_intra_doc_links)]
11#![deny(missing_debug_implementations)]
12#![deny(missing_docs)]
13#![deny(unsafe_code)]
14#![cfg_attr(not(feature = "std"), no_std)]
15#![allow(non_camel_case_types)]
16
17#[cfg(not(feature = "std"))]
18#[macro_use]
19extern crate alloc;
20
21mod traits;
22pub use traits::*;
23
24/// An implementation of instantiations of the Anemoi permutation
25/// in Sponge and Jive modes targetting the 128-bit security level
26/// over BLS12-377 base field.
27#[cfg(feature = "bls12_377")]
28pub mod bls12_377;
29
30/// An implementation of instantiations of the Anemoi permutation
31/// in Sponge and Jive modes targetting the 128-bit security level
32/// over BLS12-381 base field.
33#[cfg(feature = "bls12_381")]
34pub mod bls12_381;
35
36/// An implementation of instantiations of the Anemoi permutation
37/// in Sponge and Jive modes targetting the 128-bit security level
38/// over BN-254 base field.
39#[cfg(feature = "bn_254")]
40pub mod bn_254;
41
42/// An implementation of instantiations of the Anemoi permutation
43/// in Sponge and Jive modes targetting the 128-bit security level
44/// over ED_ON_BLS12-377 base field.
45#[cfg(feature = "ed_on_bls12_377")]
46pub mod ed_on_bls12_377;
47
48/// An implementation of instantiations of the Anemoi permutation
49/// in Sponge and Jive modes targetting the 128-bit security level
50/// over Jubjub base field.
51#[cfg(feature = "jubjub")]
52pub mod jubjub;
53
54/// An implementation of instantiations of the Anemoi permutation
55/// in Sponge and Jive modes targetting the 128-bit security level
56/// over Pallas base field.
57#[cfg(feature = "pallas")]
58pub mod pallas;
59
60/// An implementation of instantiations of the Anemoi permutation
61/// in Sponge and Jive modes targetting the 128-bit security level
62/// over Vesta base field.
63#[cfg(feature = "vesta")]
64pub mod vesta;