XAES-256-GCM
Encrypt with AES-256-GCM using a 192-bit nonce that is can be chosen at random.
import os
from oxcrypto.aead.xaes_256_gcm import XAES_256_GCM
key = XAES_256_GCM.XAES_256_GCM.generate()
nonce = os.urandom(24)
sealed = key.encrypt(nonce, b"message", associated_data=b"header")
plaintext = key.decrypt(nonce, sealed, associated_data=b"header")Variants: XAES_256_GCM.
Keys are 32 bytes and the nonce is 24 bytes.
| Standard | C2SP XAES-256-GCM specification (community specification, not a NIST or IETF standard). |
| Crate | xaes-256-gcm 0.1.0 |
| Maturity | Stable release. No published audit. |
| MSRV | Builds with Rust 1.88. |
| Zeroization | xaes-256-gcm and aes-gcm with zeroize are written to wipe the derived key K1, the AES round keys and the per-message AES-GCM state. oxcrypto has not verified this independently. |
| Experimental | No |
| Test vectors | xaes-256-gcm crate vectors (from the C2SP specification) |