Adaptive decapsulation experiments #
The KEM experiments of [BS23], Exercise 12.5, reuse the real and ideal sampling
continuations of Hybrid. After receiving (pk, (shownKey, ct)), the adversary may make adaptive
decapsulation queries over a KEM ciphertext space ctSpace : ℕ → List Bool → Bool. Using
cca2Phase2Oracle, both worlds reject the exact challenge word and every word outside ctSpace
with [] (encOption encBits none) without invoking decaps, and encode every other Option
reply, distinguishing rejection from an accepted empty key ([true]). When ctSpace is
efficiently recognizable, an adversary can simulate out-of-space rejections itself, matching
Exercise 12.5's restriction of decapsulation queries to C_kem (printed p. 513). There is no
prechallenge decapsulation phase or additional challenge encapsulation.
These games still strengthen the exercise's printed KEM game (p. 513) in one way: its challenger
sends only (k_b, c_kem), while here the distinguisher also receives pk (#5293). KEM security
in these games is therefore a stronger premise than the printed exercise's (and as the
KEMINDCPA counterexample shows, hybrid security needs pk given to the KEM distinguisher).
Security is expressed with the existing Game.Indistinguishable and IsOraclePPT predicates;
these experiments introduce no new adversary or security structure. They specialize to the
existing CPA games for adversaries that only sample closed programs.
Main definitions #
Cslib.Crypto.Encryption.kemCCAContinuation: interpret the postchallenge adversary against a challenge- andctSpace-rejecting decapsulation oracle.Cslib.Crypto.Encryption.kemCCARealGame: the encapsulated key is shown.Cslib.Crypto.Encryption.kemCCAIdealGame: an independent uniform key is shown.
Main results #
Cslib.Crypto.Encryption.eval_kemCCARealGame_sample: recover the real CPA game.Cslib.Crypto.Encryption.eval_kemCCAIdealGame_sample: recover the ideal CPA game.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Exercise 12.5, pp. 513–514.
Interpret a KEM distinguisher using cca2Phase2Oracle restricted to ctSpace.
The adversary receives the encoded public key, shown key and challenge ciphertext; sk remains
internal to the challenger. Queries equal to ct or failing ctSpace n return []
(encOption encBits none) without calling decaps, matching Exercise 12.5's restriction of
queries to C_kem \ {c_kem} when ctSpace is efficiently recognizable; Exercise 12.5's printed
KEM challenger sends only the key and the encapsulation, without pk (#5293).
Real KEM experiment with adaptive postchallenge decapsulation queries restricted to
ctSpace.
Ideal KEM experiment: replace only the shown key; the decapsulation oracle uses the same
secret key, ctSpace guard, and challenge exclusion as the real experiment.
A closed distinguisher ignores the decapsulation oracle, recovering the real CPA game.
A closed distinguisher ignores the decapsulation oracle, recovering the ideal CPA game.