AES-GCM
The most widely deployed AEAD: AES in counter mode for encryption plus a GHASH polynomial MAC, specified in NIST SP 800-38D.
AES-GCM encrypts with AES in counter mode and authenticates with GHASH, a polynomial MAC over GF(2^128). It is fast where AES-NI and carry-less multiply instructions exist, which is almost every server CPU, and it is the default AEAD in TLS, cloud KMS products and most libraries.
It takes a 96-bit nonce. Reusing a nonce under the same key is catastrophic: the keystream repeats, so the XOR of two plaintexts leaks, and the attacker can recover the GHASH key and forge tags for arbitrary messages. With random 96-bit nonces NIST caps usage at 2^32 messages per key to keep collision probability acceptable.
Mitigations: counter-based nonces with a single writer, rotating keys before the message limit, deriving a fresh key per message or file, or using AES-GCM-SIV (RFC 8452), which degrades gracefully on nonce reuse. GCM is also not key-committing: one ciphertext can decrypt validly under two chosen keys, which has broken real systems that try multiple keys.
Learn it properly
Compared
Also used in
- Cryptography you actually needSecEng · Foundations of Security EngineeringFree
- Secure design principles that still holdSecEng · Foundations of Security EngineeringFree
- TLS and PKI in practiceSecEng · Network & Infrastructure SecurityFree
- Design a secure file sharing serviceHLD · Design problems: communication securityFree
- Data protection: KMS, envelope encryption, tokenisationSecEng · Cloud & Platform SecurityPro
- Deletion and DSAR pipelinesSecEng · Privacy engineeringPro
- Design a PCI tokenisation vaultHLD · Design problems: data securityPro
- Design a data deletion serviceHLD · Design problems: data securityPro