concept Security & reliability
AEAD nonce reuse and authenticated encryption boundaries
A valid tag does not prove a nonce was used only once. Compare two encryptions to see when a key-and-nonce pair repeats, and why the absence of a repeat in one pair is a much narrower finding.
What it means
If an authenticated encryption algorithm requires a distinct nonce for each encryption under a key, using the same key and nonce twice breaks that requirement. A valid authentication tag does not make reuse safe. For AES-GCM, for example, encrypting two different messages with the same key and nonce can compromise both the secrecy of the messages and the ability to detect tampering.
AEAD stands for authenticated encryption with associated data. A nonce is an input to encryption; its requirements depend on the algorithm. For a scheme that requires nonce uniqueness, the important distinction is between two questions: “Did this record's tag check pass?” and “Has this key been used with this nonce before?” The first is a check on one record. The second requires information about more than one encryption.
Try it
Simulation: compare two separate encryptions, Message A and Message B. The labels below stand for identities, not secret values.
AEAD nonce reuse and authenticated encryption boundaries
Illustrate why nonce uniqueness is a safety condition, not optional randomness
Same key and nonce reused violates the modeled nonce-uniqueness condition; do not infer safety from a valid tag.
Record A
- KeyK1
- NonceN1
Record B
- KeyK1
- NonceN1
Decision
- Pair relationRepeated pair
- Authentication observationNot evaluated
- OutcomeSTOP — reuse
Key and nonce labels are symbolic identities, not cryptographic material. A repeated pair violates the scoped condition regardless of the tag selection. Distinct pairs do not establish uniqueness across all messages.
Evaluated inputs
- Required scenario evidence
- provided
- Key relation
- same
- Nonce relation
- same
Not evaluated: Authentication result
Symbolic comparison for nonce-unique schemes; no actual keys/ciphertexts, cryptographic attack, forgery or algorithm implementation.
About this model
The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.
Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.
| Encryption | Key | Nonce |
|---|---|---|
| Message A | K1 | N1 |
| Message B | K1 | N1 |
Start with Required scenario evidence set to provided. Both relations are same, so the pair (K1, N1) appears twice. The result is reuse. Although Authentication result is set to valid, the model does not use that selection: the repeated pair is enough to establish the violation.
Change only Nonce relation to different. Think of Message B as using (K1, N2). Now the pairs differ, and the model takes the stipulated valid tag result into account. The result changes to conditional: these two encryptions did not repeat a key-and-nonce pair. Nothing in that comparison tells you whether an earlier message also used (K1, N2). Reset restores the original selections and the reuse example.
What the tag can tell you
Consider the other way the pairs can differ: set Key relation to different and Nonce relation to same. Because the keys differ, the model does not need to examine the nonce relation. The selected nonce is not evidence in this decision. If you select invalid for the authentication result, the result is reject: there is no same-key reuse between the two records, but authentication failed. If you select unknown instead, the model has no tag result on which to base acceptance or rejection.
Missing scenario evidence is a different limit. With Required scenario evidence set to missing, the model does not compare the keys or nonces or consider the tag. It returns insufficient, even if the visible selections look like a repeated pair. All inputs are symbolic choices: the simulation neither encrypts a message nor verifies a tag.
The visual pair comparison has a deliberate skipped-input case. With different keys, the nonce relation does not need evaluation to distinguish the pairs. With the same key and same nonce, even a missing tag observation cannot undo the established reuse violation. Do not interpret the unexamined selection as a successful authentication check.
In practice
First identify the construction. For the ChaCha20-Poly1305 construction in RFC 8439 §2.8, the nonce is 96 bits and must be distinct for every encryption under the same key. Length and uniqueness are separate requirements: a second nonce can be the right size and still equal the first. Random selection from a finite set leaves a possibility of repetition; “chosen at random” is not evidence that a value has never been used.
A counter raises a different question: what happens after a restart? If the key stays the same but the counter starts over, it can issue a value used before the crash. RFC 5116 §3.1 discusses saving nonce progress. In its checkpoint example, as corrected by verified erratum 4268, the new checkpoint must be saved before values from the next reserved range are used. Without evidence of the saved state, uniqueness across that restart is unknown, not proved or disproved.
For a real service, look for the documented per-key rule and evidence of how the implementation maintains it, including across restarts. Stop if the construction, supported version, or necessary facts are unknown; do not change encryption settings or stored data on the strength of this example. A repeated pair can disprove uniqueness, but one distinct pair cannot establish it for the life of a key. That is why a history of nonce use, not a passing tag, matters to this question.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Can a nonce repeat under a different key?
The stated uniqueness requirement is scoped to the key, subject to the algorithm.
Is random generation a guarantee?
No. Random draws from a finite nonce space can collide. For an AEAD algorithm with a nonzero nonce requirement, the design must satisfy that algorithm's per-key nonce and invocation constraints. The symbolic lab does not generate or validate cryptographic keys or nonces.
Does encryption alone authenticate?
No. Confidentiality alone is not evidence that data is authentic. AEAD combines confidentiality with authentication under its algorithm and key/nonce requirements.
Do all AEAD algorithms have identical nonce requirements?
No. Nonce length, uniqueness requirements and permitted usage depend on the algorithm. The example compares two symbolic key/nonce identities and models a nonce-unique scheme, not all authenticated encryption constructions. Consult the algorithm’s exact specification.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- RFC 5116: An Interface and Algorithms for Authenticated Encryption
Sections 2.1, 3.1 and 5.1.1. AEAD nonce constraints are algorithm-specific. Reusing an AES-GCM nonce under the same key compromises security. Random finite-space draws can collide; the lab uses symbolic identifiers.
Checked .
- RFC 8439: ChaCha20 and Poly1305 for IETF Protocols
§2.8. ChaCha20-Poly1305 specifies a 96-bit nonce that is distinct for each invocation under the same key. The symbolic nonce check does not implement any cipher.
Checked .