I am trying to understand why the following birthday attack is invalid for this MAC construction.
Let Mac : $\{0, 1\}^{128} \times \{0, 1\}^{256} \to \{0, 1\}^{128}$ be a MAC. Consider the following adversary $A$, that is meant to work with Expt $Mac(A)$:
1
Adversary A^Mac(k,·),Vrfyk(·,·)
Initialize an empty hash table Y .
For m ∈{0, 1}^256:
Query y ←Mac(k, m)
If y ∈Y :
m′ ←Y [y]
Query Vrfyk(m′, y) and halt
Else:
Y [y] ← m
According to my professor, by the birthday bound, this attack should terminate in approximately $2^{64}$ iterations of the loop, which is practical for a strong adversary. But this is not a valid attack. Why?