Documentation

CslibFrontier.Crypto.Computational.TreeSignature.Security

Security of stateless tree signatures #

Steps toward stateless EUF-CMA security of TreeSignature.scheme, [BS23], Section 14.6.3, Theorem 14.6, p. 600, in the binary case q = 2. An indexed EUF-CMA secure signature scheme S of capacity at least 2, used at indices 0 and 1 only, and a length-preserving pseudorandom function yield a stateless many-time signature scheme (eufCMA_scheme_of_prf). That is not Theorem 14.6, because its PRF premise is stronger than the source's, as explained below; the theorem itself is open (#5293).

Theorem 14.6 covers a q-ary tree of depth d for poly-bounded d and q with q ^ d super-poly. The tree here is binary, so 2 ^ depth n must be super-poly: the asymptotic theorems assume that 1 / 2 ^ depth n is negligible, with depth computable in polynomial time. The source's term Q ^ 2 / (2 q ^ d) becomes Q ^ 2 / 2 ^ (depth n + 1), and its factor Q d becomes dyadicSize (Q * depth n), a power of two in (Q d, 2 Q d] when Q d ≥ 1. The tree for general q is not formalized (#5293). Besides the construction's deviations, listed in CslibFrontier.Crypto.Computational.TreeSignature, the theorems differ from the source in two ways.

Using family at the rescaled parameter coinParam budget n ≥ n adds no assumption: the proof turns its security there into a bound negligible in n (exists_negligible_treeGame_le). The premise that family is a length-preserving PRF, on every key length and every query, is however stronger than the source's. It implies that the coins prfCoins family are pseudorandom (PseudorandomFunction.coinIndistinguishable), but the converse is not proved. The proof passes through the coin games coinRealGame and coinIdealGame, but these accept every request word, and a request of at least N bits reaches family at its first N bits, so they expose family on every N-bit input as its own PRF games do. A faithful Theorem 14.6 needs the coin games restricted to the tree's requests at the parameters coinParam budget n, and a proof that treeCoinAdversary stays in that domain.

Starting from treeGame (TreeSignature.scheme's eufCmaGame), the reduction is split into four focused companion modules after the PRF-to-random-function coin hybrid (CslibFrontier.Crypto.Computational.TreeSignature.CoinHybrid):

Both game hops share the leaf-guarded signing handler combinators in CslibFrontier.Crypto.Computational.TreeSignature.Handlers. This module assembles the concrete and asymptotic security theorems and existential upgrades.

Combining this upgrade with OneWay.exists_pseudorandomFunction and OneWay.exists_indexedEUFCMA constructs a stateless EUF-CMA secure signature scheme from a one-way function and a collision-resistant hash family (OneWay.exists_eufCMA_of_hashFamily). With target collision-resistant hashing from inaccessible entropy in place of the collision-resistant hash family, CslibFrontier.Crypto.Computational.Rompel removes that assumption: every uniform OneWay function yields a stateless many-time SignatureScheme satisfying EUFCMA (OneWay.exists_eufCMA, [Rom90]).

Main results #

Steps toward Theorem 14.6 with q = 2 #

References #

theorem Cslib.Crypto.TreeSignature.succProbability_treeIdealGame_le (S : IndexedSignatureScheme) (T : S.Seeded) (depth N slotBound sigCap : ℕ → ℕ) {n Q : ℕ} (hcap : 2 ≤ S.capacity n) (hdepth_pos : 1 ≤ depth n) (hwidth : 2 * depth n + 4 ≤ N n) (hkgBudget : T.keyGenBudget n ≤ N n) (hsgBudget : ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → T.signBudget keys.2 u msg ≤ N n) (hslot : Q * depth n ≤ slotBound n) (hsigCap : ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → ∀ σ ∈ (S.sign keys.2 u msg).eval.support, σ.length ≤ sigCap n) (adversary : Forger) (hq : ∀ root ∈ (S.keyGen n).eval.support, ProbOracleComp.IsQueryBounded (adversary n ((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, root.1))) Q) :
Game.succProbability (treeIdealGame S T depth N adversary n).eval ≤ ↑(Probability.dyadicSize (slotBound n)) * Game.succProbability (S.indexedEufCmaGame (indexedForger S depth slotBound sigCap adversary) n).eval + ↑Q ^ 2 / 2 ^ (depth n + 1)

Concrete security of treeIdealGame (a step of the proof of [BS23], Theorem 14.6): combining the lazy-coin leaf-collision hybrid and the planted-node indexed-forgery reduction.

theorem Cslib.Crypto.TreeSignature.succProbability_eufCmaGame_scheme_le (S : IndexedSignatureScheme) (T : S.Seeded) (family : List Bool → List Bool → List Bool) (depth N inv slotBound sigCap : ℕ → ℕ) (hcoins : Turing.MultiTapeTM.ComputableInPolyTime (fun (x : List Bool × List Bool × ℕ) => match x with | (k, input, length) => prfCoins family k input length) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encUnary)) Turing.MultiTapeTM.encBits) (hN : Turing.MultiTapeTM.ComputableInPolyTime N Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hdepth : Turing.MultiTapeTM.ComputableInPolyTime depth Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hcap : ∀ (n : ℕ), 2 ≤ S.capacity n) (hdepth_pos : ∀ (n : ℕ), 1 ≤ depth n) (hinv : ∀ (n : ℕ), inv (N n) = n) {n Q : ℕ} (hwidth : 2 * depth n + 4 ≤ N n) (hkgBudget : T.keyGenBudget n ≤ N n) (hsgBudget : ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → T.signBudget keys.2 u msg ≤ N n) (hslot : Q * depth n ≤ slotBound n) (hsigCap : ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → ∀ σ ∈ (S.sign keys.2 u msg).eval.support, σ.length ≤ sigCap n) (adversary : Forger) (hq : ∀ root ∈ (S.keyGen n).eval.support, ProbOracleComp.IsQueryBounded (adversary n ((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, root.1))) Q) :
Game.succProbability ((scheme S T (prfCoins family) N depth hcoins hN hdepth hcap hdepth_pos).eufCmaGame adversary n).eval ≤ Game.advantage (prfRealGame id family (coinDistinguisher (treeCoinAdversary S T depth N inv adversary)) (N n)).eval (prfIdealGame id id (coinDistinguisher (treeCoinAdversary S T depth N inv adversary)) (N n)).eval + ↑(Probability.dyadicSize (slotBound n)) * Game.succProbability (S.indexedEufCmaGame (indexedForger S depth slotBound sigCap adversary) n).eval + ↑Q ^ 2 / 2 ^ (depth n + 1)

