cryptographic-nonce · shipping · also Nonce

Cryptographic nonce

A cryptographic nonce is an input value whose required uniqueness scope is specified by the cryptographic construction that uses it.

Related Observatory article: Read on hesela.com

For RFC 5116's AES-GCM profiles, encryption must not reuse a nonce under one key; repeated decryption is different. Those profiles fix the nonce at 12 octets. Section 3.2 recommends support for a 4-octet counter, giving 2^32 values per fixed field; distinct encryptors sharing a key need distinct fixed fields. [1]

VM rollback can cause reuse by restoring earlier encryption state. [1] SP 800-38D likewise caps a key at 2^32 encryptions unless only deterministic 96-bit IVs are used. [4] XTS sector-number tweaks have a different contract and must not be treated as GCM nonces; the plain64 generator uses the sector as a 64-bit value, and the cited disk-encryption design recommends at least 128 bits for its stored random IV. [2]

Relations

related
Authenticated encryption, XTS-AES, Storage snapshot, Replay attack, ZFS raw send, AES-GCM-SIV

Advantages

  • A counter-based nonce needs only a per-key sequence, not a random source, and the counter may skip values without breaking uniqueness. [1]

Limitations

  • A nonce is not itself a freshness policy that rejects old, valid ciphertext. [1]
  • For CBC and CFB, an IV need not be secret but must be unpredictable before it is generated for the plaintext; later storage beside ciphertext is not itself a violation. [5]

Citations

  1. RFC 5116: nonce requirements, GCM reuse and VM rollback, sections 2.1, 3.1, 5.1.1 and 8 (accessed 2026-10-23)
  2. Broz, Patocka and Matyas: Practical cryptographic data integrity protection with full disk encryption, 2018, sections 2.4 and 3.3 (accessed 2026-10-23)
  3. NIST SP 800-38D: GCM and GMAC, IV lengths and section 8.3 invocation limit (accessed 2026-10-23)
  4. NIST SP 800-38A: CBC/CFB IV requirements and Appendix C on generation (accessed 2026-11-21)

Further reading

  1. Hesela: Nonce reuse is not ciphertext replay (accessed 2026-10-15)
Sources & caveats
  • rfc5116 is RFC 5116, re-read for the 12-octet nonce length, section 3.2 nonce formation and the VM rollback warning in section 8.
  • broz2018 is the 2018 arXiv paper on authenticated full-disk encryption, re-read for the plain64 generator, the GCM reuse warning and the 128-bit random-IV guidance.
  • sp800-38d is NIST SP 800-38D, read for the 96-bit IV recommendation and the section 8.3 invocation limit.
  • The dm-integrity entry links here because its per-sector metadata can hold the random IVs whose size and reuse rules are described here.
  • The IV secrecy statement and four-octet counter scope were corrected against SP 800-38A Appendix C and RFC 5116 section 3.2 on 2026-11-21.
  • The general IV correction does not endorse the paper's random-IV generator for CBC; that paper restricts the generator's supported modes. [2]

JSON: /data/terms/cryptographic-nonce.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Cryptographic nonce. Hesela. 2026-11-21. https://hesela.dev/terms/cryptographic-nonce/