This question is about why one should use different keys when doing encrypt-then-MAC. It is based on Exercise 9.8 in Boneh-Shoup. Suppose Enc is a block cipher with n-bit blocks. We build an authenticated encryption scheme from Enc by using CBC-mode with random IV , and using a MAC also built from CBC-mode. So an encryption of an n-bit message m is a triple (c0, c1, t) where c0 = IV , c1 = Enck(IV ⊕ m), and t = Enck(Enck(c0) ⊕ c1). (a) Write down the operations and checks performed by the authenticated decryption algorithm on input (r, c, t). (b) Write down an encryption of the n-bit zero message and explain why an attacker who asks for encryptions of zero can get many pairs (r, Enck(r)) for random n-bit strings r. (c) Suppose an attacker who does not know k is given r, c = Enck(r) and r 0 , c0 = Enck(r 0 ) for random r = r 0 . Show that (r, r0 ⊕ c, c0 ) is accepted by the decryption algorithm.
Question
This question is about why one should use different keys when doing encrypt-then-MAC. It is based on Exercise 9.8 in Boneh-Shoup. Suppose Enc is a block cipher with n-bit blocks. We build an authenticated encryption scheme from Enc by using CBC-mode with random IV , and using a MAC also built from CBC-mode. So an encryption of an n-bit message m is a triple (c0, c1, t) where c0 = IV , c1 = Enck(IV ⊕ m), and t = Enck(Enck(c0) ⊕ c1). (a) Write down the operations and checks performed by the authenticated decryption algorithm on input (r, c, t). (b) Write down an encryption of the n-bit zero message and explain why an attacker who asks for encryptions of zero can get many pairs (r, Enck(r)) for random n-bit strings r. (c) Suppose an attacker who does not know k is given r, c = Enck(r) and r 0 , c0 = Enck(r 0 ) for random r = r 0 . Show that (r, r0 ⊕ c, c0 ) is accepted by the decryption algorithm.
Solution
(a) The authenticated decryption algorithm would perform the following operations and checks on input (r, c, t):
- Compute t' = Enck(Enck(r) ⊕ c). This is the expected MAC value.
- Check if t' equals t. If not, reject the message as it indicates that the message has been tampered with.
- If t' equals t, decrypt the ciphertext c using the key k and the IV r to get the plaintext message m. This is done by computing m = Dec_k(c) ⊕ r.
(b) An encryption of the n-bit zero message would be (r, c, t) where r = IV, c = Enck(r) and t = Enck(Enck(r) ⊕ c). An attacker who asks for encryptions of zero can get many pairs (r, Enck(r)) for random n-bit strings r because the encryption of the zero message only depends on the random IV r and the key k, and does not change with different messages. Therefore, by repeatedly asking for encryptions of the zero message with different random IVs, the attacker can obtain many pairs (r, Enck(r)).
(c) Suppose an attacker who does not know k is given r, c = Enck(r) and r0, c0 = Enck(r0) for random r ≠ r0. The attacker can construct a new message (r, r0 ⊕ c, c0). The decryption algorithm would perform the following operations and checks:
- Compute t' = Enck(Enck(r) ⊕ (r0 ⊕ c)). Since r0 ⊕ c = Enck(r), this simplifies to t' = Enck(Enck(r) ⊕ Enck(r)) = Enck(0) = c0.
- Check if t' equals c0. Since we have shown that t' = c0, this check passes.
- Decrypt the ciphertext r0 ⊕ c using the key k and the IV r to get the plaintext message m. Since r0 ⊕ c = Enck(r), this simplifies to m = Dec_k(Enck(r)) ⊕ r = 0 ⊕ r = r.
Therefore, the message (r, r0 ⊕ c, c0) is accepted by the decryption algorithm.
Similar Questions
(d) Write down the authenticated encryption algorithm based on the same design but using different keys for the encryption and the MAC. Explain why the attack from part (c) cannot be done when the authenticated encryption algorithm uses different keys.
Let IV, c1, c2, c3, . . . be a CBC-mode encryption of message m1, m2, m3, . . . , where each message block mi is n-bits long. Suppose an attacker (who does not know the key) knows the first block m1 (e.g., it is predictable header information). Suppose m01 is a different n-bit string. Show how the attacker can make a new ciphertext IV 0 , c01 , c02 , c03 , . . . which decrypts to m01 , m2, m3, . . . , even though they do not know the key that was used for the encryption.
Explain why CBC mode encryption cannot be parallelised, but decryption can be parallelised.
Which property differentiates between MAC and Hash?MAC does not provide Integrity.Hash provides Authenticity and Integrity both.MAC provides Authenticity and Integrity both.Both have same properties.
Encryptng passwords isn’t recommended because if you store the key with the encrypted passwords and you get hacked, then all the passwords are immediately broken. This statement is Question 26Select one: True False
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.