Introduction
What Is Cryptography?
Cryptography is the science of securing communication — transforming information so that only authorized parties can read it. From Caesar's battlefield ciphers to the RSA keys that protect your bank transactions, cryptography sits at the intersection of mathematics, computer science, and security engineering.
This course implements the core algorithms of cryptography in pure Python — no libraries, no black boxes. You will build ciphers from scratch, implement public-key systems, construct hash functions, and explore the protocols that underpin modern security.
Prerequisites
- Basic Python (functions, lists, string operations)
- Modular arithmetic is helpful but reviewed where needed
What You Will Build
This course contains 15 lessons organized into 5 chapters:
- Classical Ciphers — Caesar, Vigenère, and XOR: the foundational ideas of substitution and stream ciphers.
- Symmetric Cryptography — Affine ciphers, block cipher modes (ECB and CBC), and Feistel networks — the structure behind DES and AES.
- Asymmetric Cryptography — Diffie-Hellman key exchange, RSA, and ElGamal: public-key systems based on hard mathematical problems.
- Hash Functions & MAC — DJB2, polynomial hashing, HMAC, and the birthday paradox that sets the security bar for collision resistance.
- Cryptographic Protocols — Commitment schemes, Shamir's Secret Sharing, and Schnorr zero-knowledge proofs.
Let's start at the very beginning.