Sequence Numbers: Ensuring Ordered, Unique Delivery
Each packet is assigned an incrementing sequence number; the receiver maintains a 'sliding window' record of expected numbers, discarding duplicates or out-of-order packets to prevent replay and maintain data integrity.
The top 3
- Top 3 Protocols Reliant on Sequence Numbers: TCP uses 32-bit sequence numbers for reliable, ordered delivery and retransmission. QUIC employs monotonically increasing packet numbers to simplify loss detection and avoid retransmission ambiguity. IPSec utilizes sequence numbers with a sliding window for anti-replay protection, discarding old or duplicate packets.
- Key Implementation Approaches for Sequence Numbers: The Sliding Window Protocol allows efficient transmission of multiple packets before acknowledgment, managing a range of valid sequence numbers. Random Initial Sequence Number (ISN) generation prevents attackers from predicting session IDs and hijacking connections. Cryptographic nonces, distinct from simple counters, are random numbers used once in secure protocols to ensure message freshness and prevent replay attacks.
- Sequence Number's Top 3 Security & Design Challenges: Sequence number wrap-around occurs when finite number spaces are exhausted and reused, requiring careful handling to prevent data confusion in long-running or high-bandwidth connections. Predictable Initial Sequence Numbers (ISN) are a major vulnerability, allowing attackers to forge connections or hijack existing sessions. Synchronization failures between communicating parties can lead to dropped packets, retransmission errors, or connection resets.
Sources
Open the full topic