Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Concurrent multi-message authentication with final key recycling

Open
QAlgorithms.Papers.Independent.Intake100.P41.authentication_many_recycling

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

prove2quantum

Let n≥1n\ge1n≥1, let KKK be a finite nonempty key set, let XXX contain at least two messages, and put T={0,1}mT=\{0,1\}^mT={0,1}m for m≥0m\ge0m≥0. Suppose h:K×X→Th:K\times X\to Th:K×X→T is ε\varepsilonε-AXU2_22​, where ε≥0\varepsilon\ge0ε≥0. The input key resource supplies one uniform hash key kkk and nnn independent uniform pads p1,…,pn∈Tp_1,\ldots,p_n\in Tp1​,…,pn​∈T. Alice tags her iiith input xix_ixi​ by hk(xi)⊕pih_k(x_i)\oplus p_ihk​(xi​)⊕pi​; Bob verifies his iiith submitted pair with pip_ipi​. Sends and submissions are ordered separately, and later sends may precede earlier verifications. Bob exports the retained hash key after all nnn verifications, or at the common final timeout with a rejection for each missing delivery. Alice exports it at that timeout.

Let RnR_nRn​ be this real system, and let SnS_nSn​ be the matching multiple authentic-channel resource with a fresh uniform key. Use the nnn fixed one-message simulators, with independent uniform tags. With honest forwarding filters, the real and ideal systems agree exactly; under arbitrary joint adaptive interaction,

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

The reserve contains one hash-index key and exactly nnn pads, corresponding to the source's key consumption ∣k1∣+n∣k2∣|k_1|+n|k_2|∣k1​∣+n∣k2​∣. This result supports concurrent authentication followed by arbitrary reuse of the retained key, without requiring synchronization between individual messages.

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.13--15, Theorem 6: one hash key and n fresh pads, concurrent sends,
ordered submissions, final synchronized arbitrary recycling, and n epsilon
resource security. Figure 10 and Section 5.1 fix Bob's earlier release, despite
the proof's inconsistent phrase about both releases occurring at timeout. -/
theorem authentication_many_recycling {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 true ((n : ℝ) * epsilon) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P41

end
Source
Key recycling in authentication, arXiv:1202.1229v3, PDF p. 14, Theorem 6
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 a list of nnn independent uniform mmm-bit pads pip_ipi​, keeping this seed fixed throughout execution. Consider real and ideal machines initially having no sent pairs, zero received submissions, no first submitted pair, and a false closed flag. While open, a send xxx is allowed when the sent-list length is i<ni<ni<n; it 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) is allowed when the received count is i<ni<ni<n, independently of how many sends occurred. It increments that count, records the pair if it is the first submission, and emits one delivery, namely yyy on acceptance and failure otherwise. Real acceptance means u=h(k,y)⊕piu=h(k,y)\oplus p_iu=h(k,y)⊕pi​; ideal acceptance means that the pair is exactly the sent-list entry at index iii, so a missing entry causes rejection. Submission number nnn releases kkk to Bob regardless of acceptance. A timeout closes the machine, sets its received count to nnn, outputs n−in-in−i failure deliveries when the previous received count was iii, releases kkk to Alice, and releases kkk to Bob exactly when i<ni<ni<n. Closed machines and requests exceeding their respective allowances are silent, meaning no tag, no deliveries, and no key outputs. For every inductively generated terminating Boolean test issuing only sends and timeouts, with each emitted pair automatically submitted and its tag hidden from the test, the uniform averages of the final Boolean in the two machines are equal. For every such test issuing arbitrary sends, submissions, and timeouts and branching on the complete outputs, the absolute difference of those averages is at most nϵn\epsilonnϵ. The definition allows m=0m=0m=0 and places no upper bound on ϵ\epsilonϵ or nϵn\epsilonnϵ.

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