crypto/ascon/mod.rs
1//! # Ascon lightweight cryptography (NIST SP 800-232)
2//!
3//! Ascon is a family of authenticated encryption and hashing algorithms selected by NIST
4//! for constrained environments. This module provides the four NIST-standardized,
5//! little-endian variants:
6//!
7//! - [`AsconAead128`] — authenticated encryption with associated data (AEAD)
8//! - [`AsconHash256`] — 256-bit cryptographic hash function
9//! - [`AsconXof128`] — extensible-output function (XOF)
10//! - [`AsconCxof128`] — customizable XOF (accepts a customization string)
11//!
12//! With optimized versions for both 32-bit and 64-bit CPUs.
13//!
14//! # Usage limits
15//!
16//! Per NIST SP 800-232 §4.3:
17//! - Max data per key: 2^54 bytes
18//! - Nonces must be distinct per key (up to 2^8 repetitions tolerated)
19//! - Tag lengths below 64 bits are discouraged; below 32 bits are not allowed
20
21mod ascon_aead128;
22mod ascon_core;
23mod ascon_cxof128;
24mod ascon_hash256;
25mod ascon_xof128;
26
27pub use ascon_aead128::AsconAead128;
28pub(crate) use ascon_core::{State, p8, p12};
29pub use ascon_cxof128::AsconCxof128;
30pub use ascon_hash256::AsconHash256;
31pub use ascon_xof128::AsconXof128;