100% Clientseitige Berechnung • Keine Server-Logs • Sofortige Ausführung
Curious TechieEntwickler-Toolbox
Cryptography & CiphersNIST SP 800-38D / RFC 7515Verified Terminology

Cryptographic Nonce

Direkte Antwort

An arbitrary number or byte string intended to be used only once within a cryptographic communication to protect against replay attacks and ensure encryption uniqueness.

Entity Relationships (GEO Conceptual Hierarchy)

Taxonomy Model
Relational Knowledge Graph Sequence
Cryptographic Nonce→
uniqueness constraint→
single-use pseudo-random value→
replay attack mitigation→
AES-GCM initialization vector→
CSP inline execution authorization
Cryptographic Nonce
•>uniqueness constraint
•>single-use pseudo-random value
•>replay attack mitigation
•>AES-GCM initialization vector
•>CSP inline execution authorization

Technical Explanation & Operational Mechanics

The term "nonce" stands for "number used once". In authenticated symmetric encryption modes like AES-GCM, the nonce acts as the Initialization Vector (IV). Reusing an IV with the same AES key completely compromises the authentication tag and can leak the underlying Galois hash key. In web security, nonces are also generated per HTTP response and embedded into Content Security Policy (CSP) headers so that only inline scripts matching the exact nonce value are permitted to execute, thwarting injection attacks.

Technical Example & Practical Implementation

CSP Nonce Validation vs AES-GCM Initialization Vector

Two core applications of cryptographic nonces in web development

<!-- Application 1: Content Security Policy Script Whitelisting -->
<!-- HTTP Response Header: -->
Content-Security-Policy: script-src 'nonce-edg893r439fh8' 'self';

<!-- Valid script executed: -->
<script nonce="edg893r439fh8">
  console.log("Authorized application code running");
</script>

<!-- Injected attacker script blocked: -->
<script>
  alert("Blocked: missing nonce!");
</script>