Module 15 of 20 — Advanced Domains

Encryption & Cryptanalysis

Cryptography protects data confidentiality, integrity, and authenticity. Cryptographic algorithms age—from quantum threats to implementation flaws. Understanding encryption fundamentals and cryptanalysis prepares you for emerging challenges in secure system design.

Encryption Algorithms & Status

Different cryptographic primitives serve different purposes. Key length and algorithm choice determine security margins.

Symmetric Algorithms

AES (128/192/256)

Secure

Advanced Encryption Standard, NIST selection.

ChaCha20 (256)

Secure

Stream cipher, mobile-friendly alternative to AES.

3DES (112)

Deprecated

Triple DES, vulnerable to Sweet32 attacks.

Asymmetric Algorithms

RSA (2048/3072/4096)

Secure

Rivest-Shamir-Adleman, widely used for key exchange.

ECC (256)

Secure

Elliptic Curve Cryptography, smaller keys same security.

DSA (2048/3072)

Legacy

Digital Signature Algorithm, less common now.

Hash Algorithms

SHA-2 (256/512)

Secure

SHA-256/SHA-512, widely trusted.

SHA-3 (256/512)

Secure

Latest SHA standard, different construction than SHA-2.

MD5 (128)

Broken

Collisions trivial, never use for security.

Cryptanalysis Techniques

Cryptanalysis studies algorithms to find weaknesses. Defenses must address both mathematical and implementation-level attacks.

Brute Force

Try all possible keys until plaintext is found.

Complexity: O(2^n) where n is key length.
Prevention: Use 256-bit keys (exhaustive search infeasible with current physics).

Rainbow Tables

Precomputed hash chains for rapid password cracking.

Complexity: Reduced to O(1) lookup time after precomputation.
Prevention: Salting defeats rainbow tables. PBKDF2, bcrypt, scrypt use salt.

Side-Channel

Extract information from power consumption, timing, EM emissions.

Complexity: Varies by implementation weakness.
Prevention: Constant-time implementations, hardware shielding, masking.

Differential Cryptanalysis

Analyze differences in input/output pairs to find key bits.

Complexity: Depends on cipher structure, requires many chosen plaintexts.
Prevention: Modern ciphers designed with resistance to this attack.

Quantum Shor's Algorithm

Polynomial-time factoring on quantum computers breaks RSA/ECC.

Complexity: O((log N)^3) for factoring N.
Prevention: Post-quantum cryptography (lattice, hash-based signatures).

Quantum Computing Threats

Quantum computers threaten public-key cryptography. Symmetric encryption is weakened but recoverable with larger keys.

AlgorithmQubits NeededTimeline
RSA-2048~20 million20+ years (optimistic)
ECC-256~10 million20+ years (optimistic)
AES-128~2^64Grover's algorithm requires 2^64 qubits impossible

Post-Quantum Cryptography (PQC)

NIST is standardizing quantum-resistant algorithms. Prepare for migration by understanding the new primitives.

CRYSTALS-Kyber

Key Encapsulation

NIST PQC finalist, selected for standardization.

CRYSTALS-Dilithium

Digital Signature

NIST PQC selected for standardization.

SPHINCS+

Stateless Hash-Based Signature

NIST PQC alternate selection.

Key Takeaways

  • AES-256 and SHA-256 remain secure against classical attacks.
  • Quantum computers threaten RSA/ECC but require millions of qubits.
  • Side-channel attacks target implementations, not algorithms directly.
  • Post-quantum migration will be required in the next decade.