Commitment schemes #
A commitment scheme Commitment.Scheme K M C O has typed public keys, messages, commitments and
openings ([BS23], Section 8.12, p. 344, and Definition 8.8). Key generation draws the
public parameter, commit produces a commitment together with its opening, and verify checks
an opening. Correctness is a separate property (Scheme.Correct).
Both security notions are stated as experiments for one fixed scheme:
- Hiding (
Scheme.hidingExperiment): draw a key and run the left-or-right experimentlrExperimenton it, where the challenge is the commitment to the selected message without its opening. Every pair of typed messages is admissible. - Binding (
Scheme.bindingExperiment): draw a key, let the adversary output aBindingCollision, and accept when it opens one commitment to two different messages.
A scheme is perfectly hiding at a key (Scheme.PerfectlyHidingAt) when the commitment law does not
depend on the message. At such a key, every adversary has advantage zero
(Scheme.advantage_lrExperiment_eq_zero). In general, the hiding advantage is at most the
probability that key generation outputs a key that is not perfectly hiding
(Scheme.advantage_hidingExperiment_le). Asymptotic security over a family of schemes and the
efficiency of adversaries are stated on top of these experiments.
Main definitions #
Cslib.Crypto.Commitment.Scheme: a commitment scheme with typed keys, messages, commitments and openings.Cslib.Crypto.Commitment.Scheme.Correct: every honest opening verifies.Cslib.Crypto.Commitment.Scheme.commitment: the commitment to a message, without its opening.Cslib.Crypto.Commitment.Scheme.hidingExperiment: the hiding experiment.Cslib.Crypto.Commitment.BindingCollision,Cslib.Crypto.Commitment.Scheme.isBindingCollision,Cslib.Crypto.Commitment.Scheme.bindingExperiment: the binding experiment and its winning condition.Cslib.Crypto.Commitment.Scheme.PerfectlyHidingAt: the commitment law is message-independent at a key.
Main results #
Cslib.Crypto.Commitment.Scheme.eval_hidingExperiment: the hiding experiment is the left-or-right experiment averaged over key generation.Cslib.Crypto.Commitment.Scheme.advantage_lrExperiment_eq_zero: zero advantage at a perfectly hiding key.Cslib.Crypto.Commitment.Scheme.advantage_hidingExperiment_le: the hiding advantage is at most the probability of a key that is not perfectly hiding.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 8.12 (Definition 8.8, p. 344).
A commitment scheme ([BS23], Section 8.12, p. 344) with public keys K, messages
M, commitments C and openings O.
An attempted double opening: one commitment together with two messages and their openings.
- commitment : C
The commitment opened twice.
- msg₀ : M
The first message.
- opening₀ : O
The opening of
commitmenttomsg₀. - msg₁ : M
The second message.
- opening₁ : O
The opening of
commitmenttomsg₁.
The commitment to m under k, without its opening. This is the challenge in the hiding
experiment.
The hiding experiment of the scheme S ([BS23], Section 8.12, Definition 8.8): draw
a key and run the left-or-right experiment on it. The adversary chooses two messages from the key,
the challenger commits to the message selected by b and gives the adversary the commitment
without its opening, and the adversary's guess is the output. Every pair of messages is
admissible.
The hiding experiment is the left-or-right experiment averaged over key generation.
The scheme is perfectly hiding at the key k when the law of the commitment does not depend on
the message.
At a perfectly hiding key, the left-or-right experiment has the same law for both bits.
Perfect hiding at a key: at a perfectly hiding key, every adversary, even a computationally unbounded one, has advantage zero in the left-or-right experiment.
Hiding up to a bad key: if the scheme is perfectly hiding at every key outside bad, then
every adversary, even a computationally unbounded one, has hiding advantage at most the probability
that key generation outputs a key in bad.
c opens to two different messages under k: the messages differ and both openings verify
([BS23], Section 8.12, Definition 8.8).
The binding experiment of the scheme S ([BS23], Section 8.12, Definition 8.8): draw
a key, give it to the adversary, and accept when the adversary opens one commitment to two
different messages.