



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The security of a cca protocol used in online transactions. The protocol involves alice and bob sharing a key and alice providing her credit card number for validation. The concept of passive and active attacks and provides a counterexample of a cpa secure encryption scheme that makes the protocol insecure against active attacks. The document also introduces the concept of chosen ciphertext attack (cca) and its relation to the security of the protocol.
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Boaz Barak February 24, 2010
Reading BS Section 9.3, KL Section 3.7 (pages 103–104), Chapter 4 (al- though we follow a somewhat different order than both books).
The online shopping problem Let’s abstract the online shopping prob- lem as follows: Alice and Bob share a key k, and Alice also has a credit card number c which Bob can validate against a database. (For simplic- ity, assume that there is only one valid credit card, and so the validation is simply checking that the card equals c.) Consider the following protocol for an online transaction:
Protocol 1
Alice Bob (k, c) (k, c) y = Ek(c) −−−−−−→ Check Dk(y) = c Either: OK←−− or GT H←−−−
Security What does it mean for this protocol to be secure. A security defi- nition always has three components:
that the protocol is secure if for every poly-time Eve, poly-bounded and large enough n,
Pr[Eve guesses c ] ≤ 10 −^8 + (n)
We say that a protocol satisfying the above definition is a passively secure authentication protocol
Theorem 1 If (E, D) is CPA-secure then Protocol 1 is a passively secure authentication protocol.
Proof We’ll do the proof by reduction: assume that A can break the passive security of Protocol 1, we’ll build an adversary B that can break the CPA security of the encryption scheme. In an actual attack, A sees T repetitions of the following messages: Ek(c) −−−→ OK←−− (of course each occurrence of Ek(c) uses fresh randomness) Consider the following “mental experiment” we run the attack of A, but instead choose a junk message J ←R { 0 , 1 }n^ (e.g., J = 0n) and send an encryption of J instead of c. That is, A will see T repetitions of: Ek(J) −−−→ OK←−− Clearly in this case A gets no information on c and so will guess it suc- cessfully with probability at most 10−^8. Hence under our assumption A can distinguish between the two cases with advantage . Using the hybrid method it follows that there is an i ∈ [T ] such that A can dis- tinguish between the case that the first i messages are encryptions of c and the last T − i messages are encryption of J and the case that the first i + 1 messages are encryptions of c and the last T − i − 1 messages are encryptions of J. Specifically, if we let p be the probability that A guesses correctly in the first case then in the second case A guesses correctly with probability at least p + /T. We can now mount a CPA attack against the encryption scheme. B will do the following:
decoding algorithm will only check for existence of a single 1 following the first i zeroes. Now suppose that the credit card number c is encoded in this form to a string ˆc, and then we use the PRF-based CPA-secure encryption we saw in class (Ek(x) = (r, fk(r) ⊕ x) ) to encrypt ˆc. The crucial observation is that if Eve gets a ciphertext Ek(x) = (r, y) even without knowing what is the plaintext, she can still flip the ith^ bit of y and that will change the ciphertext to the encryption of x with its ith^ bit flipped. This means that Eve to guess a particular digit of the card, Eve can try to flip the last location in the encoding of that digit, then one before last, and so on. If i is the first location where Eve got a “GTH” message then the digit was i − 1. Thus, after at most 88 executions Eve would be able to learn the entire credit card number.
On the importance of contrived counterexamples: Why is this mean- ingful? On a first encounter a natural reaction to such a counterexample is that this is cheating. This is an obviously contrived encryption scheme which no designer in his right mind would use in a login protocol. How can such an example teach us something about security? There are sev- eral answers to this concern (in some sense these are all different ways to state the same answer):
is always on the protocol designer to demonstrate that the protocol is secure. If the designer claims that his login protocol is secure, he should state under what conditions on the encryption scheme this will be the case.
Stronger notion of encryption: It turns out there is a stronger notion of encryption scheme, that suffices to imply security of Protocol 1 and in many other places. This notion might seem “crazy strong” but it turns out that:
Chosen ciphertext attack The definition of chosen ciphertext attack is a variation of chosen plaintext attack but this time the attacker is given oracle access even to the decryption box!
(E, D) is CCA-secure if for every poly Adv, poly-bounded : N → [0, 1], and large enough n, Pr[Adv wins ] ≤ 1 /2 + (n).
Theorem 2 If (E, D) is CCA-secure then Protocol 1 is an actively secure authentication protocol.
Proof We modify the proof of Theorem 1 in the following way: first, we assume that Bob sends an OK message if the encryption is either of c or the junk message J. We can do that because the probability that Eve sends an encryption of the junk message J is at most 2 Tn. Then, we can simulate Eve - in Step 5 we do the following: for every generated encryption yi, feed yi to A and obtain the modified version y i′. Then, if y′ i = y∗^ then feed “OK” to A; otherwise, ask the decryption box to decrypt y i′ and answer OK iff it decrypts to either c or J.
An example of a non CCA secure encryption The basic CPA secure encryption we showed in class: given PRFs {fk}, encrypt x by choosing r ←R { 0 , 1 }n^ and outputting (r, fk(x) ⊕ r) is not CCA secure.