tlswg / draft-ietf-tls-esni

TLS Encrypted Client Hello
https://tlswg.github.io/draft-ietf-tls-esni/#go.draft-ietf-tls-esni.html
Other
229 stars 56 forks source link

0xfe0d to decimal #537

Closed AAGiron closed 2 years ago

AAGiron commented 2 years ago

Hi,

just a small fix, section 5. states:

      enum {
          encrypted_client_hello(0xfe0d), (65535)
       } ExtensionType;

But instead of 65535 it should be 65037.

davidben commented 2 years ago

65535 is correct, though it is a bit confusing if unfamiliar with the syntax. This isn't the deceimal version but a separate value. The extra untagged value specifies the field width. https://www.rfc-editor.org/rfc/rfc8446.html#section-3.5

Strictly speaking, the field width is determined by the smallest that'll fit all values. Since 0xfe0d already implies a 2-byte value, we don't actually need it here. But typically we write down the maximum possible value to be explicit. See how the RFC 8446 definition also has a (65535). https://www.rfc-editor.org/rfc/rfc8446.html#section-4.2

And likewise otherdocuments which extend the enum tend to do as this draft does. https://www.rfc-editor.org/rfc/rfc6066.html#section-1.1

AAGiron commented 2 years ago

Hi! Thanks for the clarification. I will close this now.