Crossover mission · Silicon Lab × Qubit Lab
The XOR cipher
XOR outputs 1 when its inputs differ. XOR a letter’s 8 bits with 8 key bits and you get scrambled bits; XOR them with the same key again and the letter comes back, because x ⊕ k ⊕ k = x.
With a truly random key as long as the message, used once, this one-time pad cannot be broken. The hard part is sharing the key. Qubit Lab’s BB84 protocol, coming in a later chapter, shares one using single photons.
Decrypt the intercepted word with the key, then answer what goes wrong when a key is reused.
Best after Silicon Lab Level 2.
| Byte | Cipher | Key | Cipher ⊕ key | Letter |
|---|---|---|---|---|
| 1 | 11110111 | 10110101 | · | |
| 2 | 00100101 | 01101100 | · | |
| 3 | 10000110 | 11010010 | · |
Letters are ASCII: A is 01000001, B is 01000010, and so on.