Skip to main content

lib_q_duplex_aead/
lib.rs

1//! Duplex-sponge AEAD built from Keccak-f\[1600\] (SHA-3 family permutation).
2//!
3//! Rate 136 bytes, 256-bit tag, 256-bit key, 128-bit nonce. Associated data is absorbed
4//! before plaintext duplex steps; the tag is the first 32 bytes of the outer state after
5//! processing.
6//!
7//! # Security
8//!
9//! This construction follows the duplex-sponge model (Bertoni et al.). The permutation is
10//! NIST-standardized SHA-3 / FIPS 202; this crate defines a **non-standard** AEAD mode on
11//! top of it. Use only after independent review for your threat model.
12
13#![cfg_attr(not(feature = "std"), no_std)]
14#![deny(unsafe_code)]
15#![deny(unused_qualifications)]
16
17#[cfg(feature = "alloc")]
18extern crate alloc;
19
20pub mod crypto;
21pub use crypto::DuplexCryptoError;
22pub mod params;
23pub mod simd;
24pub mod state;
25
26#[cfg(feature = "alloc")]
27mod aead;
28
29#[cfg(feature = "alloc")]
30pub use aead::DuplexSpongeAead;
31pub use params::{
32    KEY_BYTES,
33    NONCE_BYTES,
34    RATE_BYTES,
35    TAG_BYTES,
36};