Course contentsShow
← Security
Lesson 125 of 3,0523. Symmetric Cryptography Deep DiveFree lesson

AES-GCM: Galois/Counter Mode

The most widely used AEAD mode combining CTR encryption with GMAC authentication.

AES-GCM: Galois/Counter Mode

What you'll learn: How AES-GCM combines encryption and authentication into one efficient, widely-trusted operation.

The Core Idea

AES-GCM (Galois/Counter Mode) is the most popular AEAD (Authenticated Encryption with Associated Data) mode in modern cryptography. It solves the "encrypt-then-MAC" problem by doing both jobs simultaneously in a single, standardized package.

Think of it like a secure envelope that both scrambles your letter (encryption) and adds a tamper-evident seal (authentication) in one smooth operation—no need to apply them separately.

How It Works

GCM combines two components you've already learned:

  1. CTR mode encryption — Your plaintext is encrypted by XORing it with a keystream generated from an incrementing counter, turning the block cipher into a stream cipher
  2. GMAC authentication — A specialized MAC (Message Authentication Code) using Galois field mathematics to verify both the ciphertext and any additional data you want to protect (like headers or metadata)

The "associated data" feature is powerful: you can authenticate information without encrypting it. For example, in HTTPS, packet headers need integrity checking but must remain readable by routers.

Why It Dominates

AES-GCM is the gold standard because:

  • Fast: Hardware acceleration (AES-NI) makes it blazingly efficient
  • Parallel: CTR mode allows encrypting multiple blocks simultaneously
  • Secure: When implemented correctly, it provides strong confidentiality and authenticity
  • Standardized: Required by TLS 1.3, used in disk encryption, VPNs, and countless protocols

The Critical Requirements

GCM's security depends on never reusing a nonce with the same key. Reuse catastrophically breaks both encryption and authentication—a vulnerability we'll explore in the next lesson.

Key Takeaway: AES-GCM is the industry-standard AEAD mode that efficiently combines CTR encryption with GMAC authentication, providing both confidentiality and integrity in one operation.