Fact-checked by Grok 2 weeks ago

Password Authentication Protocol

The Password Authentication Protocol (PAP) is a straightforward two-way handshake authentication mechanism employed within the (PPP) framework to verify the identity of a connecting peer by transmitting its username (Peer-ID) and in over the link. Defined initially in as part of early PPP specifications, PAP enables network access servers or authenticators to authenticate dial-up or switched-circuit connections from hosts and routers before allowing network-layer protocols to proceed. In operation, the peer initiates authentication by sending an Authenticate-Request packet containing its Peer-ID and to the , which then validates the credentials against a local or remote database. If valid, the responds with an Authenticate-Ack packet (Code 2), advancing the PPP phase to network-layer configuration; otherwise, it issues an Authenticate-Nak (Code 3), potentially terminating the link after repeated failures. This process occurs after link establishment and quality determination but before higher-layer protocol negotiation, using PPP protocol field hexadecimal value C023 for PAP packets. Despite its simplicity, PAP has significant security limitations, as passwords are sent unencrypted, exposing them to eavesdropping, replay attacks, and brute-force attempts on open networks. For this reason, it supports only unilateral authentication (peer to authenticator) and is considered a weak method, with standards recommending negotiation of stronger alternatives like the Challenge-Handshake Authentication Protocol (CHAP) whenever possible. Updated in 1992 to refine packet formats and error handling, PAP was later deprecated in modern authentication contexts due to these vulnerabilities, particularly in environments like RADIUS where cleartext transmission amplifies risks. Today, it persists primarily in legacy systems or controlled networks where simplicity outweighs security needs, though its use is strongly discouraged in favor of encrypted protocols.

Overview

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. 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. This approach enables basic identity verification without complex cryptographic operations, making PAP suitable for environments where simplicity is prioritized. The core purpose of PAP is to establish 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. It serves as a foundational step to prevent unauthorized access to network resources, simulating a traditional remote process where the peer must prove its identity before gaining session privileges. By operating within the PPP framework, PAP contributes to the overall reliability of link establishment without introducing , focusing instead on straightforward validation. 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. 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.

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 (PPP) suite, designed to enable authentication for (IP) datagrams transmitted over serial links such as dial-up modems. PPP itself developed as a successor to the (SLIP), which lacked robust support for multiple protocols and error detection, to meet the expanding needs of remote access in TCP/IP environments during the pre-broadband era. 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 (IETF) Point-to-Point Protocol Working Group. This document outlined PAP as one of two primary authentication mechanisms for PPP—alongside the (CHAP)—to address the authentication requirements following initial link establishment in switched circuits or dial-up scenarios. The protocol's creation responded directly to the surging demand for reliable remote access as connectivity grew via serial connections, extending beyond SLIP's limitations to support broader / integration for hosts and routers. Early adoption of PAP occurred prominently in operating systems, such as , where it integrated into PPP configurations for dial-up user validation using files like /etc/ppp/pap-secrets, and in initial routers handling modem-based access.

Technical Specifications

Authentication Process

The Password Authentication Protocol (PAP) employs a straightforward two-way to verify the identity of a peer during the establishment of a (PPP) link. In this mechanism, the peer seeking initiates the process by transmitting an Authenticate-Request packet containing its username (Peer-ID) and password in . The authenticator, upon receiving this packet, validates the provided credentials against its local database or configured system. If the credentials are correct, the authenticator responds with an Authenticate-Ack packet, confirming successful 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. Within the PPP framework, the 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. The operational flow begins with the peer generating an Authenticate-Request, which includes a field to correlate it with the forthcoming response. The processes this request by cross-referencing the username and against its database, performing the validation locally without involving external servers in the basic PAP design. Upon validation, the 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 , unidirectional authentication direction from peer to , emphasizing efficiency over complexity in link setup.

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. 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. The Authenticate-Request packet, sent by the peer seeking , 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 ASCII strings, using displayable characters in the range of decimal 32 to 126, with their lengths explicitly specified to delimit the fields. 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.
FieldSize (octets)Description
Common Header
1Packet type (1=Request, 2=, 3=Nak)
Identifier1Matches requests and replies
Length2Total packet length
Authenticate-Request Data
Peer-ID Length1Length of Peer-ID string
Peer-IDVariableASCII peer identifier
Password Length1Length of Password string
PasswordVariableASCII password
Authenticate-Ack/Nak Data
Msg-Length1Length of Message string
MessageVariableOptional ASCII message

Security Analysis

Vulnerabilities and Risks

