Skip to main content

Crate lib_q_romulus

Crate lib_q_romulus 

Source
Expand description

Romulus-N and Romulus-M authenticated encryption (Romulus v1.3).

§Modes

  • Romulus-N (RomulusN): nonce-based AEAD. Unique nonces are required for security.
  • Romulus-M (RomulusM): misuse-resistant AEAD (SIV-style). Reusing a nonce does not allow forgery; confidentiality impact is bounded by the MRAE goal of the mode.

§API

The primary interface is RustCrypto aead::AeadInPlace (and aead::AeadCore) with 16-byte key, 16-byte nonce, and 16-byte tag. Use aead::KeyInit::new to build a cipher from a key.

Allocating helpers (aead::Aead) are available when the alloc feature is enabled.

When alloc is enabled, RomulusNAead and RomulusMAead implement lib_q_core::Aead for integration with the lib-Q AEAD registry.

§Targets

The cryptographic core is #![no_std], avoids OS services and RNG, and is intended to compile for embedded and wasm32-unknown-unknown without wasm-bindgen in this crate.

§Feature flags

FeatureEffect
(none)no_std, in-place AEAD only
allocaead::Aead, lib_q_core::Aead wrappers
stdStandard library (implies alloc)

Re-exports§

pub use romulus_m::RomulusM;
pub use romulus_n::RomulusN;

Modules§

romulus_m
Romulus-M: nonce-misuse-resistant AEAD (Romulus v1.3).
romulus_n
Romulus-N: nonce-based AEAD (Romulus v1.3).

Structs§

RomulusMAead
Stateless Romulus-M facade using lib_q_core::Aead.
RomulusNAead
Stateless Romulus-N facade using lib_q_core::Aead.

Type Aliases§

CiphertextOverhead
Ciphertext expansion for in-place API (tag is detached).
KeySize
Key size as a aead::consts typenum (128 bits).
NonceSize
Nonce size (128 bits).
TagSize
Tag size (128 bits).
U0
U16