All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Simulated Nma Adv hash Query Bound

FiatShamir.simulatedNmaAdv_hashQueryBound

Plain-language statement

Hash-query bound for simulatedNmaAdv: if the CMA adversary makes at most qS signing-oracle queries and qH random-oracle queries, the NMA reduction makes at most qH live hash queries. The qS signing queries are absorbed into the managed cache rather than issued live.

Exact Lean statement

theorem simulatedNmaAdv_hashQueryBound
    [DecidableEq M] [DecidableEq Commit] [Finite Commit]
    [Finite Chal] [Inhabited Chal] [SampleableType Chal]
    [Finite Resp]
    (simTranscript : Stmt → ProbComp (Commit × Chal × Resp))
    (adv : SignatureAlg.unforgeableAdv
      (FiatShamir (m := OracleComp (unifSpec + (M × Commit →ₒ Chal))) σ hr M))
    (qS qH : ℕ)
    (hQ : ∀ pk, signHashQueryBound (M := M) (Commit := Commit) (Chal := Chal)
      (S' := Commit × Resp) (oa := adv.main pk) qS qH) :
    ∀ pk, nmaHashQueryBound (M := M) (Commit := Commit) (Chal := Chal)
      (oa := (simulatedNmaAdv (σ := σ) (hr := hr) (M := M)
        (simTranscript := simTranscript) (adv := adv)).main pk) qH

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem simulatedNmaAdv_hashQueryBound    [DecidableEq M] [DecidableEq Commit] [Finite Commit]    [Finite Chal] [Inhabited Chal] [SampleableType Chal]    [Finite Resp]    (simTranscript : Stmt  ProbComp (Commit × Chal × Resp))    (adv : SignatureAlg.unforgeableAdv      (FiatShamir (m := OracleComp (unifSpec + (M × Commit Chal))) σ hr M))    (qS qH : )    (hQ :  pk, signHashQueryBound (M := M) (Commit := Commit) (Chal := Chal)      (S' := Commit × Resp) (oa := adv.main pk) qS qH) :     pk, nmaHashQueryBound (M := M) (Commit := Commit) (Chal := Chal)      (oa := (simulatedNmaAdv (σ := σ) (hr := hr) (M := M)        (simTranscript := simTranscript) (adv := adv)).main pk) qH := by  have : Fintype Chal := Fintype.ofFinite Chal  have : Fintype Resp := Fintype.ofFinite Resp  have : Fintype Commit := Fintype.ofFinite Commit  let : IsUniformSpec ((M × Commit Chal) : OracleSpec _) :=    IsUniformSpec.ofFintypeInhabited _  intro pk  change nmaHashQueryBound (M := M) (Commit := Commit) (Chal := Chal)    (oa := (simulateQ (simulatedNmaImpl (M := M) (Commit := Commit) (Chal := Chal)      (Resp := Resp) simTranscript pk) (adv.main pk)).run ∅) qH  unfold nmaHashQueryBound simulatedNmaImpl  refine OracleComp.IsQueryBoundP.simulateQ_run_add_inl_of_step    (fun _ => Bool.false_ne_true) (hQ pk).2 ?_ ?_ ?_ ∅  · rintro (_ | mc) hp s'    · simp at hp    · exact simulatedNmaRoSim_run_hashQueryBound (M := M) mc s'  · rintro (n | _) hnp s'    · exact simulatedNmaFwd_run_hashQueryBound (M := M) (.inl n) s'    · simp at hnp  · intro msg s'    exact simulatedNmaSigSim_run_hashQueryBound (M := M) (Resp := Resp) simTranscript pk msg s'
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/CryptoFoundations/FiatShamir/Sigma/CmaToNma.lean:210-242

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

Project-declaredLean 4.32.0

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.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.0

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.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record