Documentation

CslibFrontier.Foundations.Combinatorics.HybridPrediction

Predicting one of several masked channels from a decoder #

Let E t : Z t → Bool, for t < T, be T channels on finite sets. Suppose a decoder D recovers a bit b from the T pairs (z t, E t (z t) + b) for every choice of the inputs z and of b. The same b masks every channel, so b is XOR-shared across them. Then D predicts one of the channels. For some t, some fixed pairs base at the other positions and some fixed trial bit y₀, the guess y₀ + D (update base t (z, y₀)) equals E t z for at least a 1 / 2 + 1 / (2 T) fraction of the inputs z ∈ Z t (exists_card_add_decode_update_eq).

The proof is Yao's hybrid argument [Yao82] with the predictor's random choices fixed, done by counting. It follows the telescoping proof of the next-bit theorem in Boneh and Shoup, Section 3.5.

Cslib.Crypto.PRG.Generator.exists_half_add_div_le_predictionExperiment proves the same telescoping for the output bits of a generator, but it does not apply here. Its predictor guesses an output bit from the bits before it, with no public side input and no shared secret. Encoding the inputs z t and the secret b as generator output would count the bits of every z t among the hybrid positions, which weakens 1 / (2 T) to roughly 1 / (2 (T + ∑ t, log₂ #(Z t))).

Main results #

References #

theorem Cslib.exists_card_add_decode_update_eq {T : ℕ} {Z : Fin T → Type u_1} [(t : Fin T) → Fintype (Z t)] [∀ (t : Fin T), Nonempty (Z t)] (E : (t : Fin T) → Z t → Bool) (D : ((t : Fin T) → Z t × Bool) → Bool) (hD : ∀ (z : (t : Fin T) → Z t) (b : Bool), (D fun (t : Fin T) => (z t, E t (z t) + b)) = b) :
∃ (t : Fin T) (base : (t : Fin T) → Z t × Bool) (y₀ : Bool), Fintype.card (Z t) * (T + 1) ≤ 2 * T * {z : Z t | y₀ + D (Function.update base t (z, y₀)) = E t z}.card

Predicting a masked channel. Let D recover b from the pairs (z t, E t (z t) + b), t < T, for every choice of the inputs z and the bit b. Then for some channel t, some pairs base and some trial bit y₀, the guess y₀ + D (update base t (z, y₀)) equals E t z for at least a 1 / 2 + 1 / (2 T) fraction of the inputs z ∈ Z t. There is a channel: with none, D would return both bits on its one input.