cloak

Learn cryptography by doing the math.

Pick a journey, or browse the catalog. Each algorithm walks step by step from the basic math to a Python script you can run.

Start here

Curated journeys — pick one to see how the pieces connect.

How TLS 1.3 works essay

The modern handshake. ECDH for key exchange, an authenticated cipher for the record stream, Ed25519 (or a CA-signed RSA cert) for identity.

X25519 ChaCha20-Poly1305 Ed25519
Read the essay →

How HTTPS works (the classic story)

The older RSA-based TLS handshake, still useful to understand. Two strangers meet on the internet and build a secure channel — asymmetric meets symmetric.

RSA AES Hybrid Encryption
Start with RSA →

Why crypto looks weird

The attacks that motivated the design choices in the rest of the catalog. Padding oracles (CBC + RSA), ECB penguins, length extension, hash collisions, birthday math, PS3 nonce reuse — each one explains a design decision.

Padding Oracle Attack Bleichenbacher Attack Length Extension Attack Hash Collisions Birthday Attack Block Cipher Modes ECDSA
Start with Padding Oracle Attack →

Post-quantum primer

Shor's algorithm breaks RSA, ECDH, and ECDSA on a fault-tolerant quantum computer. NIST standardized three replacements in August 2024.

Kyber (ML-KEM) Dilithium (ML-DSA) SPHINCS+ (SLH-DSA) X25519
Start with Kyber (ML-KEM) →

Hashing for developers

SHA-256 fingerprints data; HMAC authenticates messages; HKDF derives keys; SHA-3 is the alternative when you want diversity. Plus password hashing (PBKDF2/bcrypt/Argon2).

SHA-256 SHA-3 (Keccak) HMAC HKDF Password Hashing bcrypt
Start with SHA-256 →

Where to start

If you've never touched cryptography, start here. Caesar through one-time pad — all the ciphers that broke, and one (the OTP) that's mathematically perfect but impractical.

Classical ciphers
Start with Classical ciphers →

Signatures, classical to modern

Sign with a private key, verify with a public one. From RSA's textbook math through RSA-PSS, ECDSA's nonce-reuse footguns, and the Schnorr/Ed25519 design family, to the post-quantum signatures from NIST 2024.

RSA RSA-PSS ECDSA Schnorr signatures Ed25519 Dilithium (ML-DSA) SPHINCS+ (SLH-DSA)
Start with RSA →

Key exchange, classical to modern

Diffie-Hellman invented the public-key handshake in 1976. Fifty years and one curve later, X25519 is what everyone uses.

Diffie-Hellman X25519 Kyber (ML-KEM)
Start with Diffie-Hellman →

Elliptic curves end to end

Start with what an elliptic curve actually IS — points, addition, scalar multiplication. Then watch the same operations power X25519 key exchange, Ed25519 signatures, and ECDSA's PS3 disaster.

Elliptic curves X25519 Ed25519 ECDSA Schnorr signatures
Start with Elliptic curves →

How card payments work

Your PIN travels through three banks. It's never decrypted along the way — only re-encrypted under fresh keys, inside tamper-evident HSMs.

HSM Triple DES AES
Start with HSM →

Block ciphers, old to new

How AES became the standard. The 30-year story from DES's deathbed through Blowfish and Twofish to ChaCha20 — plus the modes that make it work.

Triple DES Blowfish Twofish AES ChaCha20-Poly1305 Block Cipher Modes
Start with Triple DES →

All algorithms

The full catalog, grouped by family.

Historical / pre-modern

Where cryptography started — substitution and shift ciphers, frequency analysis, the one-time pad. The on-ramp.

Hash & MAC

One-way functions that fingerprint data and authenticate messages — the building blocks under almost every protocol.

Key management & HSMs

Patterns and devices for protecting the key material itself — vaults, not algorithms.