Three hash-and-OTP consequences of AXU2 hashing
OpenQAlgorithms.Papers.Independent.Intake100.P41.hash_otpLet be finite and nonempty, let be any message alphabet, and let for . Let be -AXU, with . For independent uniform and , set . Then:
- For and ,
- For each fixed , message , and tag ,
- For and ,
Thus OTP padding gives the source's ASU pair bound, tag uniformity independent of the hash index, and the conditional forgery bound. The conditioning probability is , including the one-element tag alphabet when .
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P41
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.4--5, Definition 2 and Eqs.(4)--(5): OTP extension is ASU2;
its tags are uniform for every fixed hash key; the conditional pair bound holds.
No nontrivial-message assumption is needed for these algebraic identities. -/
theorem hash_otp {K X : Type*} [Fintype K] [Nonempty K] {m : ℕ}
(h : K → X → Tag m) (epsilon : ℝ) (hepsilon : 0 ≤ epsilon)
(hh : IsAXU2 h epsilon) :
IsASU2 (fun seed : K × Tag m => paddedTag h seed.1 seed.2) epsilon ∧
(∀ k x t, uniformProbability (fun pad => paddedTag h k pad x = t) =
1 / (Fintype.card (Tag m) : ℝ)) ∧
(∀ x y, x ≠ y → ∀ a b,
uniformProbability (fun seed : K × Tag m =>
paddedTag h seed.1 seed.2 x = a ∧ paddedTag h seed.1 seed.2 y = b) /
uniformProbability (fun seed : K × Tag m => paddedTag h seed.1 seed.2 x = a)
≤ epsilon) := by sorry
end QAlgorithms.Papers.Independent.Intake100.P41
end
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
Let be a finite nonempty type, an arbitrary type, , , and . Suppose that, for every distinct and every , the fraction of keys satisfying is at most . Put , where is an -bit pad. Then all three assertions hold: for every distinct and tags , the fraction of uniformly chosen satisfying both and is at most ; for every fixed , the fraction of pads satisfying is exactly ; and, for every distinct and tags ,
Each probability here means the cardinality of the specified subset divided by the cardinality of its finite uniform seed space. No upper bound on is assumed. The assertions involving distinct messages are vacuous if has at most one element; is included.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.