Password Authentication Protocol
View on WikipediaPassword Authentication Protocol (PAP) is a password-based authentication protocol used by Point-to-Point Protocol (PPP) to validate users.[1] PAP is specified in RFC 1334.
Almost all network operating systems support PPP with PAP, as do most network access servers. PAP is also used in PPPoE, for authenticating DSL users.
As the Point-to-Point Protocol (PPP) sends data unencrypted and "in the clear", PAP is vulnerable to any attacker who can observe the PPP session. An attacker can see the users name, password, and any other information associated with the PPP session. Some additional security can be gained on the PPP link by using CHAP or EAP. However, there are always tradeoffs when choosing an authentication method, and there is no single answer for which is more secure.
When PAP is used in PPP, it is considered a weak authentication scheme. Weak schemes are simpler and have lighter computational overhead than more complex schemes, such as Transport Layer Security (TLS), but they are much more vulnerable to attack. Weak schemes are used where the transport layer is expected to be physically secure, such as a home DSL link. Where the transport layer is not physically secure a system such as TLS or Internet Protocol Security (IPsec) is used instead.
Other uses of PAP
[edit]PAP is also used to describe password authentication in other protocols such as RADIUS and Diameter. However, those protocols provide for transport or network layer security, and therefore that usage of PAP does not have the security issues seen when PAP is used with PPP.
Benefits of PAP
[edit]When the client sends a clear-text password, the authentication server will receive it, and compare it to a "known good" password. Since the authentication server has received the password in clear-text, the format of the stored password can be chosen to be secure "at rest". If an attacker were to steal the entire database of passwords, it is computationally infeasible to reverse the function to recover a plaintext password.
As a result, while PAP passwords are less secure when sent over a PPP link, they allow for more secure storage "at rest" than with other methods such as CHAP.
Working cycle
[edit]PAP authentication is only done at the time of the initial link establishment, and verifies the identity of the client using a two-way handshake.
- Client sends username and password. This is sent repeatedly until a response is received from the server.
- Server sends authentication-ack (if credentials are OK) or authentication-nak (otherwise)[2]
PAP packets
[edit]|
Description |
1 byte | 1 byte | 2 bytes | 1 byte | Variable | 1 byte | Variable |
|---|---|---|---|---|---|---|---|
| Authentication-request | Code = 1 | ID | Length | Username length | Username | Password length | Password |
| Authentication-ack | Code = 2 | ID | Length | Message length | Message | ||
| Authentication-nak | Code = 3 | ID | Length | Message length | Message |
PAP packet embedded in a PPP frame. The protocol field has a value of C023 (hex).
| Flag | Address | Control | Protocol (C023 (hex)) | Payload (table above) | FCS | Flag |
|---|
See also
[edit]- SAP – Service Access Point
Notes
[edit]- ^ "Password Authentication Protocol (PAP)". GeeksforGeeks. 2018-07-17. Retrieved 2020-11-08.
- ^ Forouzan (2007). Data Commn & Networking 4E Sie. McGraw-Hill Education (India) Pvt Limited. pp. 352–. ISBN 978-0-07-063414-5. Retrieved 24 November 2012.
References
[edit]- Lloyd, Brian; Simpson, William Allen (1992). "Password Authentication Protocol". PPP Authentication Protocols. IETF. p. 2. doi:10.17487/RFC1334. RFC 1334. Retrieved 16 July 2015.
Password Authentication Protocol
View on GrokipediaOverview
Definition and Purpose
The Password Authentication Protocol (PAP) is a simple authentication mechanism integrated into the Point-to-Point Protocol (PPP), designed to verify the identity of communicating peers through a two-way handshake process.[1] In this protocol, the peer attempting to connect sends its username and password in plaintext to the authenticator, which checks these credentials against a local database or configured values to confirm legitimacy.[1] This approach enables basic identity verification without complex cryptographic operations, making PAP suitable for environments where simplicity is prioritized.[7] The core purpose of PAP is to establish access control during the initial setup of point-to-point network links, such as those used in dial-up connections or serial interfaces, by ensuring that only authorized peers can advance to full data exchange.[1] It serves as a foundational step to prevent unauthorized access to network resources, simulating a traditional remote login process where the peer must prove its identity before gaining session privileges.[7] By operating within the PPP framework, PAP contributes to the overall reliability of link establishment without introducing encryption, focusing instead on straightforward credential validation.[1] A key aspect of PAP's operation is its positioning within the PPP negotiation sequence: it activates after the Link Control Protocol (LCP) has successfully configured the physical and data link layers, but before the Network Control Protocol (NCP) configures higher-layer network protocols.[1] This timing ensures that authentication occurs at a critical juncture, providing essential access gating while maintaining the protocol's minimal overhead and ease of deployment in legacy or resource-constrained networking scenarios.[7]History and Development
The Password Authentication Protocol (PAP) was first proposed in the initial PPP specification, RFC 1172 (July 1990), and emerged in the early 1990s as a component of the Point-to-Point Protocol (PPP) suite, designed to enable authentication for Internet Protocol (IP) datagrams transmitted over serial links such as dial-up modems.[2] PPP itself developed as a successor to the Serial Line Internet Protocol (SLIP), which lacked robust support for multiple network protocols and error detection, to meet the expanding needs of remote network access in TCP/IP environments during the pre-broadband era.[8] PAP was formally standardized in October 1992 through RFC 1334, authored by B. Lloyd of Lloyd & Associates and W. Simpson of Daydreamer, under the auspices of the Internet Engineering Task Force (IETF) Point-to-Point Protocol Working Group.[9] This document outlined PAP as one of two primary authentication mechanisms for PPP—alongside the Challenge-Handshake Authentication Protocol (CHAP)—to address the authentication requirements following initial link establishment in switched circuits or dial-up scenarios.[9] The protocol's creation responded directly to the surging demand for reliable remote access authentication as Internet connectivity grew via serial connections, extending beyond SLIP's limitations to support broader TCP/IP integration for hosts and routers.[10] Early adoption of PAP occurred prominently in Unix-like operating systems, such as Solaris, where it integrated into PPP configurations for dial-up user validation using files like /etc/ppp/pap-secrets, and in initial Internet routers handling modem-based access.[11]Technical Specifications
Authentication Process
The Password Authentication Protocol (PAP) employs a straightforward two-way handshake to verify the identity of a peer during the establishment of a Point-to-Point Protocol (PPP) link. In this mechanism, the peer seeking authentication initiates the process by transmitting an Authenticate-Request packet containing its username (Peer-ID) and password in plaintext. The authenticator, upon receiving this packet, validates the provided credentials against its local database or configured authentication system. If the credentials are correct, the authenticator responds with an Authenticate-Ack packet, confirming successful authentication and including an optional message; conversely, if the credentials are invalid, it sends an Authenticate-Nak packet with a brief error message indicating the failure.[1] Within the PPP framework, the PAP authentication sequence occurs immediately after the Link Control Protocol (LCP) has successfully established and configured the link but before the Network Control Protocol (NCP) negotiates and assigns network-layer addresses, such as IP addresses. This positioning ensures that authentication is a prerequisite for progressing to network-layer operations, with PAP itself being an optional phase negotiated via the Authentication-Protocol Configuration Option during LCP. The peer may repeat the transmission of Authenticate-Request packets until it receives a response or a local retry counter expires, allowing for basic handling of transient transmission issues without a formal retry protocol defined within PAP. Successful completion of this handshake is mandatory for the session to advance; failure results in link termination, as the authenticator may issue an LCP Terminate-Request following an Authenticate-Nak.[1] The operational flow begins with the peer generating an Authenticate-Request, which includes a unique Identifier field to correlate it with the forthcoming response. The authenticator processes this request by cross-referencing the username and password against its authentication database, performing the validation locally without involving external servers in the basic PAP design. Upon validation, the authenticator crafts and sends either the Authenticate-Ack or Authenticate-Nak, matching the Identifier to ensure the response pertains to the correct request. In cases of post-authentication scenarios, such as link re-establishment, the peer can resend Authenticate-Requests, but persistent failures trigger LCP termination procedures to indicate issues like a lost Nak response. This sequence maintains a simple, unidirectional authentication direction from peer to authenticator, emphasizing efficiency over complexity in link setup.[1]Packet Format
The Password Authentication Protocol (PAP) packets are encapsulated within the Information field of Point-to-Point Protocol (PPP) Data Link Layer frames, using the protocol number 0xc023 to identify PAP traffic.[1] All PAP packets share a common header structure consisting of a one-octet Code field, a one-octet Identifier field, and a two-octet Length field. The Code field specifies the packet type: 1 for Authenticate-Request, 2 for Authenticate-Ack, and 3 for Authenticate-Nak. The Identifier field aids in matching requests with their corresponding replies. The Length field indicates the total length of the PAP packet, including the header and all data fields, in octets.[1] The Authenticate-Request packet, sent by the peer seeking authentication, follows the header with a one-octet Peer-ID Length field, the variable-length Peer-ID string, a one-octet Password Length field, and the variable-length Password string. The Peer-ID and Password are transmitted as plaintext ASCII strings, using displayable characters in the range of decimal 32 to 126, with their lengths explicitly specified to delimit the fields.[1] The Authenticate-Ack and Authenticate-Nak packets, sent by the authenticator in response, follow the header with a one-octet Msg-Length field and an optional variable-length Message string. The Message provides human-readable feedback, such as an error indication, and is also encoded in displayable ASCII characters from decimal 32 to 126, with its length given by the Msg-Length field.[1]| Field | Size (octets) | Description |
|---|---|---|
| Common Header | ||
| Code | 1 | Packet type (1=Request, 2=Ack, 3=Nak) |
| Identifier | 1 | Matches requests and replies |
| Length | 2 | Total packet length |
| Authenticate-Request Data | ||
| Peer-ID Length | 1 | Length of Peer-ID string |
| Peer-ID | Variable | ASCII peer identifier |
| Password Length | 1 | Length of Password string |
| Password | Variable | ASCII password |
| Authenticate-Ack/Nak Data | ||
| Msg-Length | 1 | Length of Message string |
| Message | Variable | Optional ASCII message |