Abstract Commitment Schemes #
This file defines the abstract structure for commitment schemes and their security games (correctness, hiding, binding).
Main definitions #
CommitmentScheme— Structure for a commitment scheme with setup, commit, verifyCorrect_Game— Correctness gameHiding_Game₀/₁— Hiding games (real/ideal)Binding_Game— Binding game
References #
- SSProve/Commitments — Com.v
- [Kate, Zaverucha, Goldberg 2010 — §3]
Commitment Scheme Structure #
An abstract commitment scheme.
A commitment scheme consists of:
- A setup algorithm producing public parameters
- A commit algorithm producing a commitment and opening
- A verify algorithm checking validity
- Key : Type
Public parameters / key type
- Message : Type
Message space
- Commitment : Type
Commitment type
- Opening : Type
Opening / decommitment type
- instDecEqKey : DecidableEq self.Key
- instDecEqMessage : DecidableEq self.Message
- instFintypeCommitment : Fintype self.Commitment
- instNonemptyCommitment : Nonempty self.Commitment
- instDecEqCommitment : DecidableEq self.Commitment
- instDecEqOpening : DecidableEq self.Opening
- setup : Core.SPComp self.Key
Probabilistic setup algorithm
- commit : self.Key → self.Message → Core.SPComp (self.Commitment × self.Opening)
Probabilistic commitment: (commitment, opening)
- verify : self.Key → self.Message → self.Commitment → self.Opening → Bool
Deterministic verification
Instances For
Correctness #
Correctness game: setup, commit, then verify.
Returns true if verify accepts the honest commitment.
Equations
- CatCrypt.Examples.Commitments.Correct_Game S m = do let k ← S.setup let __x ← S.commit k m match __x with | (c, o) => CatCrypt.Core.SPComp.pure (S.verify k m c o)
Instances For
A commitment scheme is correct if for all messages, the correctness game always returns true.
Equations
Instances For
Hiding #
Type of hiding adversary: chooses two messages, then distinguishes
- choose : S.Key → Core.SPComp (S.Message × S.Message)
Choose two messages given the public key
- distinguish : S.Commitment → Core.SPComp Bool
Distinguish given commitment
Instances For
Hiding game with bit b: commit to m_b
Equations
- One or more equations did not get rendered due to their size.
Instances For
Hiding advantage
Equations
Instances For
Binding #
Type of binding adversary: given key, output two valid openings for different messages
Equations
- CatCrypt.Examples.Commitments.BindingAdversary S = (S.Key → CatCrypt.Core.SPComp (S.Message × S.Opening × S.Message × S.Opening × S.Commitment))
Instances For
Binding game: adversary wins if it finds two valid openings for the same commitment but different messages
Equations
- One or more equations did not get rendered due to their size.
Instances For
Binding advantage