Fixed-first-coordinate DDH rerandomization and Multi-DDH #
Fixed-first-coordinate rerandomization preserves the real DDH law and sends any non-DDH triple
to the random pair law ([BS23], Section 10.11, Exercise 10.8). Combining Exercise 10.9's
single-exponent shift with Exercise 10.8's fixed-first-coordinate rerandomization yields both the
single-shared-secret ($n = 1$) step and the full two-parameter $(n, m)$ Multi-DDH (I) reduction
([BS23], Exercise 10.11, p. 426), with tight algebraic loss 1 / q independent of the
number of secrets and pairs.
We provide both the exact distributional laws (ddhFixedURerandomizeLaw,
multiDDHRerandomizeLaw, ddhShiftAndRerandomizeLaw, used by Naor–Reingold's prefix-tree hybrid
and the Multi-DDH game hops) and the executable ProbComp reductions and uniform strict PPT
witnesses (ddhFixedUSelfReduceDistinguisher, singleSecretMultiDDHToDDHDistinguisher,
DDH.singleSecretMultiDDH, multiDDHToDDHDistinguisher, DDH.multiDDH) using approximate
exponent sampling via sampleExp.
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedURerandomize,Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedUWordRerandomize,Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedURerandomizeLaw,Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedURerandomizeComp: algebraic, word-level, distributional, and executable fixed-first-coordinate DDH rerandomization (Exercise 10.8).Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedUSelfReduceDistinguisher: the efficient fixed-first-coordinate DDH random self-reduction.Cslib.Crypto.PrimeOrderGroupFamily.multiDDHRealTupleLaw,Cslib.Crypto.PrimeOrderGroupFamily.multiDDHRandomTupleLaw,Cslib.Crypto.PrimeOrderGroupFamily.multiDDHRerandomizeLaw: finite-index Multi-DDH (I) laws.Cslib.Crypto.PrimeOrderGroupFamily.SingleSecretMultiDDHInput,Cslib.Crypto.PrimeOrderGroupFamily.encSingleSecretMultiDDHInput,Cslib.Crypto.PrimeOrderGroupFamily.SingleSecretMultiDDHDistinguisher,Cslib.Crypto.PrimeOrderGroupFamily.singleSecretMultiDDHRealGame,Cslib.Crypto.PrimeOrderGroupFamily.singleSecretMultiDDHRandomGame,Cslib.Crypto.PrimeOrderGroupFamily.SingleSecretMultiDDH,Cslib.Crypto.PrimeOrderGroupFamily.singleSecretMultiDDHToDDHDistinguisher: the single-secret ($n = 1$) Multi-DDH (I) games, assumption, and executable reduction to DDH.Cslib.Crypto.PrimeOrderGroupFamily.ddhShift,Cslib.Crypto.PrimeOrderGroupFamily.ddhWordShift,Cslib.Crypto.PrimeOrderGroupFamily.ddhShiftAndRerandomizeLaw,Cslib.Crypto.PrimeOrderGroupFamily.ddhShiftAndRerandomizeComp: single-exponent shift (Exercise 10.9) and per-secret block generation for full two-parameter Multi-DDH (I).Cslib.Crypto.PrimeOrderGroupFamily.MultiDDHInput,Cslib.Crypto.PrimeOrderGroupFamily.encMultiDDHInput,Cslib.Crypto.PrimeOrderGroupFamily.MultiDDHDistinguisher,Cslib.Crypto.PrimeOrderGroupFamily.multiDDHRealGame,Cslib.Crypto.PrimeOrderGroupFamily.multiDDHRandomGame,Cslib.Crypto.PrimeOrderGroupFamily.MultiDDH,Cslib.Crypto.PrimeOrderGroupFamily.multiDDHToDDHDistinguisher: the full two-parameter $(n, m)$ Multi-DDH (I) games, assumption, and executable reduction to DDH (Exercise 10.11).
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedURerandomizeLaw_real: real fixed-coordinate law.Cslib.Crypto.PrimeOrderGroupFamily.ddhFixedURerandomizeLaw_random: non-DDH fixed-coordinate law.Cslib.Crypto.PrimeOrderGroupFamily.isPPT_ddhFixedUSelfReduceDistinguisher,advantage_ddhFixedURerandomizeLaw_ddhFixedUSelfReduceDistinguisher_le: the fixed-first-coordinate self-reduction is PPT and loses at most2 / 2 ^ nagainst exact rerandomization.Cslib.Crypto.PrimeOrderGroupFamily.advantage_multiDDH_le: distributional Multi-DDH loss for one shared secret.Cslib.Crypto.PrimeOrderGroupFamily.isPPT_singleSecretMultiDDHToDDHDistinguisher,Cslib.Crypto.PrimeOrderGroupFamily.advantage_singleSecretMultiDDHGame_le,Cslib.Crypto.PrimeOrderGroupFamily.DDH.singleSecretMultiDDH: single-secret ($n = 1$) Multi-DDH (I) is implied byDDHfor any polynomial-time pair-count schedule.Cslib.Crypto.PrimeOrderGroupFamily.isPPT_multiDDHToDDHDistinguisher,Cslib.Crypto.PrimeOrderGroupFamily.advantage_multiDDHGame_le,Cslib.Crypto.PrimeOrderGroupFamily.DDH.multiDDH: full two-parameter $(n, m)$ Multi-DDH (I) is implied byDDHfor any polynomial-time secret-count and pair-count schedules.
References #
- [BS23], Section 10.11, Exercises 10.8, 10.9, and 10.11.
Fixed-$u$ DDH random self-reduction and Multi-DDH (I) (Exercises 10.8 & 10.11) #
Fixed-$u$ DDH rerandomization ([BS23], Section 10.11, Exercise 10.8, p. 425):
given (u, v, w) and exponents σ, τ : ZMod (F.order d), output
(v*, w*) = (σ • g + τ • v, σ • u + τ • w).
Algebraic action of ddhFixedURerandomize on multiples of the generator:
v* = (σ + τ * β) • g and w* = (α * (σ + τ * β) + τ * (γ - α * β)) • g.
ddhFixedUWordRerandomize computes the encoded output of ddhFixedURerandomize.
ddhFixedUWordRerandomize is computable in polynomial time.
Compositional polynomial-time certificate for ddhFixedUWordRerandomize.
The encoded pair output of ddhFixedURerandomize with natural-number exponents is computable
in polynomial time.
The distribution of (v*, w*) obtained by drawing σ, τ : ZMod (F.order d) independently and
uniformly in ddhFixedURerandomize ([BS23], Exercise 10.8, p. 425).
The real DDH pair distribution (β • g, (α * β) • g) for a fixed first exponent α.
The random pair distribution (β • g, γ • g) on F.Carrier d × F.Carrier d.
Boneh–Shoup Exercise 10.8(a): if (u, v, w) = (α • g, β • g, (α * β) • g) is a DDH triple,
then ddhFixedURerandomizeLaw produces ddhFixedURealLaw d α for every α, β.
Boneh–Shoup Exercise 10.8(b): if (u, v, w) = (α • g, β • g, γ • g) is a non-DDH triple
(γ ≠ α * β), then ddhFixedURerandomizeLaw produces ddhFixedURandomLaw d.
The Multi-DDH (I) real tuple family i ↦ (B i • g, (α * B i) • g) for a fixed α and an
index type ι ([BS23], Section 10.11, Exercise 10.11, p. 426).
The Multi-DDH (I) random tuple family i ↦ (B₀ i • g, B₁ i • g) for an index type ι
([BS23], Section 10.11, Exercise 10.11, p. 426).
Multi-DDH (I) rerandomization ([BS23], Exercise 10.11, p. 426): given a single
candidate DDH triple (u, v, w), draw independent (σ i, τ i) ← ZMod q × ZMod q for each i : ι
and output i ↦ ddhFixedURerandomize d u v w (σ i) (τ i).
On any real DDH triple (α • g, β • g, (α * β) • g), multiDDHRerandomizeLaw produces
multiDDHRealTupleLaw d ι α ([BS23], Exercise 10.11).
On any non-DDH triple (α • g, β • g, γ • g) with γ ≠ α * β, multiDDHRerandomizeLaw
produces multiDDHRandomTupleLaw d ι ([BS23], Exercise 10.11).
On a real DDH triple, multiDDHRerandomizeLaw produces multiDDHRealTupleLaw.
On a random DDH triple, multiDDHRerandomizeLaw agrees with multiDDHRandomTupleLaw except on
the 1 / q fraction of triples that happen to be valid DDH triples.
Boneh–Shoup Exercise 10.11 ($n = 1$ Multi-DDH (I), p. 426): for a single shared secret α,
any finite index type ι (|ι| pairs), and any test
test : F.Carrier d → (ι → F.Carrier d × F.Carrier d) → PMF Bool, the advantage between
(α • g, multiDDHRealTupleLaw d ι α) and (α • g, multiDDHRandomTupleLaw d ι) is at most the DDH
advantage of the rerandomizing wrapper multiDDHRerandomizeLaw (which samples |ι| pairs) plus
(F.order d)⁻¹.
Executable fixed-$u$ DDH random self-reduction (Exercise 10.8) #
Executable fixed-$u$ DDH rerandomization ([BS23], Exercise 10.8, p. 425): sample two
independent approximate uniform exponents σ, τ ← F.sampleExp n d and output
F.ddhFixedURerandomize d u v w σ τ.
The fixed-$u$ DDH random self-reduction ([BS23], Exercise 10.8, p. 425): rerandomize
(v, w) while keeping u fixed via ddhFixedURerandomizeComp, then run distinguisher on
(u, v', w').
ddhFixedURerandomizeComp is uniform strict PPT on encoded group elements.
ddhFixedUSelfReduceDistinguisher is uniform strict PPT whenever distinguisher is.
Replacing ddhFixedURerandomizeComp by the exact uniform rerandomization law
ddhFixedURerandomizeLaw changes Game.advantage by at most 2 / 2 ^ n.
Sampling loss of the fixed-$u$ DDH self-reduction: on any fixed triple (u, v, w),
replacing the two exact uniform exponents of ddhFixedURerandomizeLaw by the sampleExp draws of
ddhFixedUSelfReduceDistinguisher changes the acceptance law by at most 2 / 2 ^ n.
Executable single-secret ($n = 1$) Multi-DDH (I) reduction (Exercise 10.11) #
Encoding of a pair of group elements (v, w) : F.Carrier d × F.Carrier d via encPair.
encList (F.encCarrierPair d) encodes a list of group-element pairs as encList of their
encoded word pairs.
The input of a single-secret ($n = 1$) Multi-DDH (I) distinguisher ([BS23],
Section 10.11, Exercise 10.11, p. 426): the security parameter, public group parameters d, the
shared first element u = α • g, and a list of candidate pairs (v_j, w_j).
- secParam : ℕ
The security parameter, given to machines in unary.
- groupParameters : F.Desc
Public parameters selecting the group, its prime order and generator within the family.
- leftPublic : F.Carrier self.groupParameters
The shared first element
u = α • g. The list of candidate pairs
(v_j, w_j).
The encoding of a SingleSecretMultiDDHInput: the unary security parameter, the group
parameters, the encoded first element, and the list of encoded pairs, each framed except the last
(encSingleSecretMultiDDHInput_apply).
A single-secret ($n = 1$) Multi-DDH (I) distinguisher over the family: given the security
parameter, public group parameters d, the shared element u : F.Carrier d, and a list of
candidate pairs List (F.Carrier d × F.Carrier d), it outputs a bit.
SingleSecretMultiDDHDistinguisher.IsPPT states its efficiency on encodings.
A SingleSecretMultiDDHDistinguisher is PPT when one uniform strict PPT machine reads
encSingleSecretMultiDDHInput and writes the distinguisher's output bit.
Characterization of SingleSecretMultiDDHDistinguisher.IsPPT in terms of IsPPTOn.
A PPT SingleSecretMultiDDHDistinguisher run on computed inputs is uniform strict PPT.
The real single-secret ($n = 1$) Multi-DDH (I) game with count n pairs ([BS23],
Exercise 10.11, p. 426): sample d ← setup n, α ← ZMod (F.order d), and count n independent
pairs (β_j • g, (α * β_j) • g) via multiDDHRealTupleLaw d (Fin (count n)) α, then pass the list
List.ofFn tuple to distinguisher.
The random single-secret ($n = 1$) Multi-DDH (I) game with count n pairs ([BS23],
Exercise 10.11, p. 426): sample d ← setup n, α ← ZMod (F.order d), and count n independent
random pairs (β_j • g, γ_j • g) via multiDDHRandomTupleLaw d (Fin (count n)), then pass the list
List.ofFn tuple to distinguisher.
The single-secret ($n = 1$) Multi-DDH (I) assumption for a setup law and pair-count schedule
count ([BS23], Exercise 10.11, p. 426): every PPT SingleSecretMultiDDHDistinguisher
has negligible advantage between singleSecretMultiDDHRealGame and
singleSecretMultiDDHRandomGame.
Executable reduction from single-secret ($n = 1$) Multi-DDH (I) to DDH ([BS23],
Exercise 10.11, p. 426): given a single candidate DDH triple (u, v, w), generate count n
independent pairs via OracleComp.replicate (count n) (F.ddhFixedURerandomizeComp n d u v w) and
pass (u, pairs) to distinguisher.
singleSecretMultiDDHToDDHDistinguisher is uniform strict PPT whenever count is computable
in polynomial time and distinguisher is PPT.
Replacing OracleComp.replicate count (F.ddhFixedURerandomizeComp n d u v w) by
F.multiDDHRerandomizeLaw d (Fin count) u v w changes Game.advantage by at most
(2 * count : ℝ≥0) / 2 ^ n.
Sampling loss of singleSecretMultiDDHToDDHDistinguisher: on any fixed triple (u, v, w),
replacing multiDDHRerandomizeLaw d (Fin (count n)) u v w by
singleSecretMultiDDHToDDHDistinguisher count distinguisher changes the acceptance law by at most
(2 * count n : ℝ≥0) / 2 ^ n.
Quantitative single-secret ($n = 1$) Multi-DDH (I) reduction ([BS23],
Exercise 10.11, p. 426): for any setup distribution setup, pair-count schedule count, and
distinguisher, the distinguishing advantage between singleSecretMultiDDHRealGame and
singleSecretMultiDDHRandomGame is bounded by the DDH advantage of
singleSecretMultiDDHToDDHDistinguisher plus the expected inverse group order
(∑' d, setup n d * (F.order d)⁻¹).toNNReal and the exponent-sampling loss
(4 * count n : ℝ≥0) / 2 ^ n.
Single-secret ($n = 1$) Multi-DDH (I) from DDH ([BS23], Section 10.11,
Exercise 10.11, p. 426): if F.DDH setup holds and count : ℕ → ℕ is computable in polynomial
time (in unary), then F.SingleSecretMultiDDH setup count holds.
Full two-parameter $(n, m)$ Multi-DDH (I) reduction (Exercises 10.9 & 10.11) #
Single-exponent DDH shift ([BS23], Section 10.11, Exercise 10.9, p. 425):
given (u, v, w) and exponent ρ : ZMod (F.order d), output
(u', w') = (ρ • g + u, ρ • v + w) while keeping v fixed.
Algebraic action of ddhShift on multiples of the generator:
u' = (α + ρ) • g and w' = ((α + ρ) * β + (γ - α * β)) • g.
ddhWordShift computes the encoded output of ddhShift.
ddhWordShift is computable in polynomial time.
Compositional polynomial-time certificate for ddhWordShift.
The encoded pair output of ddhShift with a natural-number exponent is computable in
polynomial time.
The real law of one secret block (α • g, List.ofFn tuple) with m pairs in
Multi-DDH (I) ([BS23], Exercise 10.11, p. 426).
The random law of one secret block (α • g, List.ofFn tuple) with m pairs in
Multi-DDH (I) ([BS23], Exercise 10.11, p. 426).
Exact law of one shifted-and-rerandomized secret block in the Multi-DDH (I) reduction
([BS23], Exercise 10.11, p. 426): sample ρ ← ZMod (F.order d), shift (u, v, w) to
(u', v, w') via ddhShift (Exercise 10.9), and draw m rerandomized pairs via
multiDDHRerandomizeLaw d (Fin m) u' v w' (Exercise 10.8).
On any real DDH triple (α • g, β • g, (α * β) • g), ddhShiftAndRerandomizeLaw d m
produces multiDDHRealBlockLaw d m ([BS23], Exercise 10.11).
On any non-DDH triple (α • g, β • g, γ • g) with γ ≠ α * β,
ddhShiftAndRerandomizeLaw d m produces multiDDHRandomBlockLaw d m
([BS23], Exercise 10.11).
On a real DDH triple, k independent draws from ddhShiftAndRerandomizeLaw d m produce
PMF.iid (multiDDHRealBlockLaw d m) k.
On a random DDH triple, k independent draws from ddhShiftAndRerandomizeLaw d m agree with
PMF.iid (multiDDHRandomBlockLaw d m) k except on the 1 / q fraction of triples that happen to be
valid DDH triples.
Executable generation of one secret block in the Multi-DDH (I) reduction ([BS23],
Exercise 10.11, p. 426): sample an approximate uniform exponent ρ ← F.sampleExp n d, shift
(u, v, w) to (u', v, w') via F.ddhShift d u v w ρ (Exercise 10.9), and generate pairCount
independent pairs for (u', v, w') via
OracleComp.replicate pairCount (F.ddhFixedURerandomizeComp n d u' v w') (Exercise 10.8).
encList (F.encMultiDDHBlock d) encodes a list of secret blocks as encList of their encoded
first elements and encoded pair lists.
The input of a two-parameter $(n, m)$ Multi-DDH (I) distinguisher ([BS23],
Section 10.11, Exercise 10.11, p. 426): the security parameter, public group parameters d, and a
list of secret blocks (u_i, [(v_{i,j}, w_{i,j})]).
- secParam : ℕ
The security parameter, given to machines in unary.
- groupParameters : F.Desc
Public parameters selecting the group, its prime order and generator within the family.
- blocks : List (F.Carrier self.groupParameters × List (F.Carrier self.groupParameters × F.Carrier self.groupParameters))
The list of secret blocks
(u_i, [(v_{i,j}, w_{i,j})]).
The tuple of the fields of encMultiDDHInput.
The encoding of a MultiDDHInput: the unary security parameter, the group parameters, and the
list of encoded secret blocks, each framed except the last (encMultiDDHInput_apply).
A two-parameter $(n, m)$ Multi-DDH (I) distinguisher over the family ([BS23],
Section 10.11, Exercise 10.11, p. 426): given the security parameter, public group parameters d,
and a list of secret blocks List (F.Carrier d × List (F.Carrier d × F.Carrier d)), it outputs a
bit. MultiDDHDistinguisher.IsPPT states its efficiency on encodings.
A MultiDDHDistinguisher is PPT when one uniform strict PPT machine reads encMultiDDHInput
and writes the distinguisher's output bit.
Characterization of MultiDDHDistinguisher.IsPPT in terms of IsPPTOn.
A PPT MultiDDHDistinguisher run on computed inputs is uniform strict PPT.
The real two-parameter $(n, m)$ Multi-DDH (I) game with secretCount n secrets and
pairCount n pairs per secret ([BS23], Exercise 10.11, p. 426): sample d ← setup n and
secretCount n independent real secret blocks (α_i • g, [(β_{i,j} • g, (α_i * β_{i,j}) • g)])
via PMF.iid (F.multiDDHRealBlockLaw d (pairCount n)) (secretCount n), then pass List.ofFn blocks
to distinguisher.
The random two-parameter $(n, m)$ Multi-DDH (I) game with secretCount n secrets and
pairCount n pairs per secret ([BS23], Exercise 10.11, p. 426): sample d ← setup n and
secretCount n independent random secret blocks (α_i • g, [(β_{i,j} • g, γ_{i,j} • g)]) via
PMF.iid (F.multiDDHRandomBlockLaw d (pairCount n)) (secretCount n), then pass List.ofFn blocks
to distinguisher.
The two-parameter $(n, m)$ Multi-DDH (I) assumption for a setup law, secret-count schedule
secretCount, and pair-count schedule pairCount ([BS23], Exercise 10.11, p. 426):
every PPT MultiDDHDistinguisher has negligible advantage between multiDDHRealGame and
multiDDHRandomGame.
Executable reduction from two-parameter $(n, m)$ Multi-DDH (I) to DDH ([BS23],
Exercise 10.11, p. 426): given a single candidate DDH triple (u, v, w), generate secretCount n
independent secret blocks, each with pairCount n candidate pairs via ddhShiftAndRerandomizeComp,
and pass blocks to distinguisher.
multiDDHToDDHDistinguisher is uniform strict PPT whenever secretCount and pairCount are
computable in polynomial time and distinguisher is PPT.
Replacing ddhShiftAndRerandomizeComp pairCount n d u v w by
ddhShiftAndRerandomizeLaw d pairCount u v w changes Game.advantage by at most
(1 + 2 * pairCount : ℝ≥0) / 2 ^ n.
Replacing OracleComp.replicate secretCount (F.ddhShiftAndRerandomizeComp pairCount n d u v w)
by PMF.iid (F.ddhShiftAndRerandomizeLaw d pairCount u v w) secretCount changes Game.advantage
by at most (secretCount * (1 + 2 * pairCount) : ℝ≥0) / 2 ^ n.
Sampling loss of multiDDHToDDHDistinguisher: on any fixed triple (u, v, w), replacing
PMF.iid (ddhShiftAndRerandomizeLaw d (pairCount n) u v w) (secretCount n) by
multiDDHToDDHDistinguisher secretCount pairCount distinguisher changes the acceptance law by at
most (secretCount n * (1 + 2 * pairCount n) : ℝ≥0) / 2 ^ n.
Quantitative two-parameter $(n, m)$ Multi-DDH (I) reduction ([BS23],
Exercise 10.11, p. 426): for any setup distribution setup, secret-count schedule secretCount,
pair-count schedule pairCount, and distinguisher, the distinguishing advantage between
multiDDHRealGame and multiDDHRandomGame is bounded by the DDH advantage of
multiDDHToDDHDistinguisher plus the expected inverse group order
(∑' d, setup n d * (F.order d)⁻¹).toNNReal and the exponent-sampling loss
(2 * secretCount n * (1 + 2 * pairCount n) : ℝ≥0) / 2 ^ n.
Multi-DDH (I) from DDH ([BS23], Section 10.11, Exercise 10.11, p. 426):
if F.DDH setup holds and both secretCount : ℕ → ℕ and pairCount : ℕ → ℕ are computable in
polynomial time (in unary), then F.MultiDDH setup secretCount pairCount holds.