A method and apparatus for performing authentication in a communications
system is provided. The method includes receiving a request for
authentication from a server, the request for authentication including a
first and a second random challenge, and comparing the first random
challenge and the second random challenge. The method further includes
denying the request for authentication in response to determining that
the first random challenge is substantially the same as the second random
challenge, and transmitting an encoded value to the server in response to
determining that the first random challenge is different from the second
random challenge, wherein the encoded value is generated based on the
first and second random challenge and a key that is not shared with the
server.