Skip to main content

decrypt_event_keyed

Function decrypt_event_keyed 

Source
pub fn decrypt_event_keyed(
    group_key: &[u8; 32],
    nonce: &[u8; 12],
    tag: &[u8],
    ciphertext: &[u8],
    keyed_leaf: &str,
    epoch: u64,
) -> Result<Vec<u8>, String>
Expand description

Decrypt an event encrypted with encrypt_event_keyed (keyed-topic + epoch AAD). The caller must supply the same keyed_leaf + epoch used at encrypt time — a mismatch (cross-topic or cross-epoch replay) fails AEAD auth.