Adaptive multi-challenge left-or-right chosen-plaintext security #
In the Q-query left-or-right chosen-plaintext experiment (Boneh and Shoup, Section 11.3.2,
Attack Game 11.2 and Definition 11.4, p. 439; cf. Attack Game 11.1, Section 11.2,
p. 436), an adversary first initializes its saved state word from the security
parameter and public key (start), then Adaptive-CPA interacts with a left-or-right encryption
oracle for Q n queries (query), and finally outputs a distinguishing bit (guess). At each
query step, query receives the unary security parameter,
the current saved state word, and the reverse transcript of challenge ciphertexts seen so far, and
returns a fresh challenge pair (msg₀, msg₁) together with an updated state word (ChoiceOut Msg).
Because query updates the state word at every step, coins flipped or challenge messages chosen in
earlier queries remain available to subsequent queries and to guess.
This module also provides the generic Q-query public-key replacement distinguishers
lorDistinguisher (for a fixed challenge bit) and lorKeyDistinguisher (sampling a hidden fair
challenge bit and outputting guess ^^ bit), together with their uniform strict PPT composition
certificates (isPPTOn_lorDistinguisher, isPPT_lorDistinguisher, isPPT_lorKeyDistinguisher)
and the loss-two public-key replacement bound advantage_lorDistinguisher_le.
Main definitions #
Cslib.Crypto.Encryption.LoRAdversaryOf,Cslib.Crypto.Encryption.LoRAdversary,Cslib.Crypto.Encryption.WordLoRAdversary: stateful adaptive left-or-right adversaries for typed, bit, and bit-word messages.Cslib.Crypto.Encryption.encLoRStageInput,Cslib.Crypto.Encryption.encLoRLoopState: encodings of the adaptive query/guess stage inputs and the(state, transcript)loop state.Cslib.Crypto.Encryption.LoRAdversaryOf.IsPPT,Cslib.Crypto.Encryption.LoRAdversary.IsPPT,Cslib.Crypto.Encryption.WordLoRAdversary.IsPPT: uniform strict PPT admissibility of all three stages with polynomially bounded per-step state growth and transcript-independent polynomial challenge-message length.Cslib.Crypto.Encryption.lorStepOn,Cslib.Crypto.Encryption.lorStep,Cslib.Crypto.Encryption.lorRunOn,Cslib.Crypto.Encryption.lorRun: one adaptive query step and theq-step adaptive query loop, with and without a challenge-pair admissibility predicate.Cslib.Crypto.Encryption.lorDistinguisherOn,Cslib.Crypto.Encryption.lorDistinguisher,Cslib.Crypto.Encryption.lorKeyDistinguisherOn,Cslib.Crypto.Encryption.lorKeyDistinguisher: fixed-bit and hidden-bitQ-query public-key distinguishers.Cslib.Crypto.Encryption.lorGameOn,Cslib.Crypto.Encryption.lorGame,Cslib.Crypto.Encryption.LoRINDCPAOn,Cslib.Crypto.Encryption.LoRINDCPAOf,Cslib.Crypto.Encryption.LoRINDCPA,Cslib.Crypto.Encryption.WordLoRINDCPA: theQ-query left-or-right chosen-plaintext experiment and asymptotic security definitions.
Main results #
Cslib.Crypto.Encryption.eval_lorGameOn_eq_distinguishingGame,Cslib.Crypto.Encryption.eval_lorGame_eq_distinguishingGame:lorGameOnandlorGamedepend only on the public-key marginal vialorDistinguisherOn/lorDistinguisher.Cslib.Crypto.Encryption.distinguishingGame_lorKeyDistinguisherOn,Cslib.Crypto.Encryption.distinguishingGame_lorKeyDistinguisher,Cslib.Crypto.Encryption.probability_lorKeyDistinguisherOn,Cslib.Crypto.Encryption.probability_lorKeyDistinguisher,Cslib.Crypto.Encryption.advantage_lorDistinguisherOn_le,Cslib.Crypto.Encryption.advantage_lorDistinguisher_le: hidden-bit identity and loss-two public-key replacement bound forQ-query left-or-right experiments.Cslib.Crypto.Encryption.isPPTOn_lorDistinguisherOn,Cslib.Crypto.Encryption.isPPTOn_lorDistinguisher,Cslib.Crypto.Encryption.isPPT_lorDistinguisherOn,Cslib.Crypto.Encryption.isPPT_lorDistinguisher,Cslib.Crypto.Encryption.isPPT_lorKeyDistinguisherOn,Cslib.Crypto.Encryption.isPPT_lorKeyDistinguisher: uniform strict PPT certificates viaIsPPTOn.iterateWith_spec.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 11.3.2 (Attack Game 11.2 and Definition 11.4, p. 439; cf. Attack Game 11.1, Section 11.2, p. 436).
A stateful adaptive multi-challenge left-or-right adversary over message space Msg.
startreceives the security parameter and public-key word and returns an initial state word.queryreceives the security parameter, current state word, and reverse transcript of challenge ciphertext words received so far, and outputs the next challenge pair(msg₀, msg₁)together with the updated state word (ChoiceOut Msg = (Msg × Msg) × List Bool).guessreceives the security parameter, final state word, and complete reverse transcript of challenge ciphertext words, and outputs a distinguishing bit.
Initialize the adversary state word from the security parameter and public key.
Choose the next challenge pair
(msg₀, msg₁)and update the saved state word.Output the final distinguishing bit from the saved state word and ciphertext transcript.
Adaptive query-and-guessing stage input (1ⁿ, state, transcript): the security parameter n
in unary, then the adversary's saved state word and the reverse list of challenge ciphertext words.
Both the parameter and the state word are framed.
Uniform strict PPT certificate for a stateful LoRAdversaryOf Msg over message encoding
encMsg: all three stages (start, query, guess) are uniform strict PPT on their complete
inputs, each adaptive query increases the bit length of the saved state word by at most a
polynomially bounded function of the security parameter, and each queried challenge pair has
encoded length polynomially bounded in the security parameter and current saved state length
(independently of the ciphertext transcript, preventing adaptive exponential message/ciphertext
blowup across rounds).
The initialization stage is uniform strict PPT on the parameter and public key.
- query : Probability.IsPPTOn encLoRStageInput (encChoiceOut encMsg) fun (x : ℕ × List Bool × List (List Bool)) => match x with | (n, state, transcript) => adversary.query n state transcript
The adaptive query stage is uniform strict PPT on the parameter, state word, and ciphertext transcript.
- guess : Probability.IsPPTOn encLoRStageInput Turing.MultiTapeTM.encBool fun (x : ℕ × List Bool × List (List Bool)) => match x with | (n, state, transcript) => adversary.guess n state transcript
The final guessing stage is uniform strict PPT on the parameter, state word, and ciphertext transcript.
- state_growth : ∃ (bound : ℕ → ℕ), PolynomiallyBounded bound ∧ ∀ (n : ℕ) (state : List Bool) (transcript : List (List Bool)), ∀ choice ∈ (adversary.query n state transcript).eval.support, choice.state.length ≤ state.length + bound n
Per-step additive growth of the saved state word is polynomially bounded in the security parameter.
- msg_length_le : ∃ (cm : ℕ) (dm : ℕ), ∀ (n : ℕ) (state : List Bool) (transcript : List (List Bool)), ∀ choice ∈ (adversary.query n state transcript).eval.support, ((Turing.MultiTapeTM.encPair encMsg encMsg) choice.msgs).length ≤ cm * (n + state.length + 2) ^ dm
Uniform transcript-independent polynomial bound on the encoded challenge message pair in terms of the security parameter and current saved state length.
A stateful adaptive left-or-right adversary for single-bit messages (Bool).
Native uniform strict PPT admissibility for a bit adaptive left-or-right adversary.
Native uniform strict PPT admissibility for a bit-word adaptive left-or-right adversary.
One adaptive left-or-right query step with challenge-pair admissibility predicate valid:
ask adversary.query on the current state word and reverse ciphertext transcript; if
valid security pk msg₀ msg₁ holds, encrypt the challenge message selected by bit under pk,
and otherwise record [] without calling encrypt; return the updated state word paired with the
extended ciphertext transcript.
One unrestricted adaptive left-or-right query step: lorStepOn with every challenge pair
admissible.
Run q adaptive left-or-right query steps with admissibility predicate valid starting from
loopState = (state, transcript).
Run q unrestricted adaptive left-or-right query steps starting from
loopState = (state, transcript).
The Q-query left-or-right public-key distinguisher with admissibility predicate valid for a
fixed challenge bit bit: initialize the adversary state on pk, answer Q security adaptive
queries under pk and bit, and return the adversary's final guess.
The unrestricted Q-query left-or-right public-key distinguisher for a fixed challenge bit
bit.
The single uniform hidden-bit public-key distinguisher for Q-query left-or-right security
with admissibility predicate valid: sample a fair challenge bit bit, run lorDistinguisherOn
with bit, and return guess ^^ bit.
The unrestricted single uniform hidden-bit public-key distinguisher for Q-query
left-or-right security.
The Q-query left-or-right chosen-plaintext experiment with admissibility predicate valid
and generated keys.
The unrestricted Q-query left-or-right chosen-plaintext experiment with generated keys.
Adaptive Q-query left-or-right IND-CPA security over message encoding encMsg with
challenge-pair admissibility predicate valid, against every uniform strict PPT
LoRAdversaryOf Msg.
Adaptive Q-query left-or-right IND-CPA security with every challenge pair admissible. For
fixed-length message types such as Bool, this is the textbook notion; for List Bool it is
stronger than the textbook equal-length notion, which WordLoRINDCPA states.
Adaptive Q-query left-or-right IND-CPA security for bit-word encryption (List Bool) under
Attack Game 11.2's equal-length rule ([BS23], Section 11.3.2, Attack Game 11.2 and
Definition 11.4, p. 439; cf. Attack Game 11.1, Section 11.2, p. 436): challenge pairs with
m₀.length ≠ m₁.length are inadmissible.
An honest key generator contributes precisely its public-key marginal to lorGameOn.
An honest key generator contributes precisely its public-key marginal to lorGame.
The hidden-bit distinguisher lorKeyDistinguisherOn averages the two lorDistinguisherOn
games, complementing the true experiment.
The hidden-bit distinguisher lorKeyDistinguisher averages the two lorDistinguisher games,
complementing the true experiment.
Acceptance of lorKeyDistinguisherOn is one half plus half the signed Q-query gap.
Acceptance of lorKeyDistinguisher is one half plus half the signed Q-query gap.
Replacing the public-key law real with ideal in the Q-query left-or-right experiment
with admissibility predicate valid costs at most twice the distinguishing advantage of
lorKeyDistinguisherOn, plus the Q-query advantage under ideal.
Replacing the public-key law real with ideal in the unrestricted Q-query left-or-right
experiment costs at most twice the distinguishing advantage of lorKeyDistinguisher, plus the
Q-query advantage under ideal.
Parameterized uniform strict PPT certificate for the adaptive query loop lorRunOn with a
polynomial-time iteration count and initial loop state, under the hypotheses of
isPPTOn_lorDistinguisherOn.
Parameterized uniform strict PPT certificate for lorDistinguisherOn when valid is
computable in polynomial time, encryption is strict PPT, Q is computable in polynomial time, and
the adversary satisfies LoRAdversaryOf.IsPPT.
Parameterized uniform strict PPT certificate for the unrestricted lorDistinguisher.
lorDistinguisherOn is one uniform strict PPT distinguisher when valid is computable in
polynomial time, encryption is strict PPT, Q is computable in polynomial time, and the adversary
satisfies LoRAdversaryOf.IsPPT.
lorDistinguisher is one uniform strict PPT distinguisher when encryption is strict PPT, Q
is computable in polynomial time, and the adversary satisfies LoRAdversaryOf.IsPPT.
The hidden-bit reduction lorKeyDistinguisherOn is one uniform strict PPT distinguisher when
valid is computable in polynomial time, encryption is strict PPT, Q is computable in polynomial
time, and the adversary satisfies LoRAdversaryOf.IsPPT.
The unrestricted hidden-bit reduction lorKeyDistinguisher is one uniform strict PPT
distinguisher when encryption is strict PPT, Q is computable in polynomial time, and the adversary
satisfies LoRAdversaryOf.IsPPT.