The Hash-and-Sign Paradigm from Collision-Resistant Hashing #
This module formalizes the single-public-key hash-and-sign paradigm ([KL20],
Section 13.3, Construction 13.3 and Theorem 13.4, pp. 467–468), which upgrades a fixed-length
SignatureScheme signing n-bit digests at security parameter n to an unrestricted
WordSignatureScheme signing arbitrary bit strings msg : List Bool using a collision-resistant
hash family H.
At security parameter n:
HashAndSign.keyGen S nruns(pk₀, sk₀) ← S.keyGen n, samples a single hash keys ← {0, 1}^n, and outputs the public keyencPair encBits encBits (pk₀, s)together with the secret keyencPair encBits encBits (sk₀, s).HashAndSign.sign S H sk msgdecodes(sk₀, s)fromskand outputsσ ← S.sign sk₀ (H s msg).HashAndSign.verify S H pk msg sigdecodes(pk₀, s)frompkand checksS.verify pk₀ (H s msg) sig.
Unlike the target collision-resistant construction TCRSignature.wordScheme
([BS23], Section 13.2.1), which must sample a fresh hash key per signature and attach it
to every signature because a universal one-way hash family cannot expose its key before the target
message is chosen, full collision resistance allows a single hash key s to be fixed once in the
public key so that signatures carry no hash-key overhead (sign returns a raw S-signature).
Following CollisionResistant and HashFamily, hash keys and digests both have length n with
uniform key sampling, specializing Construction 13.3 to digest length ℓ(n) = n and uniform Gen.
For the security reduction ([KL20], Theorem 13.4, p. 468), any execution of an
EUFCMA forger producing a fresh valid forgery (m*, σ*) against HashAndSign.scheme splits
pointwise into two cases:
- If some queried message
m ∈ queriedsatisfiesH s m = H s m*, thenm ≠ m*(sincem* ∉ queried), soHashAndSign.collisionFinderextracts a hash collision(m*, m)under the challenge keys. - Otherwise
H s m* ∉ queried.map (H s)and(H s m*).length = n, soHashAndSign.baseForgerforwards(H s m*, σ*)as a fresh validn-bit forgery inS.eufCmaGame.
This yields the tight pointwise bound succProbability_eufCmaGame_le with loss factor 1 on both
terms, and hence SignatureScheme.EUFCMA.wordEUFCMA_hashAndSign,
SignatureScheme.EUFCMA.wordEUFCMA_of_hashFamily, and
SignatureScheme.EUFCMA.wordEUFCMA_merkleDamgard.
In the negative direction, HashAndSign.not_eufCMA_scheme_of_collision shows that key-independent
collisions break the scheme: if two distinct messages m₀ ≠ m₁ collide under every hash key s,
a one-query forger queries m₀ and outputs its signature on m₁, winning eufCmaGame with
probability 1 at every security parameter n regardless of the underlying SignatureScheme S.
Main definitions #
Cslib.Crypto.HashAndSign.keyGen,Cslib.Crypto.HashAndSign.sign,Cslib.Crypto.HashAndSign.verify,Cslib.Crypto.HashAndSign.scheme: Construction 13.3 of [KL20] packaged as aWordSignatureScheme.Cslib.Crypto.HashAndSign.collisionFinder: collision-finding reduction from anEUFCMAforger.Cslib.Crypto.HashAndSign.baseForger: underlying fixed-length signature reduction from anEUFCMAforger.Cslib.Crypto.HashAndSign.fixedCollisionForger: one-query attacker exploiting a known hash collisionH s m₀ = H s m₁.
Main results #
Cslib.Crypto.HashAndSign.succProbability_eufCmaGame_le: forging againstHashAndSign.schemesucceeds at most as often as forging againstSplus finding a collision inH.Cslib.Crypto.SignatureScheme.EUFCMA.wordEUFCMA_hashAndSign: Theorem 13.4 of [KL20].Cslib.Crypto.SignatureScheme.EUFCMA.wordEUFCMA_of_hashFamily: specialization to a bundledHashFamily.Cslib.Crypto.SignatureScheme.EUFCMA.wordEUFCMA_merkleDamgard: specialization to aCompressionFamilyvia the one-bit-per-block Merkle–Damgård instancemerkleDamgard.Cslib.Crypto.HashAndSign.not_eufCMA_scheme_of_collision: key-independent collisions break the scheme.
References #
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, 3rd ed., Section 13.3 (Construction 13.3 and Theorem 13.4, pp. 467–468).
Construction 13.3: Single-Key Hash-and-Sign Scheme #
Total polynomial-time decoder for a paired key encPair encBits encBits (key₀, s).
Support characterization for HashAndSign.keyGen: every generated key pair packs a valid
base key pair keys₀ ∈ (ProbComp.eval (S.keyGen n)).support with an n-bit hash key s.
Correctness of Construction 13.3: for any length-preserving hash family (|H s msg| = |s|),
every signature produced by HashAndSign.sign under a honestly generated key pair verifies for any
arbitrary-length message msg : List Bool.
Construction 13.3 ([KL20], Section 13.3, p. 468): the single-public-key
hash-and-sign WordSignatureScheme built from a fixed-length SignatureScheme S and a
length-preserving hash family H.
Theorem 13.4: Reductions to Collision Finding and Fixed-Length Forgery #
Whenever m* ∉ queried and queried.find? (fun m => H s m == H s m*) succeeds, collisionOf
produces a genuine collision for H under key s.
Collision-finding reduction ([KL20], Theorem 13.4, Case 1): given challenge
parameter n and hash key s, generate (pk₀, sk₀) ← S.keyGen n, simulate the HashAndSign
signing oracle directly using sk₀ and s, and extract a colliding message pair via
collisionOf.
Stateless oracle handler that answers a WordSignatureScheme signing query ((), msg) by
querying the external fixed-length signing oracle on ((), H s msg) and truncating the response to
bound bits.
Underlying signature reduction ([KL20], Theorem 13.4, Case 2): given n and
base public key pk₀, sample a uniform n-bit hash key s, run adversary n ⟨pk₀, s⟩ by
forwarding hashed signing queries H s msg through hashSigningHandler, and output the hashed
forgery (H s m*, σ*).
When bound upper-bounds the bit-length of every signature in the support of
S.sign sk₀ (H s msg) and |H s msg| = n, interpreting hashSigningHandler against
S.signingOracle n sk₀ matches running (scheme S H hH hlen).signingOracle ⟨sk₀, s⟩ while mapping
the recorded query log queried to queried.map (H s).
Pointwise reduction inequality for Theorem 13.4 ([KL20], p. 468): whenever
bound n upper-bounds the bit-length of valid S-signatures at parameter n, the EUFCMA
forging probability of adversary against HashAndSign.scheme S H hH hlen is at most the sum of
the EUFCMA forging probability of baseForger H bound adversary against S and the collision-
finding probability of collisionFinder S H hH hlen adversary against H.
Key-Independent Collisions Break the Scheme #
One-query forger that queries m₀, truncates the reply to bound n bits, and outputs it as a
forgery on m₁. Whenever m₀ ≠ m₁ and H s m₀ = H s m₁, this attacker breaks
HashAndSign.scheme with probability 1.
If m₀ ≠ m₁ collide under every hash key (∀ s, H s m₀ = H s m₁) and bound n upper-bounds
the length of valid S-signatures, fixedCollisionForger bound m₀ m₁ wins
(scheme S H hH hlen).eufCmaGame with probability 1 at every security parameter n.
Key-independent collisions break Construction 13.3: if two distinct messages m₀ ≠ m₁
collide under every hash key s, then (scheme S H hH hlen) is not EUFCMA secure for any
underlying SignatureScheme S.
Theorem 13.4 ([KL20], Section 13.3, p. 468): if S is an EUFCMA-secure
fixed-length SignatureScheme and H is a polynomial-time length-preserving collision-resistant
hash family, then the single-public-key hash-and-sign scheme HashAndSign.scheme S H hH hlen is an
EUFCMA-secure WordSignatureScheme on arbitrary-length bit strings.
Theorem 13.4 specialized to a bundled HashFamily ([KL20], Section 13.3,
p. 468).
Merkle–Damgård + Hash-and-Sign ([KL20], Sections 6.2 and 13.3): an
EUFCMA-secure fixed-length SignatureScheme together with a collision-resistant 2 n → n
CompressionFamily yields an EUFCMA-secure WordSignatureScheme on arbitrary-length messages via
merkleDamgard and HashAndSign.scheme. merkleDamgard puts one message bit in each block; it is
not textbook length-strengthened Merkle–Damgård.