Nma to hard relation bound
FiatShamir.nma_to_hard_relation_bound
Project documentation
NMA-to-extraction via the forking lemma and special soundness. The parameter qH is the fork slot parameter passed to Fork.forkPoint qH, i.e., the number of Fin (qH + 1) candidate target positions over which the replay-forking lemma sums. It is not required to be a valid query bound on the adversary: callers may supply a wrapped adversary with up...
Exact Lean statement
theorem nma_to_hard_relation_bound
[DecidableEq M] [DecidableEq Commit]
[SampleableType Wit] [SampleableType Chal]
(hss : σ.SpeciallySound)
(hss_nf : ∀ ω₁ p₁ ω₂ p₂, Pr[⊥ | σ.extract ω₁ p₁ ω₂ p₂] = 0)
[Fintype Chal] [Inhabited Chal]
(nmaAdv : SignatureAlg.managedRoNmaAdv
(FiatShamir (m := OracleComp (unifSpec + (M × Commit →ₒ Chal))) σ hr M))
(qH : ℕ) :
∃ reduction : Stmt → ProbComp Wit,
(Fork.advantage σ hr M nmaAdv qH *
(Fork.advantage σ hr M nmaAdv qH / (qH + 1 : ENNReal) -
challengeSpaceInv Chal)) ≤
Pr[= true | hardRelationExp hr reduction]Formal artifact
Lean source
theorem nma_to_hard_relation_bound [DecidableEq M] [DecidableEq Commit] [SampleableType Wit] [SampleableType Chal] (hss : σ.SpeciallySound) (hss_nf : ∀ ω₁ p₁ ω₂ p₂, Pr[⊥ | σ.extract ω₁ p₁ ω₂ p₂] = 0) [Fintype Chal] [Inhabited Chal] (nmaAdv : SignatureAlg.managedRoNmaAdv (FiatShamir (m := OracleComp (unifSpec + (M × Commit →ₒ Chal))) σ hr M)) (qH : ℕ) : ∃ reduction : Stmt → ProbComp Wit, (Fork.advantage σ hr M nmaAdv qH * (Fork.advantage σ hr M nmaAdv qH / (qH + 1 : ENNReal) - challengeSpaceInv Chal)) ≤ Pr[= true | hardRelationExp hr reduction] := by classical refine ⟨nmaReduction σ hr M nmaAdv qH, ?_⟩ set acc : Stmt → ENNReal := fun pk => Pr[ fun x => (Fork.forkPoint (M := M) (Commit := Commit) (Resp := Resp) (Chal := Chal) qH x).isSome | Fork.runTrace σ hr M nmaAdv pk] with hacc_def have hAdv_eq_tsum : Fork.advantage σ hr M nmaAdv qH = ∑' pkw : Stmt × Wit, Pr[= pkw | hr.gen] * acc pkw.1 := by simp only [Fork.advantage, Fork.exp, ← probEvent_eq_eq_probOutput, probEvent_simulateQ_unifChalImpl, probEvent_bind_eq_tsum, bind_pure_comp, probEvent_map, Function.comp_def, probEvent_liftComp, acc] have hRHS_eq_tsum : Pr[= true | hardRelationExp hr (nmaReduction σ hr M nmaAdv qH)] = ∑' pkw : Stmt × Wit, Pr[= pkw | hr.gen] * Pr[ fun w : Wit => rel pkw.1 w = true | nmaReduction σ hr M nmaAdv qH pkw.1] := by simp only [hardRelationExp, ← probEvent_eq_eq_probOutput, bind_pure_comp, probEvent_bind_eq_tsum, probEvent_map, Function.comp_def] -- The replay-forking bound feeds the per-`pk` witness-extraction bound. have hPerPkFinal : ∀ pk : Stmt, acc pk * (acc pk / (qH + 1 : ENNReal) - challengeSpaceInv Chal) ≤ Pr[ fun w : Wit => rel pk w = true | nmaReduction σ hr M nmaAdv qH pk] := fun pk => (Fork.replayForkingBound (σ := σ) (hr := hr) (M := M) nmaAdv qH pk (P_out := forkSupportInvariant σ M qH pk) (hP := fun h => forkSupportInvariant_of_mem_replayFirstRun σ hr M nmaAdv qH pk h) (hreach := Fork.runTrace_forkPoint_CfReachable (σ := σ) (hr := hr) (M := M) nmaAdv qH pk)).trans (perPk_extraction_bound σ hr M nmaAdv qH hss hss_nf pk) rw [hAdv_eq_tsum, hRHS_eq_tsum] exact OracleComp.EvalDist.marginalized_jensen_forking_bound (mx := hr.gen) (acc := fun pkw => acc pkw.1) (B := fun pkw => Pr[ fun w : Wit => rel pkw.1 w = true | nmaReduction σ hr M nmaAdv qH pkw.1]) (q := (qH : ENNReal) + 1) (hinv := challengeSpaceInv Chal) challengeSpaceInv_ne_top (fun _ => probEvent_le_one) (fun pkw => hPerPkFinal pkw.1)- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/CryptoFoundations/FiatShamir/Sigma/Reductions.lean:310-359
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Expected Cost Nat eq sum tail probs of pathwise Cost At Most
AddWriterT.expectedCostNat_eq_sum_tail_probs_of_pathwiseCostAtMost
Plain-language statement
Finite tail-sum formula for natural-valued writer cost under a pathwise upper bound. If every execution path of oa incurs cost at most n, then the tail probabilities vanish above n, so the infinite tail sum truncates to Finset.range n.
Source project: VCVio
Person-level attribution pending.
IND CPA advantage to Real le sum step signed Advantage Real abs
AsymmEncAlg.IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs
Plain-language statement
Planned generic one-time-to-many-time lift: bounded multi-query IND-CPA advantage is at most the sum of the extracted one-time signed advantages over the first q fresh LR queries.
Source project: VCVio
Person-level attribution pending.
IND CPA LR hybrid Game q eval Dist eq left of Makes At Most Queries
AsymmEncAlg.IND_CPA_LR_hybridGame_q_evalDist_eq_left_of_MakesAtMostQueries
Plain-language statement
If an adversary makes at most q fresh LR queries, then the leftUntil = q LR-hybrid is the all-left endpoint game.
Source project: VCVio
Person-level attribution pending.