Decodable group-element ElGamal games and INDCPAOn without valid stand-ins #
In CslibFrontier/Crypto/Computational/ElGamal.lean, elGamalGroupCPAGameOn and
elGamalMsgCPAGameOn parameterize the adversary's challenge check by a predicate
valid : ℕ → List Bool → Msg → Msg → Bool paired with AdmitsGroupElements, because a general
PrimeOrderGroupFamily has no efficient group-element membership test or decoder. Over a
DecodablePrimeOrderGroupFamily:
elGamalGroupCPAGamechecksF.isElem (d, m₀) && F.isElem (d, m₁)directly using the sampled group descriptiond, removing the externalvalid,hvalid, andAdmitsGroupElementsparameters (DDH.negligible_elGamalGroupCPAGame_ideal). Like the games ofElGamal.lean, it draws the key and challenge exponents exactly uniformly at thePMFlevel.- For a polynomial-time group description family
d : ℕ → F.Desc,elGamalGroupValid F dsupplies the nativeEncryption.INDCPAOnadmissibility predicate usingF.isElem (d n, ·), yieldingDDH.indcpaOn_elGamalGroupEncryptProbwithout external validity premises.
The more general parameterized forms elGamalMsgCPAGameOn / elGamalGroupCPAGameOn,
GeneralCipher.hashedElGamalCipherCPAGameOn, and DDH.indcpaOn_elGamalEncryptProb remain for
arbitrary typed-message encoders (encodeBit), additional client-side challenge constraints such as
equal bit-length (equalLengthWords), and generic PrimeOrderGroupFamily statements where
F.encDesc need not have a decoder to recover d from pk : List Bool.
Main definitions #
Cslib.Crypto.DecodablePrimeOrderGroupFamily.elGamalGroupCPAGame: group-element ElGamal CPA game checkingF.isElem (d, ·)directly.Cslib.Crypto.DecodablePrimeOrderGroupFamily.elGamalGroupToDDHDistinguisher: DDH reduction forelGamalGroupCPAGame.Cslib.Crypto.DecodablePrimeOrderGroupFamily.elGamalGroupValid: native challenge-pair admissibility predicateF.isElem (d n, m₀) && F.isElem (d n, m₁).
Main results #
Cslib.Crypto.DecodablePrimeOrderGroupFamily.DDH.indcpaOn_elGamalGroupEncryptProb: nativeEncryption.INDCPAOnsecurity of(F.elGamalKeyGenProb d, F.elGamalEncryptProb (fun _ m => m) d)under DDH ford : ℕ → F.Desc.
Ideal-sampling step #
elGamalGroupCPAGame draws exponents exactly uniformly at the PMF level, so the results about it
are a step toward DDH.indcpaOn_elGamalGroupEncryptProb, not the cited result. They hold for an
arbitrary setup law, while the native theorem fixes the group description at each security
parameter.
Cslib.Crypto.DecodablePrimeOrderGroupFamily.advantage_elGamalGroupCPAGame_le_ideal,Cslib.Crypto.DecodablePrimeOrderGroupFamily.DDH.negligible_elGamalGroupCPAGame_ideal: DDH implies group-element ElGamal CPA security of the ideal-sampling game without an externalvalidpredicate.
Group-element ElGamal CPA experiment ([BS23], Exercise 11.5(a), p. 459) over a
DecodablePrimeOrderGroupFamily, validating challenge messages directly with
F.isElem (d, m₀) && F.isElem (d, m₁) without an external valid predicate.
DDH distinguisher constructed from an adversary in elGamalGroupCPAGame.
Ideal-sampling step toward DDH.indcpaOn_elGamalGroupEncryptProb, not the cited result: in
elGamalGroupCPAGame, whose key and challenge exponents are drawn exactly uniformly at the PMF
level and whose challenge membership is enforced directly by F.isElem, the IND-CPA distinguishing
advantage of adversary is bounded by the sum of the DDH advantages of
elGamalGroupToDDHDistinguisher adversary false and
elGamalGroupToDDHDistinguisher adversary true.
Ideal-sampling step toward DDH.indcpaOn_elGamalGroupEncryptProb, not the cited result: under
DDH for any setup law, every uniform strict PPT Encryption.WordAdversary has negligible advantage
in elGamalGroupCPAGame, whose key and challenge exponents are drawn exactly uniformly at the PMF
level and whose challenge membership is enforced directly by F.isElem.
Challenge-pair admissibility predicate for native Encryption.INDCPAOn of multiplicative
ElGamal over a parameterized group description family d : ℕ → F.Desc, testing whether both
candidate words represent group elements in F.Carrier (d n).
elGamalGroupValid d is computable in polynomial time whenever d is.
On the point-mass setup fun n => PMF.pure (d n), elGamalGroupValid d admits only group
elements under the identity word message encoding.
Group-element multiplicative ElGamal satisfies Encryption.INDCPAOn under DDH for any
DecodablePrimeOrderGroupFamily and polynomial-time group description family d : ℕ → F.Desc,
with admissibility defined directly by F.elGamalGroupValid d (no external valid, hvalid, or
AdmitsGroupElements arguments).