-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at 7, 14, and 30-bit varint packet numbers #1334
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b3bb463
First pass at varint packet numbers
britram fae6da8
tweaks, thanks Martin and Ian
britram 50f0501
long headers too
britram 4f8bb35
Both long and short have varint PN
martinthomson 8d49212
Merge pull request #1 from quicwg/long-and-short-varint-pn
britram 3335dd5
Update examples for shorter encodings
martinthomson 60811b2
Merge pull request #2 from quicwg/fix-pn-example
britram 7b22bf0
Update table caption
martinthomson 7fcd5a7
indent
janaiyengar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,7 +282,7 @@ keys are established. | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
| Payload Length (i) ... | ||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
| Packet Number (32) | | ||
| Packet Number (8/16/32) | | ||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
| Payload (*) ... | ||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
|
@@ -344,11 +344,10 @@ Payload Length: | |
|
||
Packet Number: | ||
|
||
: The Packet Number is a 32-bit field that follows the two connection IDs. | ||
Packet numbers are not encrypted as part of packet protection, but instead | ||
have additional confidentiality protection. {{packet-numbers}} describes the | ||
use of packet numbers. | ||
|
||
: The packet number field is 1, 2, or 4 octets long. The packet number has | ||
confidentiality protection separate from packet protection, as described in | ||
Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is encoded | ||
in the plaintext packet number. See {{packet-numbers}} for details. | ||
|
||
Payload: | ||
|
||
|
@@ -449,8 +448,8 @@ Destination Connection ID: | |
|
||
Packet Number: | ||
|
||
: The packet number field is either 1, 2, or 4 bytes long. The packet number | ||
has confidentiality protection separate from packet protection, as described in | ||
: The packet number field is 1, 2, or 4 octets long. The packet number has | ||
confidentiality protection separate from packet protection, as described in | ||
Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is encoded | ||
in the plaintext packet number. See {{packet-numbers}} for details. | ||
|
||
|
@@ -776,15 +775,10 @@ CONNECTION_CLOSE frame or any further packets; a server MAY send a Stateless | |
Reset ({{stateless-reset}}) in response to further packets that it receives. | ||
|
||
In the QUIC long and short packet headers, the number of bits required to | ||
represent the packet number are reduced by including only the least | ||
significant bits of the packet number. | ||
|
||
In the long packet header, the least significant 32 bits of the packet number | ||
are encoded into the Packet Number field. | ||
|
||
In the short packet header, a variable number of significant bits are encoded. | ||
One or two of the most significant bits of the first octet determine how many | ||
bits of the packet number are provided, as shown in {{pn-encodings}}. | ||
represent the packet number are reduced by including only a variable number of | ||
the least significant bits of the packet number. One or two of the most | ||
significant bits of the first octet determine how many bits of the packet | ||
number are provided, as shown in {{pn-encodings}}. | ||
|
||
| First octet pattern | Encoded Length | Bits Present | | ||
|:--------------------|:---------------|:-------------| | ||
|
@@ -793,7 +787,6 @@ bits of the packet number are provided, as shown in {{pn-encodings}}. | |
| 0b11xxxxxx | 4 | 30 | | ||
{: #pn-encodings title="Short Header Packet Number Encodings"} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. {: #pn-encodings title="Short Header Packet Number Encodings"} |
||
|
||
Note that these encodings are similar to those in {{integer-encoding}}, but | ||
use different values. | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Packet Number Encoding for Packet Headers" perhaps