Chosen-ciphertext security with associated data (1CCA-AD) #
This module defines the single-challenge adaptive chosen-ciphertext security experiment with
associated data (1CCA with associated data, Boneh and Shoup, Section 12.7, Definition 12.7,
printed pp. 501–502) over an arbitrary message space Msg, associated-data space
AD, and decryption output space Out, extending Cslib.Crypto.Encryption.CCA2AdversaryOf,
cca2GameOn, and INDCCA2On from CslibFrontier.Crypto.Computational.Encryption.CCA.
In Phase 1 (choose), the adversary makes adaptive decryption queries (ct, ad) (encoded as
encPair encBits encBits (ct, ad)) and outputs an ADChoiceOut Msg AD record holding the two
challenge messages msg₀ and msg₁, challenge associated data ad, and saved state word state.
If valid n pk msg₀ msg₁ holds, the challenger encrypts if bit then msg₁ else msg₀ under ad to
obtain ct, and runs Phase 2 (guess) against cca2ADPhase2Oracle, which rejects the exact
challenge pair (ct, encAD ad) with [] (encOption encOut none) and decrypts every other query
(ct', ad').
Main definitions #
Cslib.Crypto.Encryption.ADChoiceOut,Cslib.Crypto.Encryption.encADChoiceOut: Phase 1 output record(msg₀, msg₁, ad, state)of an associated-data 1CCA adversary and its bit-string encoding.Cslib.Crypto.Encryption.ADCCA2AdversaryOf,Cslib.Crypto.Encryption.ADCCA2Adversary,Cslib.Crypto.Encryption.WordADCCA2Adversary: single-challenge adaptive chosen-ciphertext adversaries with associated data (AD), together withBoolandList Boolmessage specializations.Cslib.Crypto.Encryption.ADCCA2AdversaryOf.IsPPT,Cslib.Crypto.Encryption.ADCCA2AdversaryOf.IsQueryBounded: uniform strict oracle PPT admissibility and per-stage decryption-query bounds.Cslib.Crypto.Encryption.CCA2AdversaryOf.toADUnit: embedding of an associated-data-freeCCA2AdversaryOf Msgas anADCCA2AdversaryOf Msg Unitwith trivial associated data().Cslib.Crypto.Encryption.cca2ADPhase1Oracle,Cslib.Crypto.Encryption.cca2ADPhase2Oracle,Cslib.Crypto.Encryption.cca2ADGameOn,Cslib.Crypto.Encryption.cca2ADGame: Phase 1 and Phase 2 associated-data decryption oracles and the single-challenge 1CCA-AD experiment.Cslib.Crypto.Encryption.INDCCA2ADOn,Cslib.Crypto.Encryption.INDCCA2ADOf,Cslib.Crypto.Encryption.INDCCA2AD,Cslib.Crypto.Encryption.WordINDCCA2AD: single-challenge 1CCA security predicates with associated data (Definition 12.7).
Main results #
Cslib.Crypto.Encryption.ADCCA2AdversaryOf.IsPPT.query_bounds: polynomial Phase 1 query, Phase 2 query, and saved-state length bounds for strict oracle PPT 1CCA-AD adversaries.Cslib.Crypto.Encryption.CCA2AdversaryOf.IsPPT.toADUnit,Cslib.Crypto.Encryption.CCA2AdversaryOf.IsQueryBounded.toADUnit:toADUnitpreserves strict oracle PPT admissibility and per-stage decryption-query bounds.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 12.7 (Definition 12.7, printed pp. 501–502).
Phase 1 choice output of an ADCCA2AdversaryOf Msg AD: the two challenge messages msg₀ and
msg₁, challenge associated data ad, and saved state word state.
- msg₀ : Msg
First challenge message (
bit = false). - msg₁ : Msg
Second challenge message (
bit = true). - ad : AD
Associated data bound to the challenge ciphertext.
Instances For
Bit-string encoding of ADChoiceOut Msg AD as the left-grouped tuple
(((msg₀, msg₁), ad), state): the message pair (msg₀, msg₁) (msg₀ framed), framed and paired
with ad, then framed and followed by state.
A single-challenge adaptive chosen-ciphertext adversary with associated data
(1CCA with associated data, [BS23], Section 12.7, Definition 12.7, printed
pp. 501–502) over message space Msg and associated-data space AD.
Both stages have access to the single-channel decryption oracle (Operation = Unit), where each
decryption query is a framed pair encPair encBits encBits (ct, ad).
Phase 2: given
n, the saved state word, and the challenge ciphertextct, make decryption queries (where querying(ct, encAD ad)is rejected) and output a guess bit.
Uniform strict oracle PPT admissibility of both stages of an ADCCA2AdversaryOf Msg AD with
respect to message encoding encMsg and associated-data encoding encAD.
Phase 1 message and associated-data selection is uniform strict oracle PPT on
(n, pk).- guess : Probability.IsOraclePPTOn encGuessInput Turing.MultiTapeTM.encBool fun (x : ℕ × List Bool × List Bool) => match x with | (n, state, ct) => adversary.guess n state ct
Phase 2 guessing is uniform strict oracle PPT on
(n, state, ct).
Per-stage decryption-query bound (Q₁ n, Q₂ n) for an ADCCA2AdversaryOf Msg AD.
Every strict oracle PPT ADCCA2AdversaryOf Msg AD has polynomial bounds on its Phase 1
queries and saved-state length in terms of (n, pk.length), and on its Phase 2 queries in terms
of (n, state.length, ct.length) for every state word state.
Single-bit 1CCA adversary with associated data AD (Msg = Bool).
Native uniform strict oracle PPT admissibility for a bit 1CCA adversary with associated data.
Native uniform strict oracle PPT admissibility for a bit-string 1CCA adversary with associated data.
Embed an associated-data-free CCA2AdversaryOf Msg as an ADCCA2AdversaryOf Msg Unit with
trivial associated data () : Unit.
CCA2AdversaryOf.toADUnit preserves uniform strict oracle PPT admissibility.
CCA2AdversaryOf.toADUnit preserves per-stage decryption-query bounds.
Phase 1 decryption oracle with associated data ([BS23], Section 12.7,
Definition 12.7, printed pp. 501–502): unpack request.2 into ciphertext unframe request.2 and
associated data dropFrame request.2, and reply with
encOption encOut (decrypt n sk (unframe request.2) (dropFrame request.2)).
Phase 2 decryption oracle with associated data ([BS23], Section 12.7,
Definition 12.7, printed pp. 501–502): unpack request.2 into (unframe request.2, dropFrame request.2), reject the challenge pair (ct, ad) with [] (encOption encOut none),
and answer all other queries with
encOption encOut (decrypt n sk (unframe request.2) (dropFrame request.2)).
Single-challenge 1CCA experiment with associated data ([BS23], Section 12.7,
Definition 12.7, printed pp. 501–502) and challenge-pair admissibility predicate
valid : ℕ → List Bool → Msg → Msg → Bool: sample (pk, sk) ← keyGen n, run Phase 1 (choose)
against cca2ADPhase1Oracle, check valid n pk choice.msg₀ choice.msg₁, encrypt
if bit then choice.msg₁ else choice.msg₀ with associated data choice.ad to obtain ct, and run
Phase 2 (guess) against cca2ADPhase2Oracle rejecting (ct, encAD choice.ad).
Unconditional single-challenge 1CCA experiment with associated data
(valid := fun _ _ _ _ => true).
Single-challenge 1CCA security with associated data ([BS23], Section 12.7,
Definition 12.7, printed pp. 501–502) with respect to challenge-pair admissibility predicate
valid, message encoding encMsg, associated-data encoding encAD, and decryption output
encoding encOut.
Single-challenge 1CCA security with associated data over a fixed-length message space Msg
(valid := fun _ _ _ _ => true).
Single-challenge 1CCA security with associated data for bit encryption (Msg = Bool,
Out = Bool).
Single-challenge 1CCA security with associated data for bit-string encryption
(Msg = List Bool, Out = List Bool) under Attack Game 12.1's equal-length challenge rule
m₀.length == m₁.length.