Nonce

A number used once: a value that must not repeat within a defined scope, used to prove messages are fresh against replay and to keep encryption under one key unique.

A nonce, short for number used once, is a value that a protocol or cipher requires to be unique within a stated scope, such as all messages under one key or all authentication attempts with one server. It does not have to be secret, and in some designs it need not be unpredictable; what matters is that it does not repeat where the design forbids repetition.

Nonces serve two main purposes. In authentication protocols they provide freshness against replay attacks: a verifier sends a new nonce as a challenge, and a response that includes it shows it was produced for this exchange rather than recorded from an earlier one. OpenID Connect uses a nonce this way, binding the returned ID token to the request that asked for it. In encryption, modes such as counter mode and GCM take a nonce as their initialization vector; reusing one under the same key can expose relationships between plaintexts and, in GCM, allow forged authentication tags.

Exam relevance: a scenario is likely to describe a captured message replayed successfully, or ciphertexts that reveal relationships because a value was repeated. Candidates are expected to identify a missing or reused nonce as the cause, and to know that a nonce is valued for its uniqueness, not its secrecy.