Which positions match?
In Lesson 3.2, you saw how XOR compares two bits. A result of 0 means they match. A result of 1 means they differ. Compare 01 and 11 and you get 10. Their first bits differ and their second bits match.
Use pad 10 on both messages and you get ciphertexts 11 and 01. Their XOR is also 10. Someone who sees only the ciphertexts can tell which positions match between the original messages if they know the pad was shared. The relationship alone leaves both possibilities at each position. Where the bits differ, for example, they could be 0 then 1 or 1 then 0.
Why the shared pad cancels
The pad applies the same flip to each message at each position. If the original bits match, flipping both keeps them equal. If they differ, flipping both keeps them different. In the XOR calculation you can reorder and group the two pad terms together. A pad XOR itself gives a row of zeros. XOR with those zeros leaves the message comparison unchanged.
(message A XOR pad) XOR (message B XOR pad)
= (message A XOR message B) XOR (pad XOR pad)
= (message A XOR message B) XOR 00
= message A XOR message B
Using the same pad to encrypt both messages is called pad reuse. It breaks the one-use requirement from Lesson 3.5.
Draw a fresh pad for each message
Draw each pad independently and uniformly, with all four values equally likely. The XOR of the pads then has the same chance of giving 00, 01, 10, or 11. For example, with pad 00 for A and 01 for B, the ciphertexts would be 01 and 10. Their XOR is 11, while the message pair still gives 10.
Fresh draws can give the same pad value by chance, especially in this two-bit example. In this activity you can see both pads. An observer who sees only the ciphertexts cannot tell whether the fresh draws happened to match. For any pair of plaintexts, all four results of comparing the ciphertexts are equally likely.
Check your understanding
Two toy ciphertexts made with a shared pad give 01 when you XOR them. What can you tell about the two original messages if you know neither plaintext?
Show the answer
The first bits match and the second bits differ. The result gives the relationship at each position. It leaves the actual bit values open.