private-attribution / ipa

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

[WIP] Integer multiplication implementation #1174

Closed shinta-liem closed 2 weeks ago

shinta-liem commented 3 weeks ago

Basic grade-school algorithm for integer multiplication for x and y where x is a positive unsigned number, and y is a signed number in two's complement.

This is a WIP:

benjaminsavage commented 2 weeks ago

@danielmasny - thanks for sharing that write-up! I think we should definitely try both approaches (and I have a few more in mind as well). The tradeoff here is communication cost vs the simplicity of remaining in a boolean field.

I do not expect the schoolbook multiplication algorithm to be the most efficient. I mainly view this as a simple onboarding task for @shinta-liem - to help familiarise her with the Rust codebase. We can implement this alternative approach as well in a follow-up PR and benchmark them against one another.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 99.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.05%. Comparing base (671fb4d) to head (701803e).

Files Patch % Lines
ipa-core/src/protocol/ipa_prf/boolean_ops/step.rs 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1174 +/- ## ========================================== + Coverage 92.01% 92.05% +0.03% ========================================== Files 195 196 +1 Lines 29130 29241 +111 ========================================== + Hits 26805 26917 +112 + Misses 2325 2324 -1 ```

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