Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Block Cipher Modes?

A block cipher mode defines how a cipher such as AES is applied to messages longer than one block. The mode, not the algorithm, usually decides whether an encryption scheme is actually secure.

Illustration for the cybersecurity term Block Cipher Modes
Home / Blog / Cybersecurity Terms / What Are Block Cipher Modes?
17 November 2026

What Are Block Cipher Modes?

What Are Block Cipher Modes?

AES encrypts 16 bytes. Your database row, your HTTP response, and your backup file are all considerably longer than 16 bytes. The mode of operation is the rule that closes that gap, and picking the wrong one has caused far more breaches than any weakness in AES itself.

Every mode answers three questions: how successive blocks relate to one another, whether a unique value such as an initialisation vector is required, and whether tampering is detected. The third question is the one teams most often forget to ask.

The Modes You Will Meet

ModeNeedsIntegrityUse it for
ECBNothingNoNothing
CBCUnpredictable IVNoLegacy interoperability only
CTRUnique nonceNoA building block, never alone
GCMUnique 96-bit nonceYesTLS, APIs, message payloads
CCMUnique nonceYesConstrained and wireless devices
XTSSector number as tweakNo, by designDisk and volume encryption
SIV / GCM-SIVNonce preferred, not criticalYesKey wrapping and nonce-risky systems

ECB: The Mode That Draws Pictures

Electronic Codebook encrypts each block independently with the same key, so identical plaintext blocks produce identical ciphertext blocks. The famous demonstration encrypts a bitmap of a penguin and leaves the penguin perfectly visible. In commercial systems the leak is less photogenic but just as real: repeated field values, padding patterns, and record boundaries are all exposed, and an attacker can cut and paste blocks between messages.

CBC: Chaining Without Integrity

Cipher Block Chaining XORs each plaintext block with the previous ciphertext block before encryption, starting from a random IV. It hides repetition, but it says nothing about whether the ciphertext arrived intact. Two consequences follow. Flipping a bit in one ciphertext block flips the same bit in the next plaintext block, which is enough to change an amount or a role name. And if the application reports padding errors differently from other errors, a padding oracle lets an attacker decrypt data byte by byte without the key — the attack Serge Vaudenay described in 2002, and the mechanism behind POODLE in 2014 and the long tail of Lucky 13 variants.

CTR: A Counter in Disguise

Counter mode encrypts a nonce plus a counter and XORs the result with the plaintext, turning AES into a stream cipher. It parallelises beautifully and needs no padding. It also fails catastrophically if a nonce repeats under one key, because the same keystream protects two different messages.

GCM: The Modern Default

Galois/Counter Mode is CTR plus a fast authenticator built on multiplication in a finite field. Decryption fails outright if a single bit changed, and additional data such as headers can be authenticated without being encrypted. It is the dominant mode in TLS 1.2 and TLS 1.3, IPsec, and most cloud encryption APIs.

Its weakness is nonce management. With random 96-bit nonces, collisions become a real risk after roughly 2^32 messages under one key; with a counter that resets when a container restarts, the collision arrives immediately. Nonce reuse in GCM leaks the authentication subkey, which lets an attacker forge messages rather than merely read one. If your architecture cannot guarantee unique nonces, AES-GCM-SIV from RFC 8452 degrades gracefully instead.

XTS: Built for Sectors

Disk encryption cannot expand data — a 512-byte sector must still occupy 512 bytes — so there is no room for an authentication tag. XTS uses the sector number as a tweak so that identical sectors encrypt differently, and accepts that modification cannot be detected. BitLocker, FileVault, LUKS, and VeraCrypt all use it, which is why full disk encryption protects a stolen laptop but not a running one.

Choosing Without Regret

Three rules cover almost every case. Use an authenticated mode unless something physically prevents it. Let a reviewed library generate and track nonces rather than writing that logic yourself. And treat any encryption code that produces ciphertext the same length as the plaintext, with no tag and no IV, as a finding rather than a feature.

Mode misuse is quiet. Nothing crashes, the data decrypts, and the test suite passes, so it survives until someone looks specifically for it. Our web application security services include reviewing how applications call their crypto libraries, which is usually where the defect lives rather than in the library itself.

FAQ – Frequently Asked Questions

Which Mode Should I Use for a New Application?

AES-GCM for anything travelling over a network or stored as a discrete record, and ChaCha20-Poly1305 where the hardware lacks AES acceleration. Use XTS only for raw block devices. If your platform offers a high-level interface such as libsodium’s secretbox or a cloud key management service, prefer it: it chooses the mode and manages nonces for you.

Is CBC Mode Insecure by Itself?

CBC provides confidentiality when the IV is unpredictable and unique, but it offers no integrity, so applications must add a separate MAC and verify it before decrypting. Getting that order wrong reintroduces padding oracles. Because an authenticated mode does the same job with fewer ways to fail, new designs should not use CBC at all.

What Exactly Goes Wrong If a GCM Nonce Repeats?

Two things, and the second is worse. The XOR of the two ciphertexts reveals the XOR of the plaintexts, which often recovers both. More seriously, the repeated nonce lets an attacker solve for the authentication subkey, after which they can forge valid tags for messages you never sent. Treat nonce uniqueness as a hard requirement, not best practice.

Why Does Disk Encryption Not Detect Tampering?

Because an authentication tag needs extra bytes and a sector has none to spare. XTS makes each sector encrypt differently using its position, which prevents copying sectors around, but an attacker with physical write access can still corrupt data. Combine full disk encryption with Secure Boot and integrity measurement if that threat is in scope.

Related Terms

You May Be Interested In These

What Is Hashing?

Cybersecurity Terms

17 November 2026

What Is Hashing?

Read More
What Is Hospital Information System Security?

Cybersecurity Terms

17 November 2026

What Is Hospital Information System Security?

Read More
What Is Kerberos Authentication?

Cybersecurity Terms

17 November 2026

What Is Kerberos Authentication?

Read More