A message locked with a key, the trouble of passing the key, and why every extra bit in the key doubles the time a codebreaker needs to try them all.
Step 1 of 6 · A locked message
Step 1 of 6
A locked message
Alice writes Bob a message, locks it with a key, and sends it down the tube. Eve copies every capsule that passes, but without the key she sees only scrambled bytes. Bob, who has the same key, opens the message and reads it. The key is a binary number, a row of bits, punched on a card both sides hold.
But where did Bob get the key from?
Step 2 of 6
Counting keys
Eve can try guessing: try every possible key until the message makes sense. Her machine, on the board at the back, tries a trillion keys a second, , and shows how many keys there are and how long it takes to try them all.
An -bit key has possible values, because each bit has two possibilities, and every extra bit doubles the number. Key size is now fixed at bits: a toy key.
Step 3 of 6
One more byte
The DES encryption standard, adopted in the United States in 1977, used a -bit key. Eve’s machine goes through all its keys in about twenty hours. Eight bits make one byte.
Step 4 of 6
Eight more bits
A -bit key, like those the United States once allowed for export, falls to Eve’s machine in about a second. Work out how long a key one byte longer would take.
Step 5 of 6
Out of reach
Because every bit doubles the time, a few more bits take a key from “broken in a second” to “broken after the codebreaker is long dead”. Today’s keys are or bits long. The glass cube beside Eve shows what share of all the keys she could try in eighty years.
Step 6 of 6
Twice as long
A long enough key shuts the door on guessing. But the problem from the start of the Lesson remains: to use a key, both sides must have the same key, and it must not travel down the tube. The next Lesson solves that.
Loading the interactive version…
Loading the interactive version…
Each step sets up the Scene for you, and a control marked “fixed” stays put for that step.
Practice · Choose
Alice wants to send Bob a message locked with a key. Eve copies everything that passes through the tube. What is the trouble with first sending the key down the same tube?
Practice · Choose
Alice wants to send Bob a message locked with a key. Eve copies everything that passes through the tube. What is the trouble with first sending the key down the same tube?
Practice · Calculate
Key size is fixed at bits, and Eve’s machine board shows keys to try. How many different keys are there at bits?
Practice · Calculate
Key size is fixed at bits, and Eve’s machine board shows keys to try. How many different keys are there at bits?
Practice · Predict, then look
Key size is bits, like DES’s from 1977, and Eve’s machine tries every key in about twenty hours. Now the key will grow to bits. How many times longer will Eve need?
Practice · Predict, then look
Key size is bits, like DES’s from 1977, and Eve’s machine tries every key in about twenty hours. Now the key will grow to bits. How many times longer will Eve need?
Practice · Predict, then look
Key size is bits, and Eve’s machine, trying keys a second, goes through them all in about seconds. How long will a -bit key take it? Write it in seconds.
Practice · Predict, then look
Key size is bits, and Eve’s machine, trying keys a second, goes through them all in about seconds. How long will a -bit key take it? Write it in seconds.
Practice · Reach the target
Change Key size until Eve’s machine needs about seven months, years, to try every key, then press Check.
Practice · Reach the target
Change Key size until Eve’s machine needs about seven months, years, to try every key, then press Check.
Practice · Choose
A -bit key is twice as long as a -bit key. How many times as many keys does it have?
Practice · Choose
A -bit key is twice as long as a -bit key. How many times as many keys does it have?
Lesson complete. Every practice question here is done.
