Fact-checked by Grok 2 weeks ago

Handshake (computing)

In computing, a handshake is a between two systems for identifying and authenticating themselves to each other, or for synchronizing their operations with each other. This ensures reliable communication by establishing parameters such as rates, handling, and measures before full exchange begins. are essential across various domains, including interfaces, , and cryptographic exchanges, preventing issues like loss or unauthorized access. In hardware contexts, handshaking typically involves the exchange of signals over dedicated lines to coordinate between devices, such as in ports. For instance, Request to Send (RTS) and Clear to Send (CTS) signals enable flow , allowing a sender to pause transmission if the receiver is not ready, thus using five wires: transmit (), receive (), RTS, CTS, and ground. This mechanism contrasts with software handshaking, which relies on characters like XON/XOFF for flow without additional . In networking, handshakes are critical for establishing connections in protocols like and TLS. The TCP three-way handshake, defined in the original protocol specification, involves a client sending a SYN packet, the server responding with SYN-, and the client replying with to synchronize sequence numbers and confirm bidirectional reachability. Similarly, the TLS handshake negotiates encryption parameters and authenticates parties, culminating in shared session keys for , as outlined in the TLS 1.3 standard. These processes underpin much of modern , ensuring reliability and confidentiality.

Overview

Definition

In computing, a handshake refers to an initial exchange of signals or messages between two devices, programs, or systems to establish, negotiate, or verify the parameters necessary for subsequent communication or data transfer. This process ensures that both parties are ready and capable of interacting under agreed-upon conditions, such as transmission speed or compatibility. Key characteristics of a computing handshake include its bidirectional nature, which facilitates between the communicating entities; negotiation of operational parameters, potentially encompassing data rates, credentials, or session keys; and incorporation of mechanisms for detecting errors or incompatibilities during the setup phase. These elements collectively prepare a stable channel, preventing mismatches that could lead to failed interactions. Unlike unilateral signals, handshakes require mutual confirmation to proceed. The term "" derives from the physical symbolizing agreement or trust, and its analogy was adopted in early for systems and network protocols. A differs from a simple (), which is a basic, one-way confirmation of data receipt during an active session; in contrast, a constitutes a structured, multi-step sequence dedicated to initial connection establishment rather than ongoing verification. In protocols like , handshakes play a foundational role in synchronizing endpoints before data exchange begins.

Purpose and Importance

Handshakes in primarily serve to establish reliable between communicating entities, such as devices or software processes, by synchronizing their operational states and confirming mutual readiness for exchange. This process allows the parties to negotiate essential parameters, including transfer rates, encoding formats, and error-checking mechanisms, ensuring before any substantive communication occurs. Additionally, handshakes facilitate to verify the identities of participants and detect potential incompatibilities early, preventing wasted resources on mismatched interactions. The benefits of handshakes are substantial, as they reduce transmission errors by incorporating mechanisms for detection and correction, such as acknowledgments, thereby enhancing overall . By verifying identities and enabling , handshakes bolster against unauthorized access, while also promoting efficient through synchronized flow control that avoids overwhelming slower components. Furthermore, they support , allowing newer systems to interoperate with legacy hardware or software by dynamically adjusting to supported capabilities. Despite these advantages, handshakes introduce drawbacks, including overhead in terms of time and bandwidth due to the multiple signal exchanges required, which can introduce latency in high-speed environments. They are also susceptible to certain risks, such as resource exhaustion attacks that exploit the state-holding nature of the process, exemplified by SYN flooding where incomplete handshakes consume server memory and processing capacity. Failure modes, like timeouts or mismatched responses, can lead to abrupt connection drops, necessitating retry mechanisms that further amplify overhead. In modern , handshakes are indispensable for the of distributed systems, where myriad devices must interoperate seamlessly across networks. Their role is particularly vital in () ecosystems and cloud environments, enabling secure, synchronized data flows among heterogeneous devices while supporting real-time applications in industrial automation and beyond. Without effective handshaking, the reliability and efficiency of these expansive, interconnected infrastructures would be severely compromised.

Types of Handshakes

Software Handshakes

Software handshakes, also known as , involve the use of special control characters embedded within the data stream to coordinate data transmission between devices, without requiring dedicated hardware control lines. This method relies on over the existing transmit and receive data lines, typically in serial communications. The primary mechanism uses ASCII characters: XON (Transmit On, DC1, hexadecimal 0x11) to resume transmission and XOFF (Transmit Off, DC3, hexadecimal 0x13) to pause it. When a receiving device's approaches capacity, it sends an XOFF character to the sender, which halts data flow until an XON is received. This process ensures and prevents overflows, though it can be less reliable if characters are corrupted or misinterpreted as data. Software handshakes operate at the physical or of the and are commonly applied in asynchronous serial interfaces, such as connections between computers and peripherals like printers or modems. They are particularly useful in scenarios with limited cabling, as no extra wires are needed beyond TX, RX, and ground. However, they introduce potential from processing control characters and risk data disruption if the protocol lacks error checking. Compared to hardware handshakes, software methods offer flexibility for software-configurable systems but may incur higher CPU overhead for parsing control characters. In some setups, both can be combined, with hardware taking precedence if enabled. The origins of software handshaking date to the early , coinciding with the development of ASCII (1963) and asynchronous teletypewriter systems, where control characters were used to manage transmission over telephone lines. It became standardized in protocols and remains in use for legacy and embedded systems.

Hardware Handshakes

