Public-parameter commitment schemes #
A CommitmentScheme specifies the exact commitment distribution and verification rule under
public parameters. Its injective public encoding makes every honest operation depend on the
parameters shown to the adversary. Efficient evaluation and realization of the ideal distributions
are separate properties. Commitment/PublicOperations supplies certificates for deterministic
evaluation on supplied randomness and verification, using exactly this public encoding.
Chosen-message hiding reuses Encryption.WordAdversary, with its explicit saved state and uniform
strict-PPT certificates. Binding asks an adversary for two distinct messages and openings of the
same commitment.
Main definitions #
Cslib.Crypto.CommitmentScheme: a public-parameter commitment scheme with exact distributional correctness.Cslib.Crypto.CommitmentScheme.hidingForKey,Cslib.Crypto.CommitmentScheme.hidingGame: chosen-message hiding experiments at a fixed key and under a setup distribution.Cslib.Crypto.CommitmentScheme.StatisticalHiding,Cslib.Crypto.CommitmentScheme.ComputationalHiding: statistical and computational hiding.Cslib.Crypto.CommitmentScheme.isBindingCollision,Cslib.Crypto.CommitmentScheme.bindingGame,Cslib.Crypto.CommitmentScheme.Binding: the binding predicate, experiment and security notion.
Main results #
Cslib.Crypto.CommitmentScheme.hidingForKey_eq_of_map_fst_commitDist_eq,Cslib.Crypto.CommitmentScheme.advantage_hidingForKey_eq_zero: a commitment-string marginal independent of the message gives exact hiding.Cslib.Crypto.CommitmentScheme.StatisticalHiding.computationalHiding: statistical hiding implies computational hiding.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 8.12 (Definition 8.8, p. 344).
A commitment scheme (C, V) with public parameters ([BS23], Section 8.12, p. 344,
and Definition 8.8):
encodeKey k: the encoded public parameter string presented to the adversary for keyk. This encoding is injective: equal public strings determine the same key and hence the same valid messages, commitment distributions, and verification results. Injectivity is an information-theoretic condition; decoding and evaluating honest operations from this string need separate efficiency certificates.ValidMessage k m: predicate characterizing valid message wordsmin the message space for keyk.commitDist k msg: the distribution of(c, o)(encoded commitment stringcand encoded opening stringo) produced byC(msg)under keyk.commitDistis modeled as aPMFrather than aProbCompso that group-based schemes such as Pedersen commitment can use the exact uniform distribution onZMod q(matchingDiscreteLog'sPMFsetup; strict-PPTProbCompmachines sampleZMod qonly approximately viasampleModNat).verify k m c o: the deterministic verification algorithmV(m, c, o)returningtrueto accept orfalseto reject. NeithercommitDistnorverifybundles a polynomial-time complexity certificate inCommitmentScheme, keeping the general scheme interface at the distributional layer; concrete instantiations certify their encoded evaluation and reduction algorithms separately (e.g.,computableInPolyTime_encodePedersenCommitandisPPTOn_pedersenToDLAdversary).validMessage_of_verifyandverify_of_mem_support:verifyaccepts only valid message words and accepts every(c, o)in the support ofcommitDist k mfor any valid message wordm.
Chosen-message hiding reuses Encryption.WordAdversary (Encryption.AdversaryOf (List Bool) from
CslibFrontier/Crypto/Computational/Encryption/Basic.lean), matching Boneh–Shoup's
semantic-security
formulation of commitment hiding.
Faithful encoding of the entire public parameter presented to the adversary.
Predicate characterizing valid message words in the message space for key
k.Distribution of
(c, o)(encoded commitment string and encoded opening string) for message wordmsgunder keyk.Verification algorithm
V(m, c, o)([BS23], Section 8.12, p. 344).- validMessage_of_verify (k : Key) (m c o : List Bool) : self.verify k m c o = true → self.ValidMessage k m
Only valid message words are accepted by
verify. - verify_of_mem_support (k : Key) (m : List Bool) (co : List Bool × List Bool) : self.ValidMessage k m → co ∈ (self.commitDist k m).support → self.verify k m co.1 co.2 = true
Correctness: every
(c, o)in the support ofcommitDist k mfor a valid message wordmis accepted byverify k m co.1 co.2.
The chosen-message hiding experiment ([BS23], Section 8.12, p. 344, and
Definition 8.8) at a fixed commitment key k : Key for hidden bit bit : Bool: the adversary
receives S.encodeKey k, chooses ((m₀, m₁), st), and receives the commitment string c = co.1
(without the opening co.2) for co ← S.commitDist k m_bit. Following Boneh–Shoup Section 8.12
(m₀, m₁ ∈ M), the challenger commits to m_bit when both chosen words satisfy S.ValidMessage k,
and defaults to m₀ otherwise so that invalid challenge pairs produce identical distributions in
both worlds.
If the commitment-string marginal (S.commitDist k msg).map Prod.fst is independent of the
message word, then S.hidingForKey k produces the exact same output distribution for any two hidden
bits b₁ and b₂, against every (even computationally unbounded) Encryption.WordAdversary.
When (S.commitDist k msg).map Prod.fst is independent of the message word, the hiding
advantage of any (computationally unbounded) adversary at key k between bit = false and
bit = true is 0.
The chosen-message hiding experiment ([BS23], Section 8.12, p. 344, and
Definition 8.8) under a key distribution keyDist : ℕ → PMF Key.
Statistical hiding ([BS23], Section 8.12, p. 344, and Definition 8.8): every (even
computationally unbounded) Encryption.WordAdversary has negligible distinguishing advantage in
S.hidingGame keyDist.
Computational hiding ([BS23], Section 8.12, p. 344, and Definition 8.8): every
uniform strict PPT Encryption.WordAdversary has negligible distinguishing advantage in
S.hidingGame keyDist.
Statistical hiding implies computational hiding against uniform strict PPT adversaries.
Boolean predicate testing whether (c, (m₀, o₀), (m₁, o₁)) is a valid binding collision under
S.verify k ([BS23], Section 8.12, p. 344, and Definition 8.8): m₀ ≠ m₁ and both
openings (m₀, o₀) and (m₁, o₁) are accepted by S.verify k for the commitment string c.
The commitment binding experiment ([BS23], Section 8.12, p. 344, and
Definition 8.8): draw k ← keyDist n, give S.encodeKey k to adversary, and accept when the
output (c, (m₀, o₀), (m₁, o₁)) satisfies S.isBindingCollision k (m₀ ≠ m₁ and both openings
verify under S.verify k).
Computational binding ([BS23], Section 8.12, p. 344, and Definition 8.8): every
uniform strict PPT adversary has negligible success probability in S.bindingGame keyDist.