Documentation

CslibFrontier.Crypto.Computational.Encryption.CCA.NonAdaptive

Non-adaptive 1CCA security for public-key encryption #

[BS23], Exercise 12.28 (printed p. 522), defines a weaker notion than CCA security: the CCA attack game in which the adversary makes all of its decryption queries before its encryption query, with a single encryption query. The book calls it non-adaptive 1CCA security.

INDCCA1On is that notion. It is the single-challenge 1CCA experiment cca2GameOn of INDCCA2On, played only by the adversaries whose guessing stage makes no decryption query (IsQueryBounded 0), so that no decryption query follows the encryption query. Since nothing is decrypted after the challenge, the source's rule that the challenge itself is never decrypted holds automatically. As in the rest of the library, the digit in INDCCA1On and INDCCA2On is the usual name of the attack, not the number of encryption queries; both are one-query notions.

The source calls the notion weaker than CCA security and proves neither of the implications CCA ⇒ non-adaptive 1CCA ⇒ CPA. The first restricts the class of adversaries. The second plays a chosen-plaintext adversary through the existing lift CCA2AdversaryOf.ofCPA, which makes no decryption query.

Not formalized here: the multi-query form of the notion and the source's statement that one encryption query suffices (the analogue of Theorem 12.1), and parts (a) and (b) of the exercise.

Main definitions #

Main results #

References #

def Cslib.Crypto.Encryption.INDCCA1On {Msg Out : Type} (valid : ℕ → List Bool → Msg → Msg → Bool) (encMsg : Msg ↪ List Bool) (encOut : Out ↪ List Bool) (keyGen : ℕ → ProbComp (List Bool × List Bool)) (encrypt : ℕ → List Bool → Msg → ProbComp (List Bool)) (decrypt : ℕ → List Bool → List Bool → Option Out) :

Non-adaptive 1CCA security ([BS23], Exercise 12.28, printed p. 522): no decryption query after the encryption query. It is the 1CCA experiment cca2GameOn of INDCCA2On with challenge-pair admissibility predicate valid, against the uniform strict oracle PPT adversaries whose guessing stage makes no decryption query, for every saved state word and ciphertext (as in CCA2AdversaryOf.IsQueryBounded), not only those the game produces.

theorem Cslib.Crypto.Encryption.INDCCA2On.indcca1On {Msg Out : Type} {valid : ℕ → List Bool → Msg → Msg → Bool} {encMsg : Msg ↪ List Bool} {encOut : Out ↪ List Bool} {keyGen : ℕ → ProbComp (List Bool × List Bool)} {encrypt : ℕ → List Bool → Msg → ProbComp (List Bool)} {decrypt : ℕ → List Bool → List Bool → Option Out} (h : INDCCA2On valid encMsg encOut keyGen encrypt decrypt) :
INDCCA1On valid encMsg encOut keyGen encrypt decrypt

1CCA security implies non-adaptive 1CCA security: the adversaries of INDCCA1On are among those of INDCCA2On.

theorem Cslib.Crypto.Encryption.INDCCA1On.indcpaOn {Msg Out : Type} {valid : ℕ → List Bool → Msg → Msg → Bool} {encMsg : Msg ↪ List Bool} {encOut : Out ↪ List Bool} {keyGen : ℕ → ProbComp (List Bool × List Bool)} {encrypt : ℕ → List Bool → Msg → ProbComp (List Bool)} {decrypt : ℕ → List Bool → List Bool → Option Out} (h : INDCCA1On valid encMsg encOut keyGen encrypt decrypt) :
INDCPAOn valid encMsg keyGen encrypt

Non-adaptive 1CCA security implies IND-CPA security: the lift CCA2AdversaryOf.ofCPA of a chosen-plaintext adversary makes no decryption query, and its game has the chosen-plaintext law.