Summary
- TCP's three-way handshake is not a ritual performed before the real work begins. Its founding job is to stop an old, wandering SYN from being mistaken for a brand-new connection.
- Each endpoint picks its own initial sequence number. The responder can fold its acknowledgment into its own SYN, but only the initiator's third message proves it actually saw the responder's current challenge.
- Quiet time, TIME-WAIT, secret-offset ISNs and SYN cookies each patch a neighbouring hole — stale data, guessable numbers, premature server memory. None of them turns TCP into authentication.
The ghost in the four-tuple
Somewhere on the Internet, right now, a packet is late. It is not lost. It is not corrupt. It is simply taking the scenic route, and it will arrive long after everyone involved has moved on.
That single fact is enough to ruin a naive protocol. Correctness cannot be inferred from arrival, because an internetwork delays, duplicates and reorders whatever it likes. Picture two applications closing a TCP connection and then, seconds later, reopening one with the exact same source address, source port, destination address and destination port. A SYN from the dead conversation may still be in flight when the new one begins.
The receiver sees the familiar four-tuple and a SYN flag. It cannot read history off the packet's face. Accept that segment as proof of a new conversation, and an expired request has just created live state.
RFC 761, published in January 1980, framed the whole problem in sequence space. Each side chooses an initial send sequence number and learns the other's during connection establishment. Those numbers let later data be ordered and duplicates rejected — but first the endpoints must agree on which numbers belong to this incarnation.
Four facts, three messages
Synchronization needs four logical statements. Endpoint A tells B, “my sequence number begins at X.” B confirms X. B tells A, “mine begins at Y.” A confirms Y.
TCP squeezes the middle two into a single segment. A sends SYN X. B replies SYN Y, ACK X+1. A returns ACK Y+1. Four facts, three messages — the compression is the whole trick.
The arithmetic is not decoration. A SYN occupies one position in sequence space, so the next expected number is X+1. A pure ACK consumes no sequence number at all; otherwise acknowledgments would demand an endless chain of acknowledgments to acknowledge them. RFC 793 turned this exchange into the standard connection-opening state machine in September 1981.
Notice what is missing: a global connection register, and a single clock handing out numbers to everyone. Each implementation makes a local choice, and the messages make those choices mutually visible. That is the entire coordination mechanism.
The third message is the receipt
So why not stop after B's SYN-ACK? B has seen A's number; A has received B's reply. Surely the deal is done.
It is not, because B still does not know that A sent its SYN now. The first SYN might be an old duplicate, and B's reply might be travelling toward a host that has long since forgotten the conversation. B has committed memory to a stranger who may never write back.
The final ACK closes that evidentiary gap. It tells B that whoever controls A's current endpoint state received Y and returned the expected acknowledgment. RFC 761 called this a trade-off between memory and messages: if B cannot retain a complete history of earlier numbers for every endpoint pair on the Internet, it asks the apparent initiator to verify the current exchange instead.
That is narrower than identity, and deliberately so. A correctly acknowledged sequence number proves reception within TCP's model. It does not identify the human at the keyboard, authorize an application request, or defeat an observer who can watch and rewrite the exchange.
Old packets need time as well as numbers
The handshake guards the opening. Old data can outlive it. TCP therefore binds sequence numbers to time as well as to a tuple: a number stays hazardous for as long as a segment carrying it could still be rattling around the internetwork.
The early specifications assumed a maximum segment lifetime, or MSL, of two minutes. A host that crashed and lost its memory of recently used sequence space was supposed to stay quiet for one MSL before emitting new segments. A host that kept the memory could simply resume beyond the numbers it had already spent.
After a normal close, TIME-WAIT holds the connection identity for twice the MSL. That pause lets delayed segments drain and lets the final acknowledgment of the close be retransmitted. The waiting is not bureaucratic inertia; it is state that stops an old packet from acquiring new meaning.
The current base specification, RFC 9293, keeps the model but notes that reboot quiet time is usually unnecessary on modern systems. Randomized ports and initial numbers shrink the odds of accidental reuse, effective packet lifetimes are shorter, and rebooting often takes longer than the danger interval. At high data rates, timestamps and PAWS handle rapid sequence-space wrap. The principle outlived the remedy.
When TIME-WAIT forgot its job
Time-based protection only works while implementations respect it. RFC 1337 documented “TIME-WAIT assassination”: an old segment provokes an ACK, the peer — which has already discarded its state — answers with a reset, and accepting that reset kills TIME-WAIT early.
Reopen the same tuple immediately and old data or acknowledgments can overlap the new receive window. The memo demonstrated erroneous data acceptance, desynchronization and connection failure. Its lesson is not that the handshake was pointless. It is that the protections have different scopes: the handshake rejects an old initiating SYN, sequence checks police a live incarnation, and TIME-WAIT separates successive incarnations.
Delete one layer because another exists, and you have confused complementary evidence with redundancy.
A fresh number is not an authenticated peer
The original specifications already warned that the old-duplicate strategy did nothing about spoofing. A host that could predict the next initial sequence number might forge the acknowledgments a server expects, without ever seeing its reply.
RFC 6528 hardened the choice: a timer combined with a pseudorandom function of the local and remote addresses, the ports and a secret. Different four-tuples get sequence spaces with no visible relationship to one another, while steady progression still helps avoid reuse.
The repair protects a bounded claim — an off-path attacker should struggle to guess an acceptable number. An on-path observer sees the whole exchange anyway. When the question shifts from “is this TCP state current?” to “who is this peer?”, cryptography is still the only answer.
Carrying state inside the challenge
The handshake also exposes a resource asymmetry. A public server may allocate a transmission control block the moment the first SYN lands, before the apparent client has proved anything at all. Send enough forged SYNs and the half-open queue fills with state that will never complete.
RFC 4987 records how SYN flooding became public and operationally serious in 1996, when a New York ISP spent days under a flood of half-open connections. One answer, the SYN cookie, delays allocation entirely. The server builds its SYN-ACK sequence number out of the client tuple, the client's number, time, selected parameters and a secret. If a valid final ACK comes back, the server reconstructs just enough state to accept the connection.
The cookie turns the responder's number into a compact commitment. It keeps the third message as the evidence, while pushing memory allocation to the moment that evidence arrives. The bargain is not free: limited bits constrain option negotiation, and implementations differ in how they spend them.
So the real history is not “three packets open TCP.” It is a sequence of narrow, stubborn decisions about evidence. The network forwards claims. Endpoints choose sequence spaces. Reciprocal acknowledgment makes those choices shared. Time bounds stale meaning. Secrets resist blind guessing. Deferred state contains the cost of unanswered claims. None of these powers needed a global authority to grant it, and none of them proves more than its own mechanism can observe.
The handshake was never really a handshake. It was a receipt — and the Internet has been checking its receipts ever since.
Sources and evidence limits
- https://www.rfc-editor.org/rfc/rfc761.html
- https://www.rfc-editor.org/rfc/rfc793.html
- https://www.rfc-editor.org/rfc/rfc1337.html
- https://www.rfc-editor.org/rfc/rfc4987.html
- https://www.rfc-editor.org/rfc/rfc6528.html
- https://www.rfc-editor.org/rfc/rfc9293.html
The RFCs establish specifications, stated rationales and selected failure analyses. They do not supply a single deployment date for every TCP stack. The architectural reading — local choices becoming shared through reciprocal evidence — is an inference drawn from those mechanisms, not a phrase the RFCs themselves use.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






