Symmetric Encryption: Shared Secrets and the AES Workhorse
Cryptography is where security gets its math — the machinery that makes confidentiality and integrity provable rather than hopeful. And it starts with the oldest, most intuitive i…
Cryptography covers: Symmetric Encryption, Asymmetric Cryptography, Hashes, MACs, and Digital Signatures, Putting It Together, Key Management and the Frontier. Year 3, Quarter 12. Includes 11 exercises and 1 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Cryptography is where security gets its math — the machinery that makes confidentiality and integrity provable rather than hopeful. And it starts with the oldest, most intuitive i…
The previous lesson ended on an apparent impossibility: two strangers want to share a secret key, but everything they send crosses a network an eavesdropper is watching — so how c…
The first two lessons were about confidentiality — keeping messages secret. But secrecy is only half of security, and often not the important half. Consider: a software update dow…
Every previous lesson gave you a primitive: symmetric encryption (fast, secret, but needs a shared key), asymmetric encryption and Diffie-Hellman (solves key distribution, but slo…
The final lesson of Cryptography splits into two very different endings. The first is the humbling operational truth that every practitioner learns: the algorithms are the easy pa…
- [ ] Implement Caesar cipher and frequency analysis attack in Ruby — Encrypt/decrypt, break by letter frequency - [ ] Hash a password with bcrypt in Ruby — BCrypt::Password.creat…
- [ ] Implement Diffie-Hellman key exchange in Ruby — Two parties derive shared secret over insecure channel - [ ] Implement HMAC from scratch in Ruby — SHA-256 based, verify mess…
- [ ] Implement a simplified TLS handshake in Ruby — Client hello, server hello, key exchange, encrypted communication - [ ] Break a weak hash function — Given MD5 hashes, find co…
- [ ] Build an end-to-end encrypted messaging system in Ruby — Diffie-Hellman key exchange, AES-256-GCM for messages, digital signatures for authentication, perfect forward secrec…
Build a two-party encrypted messaging system: Diffie-Hellman key exchange (implemented from scratch), AES-256-GCM encryption (via OpenSSL), message signing with HMAC. Two Ruby pro…
- [ ] What is the difference between symmetric and asymmetric encryption? Give examples of each. - [ ] Explain Diffie-Hellman key exchange. Why can an eavesdropper not derive the …
11 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.