Adaptive CCA security of hybrid encryption #
The KEM key is postprocessed by a native function whose uniform-seed law is exactly the
symmetric cipher's actual key generator. The two KEM hops surround the actual-key DEM game.
Challenge messages have length exactly the security parameter, as in SymmetricCipher.
The conclusion is INDCCA2On with this admissibility rule, not unrestricted WordINDCCA2.
The results are steps toward [BS23], Exercise 12.5(a), printed p. 513, not the exercise
itself. The proof constructs both reductions, a KEM distinguisher and a one-time symmetric CCA
adversary, with their efficiency certificates, and enforces the KEM ciphertext space ctSpace
(C_kem) in both kemCCAContinuation and hybridDecrypt (as well as in the reductions), so a
KEM that is secure on C_kem is never queried outside C_kem. On the KEM side, however,
kemCCARealGame and kemCCAIdealGame still strengthen the exercise's printed KEM game (p. 513) by
giving the distinguisher (pk, (k, ct)), where the printed challenger sends only the key and the
encapsulation (#5293; as the KEMINDCPA counterexample shows, hybrid security needs pk).
On the DEM side, SymmetricCipher.ctSpace models the ciphertext space C (by
decrypt_eq_none_of_ctSpace_eq_false, decrypt returns none outside C, which the oracle
encodes as []), so SymmetricCipher.OneTimeINDCCA matches Attack Game 9.2 (printed p. 362) on
an efficiently recognizable C (default C is all words).
The source's uniform key space is represented by uniform keyLen n-bit seeds followed by F n.
An exact sampler identity relates this distribution to E.keyGen n; no uniformity of encoded
symmetric keys is assumed. Both KEM games retain their existing postchallenge decapsulation
schedule. The reduction answers the distinguished component locally before and after its own
hybrid challenge; other components use bounded external replies. The real-hop commutation is
conditional on the same original keypair and uses supported KEM correctness.
Security and perfect correctness are distinct. Correctness additionally needs postprocessed real encapsulation keys in the DEM's support. A total saved-coins evaluator supplies this for all seeds; a simple fixed-width key split instead needs a supported real-key length contract.
Main definitions #
Cslib.Crypto.Encryption.hybridKEMCCAHandler: canonical parsing and bounded decapsulation.Cslib.Crypto.Encryption.hybridKEMCCAContinuation: both adaptive hybrid phases.Cslib.Crypto.Encryption.hybridToKEMCCA: the fixed-bit KEM reduction.Cslib.Crypto.Encryption.hybridToKEMCCAHiddenBit: the single reduction for the factor-two bound.Cslib.Crypto.Encryption.HybridCCAReductions: a KEM distinguisher and a one-time symmetric adversary with the concrete2 * KEM advantage + symmetric CCA advantagebound.
Main results #
Cslib.Crypto.Encryption.eval_kemCCARealGame_hybridToKEMCCA,Cslib.Crypto.Encryption.eval_kemCCAIdealGame_hybridToKEMCCA: exact actual-game identities.Cslib.Crypto.Encryption.exists_hybridCCA_reductions: nativeHybridCCAReductionsfor every PPT adversary, uniformly for every parameter (a step toward Exercise 12.5(a)).Cslib.Crypto.Encryption.hybrid_indcca2On: n-bit-message adaptive CCA security (a step toward Exercise 12.5(a)).Cslib.Crypto.Encryption.isPPTOn_hybridCCAGame: native honest-game runtime.Cslib.Crypto.Encryption.hybridDecrypt_postprocessed_hybridEncrypt: separate supported-key correctness.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Exercise 12.5(a), printed p. 513.
Decrypt the distinguished component locally under the shown, postprocessed key when in
ctSpace. Other canonical in-space components use a bounded decapsulation reply, preserving
rejection and empty keys. This handler never queries outside ctSpace or on the distinguished KEM
ciphertext.
Simulate the two public-key phases using the shown key and ciphertext. The same local key override is present before challenge selection. After encryption, only the exact full challenge word is rejected; a different in-space KEM component with the same DEM component is allowed.
Fixed-bit KEM distinguisher. The input is the existing (pk, (shownKey, ctK)) encoding;
no secret key is available to the reduction.
An actual decapsulation reply is fully read. Neither the ctSpace guard nor the source KEM
challenge exclusion interferes, since out-of-space words and the distinguished component are
handled locally in both phases.
The ideal KEM hop uses the actual DEM sampler, through an exact postprocessing law. The original keypair and encapsulation retain their joint distribution.
Supported encapsulation correctness removes the local override in the real world. Encapsulation is commuted with Phase 1 only after the original keypair has been fixed.
Native implementation of bounded KEM reply reading, including the cost of ciphertext-space recognition, key postprocessing and decryption. The certificate holds for arbitrary external replies.
Native certificate for both simulated phases. All external reads have a unary-computable cap; subsequent ciphertext-space recognition, key postprocessing, decryption and challenge handling are charged.
The fixed-bit KEM reduction is uniform strict oracle PPT. It does not sample ideal keys, so its native certificate needs no efficiency assumption on the ideal key-length schedule.
A single KEM reduction chooses the hybrid challenge bit privately and complements the answer in the true world. This retains the signed difference between the two KEM hops.
The hidden-bit reduction is uniform strict oracle PPT, including private bit selection and answer complementation.
Exact signed real-world selector identity, before taking any absolute values.
Exact signed ideal-world selector identity, with the same bit and output conventions.
The two KEM hops have total loss two, with one native hidden-bit KEM reduction.
The middle advantage is the existing actual-key DEM experiment, whose exact reduction to
one-time symmetric CCA is eval_hybridDEMGame.
Adaptive CCA security of KEM–DEM encryption in the symmetric cipher's n-bit message model,
from a KEM CCA premise on ctSpace and E.OneTimeINDCCA: a step toward [BS23],
Exercise 12.5(a), not the cited result, because its KEM premise gives the distinguisher pk
(#5293).
The proof constructs both reductions, hybridToKEMCCAHiddenBit and hybridToOneTimeCCAAdversary,
with their efficiency certificates. Relative to the exercise's premises (printed p. 513):
- KEM:
ctSpacerepresentsC_kem, and bothkemCCAContinuationandhybridDecrypt(as well ashybridKEMCCAHandler) reject KEM ciphertexts outsidectSpacewithout callingdecaps, matching the exercise's restriction of decapsulation queries to an efficiently recognizableC_kem. However, inkemCCARealGameandkemCCAIdealGamethe distinguisher receives(pk, (k, ct)), where the printed challenger sends only the key and the encapsulation (#5293). The counterexample in theKEMINDCPAdocstring (a KEM whose key is its public key) shows that the printed statement needspkgiven to the distinguisher. - DEM:
SymmetricCipher.ctSpacerepresentsC, andE.decrypt_eq_none_of_ctSpace_eq_falseforces queries outsideCto be answered with the rejection[] = encOption encBits none. WhenCis efficiently recognizable,E.OneTimeINDCCAmatches Attack Game 9.2 (Definition 9.6, printed pp. 362–363).
The same native postprocessor is used on the shown KEM key and on every successful decapsulation. Its ideal-key distribution is the actual symmetric key sampler, uniformly in the security parameter. KEM correctness is needed for the real-game hop. Correctness of hybrid decryption is a separate supported-output contract; the security statement does not assert unrestricted word-message CCA.
The two reductions for the postprocessed KEM–DEM hybrid against adversary, in the library's
games: a KEM CCA distinguisher kem and a one-time symmetric CCA adversary dem, both oracle PPT,
such that at every n the hybrid's n-bit-message CCA advantage is at most twice kem's
advantage between kemCCARealGame and kemCCAIdealGame on ctSpace plus dem's advantage in
E.ccaOneTimeGame. Both kemCCAContinuation and hybridDecrypt reject KEM ciphertexts outside
ctSpace, and E.ccaOneTimeGame rejects decryption queries outside E.ctSpace
(decrypt_eq_none_of_ctSpace_eq_false). The KEM games still give the distinguisher pk, so this is
a step toward the concrete bound of [BS23], Exercise 12.5(a), not that bound
(exists_hybridCCA_reductions; #5293).
- kem : OracleDistinguisher
The KEM CCA distinguisher.
- dem : CCAAdversary
The one-time symmetric CCA adversary.
kemis oracle PPT.demis oracle PPT.- advantage_le (n : ℕ) : let encaps' := fun (n : ℕ) (pk : List Bool) => (fun (kc : List Bool × List Bool) => (F n kc.1, kc.2)) <$> encaps n pk; let decaps' := fun (n : ℕ) (sk ct : List Bool) => Option.map (F n) (decaps n sk ct); Game.advantage (cca2GameOn (fun (n : ℕ) (x m0 m1 : List Bool) => m0.length == n && m1.length == n) Turing.MultiTapeTM.encBits keyGen (hybridEncrypt encaps' E.encrypt) (hybridDecrypt ctSpace decaps' E.decrypt) adversary false n).eval (cca2GameOn (fun (n : ℕ) (x m0 m1 : List Bool) => m0.length == n && m1.length == n) Turing.MultiTapeTM.encBits keyGen (hybridEncrypt encaps' E.encrypt) (hybridDecrypt ctSpace decaps' E.decrypt) adversary true n).eval ≤ 2 * Game.advantage (kemCCARealGame ctSpace keyGen encaps decaps self.kem n).eval (kemCCAIdealGame ctSpace keyLen keyGen encaps decaps self.kem n).eval + Game.advantage (E.ccaOneTimeGame self.dem false n).eval (E.ccaOneTimeGame self.dem true n).eval
The hybrid advantage is at most twice the KEM advantage plus the symmetric advantage.
Native KEM and one-time symmetric CCA reductions for the postprocessed KEM–DEM hybrid, with
hybrid advantage at most twice the KEM advantage plus the symmetric advantage at every n: a
step toward the concrete bound of [BS23], Exercise 12.5(a), not the cited result,
because the KEM games on its right-hand side give the distinguisher pk (#5293).
The proof constructs both reductions. The KEM advantage is measured in kemCCARealGame and
kemCCAIdealGame on ctSpace, which reject queries outside ctSpace (C_kem) with [] and give
the distinguisher (pk, (k, ct)), whereas the exercise's KEM challenger sends only the key and
encapsulation (printed p. 513). The symmetric advantage is measured in E.ccaOneTimeGame, which
rejects decryption queries outside E.ctSpace with [] (decrypt_eq_none_of_ctSpace_eq_false).
The hybrid game on the left likewise rejects KEM components outside ctSpace and DEM components
outside E.ctSpace. The reduction code and polynomial clocks are fixed before n. No security
assumption is needed for this quantitative statement.
Native runtime of the actual postprocessed hybrid game, including both decryption phases. No security or key-distribution assumption is required for runtime.
Decryption correctness on supported ciphertexts requires supported encapsulations to lie in
ctSpace and postprocessed real encapsulation keys to be supported by the DEM. An ideal-key
sampler identity alone does not assert this real-key fact.