4) Upon receiving the message ID Gn, the tag verifies
the correctness of this response value. If it is correct,
it computes Gn+1 = P(Gn), Gn+2 = P(Gn+1),
Kn = F(Gn), and K0n
= F(Kn). Next, it calculates
the messages Kn Gn+1 and K0n
Gn+2 and sends
both of them to the reader. Lastly, the tag updates
IDS = F(IDS Gn) and Gn = Gn+1.
5) The reader first verifies KnGn+1
?=
F(Gn)Gn+1. If
the reader authenticates the tag, then the reader derives
Gn+2 by XORing K0n
Gn+2 and F(F(Gn)). Finally,
it updates IDSnew = F(IDSold Gn), Gn = Gn+1,
and Gn+1 = Gn+2.