thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Commonly confused · Security Fundamentals & Crypto

ECB vs CBC vs GCM: Block Cipher Modes Compared

ECB encrypts each block independently, so identical plaintext blocks leak as identical ciphertext. CBC chains blocks with an IV to hide patterns, and GCM is a counter-based authenticated mode that adds built-in integrity and is the modern default.

ECB Mode

vs

CBC Mode

vs

GCM Mode

ECB ModeCBC ModeGCM Mode
Pattern hidingNo, identical blocks produce identical outputYesYes
IV or nonceNoneRandom, unpredictable IVUnique nonce, never reused
Integrity built inNoNo, needs a separate MACYes, authenticated encryption (AEAD)
Parallel encryptionYesNo, sequentialYes
PaddingRequiredRequired (padding oracle risk)Not required
RecommendationAvoidLegacy, acceptable with a MACPreferred, used in TLS 1.2/1.3
Remember it

ECB shows the penguin, CBC hides it, GCM hides it and seals the envelope.

Exam tip

Look for the word 'authenticated' or 'AEAD': that means GCM. A question about visible patterns in encrypted images points to ECB.

Tested on

More Security Fundamentals & Crypto look-alikes