Hardware handshakes involve signal-based exchanges between devices using dedicated control pins or electrical lines at the physical or , enabling direct coordination without reliance on higher-layer software protocols. These mechanisms ensure reliable data flow by signaling device readiness and managing transmission timing through voltage level changes, where +3 V to +15 V represents logic 0 (SPACE) and -3 V to -15 V represents logic 1 (MARK) in standards like RS-232. This approach is particularly suited to environments where precise, low-level is required to prevent or overflows. Common mechanisms include the Request-to-Send (RTS) and Clear-to-Send (CTS) signals, which provide hardware flow control in interfaces. In this protocol, the (DTE), such as a computer, asserts the RTS line (pin 4) to indicate readiness to transmit data, prompting the (DCE), like a , to assert CTS (pin 5) when it can receive, thereby initiating data transfer. Additional signals, such as (DTR) and Data Set Ready (DSR), may complement by confirming overall connection status before communication begins. These voltage-driven interchanges allow for simple without embedding control information in the itself. Hardware handshakes find primary application in point-to-point links, such as connections between computers and peripherals like printers or sensors, where software cannot reliably predict timing due to variable processing delays. For instance, in environmental control systems interfacing with devices like thermostats, ensures half-duplex communication proceeds only when both ends are prepared, avoiding transmission errors in unreliable timing scenarios. This is essential for legacy and embedded systems relying on direct electrical signaling for basic coordination. Compared to software handshakes, hardware methods offer lower through immediate electrical responses, eliminating the need for packet-based acknowledgments and reducing CPU overhead. They impose no additional data overhead, making them efficient for flow control, though their scope is limited to straightforward negotiations such as readiness signaling rather than complex parameter exchanges like baud rate or settings. In hybrid systems, hardware handshakes can integrate with software approaches to provide layered control for more robust communication. The origins of hardware handshaking trace back to the , evolving from teletypewriter systems that required reliable signal coordination for early data transmission over telephone lines. These mechanisms were formalized in the EIA standard, first published in 1962 by the Electronic Industries Association to standardize interfaces between data terminals and modems, with subsequent revisions ensuring compatibility across serial ports.

Handshakes in Networking Protocols

TCP Three-Way Handshake

