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

Incorrect Bitwise Operation in aggregatable-histogram creation #1353

Closed
hiratara opened this issue Jun 28, 2024 · 5 comments
Closed

Incorrect Bitwise Operation in aggregatable-histogram creation #1353

hiratara opened this issue Jun 28, 2024 · 5 comments
Assignees

Comments

@hiratara
Copy link
Contributor

Hello,

I have identified a discrepancy in the implementation of the Attribution Reporting API concerning the handling of aggregation keys. According to the Privacy Sandbox documentation on aggregation keys (https://developers.google.com/privacy-sandbox/relevance/attribution-reporting/aggregation-keys), a key should be calculated using the XOR (^) operation, specifically stating, "A key is calculated by taking the XOR (^) of its key pieces."

However, the current implementation in the API seems to use the OR bitwise operation instead of XOR. This contradicts both the documentation and the original specification detailed in pull request #416, which clearly states: Set |aggregationKeys|[|sourceKey|] to |aggregationKeys|[|sourceKey|] XOR |triggerData|'s [=attribution aggregatable trigger data/key piece=].

It appears that there may have been a misunderstanding or an error in implementing the intended bitwise operation. Can this be confirmed and corrected if necessary? This issue could potentially affect the accuracy and intended functionality of key aggregation in the API.

Thank you for your attention to this matter.

@linnan-github
Copy link
Collaborator

linnan-github commented Jun 28, 2024

Thanks for reporting the issue in the documentation. The bitwise OR is the intended behavior, which is what has been implemented and corrected in the specification (step 2.2.2 in https://wicg.github.io/attribution-reporting-api/#create-aggregatable-contributions).

We will fix the documentation to avoid confusion.

@hiratara
Copy link
Contributor Author

hiratara commented Jul 1, 2024

Thank you for the clarification and for your prompt response. I appreciate the update and look forward to seeing the revised documentation.

@hiratara
Copy link
Contributor Author

hiratara commented Jul 2, 2024

Hello @apasel422,

I noticed that the ticket was closed as completed, but the documentation still appears to be unchanged. Could you please clarify why the ticket was closed? Additionally, could you inform me where I can track the progress or check for updates regarding the documentation revision? Is there a specific issue or pull request that I should follow?

Thank you for your assistance.

@apasel422
Copy link
Collaborator

@hiratara The documentation issue you identified is not covered by this repository, which covers the Attribution Reporting specification. I suggest filing a bug there if @linnan-github hasn't already.

@hiratara
Copy link
Contributor Author

hiratara commented Jul 2, 2024

Hello @apasel422, @linnan-github and @akashnadan,

I have created a new issue to address the incorrect use of XOR in place of OR in the aggregatable-histogram creation as discussed. The issue can be found here: privacysandbox/privacy-sandbox-dev-support#387 . I appreciate your guidance on this matter and look forward to the resolution.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants