🕵️ 5. Attacker Tries to Crack It
← Flowchart Step 06 · Attacker intercepts C₀ — has no sk, must brute-force
The attacker has H, y, and C₀ = s = [2, 5]. Their only option: try every possible pair of error positions and check if H·eᵀ = C₀. With n=4, t=2 there are C(4,2) = 6 pairs to try.
Target syndrome to match: s = [2, 5]
Guess 1 — errors at positions 1,2 → e = [1,1,0,0]
Row 1: 4×1 + 3×1 + 5×0 + 5×0 = 4 + 3 = 7 → 0 (mod 7)
Row 2: 4×1 + 6×1 + 1×0 + 6×0 = 4 + 6 = 10 → 3 (mod 7)
Result: [0, 3] ≠ [2, 5] ❌ No match
Guess 2 — errors at positions 1,3 → e = [1,0,1,0]
Row 1: 4×1 + 3×0 + 5×1 + 5×0 = 4 + 5 = 9 → 2 (mod 7, 9=7+2)
Row 2: 4×1 + 6×0 + 1×1 + 6×0 = 4 + 1 = 5
Result: [2, 5] = [2, 5] ✅ MATCH FOUND!
Guess 3 — errors at positions 1,4 → e = [1,0,0,1]
Row 1: 4×1 + 3×0 + 5×0 + 5×1 = 4 + 5 = 9 → 2 (mod 7)
Row 2: 4×1 + 6×0 + 1×0 + 6×1 = 4 + 6 = 10 → 3 (mod 7)
Result: [2, 3] ≠ [2, 5] ❌ No match
Guess 4 — errors at positions 2,3 → e = [0,1,1,0]
Row 1: 4×0 + 3×1 + 5×1 + 5×0 = 3 + 5 = 8 → 1 (mod 7, 8=7+1)
Row 2: 4×0 + 6×1 + 1×1 + 6×0 = 6 + 1 = 7 → 0 (mod 7)
Result: [1, 0] ≠ [2, 5] ❌ No match
Guess 5 — errors at positions 2,4 → e = [0,1,0,1]
Row 1: 4×0 + 3×1 + 5×0 + 5×1 = 3 + 5 = 8 → 1 (mod 7)
Row 2: 4×0 + 6×1 + 1×0 + 6×1 = 6 + 6 = 12 → 5 (mod 7, 12=7+5)
Result: [1, 5] ≠ [2, 5] ❌ No match
Guess 6 — errors at positions 3,4 → e = [0,0,1,1]
Row 1: 4×0 + 3×0 + 5×1 + 5×1 = 5 + 5 = 10 → 3 (mod 7)
Row 2: 4×0 + 6×0 + 1×1 + 6×1 = 1 + 6 = 7 → 0 (mod 7)
Result: [3, 0] ≠ [2, 5] ❌ No match
⚠️ The attacker got lucky here — only 6 combinations exist in this toy example so they found the answer on guess 2.
In the real scheme: n = 6960, t = 128 → there are C(6960, 128) ≈ 10²⁰⁰ combinations to try. That is more than the number of atoms in the observable universe. Even the fastest computers cannot finish this search.