DDH ⇒ CDH:
ProvedCryptologyCity.ddh_to_cdhLet generate a group of order . For every CDH adversary , define the DDH adversary : run and output ("real") if its answer equals , and ("random") otherwise. Then
where and is the probability of outputting .
import Definitions.Def_CryptologyCity_DLogGames open scoped ENNReal
namespace CryptologyCity
theorem ddh_to_cdh {G : Type*} [Group G] [DecidableEq G] (g : G) (p : ℕ) [NeZero p]
(hg : IsCyclicGroupOfOrder g p) (A : CDHAdversary G) :
(cdhAdv g p A).toReal - 1 / (p : ℝ) ≤
ddhAdv g p (fun X Y Z => (A X Y).map fun Z' => decide (Z' ≠ Z)) := by sorry
end CryptologyCityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be any group with decidable equality, , and a natural number with ; assume , i.e. every element of is an integer power of and has order exactly ( need not be prime; is allowed, in which case is trivial). Let be an arbitrary CDH adversary (no efficiency restriction). Define the DDH adversary by: on input , sample and output ("random") iff , and ("real") iff . The theorem asserts the real-number inequality
where with uniform and independent in (converted from to a real; it is a probability, so the conversion is exact), and the DDH game is as defined above (third input when the hidden bit is , for an independent uniform when it is ). The subtraction is in , so whenever the left side is and the statement holds trivially. The statement is a single inequality for every fixed ; it is not an equality and it says nothing about running time of beyond its explicit description (one call to plus one equality test).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.