Bug 219519 - PCM: Switch to 8+4 bits for source IDs and trigger values respectively
Summary: PCM: Switch to 8+4 bits for source IDs and trigger values respectively
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-03 17:35 PST by John Wilander
Modified: 2020-12-04 14:19 PST (History)
8 users (show)

See Also:


Attachments
Patch (40.95 KB, patch)
2020-12-03 17:47 PST, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2020-12-03 17:35:32 PST
We've received a lot of feedback saying increased entropy on the click side is more important than the current 6 bits on the conversion side. Some of that conversation is captured in https://github.com/privacycg/private-click-measurement/issues/28. We should switch from the current 6+6 bits to 8+4 bits.
Comment 1 John Wilander 2020-12-03 17:36:20 PST
<rdar://problem/70470036>
Comment 2 John Wilander 2020-12-03 17:47:44 PST
Created attachment 415370 [details]
Patch
Comment 3 Brent Fulgham 2020-12-04 13:50:10 PST
Comment on attachment 415370 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415370&action=review

r=me

> Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:77
> +    ASSERT_EQ(attribution.json()->toJSONString(), "{\"source-engagement-type\":\"click\",\"source-site\":\"webkit.org\",\"source-id\":255,\"attributed-on-site\":\"example.com\",\"trigger-data\":15,\"report-version\":1}");

I wonder if this could be a formatted string so you wouldn't have to manually replace the 63/63 with 255/15 if we have to change this again in the future. Not critical for this patch.
Comment 4 John Wilander 2020-12-04 13:52:48 PST
Comment on attachment 415370 [details]
Patch

Thanks for the review, Brent!

Yeah, as I updated the API tests I thought about various ways to parameterize it rather than this blunt hardcoding. But as you say, we may never have to update this again.
Comment 5 EWS 2020-12-04 14:19:18 PST
Committed r270456: <https://trac.webkit.org/changeset/270456>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415370 [details].