private-attribution / ipa

A raw implementation of Interoperable Private Attribution
MIT License
39 stars 23 forks source link

Allow PRSS to generate randomness shared with only one helper #1187

Closed akoshelev closed 1 day ago

akoshelev commented 1 week ago

Builds on top of #1185

This closes https://github.com/private-attribution/ipa/issues/1029 by adding a method to PRSS implementation that allows callers to specify which randomness they want to obtain: shared with the helper on the right or on the left. This saves 50% of computation in cases where only one side of PRSS is required. https://github.com/private-attribution/ipa/issues/1029 lists the cases where it is useful.

Happy to bikeshed on naming, it gets harder and harder to find good names

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.08%. Comparing base (c160823) to head (c020f73).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1187 +/- ## ========================================== + Coverage 92.04% 92.08% +0.03% ========================================== Files 196 196 Lines 29382 29458 +76 ========================================== + Hits 27045 27126 +81 + Misses 2337 2332 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

akoshelev commented 1 week ago

Here is the link to the benchmark that forced me to implement custom iterator.

Using Zip to combine two iterators. Benchmark against the stable main. 15% regression

pdf

Using ChunksIter with inline calls. Benchmark against the stable main. No perf change pdf