Skip to main content

derive_event_nonce

Function derive_event_nonce 

Source
pub fn derive_event_nonce(
    session_id: &[u8; 16],
    sequence: u64,
) -> Result<[u8; 12], String>
Expand description

Return the injective 96-bit nonce for one sequence in a session-scoped key domain. The session prefix is carried through the wire object and is also bound into the AEAD key; it avoids a fixed nonce label while preserving the only property AES-GCM needs: uniqueness for each (key, nonce) pair. Sequence zero is reserved as the pre-publication state.