Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Authentication with retained hash key kept internal in an asynchronous network

Open
QAlgorithms.Papers.Independent.Intake100.P41.authentication_asynchronous

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let n≥1n\ge1n≥1, let KKK be finite and nonempty, let XXX contain at least two messages, and let T={0,1}mT=\{0,1\}^mT={0,1}m, where m≥0m\ge0m≥0. Let h:K×X→Th:K\times X\to Th:K×X→T be ε\varepsilonε-AXU2_22​, with ε≥0\varepsilon\ge0ε≥0. Authenticate nnn messages with the same uniform hash key and independent uniform pads, matching the iiith Alice input and iiith adversarial submission by their respective arrival orders. The hash key is used internally only for authentication and is destroyed rather than exported after the protocol. There is no timeout: withholding a submitted message produces no Bob response.

For the real resource RnR_nRn​ and the multiple authentic-channel resource AnA_nAn​ with the fixed independent-tag simulators σn\sigma_nσn​,

d((Rn)hon,(An)hon)=0,d(Rn,Anσn)≤nε.d((R_n)_{\rm hon},(A_n)_{\rm hon})=0,\qquad d(R_n,A_n\sigma_n)\le n\varepsilon.d((Rn​)hon​,(An​)hon​)=0,d(Rn​,An​σn​)≤nε.

The distance concerns the full interactive resources, including arbitrary joint adaptive attacks and absent outputs. This provides composable authentication without an external synchronization assumption.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P41
Formal statement
noncomputable section

open scoped BigOperators

namespace QAlgorithms.Papers.Independent.Intake100.P41

open QAlgorithms.Papers.Independent.Bridge50.P44 (xorWord verifyTag)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF pp.15--16, Corollary 7: full n epsilon security in a completely
asynchronous network. The key is never exported for arbitrary use; there is
no timeout rejection or synchronization observable. -/
theorem authentication_asynchronous {K X : Type*} [Fintype K] [Nonempty K]
    [Nontrivial X] {m n : ℕ} (hn : 1 ≤ n) (h : K → X → Tag m) (epsilon : ℝ)
    (hepsilon : 0 ≤ epsilon) (hh : IsAXU2 h epsilon) :
    PaddedConstructionSecure (n := n) h false ((n : ℝ) * epsilon) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P41

end
Source
Key recycling in authentication, arXiv:1202.1229v3, PDF p. 16, Corollary 7
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

Let KKK be finite and nonempty, let XXX contain at least two distinct elements, let m,nm,nm,n be natural numbers with n≥1n\ge1n≥1, and let h:K×X→{0,1}mh:K\times X\to\{0,1\}^mh:K×X→{0,1}m and ϵ≥0\epsilon\ge0ϵ≥0 satisfy: for every distinct x,yx,yx,y and every ccc, the fraction of keys with h(k,x)⊕h(k,y)=ch(k,x)\oplus h(k,y)=ch(k,x)⊕h(k,y)=c is at most ϵ\epsilonϵ. Choose uniformly a key kkk and nnn independent uniform mmm-bit pads pip_ipi​, retaining this seed during the execution. Real and ideal machines start with an empty sent list, zero received submissions, no first submitted pair, and a false closed flag. A send xxx, when the sent-list length is i<ni<ni<n, appends and outputs (x,h(k,x)⊕pi)(x,h(k,x)\oplus p_i)(x,h(k,x)⊕pi​) in the real machine and (x,pi)(x,p_i)(x,pi​) in the ideal machine. A submission (y,u)(y,u)(y,u), when the received count is i<ni<ni<n, increments that count, stores the pair if it is the first submission, and emits yyy on acceptance or failure otherwise. The real machine accepts exactly when u=h(k,y)⊕piu=h(k,y)\oplus p_iu=h(k,y)⊕pi​; the ideal machine accepts exactly when the pair equals sent-list entry iii, with a missing entry causing rejection. Sends and submissions have separate allowances, so submissions may precede sends. Requests exceeding an allowance are silent. Every timeout leaves the state unchanged and is silent; no keys are released by any transition. Silent outputs contain no tag, no deliveries, and no keys. For every inductively generated terminating Boolean test issuing sends and timeouts, with each emitted pair automatically submitted and its tag hidden, the real and ideal uniform averages of the final Boolean coincide. For every such test allowed arbitrary sends, submissions, and timeouts and access to the complete outputs, the absolute difference of those averages is at most nϵn\epsilonnϵ. Here m=0m=0m=0 is permitted, and neither ϵ\epsilonϵ nor nϵn\epsilonnϵ is required to be at most one.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me