XOR Uniformity Lemma
- •
Definition
- •
if is a random variable with any (even adversarially chosen) distribution over , and is an independent, uniform random variable over , then is uniformly distributed over — regardless of what 's distribution was
- •
- •
Why it matters
- •
this single fact is the reason XOR shows up constantly in cryptography ("cryptographers only know how to XOR things together," as the joke goes) — it's exactly why the One-Time Pad and Stream Cipher work: XORing a message (arbitrary distribution) with an independent uniform key/pad produces a uniformly random ciphertext, hiding the message completely
- •
- •
Proof idea (1-bit case)
- •
write out the joint distribution table for (uniform) and (arbitrary, weights ); since they're independent, joint probabilities multiply; summing the two cases that produce gives exactly since
- •
- •