Problem
Let F be a pseudorandom function. Show that each of the following MACs is insecure, even if used to authenticate fixed-length messages. (In each case Gen outputs a uniform k∈{0,1}n. Let ⟨i⟩ denote an n/2-bit encoding of the integer i.)
To authenticate a message m=m1,…,ml where mi∈{0,1}n, compute t:=Fk(m1)⊕⋯⊕Fk(ml).
To authenticate a message m=m1,…,ml where mi∈{0,1}n/2, compute t:=Fk(⟨1⟩∣∣m1)⊕⋯⊕Fk(⟨l⟩∣∣ml).
To authenticate a message m=m1,…,ml where mi∈{0,1}n/2, choose uniform r←{0,1}n, compute t:=Fk(r)⊕Fk(⟨1⟩∣∣m1)⊕⋯⊕Fk(⟨l⟩∣∣ml), and let the tag be ⟨r,t⟩
Solution
Part 1
Reorder the blocks in m and the tag doesn't change.
Part 2
Query
m1=m1∣∣m2, tag t1=Fk(⟨1⟩∣∣m1)⊕Fk(⟨2⟩∣∣m2)
m2=m3∣∣m2, tag t2=Fk(⟨1⟩∣∣m3)⊕Fk(⟨2⟩∣∣m2)
m3=m3∣∣m4, tag t3=Fk(⟨1⟩∣∣m3)⊕Fk(⟨2⟩∣∣m4)
Thus m∗=m1⊕m2⊕m3=m1∣∣m4, tag t=t1⊕t2⊕t3=Fk(⟨1⟩∣∣m1)⊕Fk(⟨2⟩∣∣m4).
Part 3
Let m∈{0,1}n/2. When choosing r=⟨1⟩∣∣m, t=Fk(r)⊕Fk(⟨1⟩∣∣m)=0n.
Thus t=⟨⟨1⟩∣∣m,0n⟩ will be a valid tag for m.