← Back to section · Foundations of Cryptography

The AEAD Idea: Encryption Must Ship With Tamper Resistance

Encryption that provides confidentiality without integrity has been dismantled again and again by padding oracles and tampering attacks. AEAD merges confidentiality and integrity into a single primitive and signs the context in as associated data — the default shape of encryption in modern protocols.

Published 22 November 2026 · 5 min read · PQ Frontier

The AEAD Idea: Encryption Must Ship With Tamper Resistance
AI-generated site artwork
Video explainer · Symmetric encryption: blocks and modes

Beginners in cryptography tend to equate “encryption” with “secrecy”: turn plaintext into unintelligible noise and the job is done. But the recurring accidents of real systems show that noise is only the entry ticket. A ciphertext that can be freely tampered with, rearranged, or replayed is a cash machine in an attacker’s hands: flip a few bytes, watch how the decryptor reacts, and the differences in its errors let plaintext be unscrewed one notch at a time. AEAD — authenticated encryption with associated data — is the formal answer of academia and engineering to that string of accidents: an encryption primitive must deliver confidentiality and integrity together, neither being optional.

Why confidentiality alone is not enough

Consider what an attacker can do with a “confidentiality-only” ciphertext. First, malleability: CTR and stream-cipher ciphertexts correspond bit-by-bit to the plaintext, so flipping a ciphertext bit flips the corresponding plaintext bit — an attacker can tamper in a targeted way (flip a digit of a transfer amount, alter a permission field) without knowing the plaintext. CBC-style modes have their own tampering channels. Second, oracles: the decryptor reacts differently to valid and invalid ciphertexts (padding right or wrong, format passing or failing, error timing), and an attacker aggregates these one-bit feedbacks over many probes into full plaintext recovery — padding oracle attacks breached TLS, IPsec, and XML encryption implementations for years in exactly this way. Third, rearrangement and replay: an old ciphertext resent verbatim, or blocks spliced from different messages, is indistinguishable to the receiver.

These attacks share a trait: none of them touches the algorithm itself; all exploit the structural hole that “ciphertext can be manipulated without the system noticing.” The conceptual fix is simple — attach a key-generated authentication tag so any tampering fails verification. The difficulty lies in composition order and detail: encrypt-then-MAC or MAC-then-encrypt, what data the tag covers, and never decrypting before reporting an error. History has failures on record for both Encrypt-and-MAC and MAC-then-Encrypt; the settled consensus is to build the two properties as one indivisible primitive, designed and proven as a whole by cryptographers. That is AEAD.

The shape of the AEAD interface

An AEAD algorithm takes four inputs: a key, a nonce, the plaintext, and associated data (AD), and outputs ciphertext plus an authentication tag (usually appended to the ciphertext). Decryption is the strict inverse: recompute and compare the tag first; only if the tag verifies is plaintext released, otherwise the whole thing errors out and not one byte is given up. This “verify before release” order is the lifeline of AEAD security — it seals the oracle at the interface level: an invalid ciphertext earns no plaintext-related feedback from the decryptor, only a refusal.

The representative algorithms have distinct characters. AES-GCM is extremely fast with hardware acceleration and powers TLS 1.3 and storage encryption, but the price of nonce reuse is catastrophic (see the previous article). ChaCha20-Poly1305 is fast and steady in software, a regular on mobile. AES-CCM is simply structured and common in constrained devices and older standards such as 802.11. More recent designs such as AES-GCM-SIV add “nonce-misuse resistance”: even if a nonce repeats occasionally, only whether two plaintexts are equal leaks, demoting the accident from collapse to manageable. When choosing, this “cost of being used wrong” deserves a line in the evaluation next to performance.

Associated data: not encrypted, but binding

AD is the most underestimated part of the AEAD interface. It is the data that needs no secrecy but must be tamper-proof: protocol versions, message sequence numbers, sender identities, packet headers, transaction context. Feeding AD into the tag computation welds the ciphertext to its context: move the ciphertext to another message, another sequence number, or another protocol, and the tag fails immediately. Replay resistance comes from sequence numbers in AD, downgrade resistance from versions in AD, cross-protocol separation from protocol identifiers in AD — many protocol-level security properties ultimately rest on the seemingly minor decision of what goes into AD.

One more discipline inside the interface: commitment

Recent research has added an easily missed property to AEAD: key commitment. Standard AEAD guarantees only that “the tag is valid under the given key”; it does not guarantee that a ciphertext can be opened by only one key — in principle, a ciphertext can be crafted that decrypts successfully under two different keys. In single-recipient settings this is harmless, but in multi-party protocols, group messaging, and certain content-distribution designs, this “one ciphertext, two faces” becomes an attack surface (the family of so-called invisible-salamander attacks). Newer designs therefore list commitment as an optional bonus property, welding the key itself into the ciphertext. It is a reminder that the AEAD contract is still being amended — confidentiality and integrity are the floor, not the whole text.

Adjacent to it is the engineering of nonce management: counter-style nonces for long connections, random nonces for short messages with the collision probability actually computed, and misuse-resistant algorithms when uniqueness genuinely cannot be guaranteed. Once AEAD tidies up the cryptography, everything left is this kind of systems engineering — which is precisely where accidents most love to happen.

The default shape of modern protocols

TLS 1.3 made a landmark decision: only AEAD suites are allowed; encryption options without authentication were deleted wholesale. QUIC, WireGuard, the Signal protocol, and transparent disk and database encryption all follow without exception. The signal of this convergence is unmistakable: the era of buying confidentiality and integrity separately is over. The designer’s questions change accordingly — no longer “which algorithm encrypts” but “how is nonce uniqueness guaranteed, what context is welded into AD, and how are keys rotated.” The algorithm is just a primitive; AEAD is the complete contract that modern symmetric encryption hands to the layers above. One practical reminder to end with: the most common AEAD mistakes are not in algorithm selection but in handing the nonce to a random generator and forgetting it, and in leaving AD empty — the former eventually collides, and the latter voluntarily gives up a free layer of context-binding protection.

Tags: AEADAuthenticated EncryptionIntegrityAES-GCM