Selective failure attacks on cryptographic protocols #
A protocol that is private against passive (semi-honest) adversaries may still leak an honest
party's secret input w : Secret when a corrupted participant deviates actively from its
prescribed response and observes whether the honest party's reconstruction fails (produces an
incorrect output, fails a consistency check, or aborts). The formal model and theorems in this
module are original to this library, motivated by active deviations against passive protocols such
as private information retrieval ([CGKS98]), oblivious transfer,
semi-honest Yao two-party computation ([LP09], background on semi-honest Yao and OT),
and semi-honest multi-party computation ([Gol04]).
This module provides a protocol-agnostic framework (SelectiveFailure.Model Secret Dev Out) that
applies uniformly across private information retrieval (PIR.Scheme), oblivious transfer
(MPC.batchOTFunctionality), garbled-circuit two-party computation (MPC.yaoProtocol), and
multi-party computation (MPC.Protocol):
- Model and failure games (
Model,Model.failureRun,Model.failureGame,Model.failureProb,Model.advantage). AModel Secret Dev Outspecifies the ideal outputtarget : Secret → Outexpected by the honest party on secret inputw : Secretand the distributionexec : Dev → Secret → ProbComp Outof the honest party's output when the adversary applies active deviationdev : Dev. The failure experimentM.failureGame dev wtests whether the reconstructed outputout ← M.exec dev wdiffers fromM.target w, andM.advantage dev w₀ w₁measures the distinguishing advantage (Game.advantage) between candidate secretsw₀andw₁from observing this 1-bit failure signal. - Selective-failure freedom (
Model.IsSelectiveFailureFree) vs. deterministic selective failure (Model.IsDeterministicAttack).M.IsSelectiveFailureFreerequiresM.advantage dev w₀ w₁ = 0(equivalentlyM.failureGame dev w₀ = M.failureGame dev w₁) for all deviationsdevand secretsw₀, w₁. Conversely,M.IsDeterministicAttack dev predstates that under deviationdev, the failure indicatordecide (out ≠ M.target w)equalspred wwith probability one for every secretw, yieldingM.advantage dev w₀ w₁ = 1wheneverpred w₀ ≠ pred w₁. - Reusable structural attack and immunity combinators:
- Indexed-slot selection (
Model.isDeterministicAttack_of_slot): when a party sends a tableSlot → αand the honest party's reconstruction on secretwreads slotsel w(as in matrix-balanced PIRPIR.Scheme.rows, covering-code PIRPIR.RadiusOneCover.scheme, 1-out-of-2 / batch OT, and Yao input-wire transfer), perturbing slotslot₀causes a deterministic failure if and only ifsel w = slot₀. - Nonlinear indicator thresholding (
Model.isDeterministicAttack_of_decide_eq_one): when a Boolean-output protocol reconstructs viadecide (L = 1)over a ring/fieldFwhere honest executions evaluateLtoif target w then 1 else 0(as in Shamir polynomial PIRPIR.shamirandPIR.shamirCube), shiftingLby anyΔ ∈ Fwith1 + Δ ≠ 1andΔ ≠ 1causes a failure if and only iftarget w = true. - Passive-view factorization (
Model.isSelectiveFailureFree_of_map_eq): when the failure indicator factors through a secret-independent passive view law (as in 1-bit XOR-sum PIRPIR.twoServerandPIR.cube), no single-party query-only deviation gains any selective failure advantage.
- Indexed-slot selection (
- Input-indexed payload selection (
indexedPayloadModel,indexedPayloadPerturb,isDeterministicAttack_indexedPayload,advantage_indexedPayload_eq_one,not_isSelectiveFailureFree_indexedPayload). Direct instantiation for 1-out-of-N/ batch oblivious transfer and input-wire selection protocols where a sender supplies a tablem : κ → Slot → αand a receiver with secret choiceb : κ → Slotreconstructsfun j => m j (b j).
Main definitions #
Cslib.Crypto.Protocols.SelectiveFailure.Model: protocol execution model under active deviations against an ideal target output.Cslib.Crypto.Protocols.SelectiveFailure.Model.failureRun,Cslib.Crypto.Protocols.SelectiveFailure.Model.failureGame,Cslib.Crypto.Protocols.SelectiveFailure.Model.failureProb,Cslib.Crypto.Protocols.SelectiveFailure.Model.advantage: canonical output-failure experiment, failure probability, and selective-failure distinguishing advantage.Cslib.Crypto.Protocols.SelectiveFailure.Model.IsSelectiveFailureFree: zero selective-failure advantage for all deviations and secret pairs.Cslib.Crypto.Protocols.SelectiveFailure.Model.IsDeterministicAttack: deterministic selective failure matching a secret predicatepred : Secret → Bool.Cslib.Crypto.Protocols.SelectiveFailure.indexedPayloadModel,Cslib.Crypto.Protocols.SelectiveFailure.indexedPayloadPerturb: selective-failure model and single-slot perturbation attack for input-indexed payload transfer (such as 1-out-of-Nand batch oblivious transfer).
Main results #
Cslib.Crypto.Protocols.SelectiveFailure.Model.isSelectiveFailureFree_iff:IsSelectiveFailureFreeholds iff the failure game distribution is invariant across secrets.Cslib.Crypto.Protocols.SelectiveFailure.Model.isDeterministicAttack_iff: support characterization ofIsDeterministicAttack.Cslib.Crypto.Protocols.SelectiveFailure.Model.IsDeterministicAttack.failureProb_eq,Cslib.Crypto.Protocols.SelectiveFailure.Model.IsDeterministicAttack.advantage_eq_one,Cslib.Crypto.Protocols.SelectiveFailure.Model.IsDeterministicAttack.not_isSelectiveFailureFree: exact failure probabilities (0or1), advantage1, and refutation ofIsSelectiveFailureFreefor deterministic selective failure attacks.Cslib.Crypto.Protocols.SelectiveFailure.Model.isDeterministicAttack_of_slot: slot-selection selective failure combinator.Cslib.Crypto.Protocols.SelectiveFailure.Model.isDeterministicAttack_of_decide_eq_one: nonlinear= 1threshold selective failure combinator.Cslib.Crypto.Protocols.SelectiveFailure.Model.isSelectiveFailureFree_of_map_eq: immunity combinator when the failure indicator factors through a secret-independent view law.Cslib.Crypto.Protocols.SelectiveFailure.isDeterministicAttack_indexedPayload,Cslib.Crypto.Protocols.SelectiveFailure.advantage_indexedPayload_eq_one,Cslib.Crypto.Protocols.SelectiveFailure.not_isSelectiveFailureFree_indexedPayload: selective-failure vulnerability of input-indexed payload transfer / batch OT.
References #
- O. Goldreich, Foundations of Cryptography, Volume 2: Basic Applications (background on semi-honest vs. malicious security in multi-party protocols)
- Y. Lindell, B. Pinkas, A Proof of Security of Yao's Protocol for Two-Party Computation (background on semi-honest Yao garbled circuits and OT)
- B. Chor, O. Goldreich, E. Kushilevitz, M. Sudan, Private information retrieval, Sections 2–4
A protocol model for analyzing selective failure attacks, parameterized by the honest party's
secret input type Secret, the adversary's active deviation type Dev, and the honest party's
output type Out.
- target : Secret → Out
The ideal (uncorrupted) output expected by the honest party on secret input
w. - exec : Dev → Secret → ProbComp Out
The distribution of the honest party's reconstructed output when the corrupted party applies active deviation
dev : Devon secret inputw : Secret.
Canonical output-failure games #
The probabilistic computation outputting true iff the honest party's reconstructed output
under deviation dev on secret w differs from the ideal output M.target w.
The Boolean failure experiment (Game) under deviation dev on secret w: succeeds (true)
when the honest party suffers a reconstruction failure (out ≠ M.target w).
The probability (ℝ≥0) that the honest party suffers a reconstruction failure
(out ≠ M.target w) under deviation dev on secret w.
The selective-failure distinguishing advantage (ℝ≥0) between candidate secrets w₀ and w₁
under active deviation dev: the absolute difference between their failure probabilities.
A protocol model is selective-failure free if no active deviation dev produces any
distinguishing advantage between any two secrets w₀, w₁ from the failure signal.
An active deviation dev is a deterministic selective failure attack for predicate
pred : Secret → Bool if, for every secret w, the failure indicator decide (out ≠ M.target w)
equals pred w with probability one.
IsSelectiveFailureFree holds iff for every deviation dev, the failure game distribution
M.failureGame dev w is independent of the secret w.
Support characterization of IsDeterministicAttack: under deviation dev, every output in the
support of M.exec dev w has failure indicator decide (out ≠ M.target w) = pred w.
Under a deterministic selective failure attack for pred, the failure probability on w is 1
when pred w = true and 0 when pred w = false.
A deterministic selective failure attack achieves maximum distinguishing advantage 1 between
any two secrets w₀, w₁ on which pred differs (pred w₀ ≠ pred w₁).
Any deterministic selective failure attack for a non-constant predicate pred refutes
IsSelectiveFailureFree.
General structural attack and immunity combinators #
Slot-selection selective failure combinator. Suppose that on secret w, the execution
M.exec dev w is obtained by mapping reconstruct w over a context distribution sample w, where
for every supported context ctx:
Nonlinear = 1 threshold selective failure combinator. For a Boolean-output protocol
(Out = Bool) that reconstructs via decide (evalField w ctx = 1) in a type F with Zero F and
One F, if under deviation dev every supported context ctx satisfies:
Passive-view factorization immunity combinator. If for every deviation dev, the failure
game M.failureGame dev w is the pushforward (ProbComp.eval (view dev w)).map (err dev) of a
passive view view : Dev → Secret → ProbComp View whose distribution is independent of w, then
M is IsSelectiveFailureFree.
Input-indexed payload transfer (1-out-of-N and batch oblivious transfer) #
Selective-failure model for an input-indexed payload transfer protocol (such as 1-out-of-N or
batch oblivious transfer MPC.batchOTFunctionality): the sender holds a table
m : κ → Slot → α, the receiver holds a secret choice vector b : κ → Slot and expects
fun j => m j (b j), and a deviating sender substitutes a modified table m' : κ → Slot → α.
Single-slot sender perturbation in indexedPayloadModel: replaces entry (j₀, s₀) of the
sender's table m with a' while leaving all other slots unchanged.
Deterministic selective failure on input-indexed payload transfer / batch OT: perturbing
slot (j₀, s₀) to a' ≠ m j₀ s₀ causes the receiver's output to differ from the honest output if
and only if the receiver's secret choice at j₀ is s₀ (b j₀ = s₀).
Perturbing slot (j₀, s₀) in indexedPayloadModel distinguishes any choice vector b₀ with
b₀ j₀ = s₀ from any b₁ with b₁ j₀ ≠ s₀ with selective-failure advantage 1.
Input-indexed payload transfer is not selective-failure free whenever the index set κ is
nonempty and the slot type Slot and payload type α are nontrivial.