The discrete-logarithm assumption #
A PrimeOrderGroupFamily is a family of cyclic groups of prime order. Fixing
F : PrimeOrderGroupFamily fixes the family, its element encodings and its algorithms. A value
d : F.Desc is a bundle of public group parameters selecting the group F.Carrier d, its order
F.order d and its generator F.generator d. For example, Schnorr parameters (p, q, g) select
the subgroup of order q of (ZMod p)ˣ generated by g. The API names Desc and encDesc refer
to the parameter type and its bit-string encoding.
Groups are written additively, as ZMod q-modules, so the book's g ^ α is α • g. Algorithms
receive the public parameters and words encoding group elements. The family supplies plain
polynomial-time functions of these inputs for the order, the encoded generator, addition and
multiplication by a natural number.
The discrete-logarithm experiment ([BS23], Attack Game 10.4) draws public group
parameters from a setup law and a uniform α : ZMod q, then gives the adversary those parameters
and the encoding of α • g; the adversary wins when the binary number it outputs is α modulo
q. DiscreteLog
asserts that every uniform strict PPT adversary wins with negligible probability.
As for DecisionLWE, this is a hypothesis, not a theorem. The setup law is arbitrary and is not
claimed to be efficiently sampleable: generating primes with certainty is not a strict PPT task,
since a fair-coin machine with a fixed clock fails with positive probability. The group parameters
are public, and an adversary's running time may depend on their encoded length.
Main definitions #
Cslib.Crypto.encDescBitsPair: encoding of public group parameters paired with two bit-string element words(d, x, y).Cslib.Crypto.PrimeOrderGroupFamily: cyclic groups of prime order with efficient operations.Cslib.Crypto.PrimeOrderGroupFamily.discreteLogGame: the discrete-logarithm experiment.Cslib.Crypto.PrimeOrderGroupFamily.DiscreteLog: the discrete-logarithm assumption.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_order_comp,Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_encode_generator,Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_add_comp,Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_smul_comp:fun_proprules for the order, encoded generator, word-level addition and word-level scalar multiplication on computed group parameters.Cslib.Crypto.PrimeOrderGroupFamily.smul_generator_injective: a discrete logarithm moduloqis unique.Cslib.Crypto.PrimeOrderGroupFamily.smul_generator_surjective,Cslib.Crypto.PrimeOrderGroupFamily.smul_generator_bijective: the generator map is bijective.Cslib.Crypto.PrimeOrderGroupFamily.uniform_smul_generator_add: the one-time group mask.
References #
Encoding of public group parameters d paired with two bit-string element words (d, x, y):
the framed encoding encDesc d of d (encPair adds the framing outside encDesc), followed by
framed x and unframed y.
A family of cyclic groups of prime order, indexed by public group parameters, with
polynomial-time operations on encoded elements. A value d : F.Desc selects the group, order
and generator within the fixed family F.
- Desc : Type
The bit-string encoding of the public group parameters given to algorithms.
The order of each group.
Every order is prime.
The groups, written additively.
Each group is commutative.
Each group is a
ZMod q-module, whereqis its order.The generator of each group.
Each group has
qelements.The generator is not the identity, so it generates the group of prime order.
Group elements as words.
Distinct elements have distinct encodings.
Addition of encoded elements.
- add_encode (d : self.Desc) (x y : self.Carrier d) : self.add (d, self.encode d x, self.encode d y) = self.encode d (x + y)
addadds encoded elements. Multiplication of an encoded element by a natural number.
- smul_encode (d : self.Desc) (a : ℕ) (x : self.Carrier d) : self.smul (d, a, self.encode d x) = self.encode d (↑a • x)
smulmultiplies encoded elements by natural numbers. - computableInPolyTime_order : Turing.MultiTapeTM.ComputableInPolyTime self.order self.encDesc Turing.MultiTapeTM.encNat
The order is computable in polynomial time from the public group parameters.
- computableInPolyTime_generator : Turing.MultiTapeTM.ComputableInPolyTime (fun (d : self.Desc) => self.encode d (self.generator d)) self.encDesc Turing.MultiTapeTM.encBits
The encoded generator is computable in polynomial time from the public group parameters.
- computableInPolyTime_add : Turing.MultiTapeTM.ComputableInPolyTime self.add (encDescBitsPair self.encDesc) Turing.MultiTapeTM.encBits
Addition is computable in polynomial time.
- computableInPolyTime_smul : Turing.MultiTapeTM.ComputableInPolyTime self.smul (Turing.MultiTapeTM.encPair self.encDesc (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat Turing.MultiTapeTM.encBits)) Turing.MultiTapeTM.encBits
Multiplication by a binary natural number is computable in polynomial time.
Equality of group elements, decided on their injective encodings.
The order of computed group parameters is computable in polynomial time.
The encoded generator of computed group parameters.
Word-level addition of computed group-element words is computable in polynomial time.
Word-level scalar multiplication of a computed group-element word by a computed natural number is computable in polynomial time.
A discrete logarithm modulo q is unique: α ↦ α • g is injective.
Every element of F.Carrier d is a scalar multiple of the generator: α ↦ α • g is
surjective.
The scalar map α ↦ α • g is a bijection between ZMod (F.order d) and F.Carrier d.
One-time group mask: for any group element m : F.Carrier d, masking m by γ • g for a
uniform γ : ZMod (F.order d) has the same distribution as γ • g itself.
The discrete-logarithm experiment ([BS23], Attack Game 10.4): draw public group
parameters and a uniform α, give the adversary those parameters and the encoding of α • g,
and accept when the binary number it outputs is α modulo q.
The discrete-logarithm assumption for a family and a setup law: every uniform strict PPT adversary, given the unary security parameter, public group parameters and the encoded instance, finds the discrete logarithm with negligible probability. This is a hypothesis, not a theorem.
It is [BS23], Attack Game 10.4 and Definition 10.6 (p. 409), read asymptotically as in
Section 10.5.2 (pp. 413–414), with these differences. The group parameters are drawn from
setup, which need not be efficiently samplable, whereas the source draws them with an efficient
system parameterization algorithm (Definition 10.9, p. 413); the assumption is the source's only
for setup laws that an efficient algorithm samples. The adversary's running time is polynomial in
the length of its whole input, including the encoded group parameters, which such a setup keeps
polynomial in n. The adversary writes the exponent as a binary number, read modulo q, where the
source's adversary outputs an element of ℤ_q.