3.3.3 Initialization

The Extensible Authentication Protocol Method for Microsoft CHAP is initialized on the EAP server when it is invoked by EAP as an authentication method. This initialization occurs when an EAP-enabled protocol (such as RADIUS [RFC2865]) invokes EAP. The EAP server responds with EAP-CHAP, and the peer performs an EAP-CHAP negotiation. After the transport layer indicates to initiate an authentication, the server prepares a Challenge-Request packet, and sends it to the peer. The currentState variable is initialized to EAP_CHAP_CHALLENGE_SENT, and the Challenge sent in the Challenge-Request message is assigned to AuthenticatorChallenge.