Description
Combine the expected packet number's high bits with the truncated low bits.
QUIC uses compact fields and truncated packet numbers. Their interpretation depends on the unprotected header bits and connection state; decoding a number does not authenticate a packet.
Combine the expected packet number's high bits with the truncated low bits.
When to use this tool
Use QUIC Packet Number Truncated Window when you need one QUIC field interpretation from already available bytes or state.
How to use the tool and how it works
- Enter expected, truncated, bits. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read packetNumber. Use the output convention below.
Combine the expected packet number's high bits with the truncated low bits. Move the candidate one window up when candidate + half-window is at most expected and the result stays below 2^62, or one window down when candidate exceeds expected + half-window and subtraction is possible.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| expected | Expected | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| truncated | Truncated | Required. Safe integer; minimum 0. |
| bits | Bits | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| packetNumber | Packet Number | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"expected": "256",
"truncated": 1,
"bits": 8
},
"output": {
"packetNumber": "257"
}
} Limitations and assumptions
- Expected is a nonnegative decimal integer below 2^62; truncation widths are 8, 16, 24, or 32 bits. This reconstruction does not authenticate the packet or infer expected.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete QUIC implementation to remove header protection, track packet state, and authenticate payloads.
References
Similar or alternative tools
- QUIC Varint Leading Length Bits
Read the top two bits of firstOctet as an exponent.
- TCP Sequence Halfspace Tie
Calculate the forward distance from first to second modulo 2^32.