) 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 is a random n-bit string (the IV), c = Enck(r) (since the message m is zero, IV ⊕ m = r), and t = Enck(Enck(r) ⊕ c) = Enck(Enck(r) ⊕ Enck(r)) = Enck(0) (since Enck(r) ⊕ Enck(r) = 0).
An attacker who asks for encryptions of zero can get many pairs (r, Enck(r)) for random n-bit strings r because the ciphertext c is simply the encryption of the IV r when the plaintext message m is zero.
(c) Given r, c = Enck(r) and r0, c0 = Enck(r0) for random r ≠ r0, the tuple (r, r0 ⊕ c, c0) would be accepted by the decryption algorithm. Here's why:
- The decryption algorithm would first compute t' = Enck(Enck(r) ⊕ (r0 ⊕ c)). Since c = Enck(r), this simplifies to t' = Enck(Enck(r) ⊕ (r0 ⊕ Enck(r))) = Enck(r0).
- The provided MAC value t is c0, which is equal to Enck(r0), so the check t' = t passes.
- The decryption algorithm then decrypts the ciphertext r0 ⊕ c to get the plaintext message. Since c = Enck(r), this is equivalent to decrypting r0 ⊕ Enck(r), which results in the message m = Dec_k(r0 ⊕ Enck(r)) = r ⊕ r = 0. So the decryption algorithm accepts the tuple.
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.