Cryptography

How secrets are kept and proved: classical ciphers and how they break, AES and its modes, RSA and Diffie-Hellman with small numbers, and the signatures and certificates behind the browser's lock.

About 12 hours of study

Learning objectives

Lessons

  1. 1

    Classical ciphers and how they break

    The Caesar and Vigenère ciphers, broken by brute force, frequency analysis and repeated patterns, and the rules those breaks taught every modern cipher.

  2. 2

    Symmetric encryption and AES

    One key to lock and unlock: what AES does inside a round, why ECB leaks patterns while CBC and GCM do not, and the key-sharing problem symmetric encryption leaves open.

  3. 3

    Public-key encryption with toy RSA

    Two keys instead of one: building RSA keys from two primes, encrypting with mᵉ mod n and decrypting with cᵈ mod n, step by step with small numbers, and why real RSA needs huge keys and padding.

  4. 4

    Agreeing on a key: Diffie-Hellman

    How two people agree on a secret key over a channel everyone can read, why the discrete logarithm keeps it safe, and why the exchange still needs signatures to stop a man in the middle.

  5. 5

    Digital signatures and certificates

    Signing with a private key and checking with the public one, what a signature proves, and how certificates and a chain of trust tell your browser that a public key really belongs to a website.

Module practice

Module quiz

1. A cipher text was made with a Caesar shift of 7. Which shift decrypts it?
2. Why is AES in ECB mode a poor choice for an image file?
3. In toy RSA with p = 3, q = 11 and e = 3, what is d?
4. In Diffie-Hellman, what keeps an eavesdropper from computing the key?
5. A browser verifies a site's certificate. Which key does it use to check the CA's signature?
6. Which pairing of tool and job is right?

‹ Security basicsHashing and passwords ›