Computational cryptography › Hashes and symmetric ciphers
SYMMETRIC ENCRYPTIONPrimitive

AES-GCM, ChaCha20-Poly1305

In plain words

Encrypts data and detects any tampering, in one step.

The idea: Two jobs at once. A cipher turns the key and a never-repeating number (the nonce) into a random-looking stream that is mixed into the message, and a one-time MAC stamps the result with a tag. The receiver checks the tag before decrypting anything and rejects the message if a single bit changed. Reusing a nonce repeats the stream, which leaks the messages and, with AES-GCM, lets attackers forge tags.

Why it matters: Protects almost every HTTPS, SSH and VPN connection you make.

The details

On the map: authenticated encryption (also AES-CBC + HMAC)

Authenticated encryption encrypts and detects tampering in one step[1]. AES-GCM, fast with hardware support[2], and ChaCha20-Poly1305, fast in software[3], protect nearly all TLS, SSH, QUIC and WireGuard traffic. Older encrypt-then-MAC constructions such as AES-CBC with HMAC, used by Signal, also count.

Security comes from the cipher behaving like a random function plus a one-time MAC. Reusing a nonce with the same key is catastrophic[4].

Rests on

If any of these breaks, this breaks too.

If it falls

If this breaks, these break with it.

References

  1. Phillip Rogaway. Authenticated-encryption with associated-data. Proceedings of the 9th ACM conference on Computer and communications security, 2002. doi:10.1145/586110.586125
  2. M J Dworkin. Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC. National Institute of Standards and Technology, 2007. doi:10.6028/NIST.SP.800-38D
  3. Y. Nir and A. Langley. ChaCha20 and Poly1305 for IETF Protocols. RFC 8439, 2018. rfc-editor.org/rfc/rfc8439
  4. Hanno Böck, Aaron Zauner, Sean Devlin et al. Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS. USENIX WOOT 2016. usenix.org/conference/woot16/workshop-program/presentation/bock