Concrete bound for TreeSignature.scheme at one parameter n, a step toward [BS23], Section 14.6.3, Theorem 14.6, p. 600, in the binary case q = 2, not the cited result: the forging probability of any Q-query forger against TreeSignature.scheme with prfCoins family is bounded by the PRF distinguishing advantage of coinDistinguisher (treeCoinAdversary …) at N n, plus dyadicSize (slotBound n) times indexedForger's indexed forging probability against S, plus (Q ^ 2 : ℝ≥0) / 2 ^ (depth n + 1). The source's terms are Q d · iSIGadv and Q ^ 2 / (2 q ^ d); general q is not formalized (#5293).

theorem Cslib.Crypto.TreeSignature.eufCMA_scheme_of_prf_of_inv (S : IndexedSignatureScheme) (hS : S.IndexedEUFCMA) (T : S.Seeded) {family : List Bool → List Bool → List Bool} (hF : PseudorandomFunction family) {depth N inv : ℕ → ℕ} (hdepth : Turing.MultiTapeTM.ComputableInPolyTime depth Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hN : Turing.MultiTapeTM.ComputableInPolyTime N Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hinvPoly : Turing.MultiTapeTM.ComputableInPolyTime inv Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hcap : ∀ (n : ℕ), 2 ≤ S.capacity n) (hdepth_pos : ∀ (n : ℕ), 1 ≤ depth n) (hNge : ∀ (n : ℕ), n ≤ N n) (hinv : ∀ (n : ℕ), inv (N n) = n) (hwidth : ∀ (n : ℕ), 2 * depth n + 4 ≤ N n) (hkgBudget : ∀ (n : ℕ), T.keyGenBudget n ≤ N n) (hsgBudget : ∀ (n : ℕ), ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → T.signBudget keys.2 u msg ≤ N n) (hdepthNeg : Negligible fun (n : ℕ) => 1 / 2 ^ depth n) :
(scheme S T (prfCoins family) N depth ⋯ hN hdepth hcap hdepth_pos).EUFCMA

Step toward [BS23], Section 14.6.3, Theorem 14.6, p. 600, in the binary case q = 2, not the cited result: its PRF premise is stronger than the source's (#5293). This is eufCMA_scheme_of_prf with a general PRF parameter N and an explicit left inverse: if S is indexed EUF-CMA secure with capacity at least 2, family is a length-preserving pseudorandom function, N covers all tree coin requests and has a polynomial-time left inverse inv, and (1 : ℝ≥0) / 2 ^ depth n is negligible, then TreeSignature.scheme is stateless EUF-CMA secure. The premise and the other deviations are those of eufCMA_scheme_of_prf, with N in place of coinParam budget.

theorem Cslib.Crypto.TreeSignature.eufCMA_scheme_of_prf (S : IndexedSignatureScheme) (hS : S.IndexedEUFCMA) (T : S.Seeded) {family : List Bool → List Bool → List Bool} (hF : PseudorandomFunction family) {depth budget : ℕ → ℕ} (hdepth : Turing.MultiTapeTM.ComputableInPolyTime depth Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hbudget : Turing.MultiTapeTM.ComputableInPolyTime budget Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hcap : ∀ (n : ℕ), 2 ≤ S.capacity n) (hdepth_pos : ∀ (n : ℕ), 1 ≤ depth n) (hwidth : ∀ (n : ℕ), 2 * depth n + 4 ≤ budget n) (hkgBudget : ∀ (n : ℕ), T.keyGenBudget n ≤ budget n) (hsgBudget : ∀ (n : ℕ), ∀ keys ∈ (S.keyGen n).eval.support, ∀ u ≤ 1, ∀ (msg : List Bool), TreeMsg S n msg → T.signBudget keys.2 u msg ≤ budget n) (hdepthNeg : Negligible fun (n : ℕ) => 1 / 2 ^ depth n) :
(scheme S T (prfCoins family) (coinParam budget) depth ⋯ ⋯ hdepth hcap hdepth_pos).EUFCMA

Step toward [BS23], Section 14.6.3, Theorem 14.6, p. 600, in the binary case q = 2, not the cited result: its PRF premise hF is stronger than the source's (#5293). If S is indexed EUF-CMA secure with capacity at least 2, used at indices 0 and 1 only, family is a length-preserving pseudorandom function, budget covers all tree coin requests, and (1 : ℝ≥0) / 2 ^ depth n is negligible, then TreeSignature.scheme with coins prfCoins family at the PRF parameter coinParam budget n is stateless EUF-CMA secure.

Theorem 14.6 assumes only that its coin function F, defined over (K, {1, …, q} ^ {≤ d}, {0, 1} ^ w), is a PRF. Here the coins are prfCoins family: family at the padded request, truncated. The premise hF asks that family be a PRF on every key length and every query. It implies that the coins are pseudorandom (PseudorandomFunction.coinIndistinguishable), but the converse is not proved. The proof passes through that coin indistinguishability, but over every request word and every PRF parameter, and a request of at least N bits reaches family at its first N bits, so those games expose family on every N-bit input as its own PRF games do. Theorem 14.6 itself needs the coin games restricted to the tree's requests at the parameters coinParam budget n. The rescaled parameter adds no assumption, since the proof turns the PRF's security at coinParam budget n ≥ n into a bound negligible in n.

The other deviations: the tree is binary, so the source's condition that q ^ d is super-poly is hdepthNeg, and general q is not formalized (#5293); and the outer messages are n-bit.

Corollary of the step eufCMA_scheme_of_prf toward [BS23], Section 14.6.3, Theorem 14.6, p. 600, with q = 2, not the cited result: any indexed EUF-CMA secure signature scheme of capacity at least 2 and any length-preserving pseudorandom function yield a stateless EUF-CMA secure signature scheme on n-bit messages. The scheme is TreeSignature.scheme with depth n + 1, so that 2 ^ (n + 1) is super-poly, and coins prfCoins family. The premise hF is stronger than the source's PRF premise on the coins, as eufCMA_scheme_of_prf explains (#5293).

Stateless many-time signatures from indexed signatures and one-way functions: any indexed EUF-CMA secure signature scheme of capacity at least 2 and any one-way function yield a stateless EUF-CMA secure signature scheme.

Stateless many-time signatures from one-way functions and collision-resistant hash families: combining Lamport one-time signatures, depth-1 Merkle trees (capacity 2), PRFs from one-way functions, and stateless tree signatures yields a stateless EUF-CMA secure signature scheme.