KEM–DEM hybrid public-key encryption #
A Key Encapsulation Mechanism (KEM) samples a public/secret key pair (pk, sk) ← keyGen n and
encapsulates a symmetric key (k, ctKem) ← encaps n pk ([BS23], Exercise 11.9). Its
chosen-plaintext security KEMINDCPA asks that replacing the encapsulated key k with an
independent uniform keyLen n-bit key is computationally indistinguishable to every uniform strict
PPT distinguisher receiving (pk, (k, ctKem)). This is the KEM security of [CS03],
Section 7.1.2, restricted to adversaries that make no decryption queries. It is stronger than the
semantic security of Exercise 11.9, whose challenger does not give the distinguisher pk.
A Data Encapsulation Mechanism (DEM) over message space Msg encrypts a single challenge message
under a fresh uniform keyLen n-bit key ([BS23], Section 2.2, Attack Game 2.1, p. 16,
and Definition 2.2). As for public-key encryption (Encryption.gameOn), demKeyGameOn takes a
challenge-pair admissibility predicate valid, and an inadmissible pair makes it output false
in both experiments. demKeyGame and DEMOneTimeKeyINDCPAOf are the always-true case. The
normalized interfaces demGameOn, demGame, and DEMOneTimeINDCPAOf specialize to keyLen n = n;
DEMOneTimeINDCPA specializes further to single-bit messages, and DEMOneTimeWordINDCPA imposes
Attack Game 2.1's equal-length rule on bit words.
Combining encaps with encryptSym produces the hybrid public-key encryption scheme
hybridEncrypt encaps encryptSym (hybridDecrypt ctSpace decaps decryptSym, Exercise 11.9(a)). If
the KEM satisfies KEMINDCPA and the DEM is one-time IND-CPA secure, then
hybridEncrypt encaps encryptSym is IND-CPA secure: KEMINDCPA.hybrid_indcpa for unrestricted
challenge pairs, and KEMINDCPA.hybrid_indcpaOn under an admissibility predicate that ignores the
public key, such as the equal-length rule. This is a corrected form of Exercise 11.9(b), not the
printed exercise: under the exercise's KEM notion, whose challenger does not give the distinguisher
pk, part (b) is false (KEMINDCPA gives a counterexample). We formalize both the single
hidden-bit KEM distinguisher bound of the corrected form (advantage_hybridGame_le_two_mul) and its
two-distinguisher triangle-inequality variant (advantage_hybridGame_le), together with
non-vacuous single-bit and n-bit word one-time pad DEM instantiations (otpEncrypt,
otpDecrypt, demOneTimeINDCPA_otpEncrypt, KEMINDCPA.hybrid_otpEncrypt_indcpa,
otpWordEncrypt, otpWordDecrypt, demOneTimeINDCPA_otpWordEncrypt,
demOneTimeWordINDCPA_otpWordEncrypt, KEMINDCPA.hybrid_otpWordEncrypt_indcpa).
Relative to Boneh and Shoup, Exercise 11.9, this development has the following representation conventions:
- Plaintext messages are parameterized by
Msg : Type(with message encodingencMsg : Msg ↪ List Boolfor PPT admissibility), matchingEncryption.gameOnandEncryption.INDCPAOninCslibFrontier/Crypto/Computational/Encryption/Basic.lean. - The DEM adversary receives the empty public key
[];demKeyGameOn validevaluatesvalidat it.KEMINDCPA.hybrid_indcpaOntherefore asks thatvalidignore the public key. - Both the ideal KEM key distribution and the one-time DEM key distribution at security parameter
nare uniformkeyLen n-bit strings (BitString.sampleList (keyLen n)). The schedule is a function of the security parameter;fun n => nrecovers the normalized convention. A native unary polynomial-time certificate forkeyLencertifies ideal sampling. The security reductions themselves do not sample ideal keys and need no such premise. Becauseencapsreturns arbitrary bit lists andKEMINDCPArequires only negligible distinguishing advantage, finitely many or negligibly probable length deviations remain compatible withKEMINDCPA, whereas non-negligible length deviations are detectable (as innot_kemINDCPA_leaking). - Decapsulation and symmetric decryption return
Option, withnonedenoting rejection.hybridDecrypt ctSpace decaps decryptSymfirst checks canonical ciphertext-pair framing and KEM ciphertext-space membershipctSpace n (unframe ct), and propagates either component failure; accepted empty keys/messages remain distinct from rejection.hybridDecrypt_hybridEncryptstates exact recovery assome msgon supported ciphertexts under component correctness and KEM ciphertext-space membership. - In
kemRealGameandkemIdealGame, the KEM distinguisher receives the public keypkexplicitly alongside(k, ctKem)(encoded as(pk, (k, ctKem))). Exercise 11.9 (p. 460) has the challenger send only(k_b, c_kem). GivingpkmakesKEMINDCPAa stronger assumption than the printed one, and part (b) needs it: the reduction distinguisher runsadversary.choose n pk, and under the printed notion part (b) is false (seeKEMINDCPA).
Main definitions #
Cslib.Crypto.Encryption.kemRealGameWith,Cslib.Crypto.Encryption.kemIdealGameWith: shared challenger continuations for the CPA and adaptive decapsulation experiments.Cslib.Crypto.Encryption.encKEMChallenge: the encoding of a KEM distinguisher's input(pk, (k, ctKem)).Cslib.Crypto.Encryption.kemRealGame,Cslib.Crypto.Encryption.kemIdealGame,Cslib.Crypto.Encryption.KEMINDCPA: real and ideal KEM IND-CPA experiments and security.Cslib.Crypto.Encryption.demGameOn,Cslib.Crypto.Encryption.demGame,Cslib.Crypto.Encryption.demKeyGameOn,Cslib.Crypto.Encryption.demKeyGame,Cslib.Crypto.Encryption.DEMOneTimeINDCPAOn,Cslib.Crypto.Encryption.DEMOneTimeINDCPAOf,Cslib.Crypto.Encryption.DEMOneTimeINDCPA,Cslib.Crypto.Encryption.DEMOneTimeWordINDCPA,Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOn,Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOf,Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPA,Cslib.Crypto.Encryption.DEMOneTimeKeyWordINDCPA: one-time symmetric encryption experiments and security at normalized (n-bit) and arbitrary (keyLen n-bit) key lengths, with and without an admissibility predicate.Cslib.Crypto.Encryption.hybridEncrypt,Cslib.Crypto.Encryption.hybridDecrypt: KEM–DEM hybrid encryption and deterministic decryption.Cslib.Crypto.Encryption.wordKEM,Cslib.Crypto.Encryption.wordCipher,Cslib.Crypto.Encryption.AdversaryOf.toHybridTwoStage: the word-level KEM, DEM and adversary at security parametern, viewed as a typedKEM,Cipherand two-stage hybrid adversary.Cslib.Crypto.Encryption.hybridToKEMDistinguisher,Cslib.Crypto.Encryption.hybridToKEMHiddenBitDistinguisher,Cslib.Crypto.Encryption.hybridToDEMAdversary: the certified uniform reductions.Cslib.Crypto.Encryption.otpEncrypt,Cslib.Crypto.Encryption.otpDecrypt,Cslib.Crypto.Encryption.otpWordEncrypt,Cslib.Crypto.Encryption.otpWordDecrypt,Cslib.Crypto.Encryption.otpKeyWordEncrypt,Cslib.Crypto.Encryption.otpKeyWordDecrypt: one-time pad single-bit,n-bit word, andkeyLen n-bit word DEMs.
Main results #
Cslib.Crypto.Encryption.isPPTOn_kemRealGame,Cslib.Crypto.Encryption.isPPTOn_kemIdealGame,Cslib.Crypto.Encryption.isPPTOn_demGameOn,Cslib.Crypto.Encryption.isPPTOn_demGame,Cslib.Crypto.Encryption.isPPTOn_demKeyGameOn,Cslib.Crypto.Encryption.isPPTOn_demKeyGame,Cslib.Crypto.Encryption.isPPTOn_hybridEncrypt,Cslib.Crypto.Encryption.computableInPolyTime_hybridDecrypt: polynomial-time certificates.Cslib.Crypto.Encryption.hybridDecrypt_of_not_canonical,Cslib.Crypto.Encryption.hybridDecrypt_of_ctSpace_eq_false: malformed encodings and out-of-space KEM components are rejected.Cslib.Crypto.Encryption.hybridDecrypt_encPair,Cslib.Crypto.Encryption.hybridDecrypt_hybridEncrypt: exact decryption correctness (Exercise 11.9(a)).Cslib.Crypto.Encryption.eval_game_hybridEncrypt,Cslib.Crypto.Encryption.eval_kemRealGame_eq_cpaExperiment,Cslib.Crypto.Encryption.eval_kemIdealGame_eq_cpaExperiment,Cslib.Crypto.Encryption.eval_demKeyGame_eq_oneTimeExperiment: the word-level hybrid, KEM and DEM experiments are the typed experiments ofwordKEM,wordCipherandtoHybridTwoStage.Cslib.Crypto.Encryption.advantage_hybridGame_le_two_mul,Cslib.Crypto.Encryption.advantage_hybridGame_le: the concrete bound for the corrected form of Boneh–Shoup Exercise 11.9(b) and its two-distinguisher variant, obtained from the typed boundsCslib.Crypto.KEM.advantage_hybrid_le_two_mulandCslib.Crypto.KEM.advantage_hybrid_lethrough these bridges.Cslib.Crypto.Encryption.eval_demGame_restrict,Cslib.Crypto.Encryption.eval_demKeyGame_restrict,Cslib.Crypto.Encryption.DEMOneTimeINDCPAOf.demOneTimeINDCPAOn,Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOf.demOneTimeKeyINDCPAOn: unrestricted one-time security implies one-time security under every polynomial-time admissibility predicate.Cslib.Crypto.Encryption.KEMINDCPA.hybrid_indcpa,Cslib.Crypto.Encryption.KEMINDCPA.hybrid_indcpaOn: the asymptotic corrected form of Boneh–Shoup Exercise 11.9(b) underKEMINDCPA, without and with an admissibility predicate.Cslib.Crypto.Encryption.demOneTimeINDCPA_otpEncrypt,Cslib.Crypto.Encryption.KEMINDCPA.hybrid_otpEncrypt_indcpa,Cslib.Crypto.Encryption.demOneTimeINDCPA_otpWordEncrypt,Cslib.Crypto.Encryption.demOneTimeWordINDCPA_otpWordEncrypt,Cslib.Crypto.Encryption.demOneTimeKeyINDCPA_otpKeyWordEncrypt,Cslib.Crypto.Encryption.demOneTimeKeyWordINDCPA_otpKeyWordEncrypt,Cslib.Crypto.Encryption.KEMINDCPA.hybrid_otpWordEncrypt_indcpa: unconditional one-time pad DEM security and the KEM-to-PKE corollaries.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 2.2 (Attack Game 2.1 and Definition 2.2, p. 16) and Exercise 11.9 (pp. 460–461).
- R. Cramer, V. Shoup, Design and Analysis of Practical Public-Key Encryption Schemes Secure against Adaptive Chosen Ciphertext Attack, Section 7.1.2 (pp. 38–39 of the authors' revised manuscript of August 14, 2003).
Key Encapsulation Mechanisms #
The shared real KEM experiment: generate keys and encapsulate, then run the challenger
continuation with (sk, pk, key, ciphertext). The secret key is internal challenger data, not an
adversary input. CPA and CCA experiments specialize the same sampling computation.
The shared ideal KEM experiment replaces only the key shown to the continuation with an
independent uniform keyLen n-bit word. Key generation, encapsulation, and their order are those
of kemRealGameWith; the secret key and ciphertext remain unchanged.
The real experiment of KEMINDCPA, the KEM game of [CS03] §7.1.2 without
decryption queries (Exercise 11.9's Experiment 0 of [BS23] with pk also given):
sample (pk, sk) ← keyGen n and (k, ctKem) ← encaps n pk, and pass the encoded triple
(pk, (k, ctKem)) to distinguisher n.
The ideal experiment of KEMINDCPA, the KEM game of [CS03] §7.1.2 without
decryption queries (Exercise 11.9's Experiment 1 of [BS23] with pk also given):
sample (pk, sk) ← keyGen n, (k, ctKem) ← encaps n pk, and an independent uniform
keyLen n-bit key kIdeal ← BitString.sampleList (keyLen n),
and pass (pk, (kIdeal, ctKem)) to distinguisher n.
The real KEM IND-CPA experiment is uniform strict PPT when key generation, encapsulation, and the distinguisher have native certificates.
The ideal KEM IND-CPA experiment is uniform strict PPT when key generation, encapsulation, and
the distinguisher have native certificates and keyLen is computable in polynomial time
in unary.
IND-CPA security for a Key Encapsulation Mechanism with the public key given to the
distinguisher: every uniform strict PPT distinguisher has negligible advantage between
kemRealGame and kemIdealGame keyLen, which pass it (pk, (k, ctKem)). This is the security
notion of [CS03], Section 7.1.2 (pp. 38–39 of the authors' revised manuscript of
August 14, 2003), restricted to adversaries that make no decryption queries: the adversary
receives the public key (Stage 1) and the pair of a key and its encapsulation (Stage 3), the key
being the encapsulated one or uniform on keyLen n-bit words. The advantage is the two-experiment
form AdvCCA', twice the source's AdvCCA. Security does not bundle correctness (soundness,
Section 7.1.1) or efficient honest algorithms.
[BS23], Exercise 11.9 (§11.8, p. 460), defines a weaker notion: its challenger sends only
(k_b, c_kem), without pk. That notion does not suffice for the exercise's part (b). If key
generation outputs a uniform pk with sk = pk and encapsulation returns (pk, []), both printed
experiments show a uniform key and an empty encapsulation, so the KEM is secure there. Yet its
hybrid with the one-time pad encrypts m as pk ⊕ m, which anyone holding pk decrypts.
KEMINDCPA excludes this KEM. It holds for the hashed ElGamal KEM under DDH and a secure KDF
(DDH.kemINDCPA_hashedElGamalEncapsProb) and for the encrypted-key KEM of a WordINDCPA scheme
(WordINDCPA.kemINDCPA_encryptKeyEncaps).
One-Time Symmetric Encryption (DEM) #
The one-time symmetric chosen-plaintext experiment over message space Msg with challenge-pair
admissibility predicate valid and key-length function keyLen : ℕ → ℕ ([BS23],
Section 2.2, Attack Game 2.1, p. 16): sample a uniform keyLen n-bit key
k ← BitString.sampleList (keyLen n) and invoke adversary.choose n []; the adversary receives
the empty public key [], and valid is evaluated at it. If the chosen pair is valid, encrypt the
selected message under encryptSym n k and pass the saved state and challenge ciphertext to
adversary.guess n; otherwise return false, in both experiments.
The unrestricted one-time symmetric experiment at key-length function keyLen: demKeyGameOn
with every challenge pair admissible.
The normalized (n-bit key) one-time symmetric chosen-plaintext experiment over message space
Msg with challenge-pair admissibility predicate valid ([BS23], Section 2.2, Attack
Game 2.1, p. 16): demKeyGameOn specialized to keyLen n = n.
The unrestricted n-bit key one-time symmetric experiment: demGameOn with every challenge
pair admissible.
At the normalized key length keyLen n = n, demKeyGameOn is definitionally demGameOn.
Whenever keyLen n = n, demKeyGameOn at security parameter n coincides with demGameOn.
Running the unrestricted demKeyGame on adversary.restrict valid has the same output
distribution as running demKeyGameOn valid on adversary.
Running the unrestricted demGame on adversary.restrict valid has the same output
distribution as running demGameOn valid on adversary.
The one-time symmetric experiment demKeyGameOn valid keyLen has a strict polynomial clock
when valid and keyLen are computable in polynomial time and symmetric encryption and both
adversary stages have native certificates.
The unrestricted one-time symmetric experiment demKeyGame keyLen has a strict polynomial
clock when keyLen is computable in polynomial time and symmetric encryption and both adversary
stages have native certificates.
The normalized (n-bit key) one-time symmetric experiment demGameOn valid has a strict
polynomial clock when valid is computable in polynomial time and symmetric encryption and both
adversary stages have native certificates.
The unrestricted n-bit key one-time symmetric experiment has a strict polynomial clock when
symmetric encryption and both adversary stages have native certificates.
One-time symmetric IND-CPA / semantic security over message encoding encMsg with
challenge-pair admissibility predicate valid and key-length function keyLen : ℕ → ℕ
([BS23], Section 2.2, Attack Game 2.1, p. 16, and Definition 2.2): every uniform strict
PPT Encryption.AdversaryOf Msg has negligible distinguishing advantage between
demKeyGameOn valid keyLen encryptSym adversary false and
demKeyGameOn valid keyLen encryptSym adversary true.
One-time symmetric IND-CPA at key-length function keyLen with every challenge pair
admissible: semantic security, [BS23], Attack Game 2.1 and Definition 2.2 (p. 16), with
a uniform keyLen n-bit key and every pair of messages admitted as a challenge in place of the
source's rule that the two messages have the same length. The notion is generic in the message type
Msg. It is exactly the source's notion when all messages of Msg have one length. At List Bool
it is strictly stronger, so it is not the source's notion there; DEMOneTimeKeyWordINDCPA is.
Unrestricted one-time symmetric IND-CPA at key length keyLen implies one-time symmetric
IND-CPA under every polynomial-time admissibility predicate.
One-time symmetric IND-CPA / semantic security for bit-word encryption at key length keyLen
under Attack Game 2.1's equal-length rule ([BS23], Section 2.2, p. 16).
Normalized (n-bit key) one-time symmetric IND-CPA / semantic security over message encoding
encMsg with challenge-pair admissibility predicate valid ([BS23], Section 2.2, Attack
Game 2.1, p. 16, and Definition 2.2): DEMOneTimeKeyINDCPAOn specialized to keyLen n = n.
Normalized (n-bit key) one-time symmetric IND-CPA with every challenge pair admissible:
semantic security, [BS23], Attack Game 2.1 and Definition 2.2 (p. 16), with a uniform
n-bit key and every pair of messages admitted as a challenge in place of the source's rule that
the two messages have the same length. The notion is generic in the message type Msg. It is
exactly the source's notion when all messages of Msg have one length. At List Bool it is
strictly stronger, so it is not the source's notion there; DEMOneTimeWordINDCPA is.
Unrestricted n-bit key one-time symmetric IND-CPA implies one-time symmetric IND-CPA under
every polynomial-time admissibility predicate.
Normalized (n-bit key) one-time symmetric IND-CPA / semantic security for bit-word encryption
under Attack Game 2.1's equal-length rule ([BS23], Section 2.2, p. 16): challenge pairs
with m₀.length ≠ m₁.length are inadmissible.
At the normalized key length keyLen n = n, DEMOneTimeKeyINDCPAOn is definitionally
DEMOneTimeINDCPAOn.
Whenever keyLen n = n for all n, DEMOneTimeINDCPAOn implies DEMOneTimeKeyINDCPAOn.
Hybrid Encryption Construction and Correctness #
KEM–DEM hybrid encryption ([BS23], Exercise 11.9): encapsulate a symmetric key
(k, ctKem) ← encaps n pk, encrypt the plaintext message under k via
ctDem ← encryptSym n k msg, and encode (ctKem, ctDem) using encPair encBits encBits.
Deterministic KEM–DEM hybrid decryption ([BS23], Exercises 11.9 and 12.5).
Reject noncanonical ciphertext-pair encodings and KEM components outside ctSpace, decapsulate the
KEM component, and decrypt the DEM component. Either component may reject with none; accepted
empty keys/messages are preserved.
Hybrid encryption is uniform strict PPT when encapsulation and symmetric encryption are.
Hybrid decryption is computable in polynomial time when the KEM ciphertext-space test, decapsulation, and symmetric decryption are computable in polynomial time.
Malformed ciphertext-pair encodings are rejected before either component is used.
Ciphertexts whose KEM projection lies outside ctSpace are rejected without decapsulating.
Decryption of a canonical pair checks KEM ciphertext-space membership, decapsulates its KEM component, and propagates any rejection before invoking symmetric decryption on the DEM component.
Hybrid decryption correctness: supported encapsulations lie in ctSpace and decapsulate to
some k, and supported symmetric ciphertexts decrypt to some msg. Then every supported hybrid
ciphertext decrypts to some msg, including the empty-key and empty-message cases.
Reductions and Asymptotic Security for the Corrected Exercise 11.9(b) #
Direct per-bit KEM distinguisher $D_{\mathrm{kem}, b}$ constructed from an
Encryption.AdversaryOf Msg and DEM encryption encryptSym (for the two-distinguisher variant of
the corrected [BS23], Exercise 11.9(b)): given an encoded KEM challenge
(pk, (k, ctKem)), run adversary.choose n pk, encrypt the bit-selected message under k, and
run adversary.guess on (ctKem, ctDem).
Single hidden-bit KEM distinguisher $\mathcal{B}_{\mathrm{kem}}$ for the corrected
[BS23], Exercise 11.9(b): given an encoded KEM challenge (pk, (k, ctKem)), run
adversary.choose n pk, sample a fair challenge bit bit ← ProbComp.uniform Bool, encrypt the
selected message under k, run adversary.guess, and return guess ^^ bit.
Two-stage DEM adversary $\mathcal{B}_{\mathrm{s}}$ constructed from keyGen, encaps, and a
hybrid Encryption.AdversaryOf Msg for the corrected [BS23], Exercise 11.9(b): stage 1
samples (pk, sk) ← keyGen n and (k, ctKem) ← encaps n pk, runs adversary.choose n pk, and
saves encPair encBits encBits (ctKem, choice.2); stage 2 combines ctKem with the DEM challenge
ciphertext ctDem and runs adversary.guess.
hybridToKEMDistinguisher is uniform strict PPT whenever symmetric encryption and the hybrid
adversary are.
hybridToKEMHiddenBitDistinguisher is uniform strict PPT whenever symmetric encryption and the
hybrid adversary are.
hybridToDEMAdversary is an admissible uniform strict PPT Encryption.AdversaryOf Msg whenever
key generation, encapsulation, and the hybrid adversary are.
The word-level hybrid as an instance of the typed hybrid #
At each parameter n, the word-level algorithms form a typed KEM (wordKEM) and cipher
(wordCipher). hybridEncrypt frames the pair of ciphertexts of their hybrid
KEM.hybrid, and a word-level adversary plays the typed experiment of the hybrid through
AdversaryOf.toHybridTwoStage, which frames the pair before guessing. The word-level games of the
Exercise 11.9(b) reductions are then the typed experiments of KEM.hybridDistinguisher,
KEM.hybridHiddenBitDistinguisher and KEM.hybridCipherAdversary, so the bounds below are
instances of KEM.advantage_hybrid_le and KEM.advantage_hybrid_le_two_mul.
The word-level KEM at parameter n as a typed KEM; encapsulation returns the ciphertext
before the key, as in KEM.
The two-stage adversary that adversary plays against the typed hybrid at parameter n: the
two-stage form adversary.toTwoStage n, guessing on the framed pair of ciphertexts, as
hybridEncrypt frames it.
At each parameter, the word-level hybrid experiment is the chosen-plaintext experiment of the
typed hybrid of wordKEM and wordCipher, played by adversary.toHybridTwoStage n.
The real KEM experiment of a word-level distinguisher is the typed KEM experiment with the
encapsulated key, for any typed distinguisher with the same output distribution on the framed
challenge (pk, (key, ct)).
The ideal KEM experiment of a word-level distinguisher is the typed KEM experiment with a
uniform keyLen n-bit key, for any typed distinguisher with the same output distribution on the
framed challenge (pk, (key, ct)).
On a framed challenge, hybridToKEMDistinguisher is the typed distinguisher
KEM.hybridDistinguisher of wordCipher and adversary.toHybridTwoStage n.
On a framed challenge, hybridToKEMHiddenBitDistinguisher has the output distribution of the
typed distinguisher KEM.hybridHiddenBitDistinguisher of wordCipher and
adversary.toHybridTwoStage n.
The one-time experiment of hybridToDEMAdversary is the typed one-time experiment of the
cipher adversary KEM.hybridCipherAdversary of wordKEM and adversary.toHybridTwoStage n.
Quantitative KEM–DEM reduction via two per-bit KEM distinguishers, the concrete bound for
the corrected form of [BS23], Exercise 11.9(b) (§11.8, pp. 460–461), in a
two-distinguisher variant: the hybrid IND-CPA advantage is bounded by the sum of the KEM
advantages of hybridToKEMDistinguisher encryptSym adversary false and
hybridToKEMDistinguisher encryptSym adversary true, plus the DEM advantage of
hybridToDEMAdversary keyGen encaps adversary. The KEM advantages are those of kemRealGame and
kemIdealGame, which give the distinguisher pk; the exercise's printed KEM game does not, and
under it part (b) is false (see KEMINDCPA). This is KEM.advantage_hybrid_le for wordKEM and
wordCipher at parameter n.
Quantitative KEM–DEM reduction via a single hidden-bit KEM distinguisher, the concrete
bound for the corrected form of [BS23], Exercise 11.9(b) (§11.8, pp. 460–461): the
hybrid IND-CPA advantage is at most twice the KEM advantage of
hybridToKEMHiddenBitDistinguisher encryptSym adversary, plus the DEM advantage of
hybridToDEMAdversary keyGen encaps adversary, the exercise's
SSadv[A, E] ≤ 2 · SSadv[B_kem, E_kem] + SSadv[B_s, E_s]. The KEM advantage is that of
kemRealGame and kemIdealGame, which give the distinguisher pk; the exercise's printed KEM game
does not, and under it part (b) is false (see KEMINDCPA). This is
KEM.advantage_hybrid_le_two_mul for wordKEM and wordCipher at parameter n.
IND-CPA security of KEM–DEM hybrid encryption from KEMINDCPA, a corrected form of
[BS23], Exercise 11.9(b) (§11.8, pp. 460–461): if (keyGen, encaps) satisfies
KEMINDCPA and encryptSym is a one-time IND-CPA secure DEM over encMsg at the same keyLen
(with uniform strict PPT honest algorithms), then hybridEncrypt encaps encryptSym is IND-CPA
secure over encMsg, with every challenge pair admissible.
The exercise's KEM game does not give the distinguisher pk, and under that premise the printed
statement is false; the docstring of KEMINDCPA gives the counterexample. KEMINDCPA gives the
distinguisher pk: it is the KEM security of [CS03], Section 7.1.2, without decryption
queries, a stronger assumption than the printed one, and the one the statement needs.
When valid ignores the public key, running the unrestricted demKeyGame keyLen on the DEM
adversary built from adversary.restrict valid has the same output distribution as running
demKeyGameOn valid keyLen on it: an invalid pair already makes the restricted
adversary's guess false.
IND-CPA security of KEM–DEM hybrid encryption under an admissibility predicate, from
KEMINDCPA, a corrected form of [BS23], Exercise 11.9(b) (§11.8, pp. 460–461):
for a polynomial-time predicate valid that ignores the public key, such as the equal-length
rule, if (keyGen, encaps) satisfies KEMINDCPA and encryptSym satisfies
DEMOneTimeKeyINDCPAOn valid encMsg keyLen, then hybridEncrypt encaps encryptSym satisfies
INDCPAOn valid encMsg.
The exercise's KEM game does not give the distinguisher pk, and under that premise the printed
statement is false; the docstring of KEMINDCPA gives the counterexample. KEMINDCPA gives the
distinguisher pk: it is the KEM security of [CS03], Section 7.1.2, without decryption
queries, a stronger assumption than the printed one, and the one the statement needs.
Non-vacuous One-Time Pad DEMs #
One-time pad encryption is uniform strict PPT.
One-time pad decryption is computable in polynomial time.
For 1 ≤ n, a uniform n-bit key masks the challenge bit perfectly in demGame otpEncrypt,
so the false and true experiment distributions are identical.
For 1 ≤ n, every adversary has exact advantage 0 in demGame otpEncrypt.
The one-time pad is unconditionally one-time IND-CPA secure
(DEMOneTimeINDCPA otpEncrypt).
Combining any KEM that satisfies KEMINDCPA with the one-time pad DEM yields an
IND-CPA secure public-key bit-encryption scheme, a corollary of KEMINDCPA.hybrid_indcpa.
otpKeyWordEncrypt keyLen is uniform strict PPT whenever keyLen is computable in polynomial
time in unary.
otpKeyWordDecrypt keyLen is computable in polynomial time whenever keyLen is computable in
polynomial time in unary.
A uniform keyLen n-bit key masks any challenge word perfectly in
demKeyGame keyLen (otpKeyWordEncrypt keyLen), so the false and true experiment distributions
are identical for every keyLen and n.
Every word adversary has exact advantage 0 in
demKeyGame keyLen (otpKeyWordEncrypt keyLen).
The keyLen n-bit word one-time pad is unconditionally one-time IND-CPA secure
(DEMOneTimeKeyINDCPAOf encBits keyLen (otpKeyWordEncrypt keyLen)).
The keyLen n-bit word one-time pad satisfies equal-length word DEM security
(DEMOneTimeKeyWordINDCPA keyLen (otpKeyWordEncrypt keyLen)).
One-time pad n-bit word symmetric encryption: otpKeyWordEncrypt specialized to
keyLen n = n.
One-time pad n-bit word symmetric decryption: otpKeyWordDecrypt specialized to
keyLen n = n.
One-time pad word encryption is uniform strict PPT.
One-time pad word decryption is computable in polynomial time.
A uniform n-bit key masks any challenge word perfectly in demGame otpWordEncrypt, so the
false and true experiment distributions are identical for every n.
Every word adversary has exact advantage 0 in demGame otpWordEncrypt.
The n-bit word one-time pad is unconditionally one-time IND-CPA secure
(DEMOneTimeINDCPAOf encBits otpWordEncrypt).
The n-bit word one-time pad satisfies equal-length word DEM security
(DEMOneTimeWordINDCPA otpWordEncrypt).
Combining any KEM that satisfies KEMINDCPA with the n-bit word one-time pad DEM
yields a public-key word-encryption scheme satisfying WordINDCPA, through the equal-length
instance of KEMINDCPA.hybrid_indcpaOn.