Build the attack yourself

Proposition 1 says a scheme is perfectly secret exactly when every message gives every ciphertext the same probability. Suppose that fails somewhere. Your job is to turn that single failure into an adversary that actually wins the distinguishing game — and to check that your construction never once looks at the key.

Stage 1

Find one place where the proposition fails

You need a triple m₀, m₁, c* with Prk[Enck(m₀) = c*] > Prk[Enck(m₁) = c*]. Since c = m ⊕ k, each of those is just the probability of one particular pad — read it straight off the grid.

m₀
m₁
target ciphertext c*
Stage 2

Turn the failure into a strategy

You submit m₀ and m₁, the challenger flips b and hands you c. Fill in a decision rule and measure it. The dashed line is what the rule achieves in theory; the tick is what it achieved in your trials.

if  c  =    then output  
otherwise output  
 
0%50%100%
Nothing measured yet.

every trial, one square

Reading left to right. Pale squares are rounds where the rule saw nothing and flipped a coin; coloured squares are the rounds where the equality test fired.

test fired, guessed right test fired, guessed wrong coin flip, right coin flip, wrong

running success rate

The rate after each trial, against the theoretical value (dashed) and the shrinking two-sigma envelope around a coin flip.

Stage 3

Work out why it wins

For the standard rule — output 0 on c*, otherwise flip — write p₀ = Pr[Enc(m₀) = c*] and p₁ = Pr[Enc(m₁) = c*] and fill in the two conditional probabilities.

Pr[ output 0 | b = 0 ]  = 
Pr[ output 1 | b = 1 ]  = 
Stage 4

What you have actually proved

Switch tabs and rebuild the attack on another scheme before answering. The point is what stays the same.