Re: What is the length of the "opaque" data type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Raghu,

please see the second half (specifically the paragraph starting "Variable-length vectors") of Section 3.4 of RFC 8446:

https://www.rfc-editor.org/rfc/rfc8446.html#section-3.4

(Both your examples are “vectors” (array types); opaque is a single byte, arrays of which are used to form byte strings.)

Grüße, Carsten


> On 2023-10-05, at 10:41, Raghu Saxena <poiasdpoiasd@xxxxxxxx> wrote:
> 
> I am reading the ECH draft (draft-ietf-tls-esni-16), and trying to understand how to parse a ECHConfig.
> 
> The "byte-struct" is defined at https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-16#section-4. Using dig, I am able to obtain the ECHConfig from a remote server (e.g. `dig TYPE65 crypto.cloudflare.com`). However, while trying to parse it (by hand), I am confused about a couple of things:
> 
> 1. For an opaque type, e.g. `opaque HpkePublicKey<1..2^16-1>;` , how would I know how many bytes is the public key? I am guessing it is some kind of length-prefixed arbitrary data, but I am not sure if the length prefix would always be two bytes for any `opaque` type (or if this assumption is correct at all).
> 
> 2. How about an array type, e.g. `HpkeSymmetricCipherSuite cipher_suites<4..2^16-4>;` , how could I know the number of elements involved?
> 
> Apologies if this is a very simple concept, but searching around I wasn't able to find an answer. I'm pretty new to reading RFCs and trying to implement them.
> 
> Regards,
> 
> Raghu Saxena
> 
> <OpenPGP_0xA1E21ED06A67D28A.asc>





[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Mhonarc]     [Fedora Users]

  Powered by Linux