The Password Authentication Protocol (PAP) transmits user credentials, including passwords, in over the network, rendering it highly susceptible to attacks where malicious actors intercept traffic using tools such as packet sniffers. This vulnerability is exacerbated in unencrypted environments like traditional (PPP) sessions, allowing attackers to capture and directly read authentication without additional decryption efforts. For instance, software can readily expose these credentials during transmission, facilitating unauthorized access to systems. PAP employs one-way authentication, verifying only the client (peer) against the (authenticator) without confirming the server's identity to the client, which leaves it open to man-in-the-middle (MITM) attacks. In such scenarios, an attacker can impersonate the legitimate , tricking the client into sending credentials to the wrong entity while relaying responses to maintain the deception. This lack of mutual verification stems from PAP's simple two-way handshake design, which does not incorporate mechanisms to bind sessions or validate the authenticator's legitimacy. The protocol offers no inherent replay protection or session binding, as it relies on static credentials without unique challenges or timestamps, enabling attackers to capture and reuse authentication packets for repeated unauthorized access. Captured credentials further support offline attacks, where adversaries systematically test common lists against the intercepted , or , where stolen pairs are tried across multiple services due to user reuse patterns. These weaknesses persist because PAP does not employ cryptographic hashing or nonces to prevent such reuse. PAP was used in legacy dial-up networking environments, where unencrypted phone lines and PPP connections allowed straightforward interception of credentials by physically tapping circuits or using early sniffing tools. In these pre-broadband systems, the protocol's plaintext nature amplified risks in unmonitored or shared access scenarios, and it is now considered inadequate for modern security standards due to these persistent threats.

Comparison with CHAP

The Password Authentication Protocol (PAP) employs a two-way , where the peer sends an authentication request containing the username and password in to the authenticator, which responds with an acknowledgment or rejection based on verification. In contrast, the (CHAP) utilizes a three-way : the authenticator initiates with a packet containing a random value, the peer responds with a hashed value derived from the challenge, identifier, and , and the authenticator replies with success or failure. This structural difference in CHAP prevents passive eavesdroppers from capturing the full exchange in a single transmission, unlike PAP's straightforward request-response. Security-wise, PAP transmits the password in cleartext, exposing it directly to interception on insecure links and enabling replay attacks if captured. CHAP addresses this by never sending the password; instead, it computes a one-way —typically —of the challenge concatenated with the , ensuring the secret remains undisclosed even if the response is intercepted. Additionally, CHAP's use of unique, unpredictable challenges per session mitigates replay risks, a vulnerability inherent in PAP's static credentials. In terms of , PAP's makes it compatible with systems requiring minimal computational overhead, as it avoids or . CHAP, however, demands more resources for computations and management on both ends, though it supports when negotiated bidirectionally. Both protocols operate within the (PPP) framework to authenticate peers over serial links. CHAP evolved directly as an enhancement to , formalized in RFC 1994 to counter and passive attacks by incorporating periodic re-challenges after initial , thereby providing ongoing verification without repeated secret exposure. This design shift underscores PAP's limitations in modern contexts, positioning CHAP as the preferred method for PPP authentication where security is prioritized.

Usage and Modern Context

Applications in Networking

The Password Authentication Protocol (PAP) finds its primary application within the (PPP) framework for authenticating users over serial lines, (ISDN), and (DSL) connections in legacy remote access servers. In these environments, PAP performs initial authentication during PPP link establishment, often integrating with (RADIUS) servers to enable centralized credential verification for dial-in users. Historically, PAP saw widespread deployment in the among dial-up Internet service providers (ISPs) and early (VPN) setups, where it authenticated modems and routers connecting remote clients to network access servers over switched circuits. This usage was prevalent in scenarios requiring simple, two-way verification to simulate traditional remote host logins, facilitating broad before more secure alternatives emerged. In niche modern contexts, PAP persists in embedded systems and (IoT) devices that employ for connectivity, such as industrial routers or legacy serial interfaces where implementation simplicity is prioritized. It also serves as an occasional fallback mechanism in and routers for PPP authentication when preferred protocols fail, and in testing environments to validate basic network authentication flows. As of 2025, vendors like and continue to support PAP for legacy compatibility, though with security warnings. Following successful PAP authentication, PPP proceeds to negotiate Network Control Protocols, such as the IP Control Protocol (IPCP), which assigns IP addresses to authenticated peers, enabling seamless transition to data transmission in these networked applications.

Deprecation and Alternatives

The Password Authentication Protocol (PAP) has been classified as obsolete by the (IETF), which explicitly describes it as a deprecated cleartext password authentication protocol for (PPP) environments due to its inherent security weaknesses. Networking standards discourage PAP in favor of encrypted methods. Key alternatives to PAP prioritize encryption and stronger verification. Within PPP contexts, the Challenge-Handshake Authentication Protocol (CHAP) serves as a direct upgrade by hashing passwords during transmission. For broader network access, the (EAP) framework offers variants like EAP-Transport Layer Security (EAP-TLS), which uses mutual certificate-based authentication, and Protected EAP (PEAP), which tunnels inner methods within TLS to protect credentials. In Windows environments, MS-CHAPv2 provides an enhanced, challenge-response mechanism compatible with PPP and . For web-based and API access, protocols such as OAuth 2.0 enable token-based authorization without exposing passwords, while (SAML) facilitates federated identity management across domains. Transitioning from PAP involves targeted migrations to mitigate risks while maintaining compatibility. In PPP setups, administrators should prioritize shifting to CHAP or EAP methods, updating configurations on routers and access servers to enforce these protocols exclusively. Where legacy systems necessitate PAP retention, encapsulating it within a TLS/SSL —such as via EAP-TTLS/PAP—can provide interim protection, though this approach remains suboptimal and demands swift replacement with native encrypted alternatives. PAP's plaintext handling contravenes regulatory standards for credential , accelerating its . The (PCI-DSS) requires and protocols to protect authentication factors during transmission (e.g., Requirement 4.1). Similarly, the General Data Protection Regulation (GDPR) Article 32 requires appropriate technical measures, including , for like passwords, making cleartext protocols a violation of data protection principles. These constraints have prompted widespread recommendations to phase out PAP in enterprise networks, favoring compliant alternatives to avoid fines and breaches.

