- Symmetric Key Crypto · Cryptography
LLearnViaNotes @learnvianotes· 2 min read Stream vs Block ciphers, operational modes (ECB vs CBC vs GCM), and padding standards.
1. Stream Ciphers vs. Block Ciphers
2. Cipher Modes of Operation
| Mode | Description | Parallelization | Security Level & Rationale |
|---|
| ECB (Electronic Codebook) | Encrypts each block independently. Identical plaintext blocks yield identical ciphertext blocks. | Yes (both Encrypt & Decrypt) | UNSAFE: Leaks structural patterns (e.g., the ECB Penguin image leak). Never use in production. |
| CBC (Cipher Block Chaining) | XORs each plaintext block with the preceding ciphertext block before encryption. Requires an IV. | Decrypt only | LEGACY: Vulnerable to Padding Oracle Attacks (Manger's/Lucky13) if error messages leak timing details. |
| CTR (Counter Mode) | Turns a block cipher into a stream cipher by encrypting an incrementing counter value. | Yes (both Encrypt & Decrypt) | SECURE: High performance, but does not check data integrity. |
| GCM (Galois/Counter Mode) | Combines CTR mode with a Galois MAC tag computation to provide AEAD (Authenticated Encryption). | Yes (both Encrypt & Decrypt) | RECOMMENDED: Guarantees confidentiality and data integrity. Modern standard for TLS/Web. |
3. Padding Standards (PKCS#7)
4. AES Block Structure and Rounds
Free for students and teachers
Write notes like this one
Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.
Something wrong with this note? Open it to report