Encryption, from the ground up · check

Know The blocks of HTTPS already?

One question for each of the 6 puzzles in this module. A right answer marks that puzzle as passed, so you can jump ahead. A wrong one tells you which puzzle to start with. Nothing is sent anywhere: it's saved in this browser.

Puzzle 0: Anyone on the line

Your app sends a password, encrypted, over the café Wi-Fi. A machine in the middle copies every byte. What does it learn?

Not quite. Seeing the bytes isn't enough: without the key, ciphertext is gibberish. Learn it in puzzle 0 →

Right. Ciphertext without the key means nothing.

Not quite. The Wi-Fi's own password doesn't matter here: what matters is your data is encrypted. Learn it in puzzle 0 →

Puzzle 1: One key for both

Your app encrypts a 1 MB photo with AES. Roughly how does AES handle it?

Right. Fixed-size blocks, one key.

Not quite. Every block uses the same key; a new key per block would need its own way to share. Learn it in puzzle 1 →

Not quite. The key is 128 to 256 bits; AES works through the data in 128-bit blocks. Learn it in puzzle 1 →

Puzzle 2: A secret agreed in public

The listener records both public values from a key exchange. What can it do with them?

Right. Public values alone don't give the secret.

Not quite. Going back is a problem nobody knows how to solve in any useful time. Learn it in puzzle 2 →

Not quite. Getting the secret needs one private value; public values alone don't give it. Learn it in puzzle 2 →

Puzzle 3: A fingerprint for data

One bit of a 10 MB file is flipped on the way. What happens to its SHA-256 digest?

Not quite. A hash doesn't map bits to bits: one flipped bit changes the whole digest. Learn it in puzzle 3 →

Right. One bit changed, a different digest.

Not quite. Any change, even one bit, gives a different digest. Learn it in puzzle 3 →

Puzzle 4: Proof of who you are

A listener makes its own certificate with your server's name and its own public key. What does your app see?

Not quite. The name isn't enough: the certificate must carry a trusted authority's signature. Learn it in puzzle 4 →

Right. Only an authority's signature makes a certificate trusted.

Not quite. Only a signature from an authority your phone trusts counts, and authorities check who controls the name. Learn it in puzzle 4 →

Puzzle 5: TLS, the blocks together

Your app connects to your server over HTTPS on the café Wi-Fi. A machine in the middle replaces one byte of the response. What happens?

Right. Every record is checked as well as encrypted.

Not quite. Encryption alone wouldn't notice; the per-record check is what catches it. Learn it in puzzle 5 →

Not quite. Every record carries a keyed check; a changed byte makes it fail, and the listener can't recompute it. Learn it in puzzle 5 →

Back to the overview →