EC-Council Certified Encryption Specialist cheat sheet
EC-Council Certified Encryption Specialist · Keep the key ideas within reach.
Introduction and History of Cryptography
Cryptography provides confidentiality; cryptanalysis studies breaking it; steganography hides the existence of a message rather than its content.
Kerckhoffs's principle: security must depend on the key, not on the secrecy of the algorithm.
Classical substitution ciphers (Caesar, Atbash, Vigenere) preserve letter frequency; frequency analysis breaks monoalphabetic ciphers.
Transposition ciphers rearrange letters (e.g., rail fence, columnar transposition) and preserve the original letter frequencies.
The one-time pad is information-theoretically secure only if the key is truly random, as long as the message, used once, and kept secret.
Steganography examples: least significant bit insertion in images, null ciphers, and whitespace encoding.
Cryptographic goals: confidentiality, integrity, authentication, non-repudiation; hashing addresses integrity, signatures address non-repudiation.
Historical milestones: Caesar cipher (substitution), Vigenere (polyalphabetic), Enigma (rotor machine), DES (1970s), AES (2001).
Symmetric Cryptography & Hashes
Symmetric algorithms use one shared secret key for both encryption and decryption; key distribution is the main weakness.
Block ciphers (DES, 3DES, AES, Blowfish, Twofish) process fixed-size blocks; stream ciphers (RC4, ChaCha20) XOR a keystream with plaintext.
DES: 56-bit key, 64-bit block; 3DES applies DES three times with two or three keys; AES: 128-bit block, key sizes 128/192/256 bits.
AES is a substitution-permutation network; DES is a Feistel network. Modes: ECB (insecure, deterministic), CBC (needs IV), CTR (stream-like), GCM (authenticated).
Hash properties: preimage resistance, second-preimage resistance, collision resistance, avalanche effect, fixed-length output.
Common hashes: MD5 (128-bit), SHA-1 (160-bit), SHA-256 (256-bit), SHA-3 (Keccak). MD5 and SHA-1 are broken for collision resistance.
HMAC combines a hash with a secret key for message authentication; it is not the same as a digital signature.
Key management: key escrow, key rotation, and separation of duties; never reuse an IV with the same key in CBC or CTR.
Number Theory and Asymmetric Cryptography
Modular arithmetic: a ≡ b (mod n) means n divides (a − b); gcd(a, n) = 1 means a is invertible modulo n.
Euler's totient φ(n): for prime p, φ(p) = p − 1; for n = pq, φ(n) = (p − 1)(q − 1).
Euler's theorem: a^φ(n) ≡ 1 (mod n) when gcd(a, n) = 1; Fermat's little theorem is the prime case.
RSA: n = p·q, φ(n) = (p−1)(q−1), choose e with gcd(e, φ(n))=1, d ≡ e^−1 mod φ(n); public (e, n), private d.
Diffie-Hellman key exchange relies on the discrete logarithm problem; it provides key agreement, not encryption or authentication by itself.
DSA and ECDSA provide digital signatures; ECC offers equivalent security to RSA with much smaller keys (e.g., 256-bit ECC ≈ 3072-bit RSA).
RSA security depends on integer factorization; DH/ECC security depends on discrete logarithms (elliptic curve discrete log for ECC).
Asymmetric ciphers are slow; typical use is to encrypt a symmetric session key (hybrid encryption) or to sign a hash of a message.
Applications of Cryptography
TLS handshake: asymmetric cryptography authenticates the server and negotiates a symmetric session key; the record layer uses symmetric encryption (e.g., AES-GCM).
Digital signature: sign the hash of the message with the sender's private key; verify with the sender's public key; provides integrity, authentication, non-repudiation.
PKI: CA issues X.509 certificates binding a public key to an identity; CRL and OCSP handle revocation; the root of trust is the CA's certificate.
Email: S/MIME and PGP provide encryption and signing; STARTTLS protects the transport only, not end-to-end storage.
Disk and file encryption: BitLocker, FileVault, VeraCrypt; full-disk encryption protects data at rest, not data in use.
Code signing verifies software integrity and publisher identity; certificate pinning restricts which certificates a client accepts.
SSH uses asymmetric keys for host and user authentication and symmetric ciphers for the session; key fingerprints verify host identity.
Blockchain uses hash chains and digital signatures for integrity and ownership; it does not by itself provide confidentiality.
Cryptanalysis
Attack categories: ciphertext-only, known-plaintext, chosen-plaintext, chosen-ciphertext, related-key; each assumes increasing attacker capability.
Brute force cost scales with key space: 2^n for an n-bit key; doubling key length squares the work.
Frequency analysis defeats monoalphabetic substitution; the Kasiski examination and index of coincidence estimate Vigenere key length.
Meet-in-the-middle reduces 2-key 3DES effective security to about 2^112 operations, not 2^168.
Birthday paradox: collisions in an n-bit hash are expected after about 2^(n/2) inputs; hence SHA-1 (160-bit) gives ~80-bit collision resistance.
Side-channel attacks: timing, power analysis, cache attacks; countermeasures include constant-time code and blinding.
Padding oracle attacks exploit distinguishable padding errors in CBC mode; use authenticated encryption (GCM, CCM) to prevent them.
Differential and linear cryptanalysis are analytic attacks on block ciphers; AES remains resistant to known practical versions.
Quantum Computing and Cryptography
Shor's algorithm factors integers and solves discrete logarithms in polynomial time on a sufficiently large quantum computer, breaking RSA, DH, and ECC.
Grover's algorithm gives a quadratic speedup for unstructured search, effectively halving symmetric key strength (AES-128 → ~64-bit security).
Mitigation for symmetric cryptography: double the key size (AES-256, SHA-384/512) to retain security against Grover.
Post-quantum families: lattice-based (Kyber/ML-KEM, Dilithium/ML-DSA), hash-based signatures (SPHINCS+), code-based (McEliece), multivariate.
NIST standardized ML-KEM (FIPS 203), ML-DSA (FIPS 204), and SLH-DSA (FIPS 205) in 2024.
Harvest-now-decrypt-later: adversaries record encrypted traffic today to decrypt once quantum computers arrive, motivating early migration.
Quantum key distribution (QKD) uses physics (e.g., BB84) to detect eavesdropping; it requires authenticated classical channels and dedicated hardware.
Crypto-agility: design systems so algorithms can be swapped without redesign, easing migration to post-quantum algorithms.