$linuxjunkies
>

nonce

also: number used once

A nonce (number used once) is a random or unique value generated for a single use in cryptographic operations to prevent replay attacks and ensure security.

A nonce is a cryptographic concept essential for securing communications and preventing attackers from reusing captured data. It's a unique value—typically random or derived from a timestamp—that's used exactly once in a security context, then discarded.

In network security, nonces prevent replay attacks where an attacker captures and resends a valid encrypted message. For example, during SSH authentication or TLS handshakes, the server sends a nonce to the client, which must include it in the response. If an attacker later replays the old response, it will have the wrong nonce and be rejected.

Linux systems use nonces in various scenarios: the challenge-response authentication mechanism requires the client to prove knowledge of a secret by responding to a server-generated nonce, and cryptographic libraries like OpenSSL generate nonces for encryption modes that need them. Even file integrity tools may use nonces to ensure each verification is unique.

Related terms