Cryptography Step by Step
A lightweight execution-visualization book.
Modular Arithmetic
Reduce Modulo
Modular Add and Multiply
Congruence Classes
Modular Inverse by Search
Euclid
Euclidean GCD
Extended Euclid Table
Bezout Inverse
Inverse Does Not Exist
RSA Small
Choose RSA Primes
Compute Totient
Choose Public Exponent
Compute Private Exponent
Encrypt Small Message
Decrypt Small Message
Fast Exponentiation
Square and Multiply
Modexp RSA Encrypt
Modexp RSA Decrypt
Diffie-Hellman
Powers Mod Prime Table
Alice Public Key
Bob Public Key
Shared Secret Match
Authenticity Boundary
Raw RSA Toy Signature
Verify Toy Signature
Why Padding and Hashing Matter
Symmetric and Hashing
XOR Stream Cipher
XOR Decrypt Round Trip
Polynomial Hash Table
Hash Sensitivity
Keyed MAC Tag
Toy HTTPS
Client Hello Offer
Server Hello Certificate
Ephemeral DH Shares
Derive Session Keys
Finished Message Check
Encrypted HTTP Request