Key-guessing security for anonymous key exchange #
[BS23], Section 10.1 (Attack Game 10.1 and Definition 10.1, p. 400), defines key-guessing security for an anonymous (unauthenticated) two-party key-exchange protocol: after an honest execution outputs its public transcript and key, a PPT adversary given the transcript tries to output the exact shared key. Section 10.4.2 (p. 408) states that Diffie–Hellman key exchange satisfies this notion if and only if the Computational Diffie–Hellman assumption holds.
In Section 10.1 (pp. 399–400) Alice and Bob are probabilistic machines whose transcript is a
function of their random bits. PrimeOrderGroupFamily.dhKeyExchangeProb runs dhExecutionProb, in
which Alice and Bob sample their exponents with PrimeOrderGroupFamily.sampleExp (certified
uniform strict PPT in isPPTOn_dhExecutionProb and correct in dhKeyExchangeProb_correct, within
statistical distance 1 / 2 ^ n of uniform on ZMod q per party). Its anonKEGame is within
2 / 2 ^ n of cdhGame (advantage_anonKEGame_dhKeyExchangeProb_cdhGame_le), yielding the
faithful equivalence dhKeyExchangeProb_anonKESecure_iff_cdh from the exact-uniform step
dhKeyExchange_anonKESecure_iff_cdh_ideal.
Main definitions #
Cslib.Crypto.KeyExchange.KeyGuesser,Cslib.Crypto.KeyExchange.KeyGuesser.IsPPT: typed key-guessing adversaries reading a transcripttand returning a guess inK t, together with their uniform strict-PPT predicate on encodings.Cslib.Crypto.KeyExchange.anonKEGame,Cslib.Crypto.KeyExchange.AnonKESecure: the key-guessing game and security notion ([BS23], Section 10.1, Attack Game 10.1, Definition 10.1, p. 400).Cslib.Crypto.PrimeOrderGroupFamily.dhToCDHAdversary,Cslib.Crypto.PrimeOrderGroupFamily.cdhToDHKeyGuesser: mutually inverse conversions between Diffie–Hellman key guessers and CDH adversaries.
Main results #
Cslib.Crypto.KeyExchange.Correct.anonKEGame_eq_bobKey: for aCorrectprotocol, guessing Alice's key agrees with guessing Bob's key.Cslib.Crypto.PrimeOrderGroupFamily.anonKEGame_dhKeyExchange,Cslib.Crypto.PrimeOrderGroupFamily.cdhGame_eq_anonKEGame_dhKeyExchange: game-level identities between ideal-sampling Diffie–Hellman key guessing andcdhGame.Cslib.Crypto.PrimeOrderGroupFamily.isPPT_dhToCDHAdversary,Cslib.Crypto.PrimeOrderGroupFamily.isPPT_cdhToDHKeyGuesser: the two conversions preserve polynomial-time efficiency.Cslib.Crypto.PrimeOrderGroupFamily.advantage_anonKEGame_dhKeyExchangeProb_cdhGame_le: explicit2 / 2 ^ nexponent-sampling bound between fair-coin Diffie–HellmananonKEGameandcdhGame.Cslib.Crypto.PrimeOrderGroupFamily.dhKeyExchangeProb_anonKESecure_iff_cdh: the fair-coin Diffie–Hellman protocoldhKeyExchangeProbsatisfiesAnonKESecureif and only ifCDHholds ([BS23], Section 10.4.2, p. 408).
Ideal-sampling steps #
Cslib.Crypto.PrimeOrderGroupFamily.dhKeyExchange_anonKESecure_iff_cdh_ideal: the ideal-sampling protocoldhKeyExchangesatisfiesAnonKESecureif and only ifCDHholds, consumed bydhKeyExchangeProb_anonKESecure_iff_cdh.
Implementation notes #
- Correctness and party efficiency are unbundled from
KeyExchange: [BS23] defines key-exchange protocols to be correct probabilistic machines, so Attack Game 10.1 does not distinguish Alice's output key from Bob's. HereCslib.Crypto.KeyExchange.Correctis unbundled onKeyExchange, matchingCslib.Crypto.KeyExchange.EavSecure, andanonKEGamechecksguess = outcome.aliceKey(Correct.anonKEGame_eq_bobKeyconnects the two keys underprotocol.Correct). FordhKeyExchangeProb, correctness and uniform strict-PPT execution aredhKeyExchangeProb_correctandisPPTOn_dhExecutionProb. - Terminology (
AnonKESecurevsEavSecure): [BS23], Definition 10.1 (p. 400), calls key-guessing security "secure against an eavesdropper", whereasCslib.Crypto.KeyExchange.EavSecureinKeyExchange.leanis the Katz–Lindell real-versus-ideal indistinguishability notion (realViewvsidealView), which gives key-guessing security only when the ideal key is hard to guess (no implication is proved here). The nameAnonKESecurefollows Boneh–Shoup's advantage notationAnonKEadv[A, P]. - Diffie–Hellman and CDH over a setup law: [BS23], Section 10.4.2 (pp. 407–408),
fixes cyclic group parameters as system parameters (or draws them via an efficient system
parameterization algorithm in Section 10.5.2, Definition 10.9, p. 413). Here
DHTranscriptincludesgroupParameters : F.Desc, anddhKeyExchangeProb setupdraws parameters from an arbitrarysetup : ℕ → PMF F.Desc(matchingCDH, which requires no efficient sampler). Only unauthenticated passive key-guessing security is formalized here.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 10.1 (Attack Game 10.1, Definition 10.1, p. 400) and Section 10.4.2 (pp. 407–408).
A key-guessing adversary against an anonymous key-exchange protocol
([BS23], Section 10.1, Attack Game 10.1, p. 400): given the security parameter and the
public transcript t, it outputs a candidate key in K t.
A key-guessing adversary is PPT when one uniform strict PPT machine reads (1ⁿ, transcript)
encoded by encPair encUnary encT and writes encK transcript guess.
The key-guessing game ([BS23], Section 10.1, Attack Game 10.1, p. 400): run the
honest protocol execution, hand outcome.transcript to adversary, and accept when its guess
equals outcome.aliceKey. For Correct protocols this equals checking outcome.bobKey
(Correct.anonKEGame_eq_bobKey).
Key-guessing security for anonymous key exchange ([BS23], Section 10.1,
Definition 10.1, p. 400): every PPT key-guessing adversary guesses the session key with negligible
probability in anonKEGame.
The book builds correctness into protocols, whereas KeyExchange.Correct is unbundled here, so the
book's notion corresponds to protocol.Correct ∧ protocol.AnonKESecure encT encK. Called
"secure against an eavesdropper" in Boneh–Shoup; distinct from KeyExchange.EavSecure, which is
the Katz–Lindell real-versus-ideal indistinguishability notion (it gives key-guessing security
only when the ideal key is hard to guess, and no implication is proved here).
For a correct key-exchange protocol, winning anonKEGame (matching Alice's key) has the same
law as matching Bob's key.
View a Diffie–Hellman key-guessing adversary as a CDH adversary over F
([BS23], Section 10.4.2, pp. 407–408).
View a CDH adversary over F as a Diffie–Hellman key-guessing adversary
([BS23], Section 10.4.2, pp. 407–408).
Running anonKEGame on F.dhKeyExchange setup with adversary gives the exact same game
as running F.cdhGame setup with F.dhToCDHAdversary adversary
([BS23], Section 10.4.2, pp. 407–408).
Running F.cdhGame setup with adversary gives the exact same game as running anonKEGame
on F.dhKeyExchange setup with F.cdhToDHKeyGuesser adversary
([BS23], Section 10.4.2, p. 408).
dhToCDHAdversary preserves polynomial-time efficiency.
cdhToDHKeyGuesser preserves polynomial-time efficiency.
Ideal-sampling step toward [BS23], Section 10.4.2, p. 408, not the cited result:
dhKeyExchange setup, whose parties draw their exponents exactly uniformly on ZMod q at the
PMF level rather than as probabilistic machines on random bits (Section 10.1, pp. 399–400), is
key-guessing secure (AnonKESecure, Definition 10.1) if and only if CDH holds for setup.
Consumed by dhKeyExchangeProb_anonKESecure_iff_cdh, which proves the equivalence for the
fair-coin protocol dhKeyExchangeProb.
The key-guessing game anonKEGame against the fair-coin Diffie–Hellman protocol
dhKeyExchangeProb and the CDH game cdhGame on dhToCDHAdversary adversary differ in success
probability by at most 2 / 2 ^ n (1 / 2 ^ n for each party's sampleExp draw). Because
dhToCDHAdversary (cdhToDHKeyGuesser B) = B is definitional, instantiating adversary with
cdhToDHKeyGuesser B gives the same 2 / 2 ^ n bound in the converse direction.
Diffie–Hellman anonymous key exchange is key-guessing secure if and only if CDH holds
([BS23], Section 10.4.2, p. 408, with Attack Game 10.1 and Definition 10.1, Section 10.1,
p. 400, and Attack Game 10.5 and Definition 10.7, Section 10.5, pp. 409–410): the fair-coin
protocol dhKeyExchangeProb setup, whose parties sample their exponents with sampleExp
(isPPTOn_dhExecutionProb, dhKeyExchangeProb_correct), satisfies AnonKESecure against uniform
strict PPT key guessers if and only if F.CDH setup holds. Derived from
dhKeyExchange_anonKESecure_iff_cdh_ideal and advantage_bind_dhKeyExchangeProb_le with sampling
loss at most 2 / 2 ^ n.