Fair-coin realization of Pedersen commitments and key generation #
PrimeOrderGroupFamily.pedersenCommitProb and PrimeOrderGroupFamily.pedersenKeyGenProb sample
their exponents using the bounded sampleExp program (ProbComp.sampleModNat) and evaluate the
public commitment and key-generation operations. Their native strict-PPT certificates charge the
unary accuracy parameter, the group description or advertised public-key encoding
pedersenScheme.encodeKey, and the message word. Each sampleExp draw uses n + |encNat q| fair
bits for q = F.order d, within statistical distance 1 / 2 ^ n of exact uniform on ZMod q, and
every opening has at most |encNat q| bits.
Replacing ideal commitment sampling (pedersenScheme.commitDist) with pedersenCommitProb, or
ideal key generation (pedersenKeyDist) with pedersenKeyDistProb, changes any randomized Boolean
continuation by at most 1 / 2 ^ n. Combining this with the exact hiding and binding reductions in
PedersenCommitment.lean yields concrete and asymptotic hiding and binding bounds for:
pedersenHidingProbForKey(chosen-message hiding withpedersenCommitProbat a fixed keyh ≠ 0, with advantage at most2 / 2 ^ n),pedersenHidingProbGameand its executableProbComp BoolrealizationpedersenHidingProbExperiment(where both key generationpedersenKeyDistProband challenge commitment samplingpedersenCommitProbusesampleExp, with advantage at most1 / m + 4 / 2 ^ nand uniform strict-PPT certificateisPPTOn_pedersenHidingProbExperiment),pedersenScheme.bindingGame (F.pedersenKeyDistProb setup)(BindingunderF.DiscreteLog setup), which never invokescommitDist, and- as an ideal-sampling step,
pedersenScheme.hidingGame (F.pedersenKeyDistProb setup), which samples the key withsampleExpbut still draws the commitment randomness exactly uniformly at thePMFlevel throughpedersenScheme.commitDist, becauseCommitmentScheme.commitDisttakes no security parameter (#6133).
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommitProb: bounded fair-coin commitment and opening.Cslib.Crypto.PrimeOrderGroupFamily.pedersenKeyGenProb,Cslib.Crypto.PrimeOrderGroupFamily.pedersenKeyDistProb: bounded fair-coin Pedersen key generation and setup distribution.Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingProbForKey,Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingProbGame,Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingProbExperiment: chosen-message hiding games and executable experiment usingpedersenCommitProbandpedersenKeyGenProb.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_pedersenCommitProb,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_pedersenKeyGenProb,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_pedersenHidingProbExperiment: uniform strict-PPT certificates for commitment sampling, key generation, and the native hiding experiment.Cslib.Crypto.PrimeOrderGroupFamily.eval_pedersenCommitProb,Cslib.Crypto.PrimeOrderGroupFamily.eval_pedersenKeyGenProb: exact output laws.Cslib.Crypto.PrimeOrderGroupFamily.advantage_bind_pedersenCommitProb_le,Cslib.Crypto.PrimeOrderGroupFamily.advantage_bind_pedersenKeyGenProb_le,Cslib.Crypto.PrimeOrderGroupFamily.advantage_bind_pedersenKeyDistProb_le: continuation error at most1 / 2 ^ nagainst the ideal distributions.Cslib.Crypto.PrimeOrderGroupFamily.pedersenVerify_of_mem_support_pedersenCommitProb,Cslib.Crypto.PrimeOrderGroupFamily.length_opening_pedersenCommitProb_le: support correctness and opening-length bound.Cslib.Crypto.PrimeOrderGroupFamily.advantage_pedersenHidingProbForKey_le_of_ne_zero,Cslib.Crypto.PrimeOrderGroupFamily.advantage_pedersenHidingProbGame_le,Cslib.Crypto.PrimeOrderGroupFamily.negligible_advantage_pedersenHidingProbGame: concrete and asymptotic hiding forpedersenHidingProbForKeyandpedersenHidingProbGame.Cslib.Crypto.PrimeOrderGroupFamily.DiscreteLog.pedersenScheme_binding_pedersenKeyDistProb: computationalBindingofpedersenSchemeunderpedersenKeyDistProb.
Ideal-sampling step #
pedersenScheme.hidingGame (F.pedersenKeyDistProb setup) draws the commitment randomness exactly
uniformly at the PMF level, so the results about it are steps toward
negligible_advantage_pedersenHidingProbGame, not the cited result.
PrimeOrderGroupFamily.advantage_pedersenHidingGame_pedersenKeyDistProb_le,PrimeOrderGroupFamily.negligible_advantage_pedersenHidingGame_ideal_pedersenKeyDistProb,PrimeOrderGroupFamily.pedersenScheme_statisticalHiding_ideal_pedersenKeyDistProb:StatisticalHidingofpedersenSchemeunderpedersenKeyDistProb, with ideal commitments.
Sample a bounded approximately uniform exponent, then evaluate Pedersen's public commitment
operations on its canonical bit representation. The accuracy parameter controls the sampling
error; the ideal law remains pedersenScheme.commitDist.
Pedersen commitment sampling is uniformly strict PPT in the unary accuracy parameter, actual public key encoding, and message word.
The sampled output is the existing Pedersen commitment-and-opening map applied to the approximately uniform residue law.
Every randomized Boolean continuation changes by at most 1 / 2 ^ n when the sampled
commitment is replaced with the existing ideal commitment law.
A sampled commitment and opening verify whenever the message is valid.
Every supported opening has at most the bit length of the public group order.
Bounded fair-coin Pedersen key generation #
Sample a bounded approximately uniform key exponent α ← F.sampleExp n d and return the
Pedersen commitment key ⟨d, (α : ZMod (F.order d)) • F.generator d⟩.
pedersenKeyGenProb is uniformly strict PPT in (n, d) with output encoding
F.pedersenScheme.encodeKey.
The output law of pedersenKeyGenProb n d is the key map α ↦ ⟨d, α • g⟩ applied to the
approximately uniform residue law (ProbComp.eval (F.sampleExp n d)).map Nat.cast.
Every randomized Boolean continuation changes by at most 1 / 2 ^ n when pedersenKeyGenProb
is replaced by an exact uniform exponent α ← PMF.uniformOfFintype (ZMod (F.order d)).
Draw d ← setup n and run F.pedersenKeyGenProb n d to sample a Pedersen key using
bounded fair-coin exponent sampling.
Replacing pedersenKeyDistProb setup n with the ideal key distribution
pedersenKeyDist setup n changes any Boolean game continuation by at most 1 / 2 ^ n.
Chosen-message hiding and binding for pedersenCommitProb and pedersenKeyDistProb #
Chosen-message hiding at a fixed Pedersen key key when the challenger samples the challenge
commitment using F.pedersenCommitProb n key msg instead of the ideal commitDist.
For any non-identity commitment key h ≠ 0, any (even computationally unbounded)
Encryption.WordAdversary has distinguishing advantage at most 2 / 2 ^ n between bit = false
and bit = true in pedersenHidingProbForKey ⟨d, h⟩.
Chosen-message hiding game where both key generation (pedersenKeyDistProb setup n) and
challenge commitment sampling (pedersenCommitProb) use bounded fair-coin exponent sampling.
Unconditional hiding bound for pedersenHidingProbGame: when every supported group at
parameter n has order at least m > 0, any (even computationally unbounded)
Encryption.WordAdversary has distinguishing advantage at most 1 / m + 4 / 2 ^ n in
pedersenHidingProbGame.
Asymptotic unconditional hiding for pedersenHidingProbGame: when every supported
group at parameter n has order at least m n > 0 and 1 / m n is negligible, every (even
computationally unbounded) Encryption.WordAdversary has negligible advantage in
pedersenHidingProbGame.
Executable ProbComp Bool hiding experiment at group description d: sample a key with
pedersenKeyGenProb n d, run adversary.choose on the encoded key, check message validity with
validPedersenMessageBool, sample the challenge commitment with pedersenCommitProb, and run
adversary.guess.
Evaluating pedersenHidingProbExperiment at a fixed group description d runs
pedersenKeyGenProb n d followed by pedersenHidingProbForKey.
Averaging pedersenHidingProbExperiment over d ← setup n yields
pedersenHidingProbGame.
pedersenHidingProbExperiment is uniformly strict PPT in (n, d) whenever adversary is a
uniform strict PPT Encryption.WordAdversary.
Unconditional hiding bound for pedersenScheme under pedersenKeyDistProb: when every
supported group at parameter n has order at least m > 0, any (even computationally unbounded)
Encryption.WordAdversary has distinguishing advantage at most 1 / m + 2 / 2 ^ n in
F.pedersenScheme.hidingGame (F.pedersenKeyDistProb setup).
Ideal-sampling step toward negligible_advantage_pedersenHidingProbGame, not the cited result:
when every supported group at parameter n has order at least m n > 0 and 1 / m n is
negligible, every (even computationally unbounded) Encryption.WordAdversary has negligible
advantage in F.pedersenScheme.hidingGame (F.pedersenKeyDistProb setup), which samples the key
with sampleExp but draws the commitment randomness exactly uniformly at the PMF level. The
native CommitmentScheme form is blocked on #6133.
Ideal-sampling step toward negligible_advantage_pedersenHidingProbGame, not the cited result:
pedersenScheme is statistically hiding (CommitmentScheme.StatisticalHiding) under the key law
pedersenKeyDistProb setup, which samples the key with sampleExp, while
pedersenScheme.commitDist still draws the commitment randomness exactly uniformly at the PMF
level, because CommitmentScheme.commitDist takes no security parameter (#6133).
Binding-to-discrete-logarithm bound under pedersenKeyDistProb: at parameter n, the
binding success probability under pedersenKeyDistProb setup is at most the discrete-logarithm
success probability of pedersenToDLAdversary adversary plus 1 / 2 ^ n.
Computational binding (CommitmentScheme.Binding) of pedersenScheme under
pedersenKeyDistProb and the discrete-logarithm assumption.