AI & Security

Cryptography & Security

The cryptography behind every secure system, without hand-waving: hashes, symmetric ciphers and modes, MACs, public-key crypto with RSA, Diffie-Hellman and elliptic curves, signatures, certificates and PKI, password storage, and the attacks that break real systems.

3 modules 12 lessons ~1 h of reading
Start learning
0/12 completed
01

Foundations

5 lessons
  1. 1Introduction to CryptographyWhat cryptography provides — confidentiality, integrity, authenticity and non-repudiation — Kerckhoffs's principle, a brief history from Caesar to AES, symmetric vs asymmetric cryptography, the building blocks, threat models, and the golden rule — don't roll your own.beginner4 min
  2. 2Cryptographic Hash FunctionsOne-way fingerprints of data — properties (preimage, second-preimage and collision resistance), the avalanche effect, the birthday bound, MD5 and SHA-1 breaks, SHA-2, SHA-3 and BLAKE, Merkle–Damgård and length-extension attacks, and uses from integrity checks to Merkle trees and blockchains.intermediate4 min
  3. 3Symmetric EncryptionShared-key encryption — the one-time pad and XOR, stream ciphers vs block ciphers, confusion and diffusion, DES and why it fell, AES rounds and key sizes, ChaCha20, hardware acceleration, and key management basics.intermediate4 min
  4. 4Block Cipher ModesHow to encrypt more than one block — ECB and the penguin problem, CBC with IVs and padding, CTR mode, GCM, nonce requirements and what happens when they're reused, padding oracle attacks, and XTS for disk encryption.intermediate4 min
  5. 5MACs & Authenticated EncryptionProtecting integrity and authenticity — message authentication codes, HMAC, Poly1305, constant-time verification, encrypt-then-MAC vs the alternatives, AEAD (AES-GCM, ChaCha20-Poly1305), associated data, and real uses like signed cookies, webhooks and API request signing.intermediate4 min
02

Public Key

5 lessons
  1. 6Public-Key CryptographyAsymmetric cryptography — the key distribution problem, key pairs, trapdoor one-way functions, encryption vs signatures vs key exchange, hybrid encryption and KEMs, the man-in-the-middle problem and why we need certificates, key sizes, and post-quantum cryptography.intermediate5 min
  2. 7RSAHow RSA works — modular arithmetic, Euler's totient, key generation, encryption and decryption, a worked example with small numbers, why it's secure (factoring), why textbook RSA is insecure, OAEP and PSS padding, performance tricks, key sizes, and RSA's decline.advanced4 min
  3. 8Diffie–Hellman & Elliptic CurvesAgreeing on a secret over a public channel — the Diffie–Hellman key exchange, the colour-mixing analogy, discrete logarithms, ephemeral keys and forward secrecy, elliptic-curve cryptography (point addition, scalar multiplication), Curve25519, P-256 and ECDSA/EdDSA, and pitfalls.advanced4 min
  4. 9Digital SignaturesProving who wrote something — sign and verify, hash-then-sign, RSA-PSS, ECDSA and its nonce pitfalls, Ed25519, what signatures do and don't prove, and real uses — code signing, software supply chains, JWTs, Git commits, passkeys and blockchains.intermediate4 min
  5. 10PKI & CertificatesHow the web knows who you're talking to — X.509 certificates, certificate authorities and chains of trust, root stores, domain validation and ACME/Let's Encrypt, the TLS handshake's use of certificates, revocation (CRL, OCSP, short-lived certs), Certificate Transparency, mTLS and private PKI.intermediate5 min