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

Add public report extensions. #632

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

branlwyd
Copy link
Collaborator

The existing (private) report extension mechanism is renamed to "private extensions."

A few notes:

  • Public extensions are always the same for both aggregators; the public extensions are included in the input share AAD to ensure that the Leader can't modify these while passing them along to the Helper.
  • Public & private extensions share the same "namespace", i.e. they use the same set of extension type codepoints, and duplicating an extension in both the public & private extensions is considered invalid.

@branlwyd
Copy link
Collaborator Author

Closes #620. +cc @martinthomson

@@ -1157,6 +1157,7 @@ struct {
struct {
ReportMetadata report_metadata;
opaque public_share<0..2^32-1>;
Extension public_extensions<0..2^32-1>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change would be smaller if you added the extensions to ReportMetadata. Any reason why you chose not to?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have added. 4 gigabytes is an awful lot. Do I have to start sharpening my varint axe? There's a lot of overhead in this protocol that would be trivially cut with a single slice.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, let's move this to the report metadata. This will also help with code movement in daphne.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, no objection to phrasing things that way.

Copy link
Collaborator Author

@branlwyd branlwyd Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have added. 4 gigabytes is an awful lot. Do I have to start sharpening my varint axe? There's a lot of overhead in this protocol that would be trivially cut with a single slice.

Using varints for length specifiers is not (AFAICT) supported by TLS syntax we currently use; we'd probably extend our syntax somehow to specify this. I'd need to do a little digging to see what varint formats are currently specified/standardized; a very quick glance does reveal anything. (Of course, if we can't lean on prior work we could certainly specify something ourselves.)

edit: if we do want to discuss use of varints for field lengths, let's do so outside this PR. It is very likely we'd apply this technique to field lengths across many messages used by DAP, not only for the extension list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I should also add: I'm in favor of a 2-byte prefix, for consistency with the private extensions.

@@ -1157,6 +1157,7 @@ struct {
struct {
ReportMetadata report_metadata;
opaque public_share<0..2^32-1>;
Extension public_extensions<0..2^32-1>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, let's move this to the report metadata. This will also help with code movement in daphne.

draft-ietf-ppm-dap.md Outdated Show resolved Hide resolved
draft-ietf-ppm-dap.md Outdated Show resolved Hide resolved
@branlwyd branlwyd force-pushed the bran/public-report-extensions branch from 4ca44d1 to d93d076 Compare October 31, 2024 16:38
@branlwyd branlwyd requested a review from cjpatton October 31, 2024 17:47
The existing (private) report extension mechanism is renamed to "private
extensions."

A few notes:
* Public extensions are always the same for both aggregators; the public
  extensions are included in the input share AAD to ensure that the
  Leader can't modify these while passing them along to the Helper.
* Public & private extensions share the same "namespace", i.e. they use
  the same set of extension type codepoints, and duplicating an
  extension in both the public & private extensions is considered
  invalid.
@branlwyd branlwyd force-pushed the bran/public-report-extensions branch from 156a286 to b6682fc Compare October 31, 2024 17:51
@branlwyd
Copy link
Collaborator Author

Rebased & squashed.

@branlwyd branlwyd merged commit 3edc15a into main Oct 31, 2024
2 checks passed
@branlwyd branlwyd deleted the bran/public-report-extensions branch October 31, 2024 17:51
@branlwyd branlwyd mentioned this pull request Nov 4, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants