RFC 2284

PPP Extensible Authentication Protocol (EAP)

πŸ“… published March 1998, from ietf

RFC 2284: PPP Extensible Authentication Protocol (EAP) πŸŽ€

okay bestie, so this is RFC 2284, and it's called PPP Extensible Authentication Protocol (EAP) πŸ’… It was written by L. Blunk and J. Vollbrecht from Merit Network, Inc., it's on the Standards Track, and it's dated March 1998. The header doesn't list anything it obsoletes or updates, so it's standing on its own ✨

Status of This Memo ✨

this one is an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements 🫢 for the current standardization state and status of this protocol, check the "Internet Official Protocol Standards" (STD 1) πŸ“š Distribution of this memo is unlimited 🌈

Copyright (C) The Internet Society (1998). All Rights Reserved.

Abstract πŸ¦‹

okay so PPP ([1]) gives you a standard way to carry multi-protocol datagrams over point-to-point links πŸš€

PPP also has an extensible Link Control Protocol, and that's what lets two ends agree on an Authentication Protocol to check their peer before any Network Layer protocols are allowed to send stuff over the link πŸ”

this document defines the PPP Extensible Authentication Protocol πŸŽ€

Table of Contents 🧚

1.     Introduction ..........................................    2
   1.1       Specification of Requirements ...................    2
   1.2       Terminology .....................................    2
2.     PPP Extensible Authentication Protocol (EAP) ..........    3
   2.1       Configuration Option Format .....................    4
   2.2       Packet Format ...................................    6
      2.2.1  Request and Response ............................    6
      2.2.2  Success and Failure .............................    7
3.     Initial EAP Request/Response Types ....................    8
   3.1       Identity ........................................    9
   3.2       Notification ....................................   10
   3.3       Nak .............................................   10
   3.4       MD5-Challenge ...................................   11
   3.5       One-Time Password (OTP) .........................   11
   3.6       Generic Token Card ..............................   12
REFERENCES ...................................................   13
ACKNOWLEDGEMENTS .............................................   14
CHAIR'S ADDRESS ..............................................   14
AUTHORS' ADDRESSES ...........................................   14
Full Copyright Statement .....................................   15

1. Introduction πŸŽ€

okay so before two ends of a point-to-point link can actually talk, each end has to send LCP packets to set up the data link during the Link Establishment phase πŸ’… Once the link is established, PPP can do an optional Authentication phase before it moves on to the Network-Layer Protocol phase ✨

authentication is not mandatory by default πŸ™ˆ If you want the link to be authenticated, an implementation MUST specify the Authentication-Protocol Configuration Option during Link Establishment phase πŸ”

these authentication protocols are mainly for hosts and routers that dial into a PPP network server over switched circuits or dial-up lines, but they could be used on dedicated links too 🌸 The server can use the identity of the connecting host or router to pick options for network layer negotiations 🧚

this document defines the PPP Extensible Authentication Protocol (EAP). The Link Establishment and Authentication phases, and the Authentication-Protocol Configuration Option, are defined in The Point-to-Point Protocol (PPP) [1] πŸ“š

1.1. Specification of Requirements

okay so this section is about the requirement words πŸ’– Several words are used to signal what the spec requires, and they're often capitalized. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [6] 🫢

1.2. Terminology

this document uses these terms a lot, so get comfy with them πŸ¦‹

  • authenticator: The end of the link that requires the authentication. The authenticator specifies the authentication protocol to be used in the Configure-Request during Link Establishment phase.
  • peer: The other end of the point-to-point link. This is the end being authenticated by the authenticator.
  • silently discard: This means the implementation discards the packet without further processing. The implementation SHOULD provide the capability of logging the error, including the contents of the silently discarded packet, and SHOULD record the event in a statistics counter. πŸ™ˆ
  • displayable message: This is a human readable string of characters. It MUST NOT affect operation of the protocol. The message encoding MUST follow the UTF-8 transformation format [5] πŸ’…

2. PPP Extensible Authentication Protocol (EAP) πŸ‘‘

okay the main event! πŸ”₯ The PPP Extensible Authentication Protocol (EAP) is a general protocol for PPP authentication that supports multiple authentication mechanisms 🌈 EAP doesn't pick a specific mechanism during the Link Control Phase. It waits and postpones that choice until the Authentication Phase πŸ’– This lets the authenticator ask for more information before deciding which mechanism to use. It also allows a "back-end" server to do the actual work of the various mechanisms while the PPP authenticator just passes the authentication exchange through 🧚

here's how the whole exchange goes:

  1. After the Link Establishment phase is complete, the authenticator sends one or more Requests to authenticate the peer. Each Request has a type field that says what is being requested. Examples of Request types include Identity, MD5-challenge, One-Time Passwords, Generic Token Card, etc. The MD5-challenge type corresponds closely to the CHAP authentication protocol. Typically, the authenticator sends an initial Identity Request, followed by one or more Requests for authentication information. However, an initial Identity Request is not required, and MAY be bypassed in cases where the identity is presumed (leased lines, dedicated dial-ups, etc.) 🫢
  2. The peer sends a Response packet in reply to each Request. Just like the Request packet, the Response packet has a type field that matches the type field of the Request πŸ’…
  3. The authenticator ends the authentication phase with a Success or Failure packet πŸŽ€

Advantages

the EAP protocol can support multiple authentication mechanisms without having to pre-negotiate a particular one during LCP Phase. Iconic! πŸ‘‘

certain devices (e.g. a NAS) don't necessarily have to understand each request type. They can just act as a passthrough agent for a "back-end" server on a host. The device only needs to look for the success/failure code to end the authentication phase 🧚

Disadvantages

ngl, there are downsides πŸ’€ EAP does require adding a new authentication type to LCP, so PPP implementations will need to be modified to use it. It also strays from the older PPP authentication model, which negotiated a specific authentication mechanism during LCP πŸ™ˆ

2.1. Configuration Option Format

here's the summary of the Authentication-Protocol Configuration Option format used to negotiate the EAP Authentication Protocol. The fields are sent from left to right πŸ¦‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |     Authentication-Protocol   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • Type: 3
  • Length: 4
  • Authentication-Protocol: C227 (Hex) for PPP Extensible Authentication Protocol (EAP) 🌸

2.2. Packet Format

exactly one PPP EAP packet is encapsulated in the Information field of a PPP Data Link Layer frame, where the protocol field indicates type hex C227 (PPP EAP) πŸ“ Here's the summary of the EAP packet format. The fields are sent from left to right ✨

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+
  • Code: This field is one octet and identifies the type of EAP packet. EAP Codes are assigned as follows:
    • 1 Request
    • 2 Response
    • 3 Success
    • 4 Failure
  • Identifier: This field is one octet and helps match responses with requests πŸ”₯
  • Length: This field is two octets and gives the length of the EAP packet, including the Code, Identifier, Length and Data fields. Octets outside the range of the Length field should be treated as Data Link Layer padding and should be ignored on reception. the padding is not your problem bestie πŸ™ˆ
  • Data: This field is zero or more octets. Its format is determined by the Code field πŸ’–

that's the foundation done, bestie 🧚 More in part 2!

2.2.1. Request and Response ✨

Description πŸ’–

okay so the Request packet is what the authenticator sends to the peer πŸ’… every Request has a type field that says what's being asked for. The authenticator MUST transmit an EAP packet with the Code field set to 1 (Request). Additional Request packets MUST be sent until a valid Response packet comes back, or an optional retry counter runs out. Retransmitted Requests MUST keep the same Identifier value so they don't get mistaken for brand new Requests πŸ™ˆ. What's in the data field depends on the Request type. The peer MUST send a Response packet in reply to a Request packet. Responses MUST only be sent in reply to a Request that was actually received, and they're never retransmitted on a timer. The Identifier field of the Response MUST match the one in the Request.

Implementation Note: Because authentication often involves user input, you have to be careful about your retransmission strategy and your authentication timeouts 🫢 It's suggested that a retransmission timer of 6 seconds with a maximum of 10 retransmissions be used as the default. You might want longer timeouts in certain cases (e.g. where Token Cards are involved). Also, the peer must be prepared to silently discard received retransmissions while it's waiting for user input.

A summary of the Request and Response packet format is shown below. The fields are transmitted from left to right ✨

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |  Type-Data ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Code πŸŽ€

  • 1 for Request;
  • 2 for Response.

Identifier πŸ¦‹

The Identifier field is one octet. The Identifier field MUST be the same if a Request packet is retransmitted because of a timeout while waiting for a Response. Any new (non-retransmission) Requests MUST modify the Identifier field. If a peer receives a duplicate Request for which it has already sent a Response, it MUST resend its Response. If a peer receives a duplicate Request before it has sent a Response to the initial Request (i.e. it's waiting for user input), it MUST silently discard the duplicate Request.

Length πŸ“

The Length field is two octets and indicates the length of the EAP packet, including the Code, Identifier, Length, Type, and Type-Data fields. Octets outside the range of the Length field should be treated as Data Link Layer padding and should be ignored on reception.

Type πŸ“

The Type field is one octet and indicates the Type of Request or Response. Only one Type MUST be specified per EAP Request or Response. Normally the Type field of the Response will match the Type of the Request. BUT there's also a Nak Response Type, which says a Request type is unacceptable to the peer. When sending a Nak in response to a Request, the peer MAY indicate an alternative desired authentication Type that it supports. An initial specification of Types follows in a later section of this document.

Type-Data 🌸

The Type-Data field changes depending on the Type of the Request and the associated Response.

2.2.2. Success and Failure πŸŽ‰

Description πŸ’–

The Success packet is sent by the authenticator to the peer to acknowledge successful authentication. The authenticator MUST transmit an EAP packet with the Code field set to 3 (Success).

If the authenticator can't authenticate the peer (unacceptable Responses to one or more Requests), then the implementation MUST transmit an EAP packet with the Code field set to 4 (Failure). An authenticator MAY wish to issue multiple Requests before sending a Failure, to allow for human typing mistakes πŸ™ˆ

Implementation Note: Success and Failure packets aren't acknowledged, so they can get lost 😭 A peer MUST allow for this circumstance. The peer can use a Network Protocol packet as an alternative indication of Success. Likewise, receiving an LCP Terminate-Request can be taken as a Failure.

A summary of the Success and Failure packet format is shown below. The fields are transmitted from left to right 🧚

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Code πŸŽ€

  • 3 for Success;
  • 4 for Failure.

Identifier πŸ¦‹

The Identifier field is one octet and helps match replies to Responses. The Identifier field MUST match the Indentifier field of the Response packet that it is sent in response to.

Length πŸ“

4

3. Initial EAP Request/Response Types πŸ‘‘

This section defines the initial set of EAP Types used in Request/Response exchanges. More Types may be defined in follow-on documents. The Type field is one octet and identifies the structure of an EAP Request or Response packet. The first 3 Types are considered special case Types. The remaining Types define authentication exchanges. The Nak Type is only valid for Response packets, so it MUST NOT be sent in a Request. The Nak Type MUST only be sent in response to a Request that uses an authentication Type code. All EAP implementations MUST support Types 1-4. Those Types, plus types 5 and 6, are defined in this document. Follow-on RFCs will define additional EAP Types 🌈

1       Identity
2       Notification
3       Nak (Response only)
4       MD5-Challenge
5       One-Time Password (OTP) (RFC 1938)
6       Generic Token Card

3.1. Identity πŸͺͺ

Description πŸ’–

The Identity Type is used to ask the peer who it is. Usually the authenticator sends this as the initial Request. An optional displayable message MAY be included to prompt the peer when there's an expectation of user interaction. A Response MUST be sent to this Request with a Type of 1 (Identity).

Implementation Note: The peer MAY get the Identity through user input. It's suggested that the authenticator retry the Identity Request if the Identity is invalid or authentication fails, to allow for possible typos from the user 🫢 It's also suggested that the Identity Request be retried a minimum of 3 times before the authentication phase ends with a Failure reply. The Notification Request MAY be used to indicate an invalid authentication attempt before a new Identity Request is sent (optionally, the failure MAY be indicated within the message of the new Identity Request itself).

Type πŸ“

1

Type-Data 🌸

This field MAY contain a displayable message in the Request. The Response uses this field to return the Identity. If the Identity is unknown, this field should be zero bytes in length. The field MUST NOT be null terminated. The length of this field comes from the Length field of the Request/Response packet, so a null isn't required.

3.2. Notification πŸ””

Description πŸ’–

The Notification Type is optionally used to send a displayable message from the authenticator to the peer. The peer SHOULD display this message to the user, or log it if it can't be displayed. It's meant to give an acknowledged notification of something imperative, like a password that's about to expire, an OTP sequence integer that's nearing 0, an authentication failure warning, etc. In most circumstances, a notification shouldn't be required.

Type πŸ“

2

Type-Data 🌸

The Type-Data field in the Request contains a displayable message that's greater than zero octets in length. The length of the message is determined by the Length field of the Request packet. The message MUST not be null terminated. A Response MUST be sent in reply to the Request with a Type field of 2 (Notification). The Type-Data field of the Response is zero octets in length. The Response should be sent immediately, regardless of how the message is displayed or logged.

3.3. Nak πŸ™…β€β™€οΈ

Description πŸ’–

The Nak Type is only valid in Response messages. It's sent in reply to a Request where the desired authentication Type is unacceptable. Authentication Types are numbered 4 and above. The Response contains the authentication Type the peer wants.

Type πŸ“

3

Type-Data 🌸

This field MUST contain a single octet indicating the desired authentication type.

3.4. MD5-Challenge πŸ”

Description πŸ’–

The MD5-Challenge Type is analogous to the PPP CHAP protocol [3] (with MD5 as the specified algorithm). The PPP Challenge Handshake Authentication Protocol RFC [3] should be referred to for further implementation specifics. The Request contains a "challenge" message for the peer. A Response MUST be sent in reply to the Request. The Response MAY be either Type 4 (MD5-Challenge) or Type 3 (Nak). The Nak reply indicates the peer's desired authentication mechanism Type. All EAP implementations MUST support the MD5-Challenge mechanism 🫢

Type πŸ“

4

Type-Data 🌸

The contents of the Type-Data field are summarized below. For reference on the use of this field, see the PPP Challenge Handshake Authentication Protocol [3].

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Value-Size   |  Value ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Name ...
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.5. One-Time Password (OTP) πŸ”‘

Description πŸ’–

The One-Time Password system is defined in "A One-Time Password System" [4]. The Request contains a displayable message with an OTP challenge. A Response MUST be sent in reply to the Request. The Response MUST be of Type 5 (OTP) or Type 3 (Nak). The Nak reply indicates the peer's desired authentication mechanism Type.

Type πŸ“

5

Type-Data 🌸

The Type-Data field contains the OTP "challenge" as a displayable message in the Request. In the Response, this field carries the 6 words from the OTP dictionary [4]. The messages MUST not be null terminated. The length of the field is derived from the Length field of the Request/Reply packet. πŸ’œ

3.6. Generic Token Card πŸŽ€

Description πŸ’…

Okay so the Generic Token Card Type is made for all sorts of Token Card setups that need the user to type something in πŸ”. The Request carries an ASCII text message, and the Reply carries the Token Card info needed for authentication. Usually that's something the user reads off the token device and types in as ASCII text, which is so relatable 😭.

Type πŸ“

6

Type-Data 🌸

The Type-Data field in the Request holds a displayable message that's greater than zero octets long πŸ’–. The length of that message is set by the Length field of the Request packet. The message MUST not be null terminated πŸ™ˆ. A Response MUST be sent in reply to the Request with a Type field of 6 (Generic Token Card) πŸ¦‹. The Response carries the data from the Token Card needed for authentication, and the length of that data is set by the Length field of the Response packet ✨.

Security Considerations πŸ’€

Okay bestie, security is the whole main character of this RFC πŸ‘‘, so pay attention 🫢.

The way the authentication protocols interact inside PPP is highly implementation dependent πŸ”₯.

For example, when authentication fails, some implementations don't terminate the link. Instead, they limit the kind of traffic in the Network-Layer Protocols to a filtered subset. That gives the user a chance to update secrets or send mail to the network administrator about the problem πŸ“§.

There's no provision for retries of failed authentication πŸ™…β€β™€οΈ. BUT the LCP state machine can renegotiate the authentication protocol at any time, which lets someone make a fresh attempt 🌈. It is recommended that any counters used for authentication failure not be reset until after successful authentication, or until the failed link is terminated afterward 🧚.

There's no requirement that authentication be full duplex, or that the same protocol be used in both directions. Using different protocols in each direction is perfectly fine πŸ’œ. Of course, what actually works depends on the specific protocols that were negotiated ⭐.

Real talk: within or associated with each PPP server, a particular named user is not expected to be authenticated by multiple methods πŸ™ˆ. That would leave them open to attacks that negotiate the least secure method from a set, like PAP instead of EAP 😬. So for each named user, there should be an indication of exactly one method used to authenticate that user name πŸŽ€. If a user needs different authentication methods under different circumstances, then distinct identities SHOULD be employed, and each one should identify exactly one authentication method πŸ”.

References πŸ“š

[1] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.

[2] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1700, October 1994.

[3] Simpson, W., "PPP Challenge Handshake Authentication Protocol (CHAP)", RFC 1994, August 1996.

[4] Haller, N. and C. Metz, "A One-Time Password System", RFC 1938, May 1996.

[5] Yergeau, F., "UTF-8, a transformation format of Unicode and ISO 10646", RFC 2044, October 1996.

[6] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, March 1997.

Acknowledgments 🫢

This protocol gets a lot of its inspiration from Dave Carrel's AHA draft, as well as the PPP CHAP protocol [3] πŸ’–. Bill Simpson provided much of the boilerplate used throughout this document πŸ“. Al Rubens (Merit) also gave valuable feedback 🌟.

Chair's Address πŸ¦‹

The working group can be contacted through the current chair:

Karl F. Fox
Ascend Communications, Inc.
655 Metro Place South, Suite 370
Dublin, Ohio  43017

EMail: karl@ascend.com
Phone: +1 614 760 4041
Fax:   +1 614 760 4050

Authors' Addresses ✨

Larry J. Blunk
Merit Network, Inc.
4251 Plymouth Rd., Suite C
Ann Arbor, MI  48105

EMail: ljb@merit.edu
Phone: 734-763-6056
FAX:   734-647-3185
John R. Vollbrecht
Merit Network, Inc.
4251 Plymouth Rd., Suite C
Ann Arbor, MI  48105

EMail: jrv@merit.edu
Phone: +1-313-763-1206
FAX: +1-734-647-3185

Copyright (C) The Internet Society (1998). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. πŸ’œ

πŸ“¦ where this page comes from