AES-128-GCM-SIV
Nonce-misuse-resistant AES mode using POLYVAL and synthetic IVs (RFC 8452)
About AES-128-GCM-SIV
AES-128-GCM-SIV is one of 2 AES-GCM-SIV variants in the NextSSL registry, an authenticated encryption (AEAD) scheme. It uses a 16-byte (128-bit) key, a 12-byte nonce and a 16-byte (128-bit) authentication tag. Its registry entry cites RFC 8452. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
AES-GCM-SIV is a nonce-misuse-resistant AEAD that derives per-nonce keys, authenticates with the POLYVAL hash and uses the resulting tag as the counter-mode IV. If a nonce is repeated, the only leak is whether two messages with the same nonce and associated data were identical.
The mode follows the synthetic-IV approach: it first computes an authenticator over the associated data and plaintext, then uses that value as the starting counter for encryption. For each nonce it derives a fresh message-authentication key and encryption key from the master key with AES, which improves the security bounds compared with SIV designs that use a fixed key.
POLYVAL is a little-endian relative of GHASH and runs efficiently with carry-less multiplication instructions, so AES-GCM-SIV reaches speeds close to AES-GCM for encryption. Decryption is slightly cheaper than encryption, and encryption is necessarily two-pass. NextSSL provides the AES-128 and AES-256 instances specified in RFC 8452.
History
2017–2018AES-GCM-SIV published by Shay Gueron, Adam Langley, Yehuda Lindell
Specified in RFC 8452
How it works
- Derive a per-nonce authentication key and encryption key by encrypting nonce-dependent blocks under the master key.
- Compute POLYVAL over the padded associated data, the plaintext and a length block.
- XOR the nonce into the hash output, clear the top bit and encrypt it with AES to obtain the tag.
- Use the tag (with its top bit set) as the initial counter block and encrypt the plaintext in counter mode.
Security notes
Nonce reuse does not break confidentiality or integrity beyond revealing equality of repeated (nonce, associated data, plaintext) tuples. Nonces should still be unique where possible, as the strongest bounds assume it.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| nonce | 12 | Nonce / IV |
| tag | 16 | Authentication tag |
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
key, nonce = ns.random(16), ns.random(12)
ct = ns.call("aead_seal", "aes-128-gcm-siv", None, key, nonce, b"header", b"secret")[0] # ct || tag
pt = ns.call("aead_open", "aes-128-gcm-siv", None, key, nonce, b"header", ct)[0]
nextssl_aead_seal("aes-128-gcm-siv", NULL, key, nonce, aad, pt, out); /* writes ct || tag */
nextssl_aead_open("aes-128-gcm-siv", NULL, key, nonce, aad, ct, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_aead_in(reg::all(), Policy::Safe, "aes-128-gcm-siv", &Params::new())?;
let ct = alg.seal(&key, &nonce, b"header", b"secret")?;
let pt = alg.open(&key, &nonce, b"header", &ct)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other AES-GCM-SIV variants
1Similar names
Looking for something else?More authenticated encryption
All 392Frequently asked questions
What is AES-128-GCM-SIV?
AES-128-GCM-SIV is an AEAD in the AES-GCM-SIV family. AES-GCM-SIV is a nonce-misuse-resistant AEAD that derives per-nonce keys, authenticates with the POLYVAL hash and uses the resulting tag as the counter-mode IV.
What are the AES-128-GCM-SIV sizes?
In NextSSL, AES-128-GCM-SIV uses: key 16 bytes, nonce 12 bytes, tag 16 bytes.
Who designed AES-128-GCM-SIV and when?
AES-128-GCM-SIV belongs to the AES-GCM-SIV family, first published in 2017 by Shay Gueron, Adam Langley, Yehuda Lindell. Its origin: RFC 8452.
Which standards define AES-128-GCM-SIV?
AES-128-GCM-SIV is referenced by RFC 8452.
Is AES-128-GCM-SIV safe to use?
AES-128-GCM-SIV is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other AES-GCM-SIV variants are there?
NextSSL also registers aes-256-gcm-siv in the AES-GCM-SIV family.
Related families
Counter-mode AES with a GHASH polynomial MAC; the default AEAD of TLS and IPsec
AES-SIVDeterministic authenticated encryption from CMAC-based S2V and AES-CTR (RFC 5297)
AESThe Advanced Encryption Standard: the world's default 128-bit block cipher
GHASHThe GF(2^128) polynomial hash at the core of AES-GCM and GMAC