References

  1. [1]
    RFC 1334 - PPP Authentication Protocols - IETF Datatracker
    This document defines two protocols for Authentication: the Password Authentication Protocol and the Challenge-Handshake Authentication Protocol.
  2. [2]
    RFC 1172 - IETF
    The Password Authentication Protocol (PAP) may be used to authenticate a peer by verifying the identity of the remote end of the link. Use of the PAP must first ...
  3. [3]
  4. [4]
  5. [5]
  6. [6]
    RFC 4962 - Guidance for Authentication, Authorization, and ...
    PAP Password Authentication Protocol; a deprecated cleartext password PPP authentication protocol, originally defined in [RFC1334]. Party A party is a ...
  7. [7]
    PPP Password Authentication Protocol | Junos OS - Juniper Networks
    The Password Authentication Protocol (PAP) provides a simple method for the peer to establish its identity using a two-way handshake.
  8. [8]
    None
    Summary of each segment:
  9. [9]
    PPP Overview, History and Benefits - The TCP/IP Guide!
    The first formal IETF document related to PPP was RFC 1134, published in 1989. This RFC is not the standard itself but a proposal for what would eventually be ...
  10. [10]
    RFC 1334 - IETF
    This document defines two protocols for Authentication: the Password Authentication Protocol and the Challenge-Handshake Authentication Protocol. This memo is ...Missing: history development
  11. [11]
  12. [12]
    Password Authentication Protocol (PAP) (System Administration Guide
    PAP uses the PPP configuration files and PAP database in the form of the /etc/ppp/pap-secrets file for setting up authentication.
  13. [13]
    Password Authentication Protocol (PAP) Security Explained - Okta
    Sep 14, 2024 · PAP, or password authentication protocol, is a point-to-point protocol (PPP) authentication method that uses passwords to validate users.
  14. [14]
    Authentication - Paul Krzyzanowski
    Sep 28, 2025 · It provides no protection against replay, offline guessing, or reuse of passwords. PAP is rarely used in production except as a fallback or ...
  15. [15]
    PAP vs. CHAP: What's the Difference? - Rublon
    Jan 16, 2023 · The main difference between PAP and CHAP is that PAP uses a Two-Way Handshake and sends the password in clear-text form, whereas CHAP uses a Three-Way ...<|separator|>
  16. [16]
    RFC 1994: PPP Challenge Handshake Authentication Protocol (CHAP)
    ### Summary of CHAP Protocol Details from RFC 1994
  17. [17]
    Configuring and Troubleshooting PPP Password Authentication ...
    The router that the ppp authentication pap command is configured on will use PAP to verify the identity of the other side (peer). This means the other side ( ...
  18. [18]
    Examine how the RADIUS Works - Cisco
    When it is provided with the username and original password given by the user, it can support PPP, PAP or CHAP, UNIX log in, and other authentication mechanisms ...Missing: integration | Show results with:integration
  19. [19]
    409 Lectures - Modems
    Can use Password Authentication Protocol (PAP) or Challenge Handshake Authentication Protocol (CHAP) for authentication. Internet Protocol Control Protocol ...
  20. [20]
    PPP Network Control Protocol Negotiation | Junos OS
    If the the attempt to negotiate CHAP authentication is unsuccessful, the router then tries to negotiate Password Authentication Protocol (PAP) authentication.
  21. [21]
    PPP Subscriber Access Networks Overview | Junos OS
    You can specify either CHAP or PAP authentication. Optionally, you can also control the order in which the router negotiates the CHAP and PAP protocols.
  22. [22]
    Authentication - OWASP Cheat Sheet Series
    The Fast Identity Online (FIDO) Alliance has created two protocols to facilitate online authentication: the Universal Authentication Framework (UAF) protocol ...Password Storage · Multifactor Authentication · Session Management
  23. [23]
    RFC 3748 - Extensible Authentication Protocol (EAP)
    Extensible Authentication Protocol (EAP) · RFC - Proposed Standard June 2004. View errata Report errata. Updated by RFC 5247, RFC 7057. Obsoletes RFC 2284. Was ...
  24. [24]
    RFC 5281 - Extensible Authentication Protocol Tunneled Transport ...
    EAP-TTLS is an EAP method that encapsulates a TLS session, using a secure tunnel for authentication and data exchange, including legacy protocols.