Skip to Content
oxcrypto

AES-GCM-SIV

Nonce-misuse-resistant AES-GCM-SIV with AES-128 or AES-256.

import os

from oxcrypto.aead.aes_gcm_siv import AES_GCM_SIV

key = AES_GCM_SIV.AES256.generate()
nonce = os.urandom(12)
sealed = key.encrypt(nonce, b"message", associated_data=b"header")
plaintext = key.decrypt(nonce, sealed, associated_data=b"header")

Variants: AES128, AES256.

Nonce reuse only reveals whether two messages were equal.

StandardRFC 8452 (Informational, IRTF CFRG).
Crateaes-gcm-siv 0.12.1
MaturityStable release. No published audit (aes-gcm-siv says none has been performed).
MSRVBuilds with Rust 1.88.
Zeroizationaes-gcm-siv, aes and polyval with zeroize are written to wipe the key-generating AES key, the per-message derived keys and the POLYVAL state. oxcrypto has not verified this independently.
ExperimentalNo
Test vectorsWycheproof aes_gcm_siv_test.json