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

Spec: Pad the payload with null contributions #98

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -794,16 +794,21 @@ To <dfn>obtain the plaintext payload</dfn> given an [=aggregatable report=]
|report|, perform the following steps. They return a [=byte sequence=].
1. Let |payloadData| be a new [=list=].
1. Let |contributions| be |report|'s [=aggregatable report/contributions=].
1. If |contributions| [=list/is empty=]:
1. [=Assert=]: |contributions|' [=list/size=] is not greater than [=maximum
report contributions=].
1. [=iteration/While=] |contributions|' [=list/size=] is less than [=maximum
report contributions=]:
1. Let |nullContribution| be a new {{PAHistogramContribution}} with the
items:
: {{PAHistogramContribution/bucket}}
:: 0
: {{PAHistogramContribution/value}}
:: 0
1. Set |contributions| to « |nullContribution| ».
1. [=list/Append=] |nullContribution| to |contributions|.

Issue(56): Replace with more generic padding.
Note: This padding protects against the number of contributions being leaked
through the encrypted payload size, see discussion
[below](#protecting-against-leaks-via-payload-size).
1. [=list/iterate|For each=] |contribution| of |report|'s [=aggregatable report/
contributions=]:
1. Let |contributionData| be an [=ordered map=] of the following key/value
Expand Down Expand Up @@ -1744,10 +1749,7 @@ count.

The length of the payload could additionally expose some cross-site information,
namely how many contributions are included. To protect against this, the payload
will be padded in the future.

Issue(56): Pad the payload to avoid this risk.

is padded to a fixed number of contributions.
### Temporary debugging mechanism ### {#temporary-debugging-mechanism}

The <code>{{PrivateAggregation/enableDebugMode()}}</code> method allows for many
Expand Down