Skip to main content
1 of 4

Insecure Mac built on pseudorandom function

this is a question about Katz-Lindell book, introduction to modern cryptography, 2nd edition, exercise 4.7, part c. enter image description here

For a) and b) it is clear that the Macs are insecure, but for c) I am struggling to see why. For me, when the attacker will present his pair (m*, <r*,t*>), the Mac will sample uniformly its own r (before applying the Vrfyk(.) algorithm), and will prepend r to the computed t. So no matter how the attacker will choose m* (even if the attacker chooses m* randomly), the Mac (assuming that it is a deterministic Mac using a canonical verification) will always sample a random r from {0,1}power n, independently from the one (r*) that the attacker output to it, and the probability that r=r* will be negligible. So it is still secure Mac, the one presented in part c). Can someone correct me if I am wrong please? Thank you