CRYPTOLOGY CRYPTOGRAPHY CRYPTANALYSIS COMPREHENSIVE ROADMAP

Cryptology Roadmap

The complete hierarchy of cryptographic primitives and the structured path to mastering cryptology: cryptography, cryptanalysis, and security protocols.

Understanding Cryptology

Cryptology is the overarching science of secure communication, comprising two main disciplines: cryptography (designing secure systems) and cryptanalysis (breaking secure systems). This roadmap follows the hierarchy of security primitives to build comprehensive expertise.

Key Distinction

Cryptography: "How to protect information" → Confidentiality, Integrity, Authentication
Cryptanalysis: "How to break protection" → Mathematical analysis, Side-channel attacks, Implementation flaws

Cryptology Hierarchy

The complete tree of cryptographic primitives and their relationships:

CRYPTOGRAPHY (Design)

The practice and study of techniques for secure communication.

Unkeyed Primitives

Cryptographic functions that don't require a secret key.

Arbitrary Length Hash Functions

  • SHA-256/512
  • SHA-3/Keccak
  • BLAKE2/3
  • MD5 (deprecated)

One-way Permutations

  • Trapdoor functions
  • Discrete log
  • Integer factorization

Random Sequences

  • PRNGs
  • CSPRNGs
  • Entropy sources
Symmetric-key Primitives

Algorithms using the same key for encryption and decryption.

Block Ciphers

  • AES (Rijndael)
  • DES/3DES
  • Blowfish
  • Twofish

Stream Ciphers

  • ChaCha20
  • RC4 (insecure)
  • Salsa20

MAC & AEAD

  • HMAC
  • Poly1305
  • AES-GCM
  • ChaCha20-Poly1305
Public-key Primitives

Asymmetric algorithms using key pairs (public/private).

Public-key Ciphers

  • RSA
  • ElGamal
  • ECC-based

Digital Signatures

  • RSA-PSS
  • ECDSA
  • EdDSA
  • DSA

Key Exchange

  • Diffie-Hellman
  • ECDH
  • Post-quantum KEMs
CRYPTANALYSIS (Attack)

The study of analyzing and breaking cryptographic systems.

Classical Attacks

  • Ciphertext-only
  • Known-plaintext
  • Chosen-plaintext
  • Frequency analysis

Modern Attacks

  • Side-channel
  • Timing attacks
  • Power analysis
  • Fault injection

Mathematical Attacks

  • Linear cryptanalysis
  • Differential cryptanalysis
  • Algebraic attacks
  • Meet-in-the-middle

Learning Roadmap

Structured learning path through the cryptology hierarchy:

PHASE 1

Mathematical Foundations

Master the mathematical concepts underlying all cryptographic primitives.

Topic Key Concepts Resources
Number Theory Modular arithmetic, primes, gcd, Euler's theorem Khan Academy, "Elementary Number Theory"
Abstract Algebra Groups, rings, fields, finite fields GF(p) MIT OCW 18.701
Probability & Stats Random variables, entropy, distributions Coursera: Statistics
Information Theory Shannon entropy, perfect secrecy "Elements of Information Theory"
number_theory.py
import math import random # Modular arithmetic basics def mod_inverse(a, m): # Extended Euclidean Algorithm def egcd(a, b): if b == 0: return (a, 1, 0) g, x1, y1 = egcd(b, a % b) return (g, y1, x1 - (a // b) * y1) g, x, _ = egcd(a, m) if g != 1: raise ValueError("No modular inverse exists") return x % m # Example: RSA key generation math def generate_rsa_primes(bits=512): # In reality, use proper primality testing p = random.getrandbits(bits) q = random.getrandbits(bits) return p, q # Euler's totient function φ(n) def euler_totient(p, q): return (p - 1) * (q - 1) print("Modular inverse of 7 mod 26:", mod_inverse(7, 26))
PHASE 2

Symmetric Cryptography

Master block ciphers, stream ciphers, and hash functions.

AES Deep Dive

  • SubBytes transformation
  • ShiftRows & MixColumns
  • Key expansion
  • Modes: ECB, CBC, CTR, GCM

Hash Functions

  • Merkle-Damgård construction
  • SHA-2 family
  • SHA-3 (Keccak)
  • HMAC construction

Practical Implementation

  • Python cryptography lib
  • OpenSSL CLI
  • CTR vs CBC usage
  • Authenticated encryption

Core Project: Build a Cryptography Library

Implement AES-128 from scratch (educational purposes only). Then use a production library like cryptography.io to implement secure file encryption with AES-256-GCM and Argon2 key derivation.

PHASE 3

Asymmetric Cryptography

Understand RSA, Elliptic Curve Cryptography, and key exchange protocols.

