-
Notifications
You must be signed in to change notification settings - Fork 4
Fix Arbitrary batched tokens structures description #19
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
Fix Arbitrary batched tokens structures description #19
Conversation
The description of arbitrary batched tokens structures did not satisfy with standard tls serialisation, and was ocnfusing. This commit addresses: * token_requests array is prefixed with the length of its underlying byte array. The previous spec refered to the number of TokenRequest, which is incorrect. * toen_requests array is an array of TokenRequest. It's only when serialized that it contains serialized TokenRequest. The wording has been updated. * TokenRequest serialization is not redefined. Its moved to a note instead of a struct definition.
Build error seems to be because I'm using a forked repository instead of the main one. |
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.
Good catch on the incorrect encoding, I missed that one.
Note that when serialiazed in network byte order, BatchTokenRequest: | ||
|
||
- is prepended with a 2-octet integer representing the length of its underlying | ||
byte array. This is not the number of TokenRequest. | ||
|
||
- has each of its TokenRequest serialized in network byte order. Specifically, | ||
this implies each TokenRequest is prepended with its length as a 2-octet | ||
integer. |
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.
I'd remove this paragraph for now. Instead, there should be a section about TLS encoding elsewhere that applies to all structs with vectors.
As mentioned at IETF121, I think we should use Variable-Size Vector Length Headers.
I can follow up with a separate PR.
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.
having a dedicated paragraph about all struct would be good.
the structure uses fixed array as these were the ones used in the already written batched private tokens.
having variable tokens would work as well. the upside is to allow for more tokens (2^30 instead of 2^16), and save 1 byte when there are less than 2^6 tokens. the downside is it's harder to bound the possible privacy leak (especially with arbitrary batched tokens).
removing it for now
Co-authored-by: raphaelrobert <raphaelrobert@users.noreply.github.com>
Co-authored-by: raphaelrobert <raphaelrobert@users.noreply.github.com>
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.
Thanks for making the changes
The description of arbitrary batched tokens structures did not satisfy with standard tls serialisation, and was ocnfusing.
This commit addresses: