The problem with ap3.1 is that the same password is used over and over again. One way to solve this problem would
be to use a different password each time.
Rather than just stop here with this solution, let us consider a more general approach for combating the playback attack.
The failure scenario resulted from the fact that your receiver could not distinguish between the original authentication of
you and the later playback of your original authentication.
A nonce is a number that a protocol will use only once in a lifetime. That is, once a protocol
uses a nonce, it will never use that number again. Out ap4.0 protocol uses a nonce .