Algorithm Family Mathematical Problem Security Level Common Uses
RSA Integer Factorization (IFP) 2048-bit = 112-bit security TLS, PGP, SSH
Diffie-Hellman Discrete Logarithm (DLP) 2048-bit = 112-bit security Key exchange
Elliptic Curve EC Discrete Logarithm (ECDLP) 256-bit = 128-bit security Bitcoin, TLS 1.3
Post-Quantum Lattice, Code-based problems Varies (ongoing NIST comp) Future-proofing
rsa_implementation.py
from cryptography.hazmat.primitives.asymmetric import rsa, padding from cryptography.hazmat.primitives import hashes # Generate RSA key pair private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048 ) public_key = private_key.public_key() # Encrypt with public key message = b"Secret message for RSA" ciphertext = public_key.encrypt( message, padding.OAEP( mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None ) ) # Decrypt with private key plaintext = private_key.decrypt( ciphertext, padding.OAEP( mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None ) ) print(f"Original: {message.decode()}") print(f"Ciphertext (hex): {ciphertext.hex()[:50]}...") print(f"Decrypted: {plaintext.decode()}")
PHASE 4

Cryptanalysis & Attacks

Learn to break cryptographic systems through mathematical and side-channel attacks.

Classical Cryptanalysis

  • Frequency analysis (Caesar, Vigenère)
  • Kasiski examination
  • Index of coincidence
  • Known-plaintext attacks

Modern Cryptanalysis

  • Linear cryptanalysis (DES)
  • Differential cryptanalysis
  • Biclique attacks (AES)
  • Related-key attacks

Side-Channel Attacks

  • Timing attacks (RSA)
  • Power analysis (DPA/SPA)
  • Cache attacks
  • Electromagnetic analysis

CTF Practice Path

1. picoCTF: Basic crypto challenges
2. CryptoHack: Progressive crypto learning
3. OverTheWire Krypton: Classical cipher breaking
4. HackTheBox: Real-world crypto implementations
5. DEFCON Quals: Advanced cryptanalysis

PHASE 5

Protocols & Real-World Applications

Apply cryptographic primitives in security protocols and systems.

Protocol Cryptographic Components Security Properties
TLS 1.3 ECDHE, AES-GCM, ChaCha20-Poly1305, RSA signatures Forward secrecy, authenticated encryption
SSH Diffie-Hellman, HMAC-SHA2, AES-CTR Secure remote access, MITM protection
PGP/GPG RSA, ECC, AES, SHA-2 Email encryption, digital signatures
Blockchain ECDSA, SHA-256, Merkle trees Transaction integrity, consensus
Signal Protocol X3DH, Double Ratchet, AES-256 Forward secrecy, post-compromise security

Advanced & Emerging Topics

Cutting-edge areas in cryptology for advanced study:

Post-Quantum Cryptography

  • Lattice-based (Kyber, Dilithium)
  • Code-based (McEliece)
  • Hash-based (SPHINCS+)
  • Multivariate cryptography

Zero-Knowledge Proofs

  • zk-SNARKs/STARKs
  • Bulletproofs
  • Sigma protocols
  • Applications: Zcash, Tornado Cash

Secure Multi-Party Computation

  • Garbled circuits
  • Secret sharing
  • Oblivious transfer
  • Private set intersection

Homomorphic Encryption

  • FHE (Fully Homomorphic)
  • SHE (Somewhat Homomorphic)
  • BFV, BGV, CKKS schemes
  • Privacy-preserving ML

Learning Progression Timeline

learning_path.sh
# Year 1: Foundations & Symmetric Crypto Months 1-3: Mathematics (Number Theory, Algebra) Months 4-6: Classical Ciphers & Cryptanalysis Months 7-9: Symmetric Cryptography (AES, Hash functions) Months 10-12: Programming Crypto Implementations # Year 2: Asymmetric Crypto & Protocols Months 1-3: Public-key Cryptography (RSA, ECC) Months 4-6: Digital Signatures & PKI Months 7-9: Network Security Protocols (TLS, SSH) Months 10-12: Cryptanalysis & CTF Challenges # Year 3: Specialization Choose 2-3 from: - Blockchain & Cryptocurrency Security - Post-Quantum Cryptography - Privacy-Enhancing Technologies - Hardware Security & Side-channels - Cryptographic Protocol Design # Continuous Learning - Read latest cryptographic papers (IACR conferences) - Contribute to open-source crypto projects - Participate in CTF competitions - Follow NIST post-quantum standardization

Assessment Checkpoints

Beginner: Solve all CryptoHack introductory challenges
Intermediate: Complete Cryptopals sets 1-6
Advanced: Solve DEFCON crypto challenges
Expert: Contribute to cryptographic research or find novel vulnerabilities