When used in PPP, CHAP also provides protection against replay attacks by the peer through the use of a challenge which is generated by the authenticator, which is typically a network access server.
Thus when used in PPP, CHAP provides better security as compared to Password Authentication Protocol (PAP) which is vulnerable for both these reasons.
MS-CHAP is similar to CHAP but uses a different hash algorithm, and allows for each party to authenticate the other.
CHAP is an authentication scheme originally used by Point-to-Point Protocol (PPP) servers to validate the identity of remote clients.
[1] The ID chosen for the random challenge is also used in the corresponding response, success, and failure packets.