Skip to content
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

Clarify header protection sampling #4404

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions draft-ietf-quic-tls.md
Expand Up @@ -1211,6 +1211,25 @@ if packet_type == Initial:
sample = packet[sample_offset..sample_offset+sample_length]
~~~

In both above pseudocodes, `packet` designates the entire partially protected
packet's bytes, with unprotected header fields as its header and the encrypted
payload, output of the {{!AEAD}} encryption process (see {{aead}}), as its
payload.

Note that the header protection sampling actually operates on the ciphertext
only, so the process can be expressed relative to the beginning of the
encrypted payload as well. The following pseudocode shows how this can be
achieved, for both short-header and long-header packets:

~~~
sample_offset = 4 - len(packet_number)

sample = ciphertext[sample_offset..sample_offset+sample_length]
~~~

where `ciphertext` is the encrypted payload, result of the {{!AEAD}} function
for the original packet payload, as described in {{aead}}.


### AES-Based Header Protection {#hp-aes}

Expand Down