Key-derivation security game #
[BS23], Section 11.5.2 (Attack Game 11.3, p. 448, and Definition 11.5, p. 449) defines
key-derivation security for a function F : X × Y → Z by comparing (x, F(x, y)) against (x, z)
for independent uniform x, y, and z. Section 8.10.1 (pp. 325–326) states the general form: for
a secret s drawn from a distribution P, public side information I(s), and derived key H(s),
the pairs (I(s), H(s)) and (I(s), t) with an independent key t are computationally
indistinguishable.
This module formalizes the game in the generality of Section 8.10.1, with the following choices relative to the printed definitions:
- One game in the Section 8.10.1 form (
sample,info,derive). Attack Game 11.3 as printed is the instance wheresample ndraws independent uniform(x, y) ∈ X × Y,info = Prod.fst, andderive = F. The group-specialized notionPrimeOrderGroupFamily.SecureKDF(where the group description is sampled first and the key law depends on the security parameter) is an instance viaPrimeOrderGroupFamily.secureKDF_iff_keyDerivation. - Arbitrary secret and ideal key laws
sample : ℕ → PMF Sandkey : ℕ → PMF Zin place of efficient samplers or fixed uniform finite-type distributions, and arbitraryinfoandderivewith no computability or finiteness hypotheses, soZneeds noFintypeinstance and bothBitString.uniformList (msgLen n)andPMF.uniformOfFintype Zare instances. - One-parameter outputs parameterized by the distinguisher's output law
X → Z → PMF Bool(realOutput,idealOutput,advantage), so both program distinguishers (ProbComp.eval) and oracle distinguishers interpreted against a fixed table are instances. - Equivalence of typed and word-ensemble presentations:
SecureisGame.Indistinguishableagainst typed uniform strict PPT distinguishers (Distinguisher.IsPPT encX encZ), andsecure_iff_computationallyIndistinguishableproves it equivalent toComputationallyIndistinguishable(Definition 3.4) of the encoded word ensemblesrealEnsembleandidealEnsemble.
Main definitions #
Cslib.Crypto.KeyDerivation.realOutput: Experiment 0 at one parameter for a distinguisher output law.Cslib.Crypto.KeyDerivation.idealOutput: Experiment 1 at one parameter for a distinguisher output law.Cslib.Crypto.KeyDerivation.advantage: single-parameter key-derivation advantageKDFadv/Distadv.Cslib.Crypto.KeyDerivation.Distinguisher: family of probabilistic key-derivation distinguishers.Cslib.Crypto.KeyDerivation.Distinguisher.IsPPT: uniform strict PPT admissibility on(1ⁿ, x, z).Cslib.Crypto.KeyDerivation.realGame: Experiment 0 family at each security parameter.Cslib.Crypto.KeyDerivation.idealGame: Experiment 1 family at each security parameter.Cslib.Crypto.KeyDerivation.Secure: asymptotic key-derivation security (Definition 11.5 and Section 8.10.1).Cslib.Crypto.KeyDerivation.realEnsemble: the encoded word ensemble(info s, derive s).Cslib.Crypto.KeyDerivation.idealEnsemble: the encoded word ensemble(info s, z).
Main results #
Cslib.Crypto.KeyDerivation.secure_iff_computationallyIndistinguishable:Secureis equivalent toComputationallyIndistinguishableofrealEnsembleandidealEnsemble.Cslib.Crypto.KeyDerivation.Secure.comp_info: postprocessing the side information by a polynomial-time function preservesSecure.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 8.10.1 (pp. 325–326) and Section 11.5.2 (Attack Game 11.3 and Definition 11.5, pp. 448–449).
One parameter #
Experiment 0 of Attack Game 11.3 ([BS23], Section 11.5.2, p. 448) at one parameter,
in the form of Section 8.10.1 (p. 326): the law of the bit a distinguisher outputs on the side
information info s and the derived key derive s, for s drawn from sample. The distinguisher
is given by its output law, so that programs (ProbComp.eval) and oracle programs run against a
fixed table are both instances.
Experiment 1 of Attack Game 11.3 ([BS23], Section 11.5.2, p. 448) at one parameter,
in the form of Section 8.10.1 (p. 326): the distinguisher sees info s and an independent key
drawn from key.
KDFadv[A, F] of Attack Game 11.3 ([BS23], Section 11.5.2, pp. 448–449), which is
Distadv[A, P, I, H] of Section 8.10.1 (p. 326) with P = sample, I = info, H = derive.
Families #
A key-derivation distinguisher: the security parameter, the public information and a candidate key.
Experiment 0 at each security parameter.
Experiment 1 at each security parameter.
Secure key derivation ([BS23], Section 11.5.2, Attack Game 11.3, p. 448, and
Definition 11.5, p. 449; Section 8.10.1, p. 326): every uniform strict PPT distinguisher
(Distinguisher.IsPPT encX encZ) has negligible advantage between realGame and idealGame.
Phrased in the form of Section 8.10.1 (secret s with law sample n, side information info s,
derived key derive s) with an arbitrary ideal key law key : ℕ → PMF Z in place of the uniform
distribution on a finite key space; Attack Game 11.3 as printed is the instance where sample n is
uniform on X × Y, info = Prod.fst, derive = F, and key n is uniform on Z. Neither
efficient computability of info and derive nor finiteness of the secret and key spaces is part
of the notion; it is the source's notion only when key n is uniform on a finite key space.
A word distinguisher run on the encoded pair plays the typed real game.
A word distinguisher run on the encoded pair plays the typed ideal game.
The two presentations agree ([BS23], Section 8.10.1, p. 326, and Section 11.5.2,
Attack Game 11.3, p. 448): Secure is computational indistinguishability (Definition 3.4) of
(I(s), H(s)) and (I(s), t).
Applying the assumption to one certified distinguisher.
Efficient preprocessing of the public information: a KDF secure given info is secure given
any polynomial-time function of it (less side information).