The TCP three-way handshake is a fundamental mechanism in the (TCP) for establishing a reliable, connection-oriented communication session between a client and a . It consists of three sequential steps—Synchronize (), Synchronize-Acknowledge (SYN-ACK), and Acknowledge ()—designed to synchronize sequence numbers and verify bidirectional , ensuring both endpoints can reliably exchange without prior state assumptions. This process prevents issues like old or duplicate packets from previous connections interfering with new ones, as each side independently generates and confirms its initial sequence number (ISN). Defined in the original specification, the handshake operates at the and is essential for TCP's reliability features, such as ordered delivery and error recovery. The process begins with the client (active opener) initiating a by sending a to the (passive opener). This packet includes the client's 32-bit ISN, randomly selected to avoid predictability, and sets the SYN control flag while leaving the number undefined. Upon , the server responds with a SYN- , which includes its own 32-bit ISN, sets both SYN and flags, and specifies an number equal to the client's ISN plus one ( = client's ISN + 1) to confirm of the ; this step consumes one sequence number from the server's side. Finally, the client sends an acknowledging the server's ISN plus one ( = server's ISN + 1), completing the and transitioning both endpoints to the ESTABLISHED state, where transmission can begin. Each may carry TCP options, and the and SYN- packets do not carry application to maintain the handshake's focus on setup. During the handshake, several key parameters are exchanged to optimize the connection. The (MSS) is advertised via a TCP option in and SYN-ACK segments, allowing each side to inform the other of its maximum receivable payload size (typically derived from the interface MTU minus headers), though it is not formally negotiated but unilaterally stated for the peer to respect. The initial receive window size, a 16-bit field in the header, is included in all segments to enable flow control by indicating the amount of buffer space available for incoming , starting from the SYN-ACK onward. Additionally, support for (SACK) can be proposed through the SACK-Permitted option in the SYN segment, permitting the to acknowledge non-contiguous blocks of later in the session if both sides agree during the . These parameters ensure efficient transfer tailored to the network path. Sequence number synchronization relies on a simple yet robust : each generates a random 32-bit ISN at the start, with the SYN segment advancing the sequence by one (as SYN consumes a slot), so subsequent data begins at ISN + 1; acknowledgments confirm this by setting ACK = peer's ISN + 1 in the response. This mutual confirmation—client acknowledging server's ISN + 1 in the final ACK, and server having already acknowledged the client's—ensures both sides agree on the starting point for byte-stream numbering, preventing desynchronization. In mathematical terms, for client ISN_c and server ISN_s: \text{SYN: } \text{SEQ} = \text{ISN}_c, \quad \text{CTL} = \text{SYN} \text{SYN-ACK: } \text{SEQ} = \text{ISN}_s, \quad \text{ACK} = \text{ISN}_c + 1, \quad \text{CTL} = \text{SYN, ACK} \text{ACK: } \text{SEQ} = \text{ISN}_c + 1, \quad \text{ACK} = \text{ISN}_s + 1, \quad \text{CTL} = \text{ACK} The 32-bit space wraps around after $2^{32} bytes, but the handshake's design minimizes collision risks through ISN randomization. A notable security concern with the three-way handshake is vulnerability to SYN flooding attacks, where an attacker sends numerous SYN packets without completing the handshake, exhausting the server's half-open connection queue and denying service to legitimate clients. This exploits the server's need to allocate resources (like state and buffers) upon receiving a SYN, potentially leading to resource depletion. A common mitigation is the use of , a cryptographic where the server encodes state information into the ISN of the SYN-ACK without storing per-connection data; upon receiving the final ACK, the client-provided cookie is verified to restore state only for valid connections, reducing memory usage during floods. The three-way handshake was originally standardized in RFC 793 in 1981 as part of the core specification. Subsequent updates have maintained its core mechanics while enhancing compatibility, such as adaptations for transport in RFC 2460, which ensure the handshake functions identically over IPv6 addresses without altering the sequence synchronization process, and further refinements in RFC 9293 ( specification update in 2022) for clarity and minor clarifications on options handling.

TLS Handshake

The TLS handshake is a multi-phase cryptographic exchange protocol that establishes a session between a client and a over a reliable , such as , by authenticating the parties, negotiating cryptographic parameters, and deriving symmetric session keys for subsequent encrypted data transfer. This process ensures , , and while preventing and tampering during session initiation. The handshake begins with the ClientHello message, in which the client specifies supported TLS versions (e.g., up to 1.3), a list of preferred defining algorithms and methods, a 32-byte random for freshness, and optional extensions such as supported groups (e.g., secp256r1 or X25519). The server responds with a ServerHello message selecting the highest mutually supported version and , its own 32-byte random , and relevant extensions, followed by its certificate chain for public-key . The phase then occurs, typically using ephemeral Diffie-Hellman (DHE) or elliptic curve Diffie-Hellman (ECDHE) for , where the client and server exchange public values to compute a shared premaster secret without transmitting it directly; as of November 2025, hybrid post-quantum —combining classical methods like X25519 with post-quantum algorithms such as —are widely adopted for quantum-resistant security, with over 50% of traffic on major platforms using such protections; alternatively, RSA-based exchange encrypts the premaster secret with the server's public key from the certificate. The handshake concludes with Finished messages from both parties, each containing a (MAC) computed over the entire handshake transcript using the newly derived keys to verify integrity and prevent replay attacks. Central to the TLS handshake are concepts from , which facilitate initial server (and optionally client) via digital certificates, transitioning to efficient symmetric cryptography for the session's bulk encryption using algorithms like . Extensions such as (SNI) allow the client to specify the target hostname in the ClientHello, enabling on shared addresses without compromising security. Key derivation combines the premaster secret with the client and server random nonces through a pseudorandom (PRF); in earlier versions like TLS 1.2, this uses a PRF based on HMAC-SHA256, while TLS 1.3 employs (HMAC-based ) for enhanced security. For instance, in TLS 1.3, traffic secrets are derived as: \text{Traffic Secret} = \text{HKDF-Expand-Label}(\text{Handshake Secret}, \text{"c ap traffic"}, \text{0x}, \text{Hash.length}) where HKDF-Expand-Label applies HKDF-Extract and HKDF-Expand with a label and context from the handshake transcript hash. The protocol evolved from the insecure Secure Sockets Layer (SSL) 1.0, proposed by Netscape in 1994 and never released due to vulnerabilities, through SSL 2.0 (1995, flawed authentication) and SSL 3.0 (1996, basis for TLS), to TLS 1.0 (1999, RFC 2246) which formalized improvements like explicit IVs. Subsequent versions addressed weaknesses: TLS 1.1 (2006, RFC 4346) mitigated CBC padding oracle attacks, TLS 1.2 (2008, RFC 5246) introduced flexible signature algorithms and AEAD ciphers, and TLS 1.3 (2018, RFC 8446) streamlined the handshake to a single round-trip (1-RTT) by integrating key exchange earlier and mandating forward secrecy. TLS incorporates security features like Perfect Forward Secrecy (PFS), achieved through exchanges (e.g., ECDHE) that ensure compromise of long-term keys does not expose past sessions, and resistance to downgrade attacks via explicit version negotiation in extensions and authenticated checks in the ServerHello random field or Finished MACs. These mechanisms build on an underlying reliable transport like to focus solely on cryptographic security.

SMTP Handshake

The SMTP handshake is the initial command-based exchange in the Simple Mail Transfer Protocol (SMTP) that establishes a session between a client Mail Transfer Agent (MTA) and a server MTA for email delivery, enabling capability negotiation and identity verification before message transfer begins. This process occurs at the application layer over a TCP connection and differs from lower-layer handshakes by relying on textual commands and responses rather than binary flags or cryptographic keys. It ensures both parties agree on protocol features, such as support for extended capabilities, while identifying the domains involved in the transaction. The handshake begins when the client initiates a connection to the on port 25, prompting the to issue a "Service ready" , which may include the 's domain and software details. The client then sends an EHLO (Extended SMTP) command followed by its (FQDN) or address literal, signaling support for SMTP extensions; alternatively, it uses the simpler HELO command for basic SMTP without extensions. In response, the replies with a multiline "" status, listing supported extensions—such as AUTH for or STARTTLS for —in a parameterized format that allows the client to select compatible features. If EHLO fails or extensions are unavailable, the client falls back to HELO, and the confirms with a single response, clearing any prior state. Key parameters in the handshake include the client's identification via EHLO or HELO, which verifies the sender's origin, and the server's advertised features, such as 8BITMIME for transporting 8-bit text content without alteration or PIPELINING for sending multiple commands without waiting for individual responses to improve efficiency. These extensions are registered with IANA and defined in separate RFCs, allowing modular enhancement of the base protocol. Following the greeting exchange, the client may negotiate using AUTH parameters or initiate with STARTTLS if advertised, upgrading the session to TLS in a single sentence of integration without altering the core flow. Error handling during the handshake involves standardized reply codes; for instance, a 421 " not available" response indicates the is busy or shutting down, prompting the client to close the and implement retry logic with . Other errors, like 500 for syntax issues or 503 for invalid sequence, terminate the session immediately, distinguishing temporary (4xx) from permanent (5xx) failures to guide client behavior. The SMTP handshake is standardized in RFC 5321, published in 2008, which consolidates and updates the original RFC 821 from 1982 by incorporating Extended SMTP (ESMTP) mechanisms for modern extensions while maintaining backward compatibility. This evolution ensures robust session setup across diverse email infrastructures. In the broader email flow, the handshake establishes sender and receiver identities through domain parameters, paving the way for subsequent MAIL FROM and RCPT TO commands that specify paths without re-verifying basics. For illustration, a typical EHLO exchange might appear as follows:
C: EHLO client.example.com
S: 250-server.example.com Hello client.example.com
S: 250-8BITMIME
S: 250-PIPELINING
S: 250 STARTTLS
S: 250 [OK](/page/OK)
This format highlights the server's multiline response, enabling the client to proceed with feature-aware commands.

Handshakes in Wireless and Physical Communications

WPA2 Four-Way Handshake

The WPA2 four-way handshake is a exchange used in (WPA2) to authenticate a client device (supplicant) and an access point (authenticator), confirm possession of a (PSK), and derive session-specific encryption keys for secure wireless communication. This process occurs after initial and open system authentication in the protocol, enabling the establishment of a Robust Security Network Association (RSNA). It protects unicast traffic with a pairwise transient key (PTK) and multicast/broadcast traffic with a group temporal key (GTK), using the (AES) in Counter Mode with Cipher Block Chaining Message Authentication Code Protocol (CCMP). The handshake is defined in the standard, which forms the basis for WPA2 certification by the . The handshake consists of four Extensible Authentication Protocol over LAN (EAPOL)-Key messages transmitted between the supplicant and over the 802.11 medium. In the first message, the initiates the exchange by sending an EAPOL-Key frame containing its randomly generated nonce (ANonce), along with the key confirmation key (KCK) identifier and replay counter, to the supplicant; this ANonce contributes to key freshness and prevents replay attacks. The supplicant responds in the second message with its own supplicant nonce (SNonce), the (MIC) computed using the KCK to verify mutual possession of the (PMK), and its own replay counter, allowing both parties to derive the PTK independently. The then sends the third message, which includes a MIC for confirmation, the encrypted with the (KEK) derived from the PTK, and instructions for the supplicant to install the keys; upon receipt, the installs the PTK for traffic. Finally, the supplicant acknowledges in the fourth message with an EAPOL-Key frame containing a MIC but no data, confirming key installation and completing the , after which encrypted data transmission begins. The PTK is derived from the PMK, which is generated from the PSK using the Password-Based Key Derivation Function 2 () with HMAC-SHA1, incorporating the network service set identifier (SSID) and ; the PTK itself is computed via a pseudo-random function (PRF) using the PMK, ANonce, SNonce, and the MAC addresses of the supplicant and as inputs, resulting in a 384-bit key partitioned into the KCK (128 bits) for MIC calculations, KEK (128 bits) for GTK encryption, and temporal keys (128 bits) for data encryption. This derivation ensures that the PTK is unique per session and resistant to , as nonces provide and the MIC in messages 2 and 3 mutually authenticates the parties without revealing the PSK. In enterprise modes, the PMK may instead derive from an (EAP) exchange under , but the four-way handshake remains the same for key confirmation. A key security feature of the four-way handshake is its protection against offline dictionary attacks on the PSK, as the requires online interaction and knowledge of the nonces to verify guesses, forcing attackers to perform resource-intensive on-path attempts rather than capturing and cracking handshakes offline. However, a known as the Key Reinstallation Attack (), disclosed in 2017, exploited flaws in the handshake's nonce management and key installation logic, allowing an attacker within radio range to force repeated key reinstallations, decrypt some traffic, and potentially inject or replay packets without compromising the PSK itself; this was addressed through updates and later superseded by WPA3's enhanced protections like . The protocol's design in has been widely adopted since WPA2's introduction, mandating CCMP encryption and the four-way handshake for certified devices to ensure interoperability and robust security in personal and enterprise networks.

Serial Hardware Handshaking

Serial hardware handshaking, also known as hardware flow control, employs dedicated control signals in serial communication standards like RS-232 and RS-485 to manage data transmission rates and prevent buffer overflows between devices. In RS-232, common signals include Request to Send (RTS) on pin 4, Clear to Send (CTS) on pin 5, Data Terminal Ready (DTR) on pin 20, and Data Set Ready (DSR) on pin 6, which allow devices such as computers (Data Terminal Equipment, DTE) and modems (Data Circuit-terminating Equipment, DCE) to indicate readiness for data exchange. These signals operate at electrical levels defined by the RS-232 standard, typically ±3 to ±15 volts, ensuring reliable detection over short distances up to 50 feet. The mechanics of RTS/CTS handshaking involve the sender (DTE) asserting the RTS signal high to request permission to transmit; the receiver (DCE) responds by asserting CTS high if its has space, enabling data flow on the / lines. If the receiver's nears capacity, it deasserts CTS low, pausing transmission until space is available again, thus providing pacing without software intervention. DTR/DSR serves a similar but more static role, with the DTE asserting DTR to signal operational readiness and the DCE responding with DSR to confirm connection establishment, often used in conjunction with for complete control. In , which supports multi-drop networks over longer distances (up to 4000 feet), handshaking is adapted for half-duplex operation, where RTS may control a driver's enable/disable for transmit/receive switching, though full is less common due to the two-wire differential setup. Configurations for serial hardware handshaking support both full-duplex and half-duplex modes; in full-duplex , separate and lines allow simultaneous bidirectional communication with continuous monitoring, while half-duplex alternatives like rely on directional control via RTS to toggle between sending and receiving. Software-assisted methods, such as XON/XOFF characters sent over the data line and triggered by hardware buffer thresholds, can complement pure hardware signals in mixed setups, though they require compatible protocol support. During handshaking, parameters like baud rate, data bits, , and stop bits are typically established through initial rather than explicit , with the primary focus on to maintain . For instance, devices synchronize at a predefined baud rate (e.g., 9600 bps), and handshaking ensures ongoing pacing without altering these settings mid-session. Historically, serial hardware handshaking became standard in the 1960s with the specification, initially for teletypewriters and modems to synchronize early data terminals with telecommunication equipment. It remained prevalent through the and in PC serial ports for connecting printers, mice, and industrial sensors, but has been largely supplanted by USB for consumer applications since the early due to higher speeds and plug-and-play simplicity. Nonetheless, it persists in industrial environments for its robustness in noisy settings, such as factory automation and systems, where multi-node networks benefit from simple handshaking to connect legacy PLCs and sensors. Common troubleshooting issues in serial hardware handshaking include crossed or improperly wired control lines, such as swapping RTS and CTS in null-modem cables, which can cause perpetual pauses or by preventing proper assertion. Other frequent problems involve incompatible voltage levels between devices (e.g., vs. ), leading to undetected signals, or disconnected handshake pins in minimal three-wire setups, resulting in unchecked overflows. To resolve, verifying pinouts against the DB-9 or DB-25 standard and using tests to confirm is essential.

Dial-Up Modem Negotiation

Dial-up modem negotiation refers to the initial establishment process between two modems over analog telephone lines, involving a series of acoustic and electrical signals to detect carriers, negotiate speeds, select protocols, and train the for reliable data transmission. This is a hybrid analog-digital procedure, where modems exchange audio tones and modulated signals to adapt to line conditions, producing the characteristic screeching sounds audible during . The process ensures compatibility and optimal performance despite impairments like noise and in the (PSTN). The negotiation unfolds in multiple phases, beginning with carrier detection and echo suppression. In the first phase, aligned with , the answering modem emits an amplitude-modulated and phase-reversed tone at 2100 Hz (known as ANSam) for approximately 3 seconds to disable echo cancellers in the , enabling full-duplex operation; the originating responds with V.21-modulated signals to confirm capabilities. This is followed by a V.8 bis transaction where modems exchange binary information via differential (DPSK) at 600 bps to identify supported modulation schemes and select protocols. Subsequent phases focus on line probing, equalization, and , as defined in V.34 (initially standardized in for speeds up to 33.6 kbps). Phase 2 involves probing with tone pairs (L1/L2 sequences at frequencies from 500 Hz to 3900 Hz) and ranging signals (A/A' at 2400 Hz and B/B' at 1200 Hz with phase reversals) to assess channel characteristics, detect the carrier, and estimate transmit power levels. In 3, the modems perform equalizer and using scrambled binary ones (TRN signal) and partial response signaling, allowing speed negotiation based on line quality; phase-locked loops synchronize the carriers during this stage. 4 completes final with additional scrambled ones and probes (MP), establishing full-duplex mode and enabling fallback to lower speeds if higher rates fail due to poor conditions. Following modulation training, the initial exchange configures error correction and framing via V.42, which implements the Link Access Procedure for Modems (LAPM), an HDLC-based protocol for detecting and retransmitting erroneous frames to ensure over the noisy analog link. The V.92 standard (2000), an enhancement to V.90, supports downstream speeds up to 56 kbps while retaining a similar structure, incorporating quick-connect features that prior line data to reduce negotiation time by up to 50% on repeated calls. This process builds on serial hardware handshaking principles by adding telephony-specific audio phases for analog adaptation. Dial-up negotiation peaked in popularity during the 1990s as the primary method, but became obsolete with the rise of in the early 2000s; it remains historically significant for enabling rural and low-cost connectivity before widespread DSL and cable adoption.

Modern and Peripheral Applications

Mobile Device Charging Protocols

Mobile device charging protocols involve an initial signal exchange between the device and to detect the charger type, negotiate appropriate voltage and levels, and identify the device's capabilities, ensuring safe and efficient delivery without data transfer. This handshake process parallels hardware handshakes in peripherals by establishing a basic connection for negotiation. In USB wired charging, the Battery Charging Specification 1.2 (BC 1.2), released by the (USB-IF), employs voltage detection on the D+ and D- data lines to classify the charger. For a Dedicated Charging Port (DCP), the device detects a short between D+ and D- with resistance less than 200 Ω by applying a source voltage of 0.5–0.7 V to D+ (V_DP_SRC) and monitoring if the voltage on D- exceeds 0.25 V (V_DAT_REF), indicating no data signaling but dedicated power up to 1.5 A at 5 V. A Charging Downstream Port (CDP) is identified similarly but with the port responding by applying 0.5–0.7 V to D- during secondary detection, allowing up to 1.5 A while supporting potential data. Standard Downstream Ports (SDP) show no such voltages, limiting current to 500 mA. For wireless charging, the Qi standard developed by the Wireless Power Consortium (WPC) since 2010 uses in-band communication through modulated power packets over inductive coupling to negotiate power levels up to 15 W. Version 2.0 (Qi2, released April 2023) introduced magnetic alignment for precise positioning and improved efficiency, with subsequent versions 2.1 (September 2024) and 2.2 (2025) adding protocol refinements while maintaining the 15 W baseline. The process begins with a digital ping from the transmitter to detect a receiver, followed by signal strength assessment and configuration packets where the receiver requests specific power profiles, such as 5 W or 15 W. Foreign object detection (FOD) is integrated via power loss monitoring during this exchange, comparing expected versus actual power transfer to identify metallic interferences and halt charging if needed. The handshake steps typically start with the device asserting its configuration: in USB, by applying test voltages to D+ or D- lines for 40 ms (T_VDPSRC_ON); the charger then responds by enabling VBUS within 1 second if compatible, such as activating 5 V at up to 1.5 A for BC 1.2 ports. In , the receiver sends identification packets post-ping, leading to power transfer initiation only after successful . These steps ensure mutual before full power delivery. Safety features are embedded throughout, including overcurrent protection limiting output to 1.5 A maximum in BC 1.2 and Qi's FOD to prevent overheating from inefficiencies. Thermal limits monitor temperature to throttle power if exceeding safe thresholds, with voltage overshoot capped at 6.0 V and undershoot above 4.1 V during load changes. The evolution continued with USB Power Delivery () Revision 3.0 in 2018 extending capabilities to 100 W via configurable voltages up to 20 V and 5 A, Revision 3.1 (2021) introducing Extended Power Range (EPR) up to 240 W at 48 V, and Revision 3.2 (June 2025) adding support for 28 V, 36 V, and 48 V fixed voltages, all enabling bidirectional power flow for devices like laptops to supply or receive power dynamically. Standardization is overseen by the USB-IF for wired protocols like BC 1.2 and PD 3.2, ensuring through compliance testing, while the WPC manages since its 2010 launch, certifying products for safe .

USB and Peripheral Handshakes

The USB and peripheral handshakes encompass the plug-and-play and configuration processes that enable seamless integration of devices such as keyboards, mice, and drives into a system. Upon connection, the detects the device through voltage changes on the data lines and initiates a series of control transfers to query descriptors, assign a unique address, and configure endpoints for . This process ensures compatibility and resource allocation without manual intervention, supporting hierarchical topologies via hubs that manage multiple downstream devices. The begins with device attachment, where identifies the via pull-up resistors on the D+ or D- lines. Speed detection follows through signaling: for USB 2.0 full-speed devices (12 Mbps), a pull-up on D+ initiates communication, while high-speed ( Mbps) devices use J/K-state s to confirm capabilities after initial full-speed fallback. then issues a bus reset to synchronize the , assigns an address via the SET_ADDRESS request, and sends GET_DESCRIPTOR requests for key information including the descriptor (containing USB version, class, subclass, protocol, vendor ID, product ID, and maximum packet size), descriptor (outlining requirements and ), and descriptors (detailing and alternate settings). The responds with these structured binary descriptors, enabling to load appropriate drivers. Finally, the SET_CONFIGURATION request activates a specific , finalizing setup and allowing normal operation. Hubs play a crucial role by relaying these requests and managing port status changes for attached peripherals. USB 2.0 and later versions (collectively USB 3.x under the USB 3.2 specification) introduce differences in link establishment, particularly for SuperSpeed modes. In USB 3.x, initial attachment uses USB 2.0 signaling for fallback compatibility, but SuperSpeed detection employs Low-Frequency Periodic Signaling (LFPS) bursts—short pulses on the SSTX/SSRX pairs—to negotiate speeds up to 5 Gbps (Gen 1), 10 Gbps (Gen 2), or 20 Gbps (Gen 2x2) via link training sequences like TS1/TS2 symbols for equalization and polarity inversion. This contrasts with USB 2.0's chirp-based method, adding robustness for higher frequencies. Hub support extends to SuperSpeed with dedicated downstream ports and bifurcation for multi-lane operation, ensuring transparent enumeration across tiers. During configuration, the host negotiates bandwidth allocation by evaluating endpoint requirements in descriptors, reserving microframe slots (for high-speed) or frames to prevent overload—typically limiting isochronous transfers to 80% of bus . Alternate interface settings allow dynamic reconfiguration, such as switching a device's audio interface from low-bandwidth stereo to high-bandwidth surround sound without re-enumeration, via the SET_INTERFACE request. This flexibility supports peripherals adapting to host constraints. The handshake process has evolved significantly since USB 1.0 in 1996, which introduced basic low/full-speed at 1.5/12 Mbps with initial and descriptor exchanges. USB 2.0 (2000) added high-speed chirps and chaining, while USB 3.x (2008 onward) incorporated LFPS and SuperSpeed for . (specification version 1.0 released 2019, version 2.0 in 2022) builds on this with tunneling protocols that encapsulate USB 2.0/3.2 traffic over a 40/80 Gbps link using 3-inspired architecture, maintaining similar enumeration but adding dynamic path management and error recovery through selective resets or link retraining. Security in these handshakes remains primarily trust-based, relying on physical access controls rather than cryptographic verification during . However, USB 3.2 introduces optional basic via the USB Authentication Specification, allowing devices to prove using public-key challenges before full , though adoption is limited to mitigate risks like unauthorized peripherals. Error universally involves bus resets to reinitialize failed handshakes.

References

  1. [1]
    handshake - Glossary - NIST Computer Security Resource Center
    Protocol dialogue between two systems for identifying and authenticating themselves to each other, or for synchronizing their operations with each other.
  2. [2]
    Lecture – Communications
    Hardware handshaking uses additional I/O lines. ... Ready). typically used by devices signaling to each other that they are powered up and ready to communicate.
  3. [3]
    RFC 793 - Transmission Control Protocol (TCP) - IETF
    The "three-way handshake" is the procedure used to establish a connection. This procedure normally is initiated by one TCP and responded to by another TCP.
  4. [4]
    RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
    1. Handshake The TLS handshake is an Authenticated Key Exchange (AKE) protocol which is intended to provide both one-way authenticated (server-only) and ...
  5. [5]
    What Is a Handshake? - Computer Hope
    Apr 26, 2017 · The term handshake describes a computer establishing a connection with another computer or device. It involves the steps of verifying a ...
  6. [6]
    Handshake | Encyclopedia.com
    Jun 27, 2018 · an exchange of standardized signals between devices in a computer network regulating the transfer of data.DERIVATIVES: hand·shak·ing / -shāking/ ...
  7. [7]
    What is Handshaking? - Tutorials Point
    Oct 31, 2023 · Handshaking is an I/O control approach to synchronize I/O devices with the microprocessor. As several I/O devices accept or release data at a much lower cost.<|separator|>
  8. [8]
    HANDSHAKE Definition & Meaning | Dictionary.com
    It was a verbal contract, sealed with a firm handshake. Computers., Also handshaking. an exchange of predetermined signals between networked or linked devices ...
  9. [9]
    What Is Handshaking? | NinjaOne
    Oct 26, 2024 · Handshaking is the process of establishing communication between devices. It's essential to what happens behind the scenes in the digital space.
  10. [10]
    What is ACK (acknowledgement) in computer networking?
    Apr 3, 2023 · ACK is a way for destination processes or devices to acknowledge that they have received a message from source processes or devices.
  11. [11]
    Two-Way Handshake and Three-Way Handshake - Baeldung
    Mar 26, 2025 · The two-way handshake is a simple protocol to create a connection between two parties that want to communicate.
  12. [12]
  13. [13]
    Handshake Mechanism | Hilscher
    In IoT networks, handshake protocols are used to establish secure connections, prevent unauthorized access, and synchronize data transmissions.
  14. [14]
    SSL Overhead: What It Is and How to Reduce It? - Baeldung
    Dec 5, 2023 · A computational overhead refers to the extra processing time required to encrypt and decrypt data and verify certificates and signatures.3. Overhead Types · 3.2. Bandwidth Overhead · 5. Optimization
  15. [15]
    RFC 4987 - TCP SYN Flooding Attacks and Common Mitigations
    The SYN flooding attack is a denial-of-service method affecting hosts that run TCP server processes. The attack takes advantage of the state retention TCP ...
  16. [16]
    SYN flood DDoS attack - Cloudflare
    A SYN flood (half-open attack) is a type of denial-of-service (DDoS) attack which aims to make a server unavailable to legitimate traffic by consuming all ...
  17. [17]
    handshaking - Computer Dictionary of Information Technology
    1. Predetermined hardware or software activity designed to establish or maintain two machines or programs in synchronisation.<|control11|><|separator|>
  18. [18]
    RFC 1: Host Software
    ### Extracted Mentions of "Handshake" or Connection Establishment Process
  19. [19]
  20. [20]
    What is OSI Model | 7 Layers Explained - Imperva
    Examples of protocols operating at the Application Layer include Hypertext Transfer Protocol (HTTP) for web browsing, File Transfer Protocol (FTP) for file ...
  21. [21]
    What is the OSI Model? The 7 Layers Explained - BMC Software
    Jul 31, 2024 · Application Layer (OSI Layers 5-7): Combines session, presentation and application layers, providing HTTP, HTTPS, FTP, SMTP, DNS, SSH protocols ...
  22. [22]
    [PDF] A History of the ARPANET: The First Decade - DTIC
    Apr 1, 1981 · To understand, design, and implement the protocols and procedures within the operating systems of each connected computer, in order to allow the ...
  23. [23]
    A Brief History of the Internet - Internet Society
    In March Ray Tomlinson at BBN wrote the basic email message send and read software, motivated by the need of the ARPANET developers for an easy coordination ...Missing: handshakes | Show results with:handshakes
  24. [24]
    Fundamentals of RS-232 Serial Communications - Analog Devices
    Mar 29, 2001 · The EIA/TIA-232-E standard was introduced in 1962 and has since been updated four times to meet the evolving needs of serial communication ...
  25. [25]
    The RS232 Standard - CAMI Research
    Tutorial discussion of the RS232 (EIA232) standard with signal names, definitions, and examples.What is EIA232? · Likely Problems when Using... · Cable Wiring Examples
  26. [26]
    Macintosh Serial Port Connections - D.P. Goldenberg UofU
    There are three handshaking pins: HSKo, HSKi and GPi. The lower case o and i in the designations indicate whether the pins are outputs or inputs, respectively, ...
  27. [27]
    [PDF] The Role of Hardware Flow Control in UART Systems
    In the field of UART communication, hardware flow control offers significant advantages over software flow control, particularly in terms of reliability, low ...
  28. [28]
  29. [29]
  30. [30]
  31. [31]
  32. [32]
  33. [33]
    RFC 2018 - TCP Selective Acknowledgment Options
    A Selective Acknowledgment (SACK) mechanism, combined with a selective repeat retransmission policy, can help to overcome these limitations.
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
  39. [39]
    RFC 8446 - The Transport Layer Security (TLS) Protocol Version 1.3
    1. Handshake The TLS handshake is an Authenticated Key Exchange (AKE) protocol which is intended to provide both one-way authenticated (server-only) and ...
  40. [40]
    RFC 5246 - The Transport Layer Security (TLS) Protocol Version 1.2
    RFC 5246 specifies TLS 1.2, a protocol for communications security over the Internet, composed of the TLS Record and Handshake Protocols.
  41. [41]
  42. [42]
  43. [43]
  44. [44]
  45. [45]
  46. [46]
  47. [47]
  48. [48]
  49. [49]
    RFC 2246 - The TLS Protocol Version 1.0 - IETF Datatracker
    This document specifies Version 1.0 of the Transport Layer Security (TLS) protocol. The TLS protocol provides communications privacy over the Internet.
  50. [50]
    RFC 4346 - The Transport Layer Security (TLS) Protocol Version 1.1
    This document specifies Version 1.1 of the Transport Layer Security (TLS) protocol. The TLS protocol provides communications security over the Internet.
  51. [51]
  52. [52]
  53. [53]
  54. [54]
  55. [55]
  56. [56]
  57. [57]
    RFC 2920 - SMTP Service Extension for Command Pipelining
    This memo defines an extension to the Simple Mail Transfer Protocol (SMTP) service whereby a server can indicate the extent of its ability to accept multiple ...
  58. [58]
    RFC 3207 - SMTP Service Extension for - IETF Datatracker
    If the SMTP client is using pipelining as defined in RFC 2920, the STARTTLS command must be the last command in a group. Hoffman Standards Track [Page 3]. RFC ...
  59. [59]
  60. [60]
  61. [61]
    RFC 5321 - Simple Mail Transfer Protocol - IETF Datatracker
    This document is a specification of the basic protocol for Internet electronic mail transport. It consolidates, updates, and clarifies several previous ...Missing: handshake | Show results with:handshake
  62. [62]
    RFC 821 - Simple Mail Transfer Protocol - IETF Datatracker
    The objective of Simple Mail Transfer Protocol (SMTP) is to transfer mail reliably and efficiently. SMTP is independent of the particular transmission ...
  63. [63]
  64. [64]
  65. [65]
    802.11i-2004 | IEEE Standard | IEEE Xplore - IEEE Xplore
    Jul 24, 2004 · This amendment defines security mechanisms for IEEE 802.11. It includes a definition of WEP for backward compatibility with the original standard.Missing: four- | Show results with:four-
  66. [66]
    KRACK Attacks: Breaking WPA2
    This website presents the Key Reinstallation Attack (KRACK). It breaks the WPA2 protocol by forcing nonce reuse in encryption algorithms used by Wi-Fi.Intro · Demo · Details · Paper
  67. [67]
    [PDF] AN0059.0: UART Flow Control - Silicon Labs
    Flow control provides extra signaling to inform the transmitter that it should stop (pause) or start (resume) the transmission.<|separator|>
  68. [68]
    [PDF] RS-232 Frequently Asked Questions - Texas Instruments
    Handshaking is a way of flow control of the communication in many RS-232 applications, which can be implemented in software or hardware. The main purpose of ...
  69. [69]
    1.4.1 Hardware Flow Control - Microchip Online docs
    For hardware flow control, the UART module utilizes a RTS / CTS flow control scheme commonly found in RS-232 (Recommended Standard 232) networks.Missing: explanation | Show results with:explanation
  70. [70]
    [PDF] Serial Communications RS232, RS485, RS422
    The specific connections are very dependent upon the type of hardware and handshaking used, but the following sections should help in configuring a null-modem ...
  71. [71]
    Serial communication Basic Knowledge -RS-232C/RS-422A/485
    This standard fixes problems in RS-232C such as a short transmission distance and a slow transmission speed.It is also called "EIA-422A".The purpose and timing ...
  72. [72]
    RS232 Serial Communication Protocol - Circuit Digest
    May 1, 2020 · While commonly referred to as RS232, the current official standard is TIA-232-F (Telecommunications Industry Association), published in 1997.Current RS232 Standards: TIA... · RS232 vs Modern... · RS232 Implementation...<|separator|>
  73. [73]
    Introduction to RS-232 Devices - Weschler Instruments
    Feb 22, 2023 · Recommended Standard 232 (RS-232) was introduced in the1960s by the telecommunications industry. It defines a simple method for serial ...
  74. [74]
    Demystifying serial communication protocols for industrial systems
    Dec 16, 2020 · Choosing the right serial communication interface requires trade-offs between factors such as bandwidth, distance, node counts, and cost.<|separator|>
  75. [75]
    5 Common Serial Port Problems You Need to Know About
    1. Incorrect Communication Parameters · 2. Incorrect Serial Cable · 3. Bad Serial Cables · 4. Software Conflicts · 5. Faulty Wiring.
  76. [76]
    Serial Port Troubleshooting: Common Problems and How to Solve
    Rating 4.8 (41) · $59.00 · WindowsNov 26, 2024 · 1. Incorrect Communication Parameters · 2. Incorrect Serial Cable · 3. Bad or Loose Serial Cables · 4. Software Conflicts · 5. Faulty Wiring.
  77. [77]
    Trouble Shooting Some Common Serial Communication (RS232 ...
    Apr 25, 2022 · Sometimes it arises because the connection is incorrectly installed or insecure. An easy solution is to simply disconnect the RS232 cable and ...Missing: crossed | Show results with:crossed<|control11|><|separator|>
  78. [78]
    absorptions: The sound of the dialup, pictured - Windytan
    Nov 17, 2012 · "The ITU-T has recently standardized a handshake and activation method for xDSL modems. This method is contained in the ITU-T Recommendation ...
  79. [79]
    ITU-T V.34 modem - 3am Systems
    Phase 1 signals (V.8 network interaction) · Phase 2 signals (line probing and ranging) · Phase 3 signals (equalizer and echo canceller training) · Phase 4 signals ...
  80. [80]
    ITU V.42 - GAO Research Inc.
    This recommendation contains an HDLC-based protocol referred to as the Link Access Procedure for Modems (LAPM). Features of V42 Error Correction Protocol. Link ...
  81. [81]
    [PDF] V.92 and V.44 Support for Digital Modems - Cisco
    V. 92 Quick Connect speeds up the client-to-server startup negotiation, reducing the overall connect time by up to 30 percent. The client modem retains line ...
  82. [82]
    History of the internet: a timeline throughout the years - Uswitch
    Aug 5, 2025 · It's safe to say that in the '90s, dial-up internet had some fundamental issues that made it hard for us to access the full potential of the ...
  83. [83]
    From Baud to Awed: The History of the Modem | Auvik
    May 24, 2022 · The 1990s saw a rapid explosion in speeds. 14.4 kilobits per second modems arrived in 1991, quickly replacing the poorly selling 9600 baud ...
  84. [84]
    Battery Charging v1.2 Spec and Adopters Agreement - USB-IF
    Dec 11, 2019 · Battery Charging v1.2 Spec and Adopters Agreement 12/11/2019 Specification Device Class Specification BCv1.2_070312.zip 1.31 MB
  85. [85]
    [PDF] USB Battery Charging 1.2 Compliance Plan rev 1.0
    Oct 12, 2011 · Charging Ports include Dedicated Charging Ports and Charging Downstream Ports as defined in the Battery Charging Specification revision 1.2. A ...
  86. [86]
    Download the Qi Specifications | Wireless Power Consortium
    The latest Qi Specification version v2.2.1 is available for WPC Members only. Click this link to download the latest publicly available Qi Specifications. For ...
  87. [87]
    USB Charger (USB Power Delivery) - USB-IF
    Announced in 2021, the USB PD Revision 3.1 specification is a major update to enable delivering up to 240W of power over full featured USB Type-C® cable and ...Battery Charging Specification · USB Type-C · USB Type-C® Cable
  88. [88]
    Qi Wireless charging | Wireless Power Consortium
    By joining the WPC you will become a key player in shaping and advancing wireless power standards. WPC members gain invaluable insights to compete more ...
  89. [89]
    USB 2.0 Specification
    Jun 3, 2025 · This specification is provided as is and without any warranty of any kind, expressed or implied. Without limitation, there is no warranty of non-infringement.
  90. [90]
    [PDF] Simplified Description of USB Device Enumeration - FTDI
    Oct 28, 2009 · USB Enumeration is the process of detecting, identifying and loading drivers for a USB device. This involves a mixture of hardware techniques ...
  91. [91]
    USB 3.2 Specification
    USB 3.2 identifies three transfer rates – 20Gbps, 10Gbps, and 5Gbps. Key characteristics of the USB 3.2 specification include: Defines multi-lane operation for ...
  92. [92]
    [PDF] What is the USB 3.1 enumeration process
    The host and device recognize a connection and begin the LFPS handshake. 2. LFPS pulses are sent to communicate which connection speed can be established.
  93. [93]
    USB Bandwidth Allocation - Windows drivers | Microsoft Learn
    Jan 17, 2024 · This article provides guidance concerning the careful management of USB bandwidth. It's the responsibility of every USB client driver to minimize the USB ...
  94. [94]
    How to Select an Alternate Setting in a USB Interface - Microsoft Learn
    Jan 17, 2024 · This topic describes the steps for issuing a select-interface request to activate an alternate setting in a USB interface.
  95. [95]
    USB4® | USB-IF
    USB4 Specification · Two-lane operation using existing USB Type-C cables and up to 80 Gbps operation over 80 Gbps certified cables · Multiple data and display ...
  96. [96]
    USB Authentication Specification Rev. 1.0 with ECN and Errata ...
    USB Authentication Specification Rev. 1.0 with ECN and Errata ... USB 3.2 · Authentication · Press · USB-IF Press Releases · Member Press ...