Exercise 4.14

Problem

Prove that the following modifications of basic CBC-MAC do not yield a secure MAC (even for fixed-length messages):

  1. Mac outputs all blocks t1,,tlt_1, \ldots , t_lrather than just tlt_l. (Verification only checks whether tlt_l is correct.)

  2. A random initial block is used each time a message is authenticated. That is, choose uniform t{0,1}nt \in \{0, 1\}^n, run basic CBC-MAC over the “message” t0,m1,,mlt_0,m_1, \ldots ,m_l, and output the tag t0,tl \langle t_0, t_l \rangle. Verification is done in the natural way.

Solution

Part 1

Query

  • m1=B0B1m^1 = B_0 || B_1, t1=t0t1t^1 = t_0 || t_1

  • m2=B2B3m^2 = B_2 || B_3, t2=t2t3t^2 = t_2||t_3

We know Fk(B0)=t0F_k(B_0) = t_0 and Fk(B2)=t2F_k(B_2) = t_2. Hence

MACk(B0B2)=Fk(B0)Fk(Fk(B0)B2)=t0Fk(t0B2)MAC_k(B_0 || B^*_2) = F_k(B_0) || F_k(F_k(B_0) \oplus B^*_2) = t_0 || F_k(t_0 \oplus B^*_2)

Let t0B2=B2t_0 \oplus B^*_2 = B_2, i.e., B2=t0B2B^*_2 = t_0 \oplus B_2. Then

MACk(B0t0B2)=t0Fk(t0t0B2)=t0Fk(B2)=t0t2MAC_k(B_0 || t_0 \oplus B_2) = t_0 || F_k(t_0 \oplus t_0 \oplus B_2) = t_0 || F_k(B_2) = t_0 || t_2

Therefore, B0t0B2,t0t2\langle B_0 || t_0 \oplus B_2, t_0 || t_2 \rangle is a valid pair of message and tag.

Part 2

Query

  • m1=B0B1m^1 = B_0 || B_1, t1=r1,t1t^1 = \langle r_1, t_1 \rangle

  • m2=B2B3 m^2 = B_2 || B_3 , t2=r2,t2 t^2 = \langle r_2, t_2 \rangle

Hence for m=B0B1t2r2B2B3m^* = B_0 || B_1 || t_2 \oplus r_2 || B_2 || B_3 , t=r,t2 t^* = \langle r, t_2 \rangle should be a valid tag.

Last updated

Was this helpful?