Authenticated encryption

AES-128-GCM-SIV

Nonce-misuse-resistant AES mode using POLYVAL and synthetic IVs (RFC 8452)

standard Safe API

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–2018
  1. AES-GCM-SIV published by Shay Gueron, Adam Langley, Yehuda Lindell

  2. Specified in RFC 8452

How it works

  1. Derive a per-nonce authentication key and encryption key by encrypting nonce-dependent blocks under the master key.
  2. Compute POLYVAL over the padded associated data, the plaintext and a length block.
  3. XOR the nonce into the hash output, clear the top bit and encrypt it with AES to obtain the tag.
  4. 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

Systems where nonce uniqueness is hard to guarantee, such as distributed or stateless encryptorsEncrypting keys, tokens and small recordsDefence in depth alongside random 96-bit nonces

Sizes

FieldBytesMeaning
key16Secret key
nonce12Nonce / IV
tag16Authentication 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]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other AES-GCM-SIV variants

1

Frequently 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.