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

refactor(mpz-ot): Normalize OT and ideal functionalities #122

Merged
merged 8 commits into from
May 8, 2024

Conversation

sinui0
Copy link
Collaborator

@sinui0 sinui0 commented Apr 30, 2024

This PR normalizes our OT interfaces as well as completely reimplements our ideal functionality abstraction.

Nothing here touches the security critical logic of any of the OT implementations. This is purely a clean up and testing utilities.

Changes

  • Ideal functionalities logic is now consolidated into mpz-ot-core instead of leaking into mpz-ot.
  • Added an abstraction which makes it easier to implement ideal 2-party functionalities in mpz-common
  • Every oblivious transfer call now has a TransferId
  • Outputs for each OT functionality is now strongly typed.

@sinui0 sinui0 requested review from themighty1 and th4s April 30, 2024 02:46
Copy link
Member

@th4s th4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🚀

What is the benefit of adding an extra encapsulation layer for the OT return types in the traits?

crates/mpz-common/src/ideal.rs Show resolved Hide resolved
crates/mpz-ot-core/src/chou_orlandi/receiver.rs Outdated Show resolved Hide resolved
crates/mpz-ot-core/src/chou_orlandi/sender.rs Outdated Show resolved Hide resolved
crates/mpz-ot-core/src/ideal/mpcot.rs Show resolved Hide resolved
crates/mpz-ot-core/src/ideal/spcot.rs Outdated Show resolved Hide resolved
crates/mpz-ot/src/ideal/mod.rs Outdated Show resolved Hide resolved
@sinui0
Copy link
Collaborator Author

sinui0 commented May 6, 2024

What is the benefit of adding an extra encapsulation layer for the OT return types in the traits?

It just provides stronger typing and a way to document what each field is. It's better to have the types defined in mpz-ot-core and the traits inmpz-ot work with them

@sinui0 sinui0 requested a review from th4s May 6, 2024 22:00
crates/mpz-ot/src/ideal/rot.rs Outdated Show resolved Hide resolved
Co-authored-by: th4s <th4s@metavoid.xyz>
@sinui0 sinui0 merged commit 42c7fe9 into threading-refactor May 8, 2024
@sinui0 sinui0 deleted the refactor/ideal-and-traits branch May 8, 2024 02:06
sinui0 added a commit that referenced this pull request Jun 25, 2024
* add transfer id

* update co15 and kos15

* add Output type

* feat(mpz-common): ideal functionality utils

* refactor ideal functionalities and traits

* pr feedback

* impl ideal rot

* Update crates/mpz-ot/src/ideal/rot.rs

Co-authored-by: th4s <th4s@metavoid.xyz>

---------

Co-authored-by: th4s <th4s@metavoid.xyz>
sinui0 added a commit that referenced this pull request Jun 25, 2024
* add transfer id

* update co15 and kos15

* add Output type

* feat(mpz-common): ideal functionality utils

* refactor ideal functionalities and traits

* pr feedback

* impl ideal rot

* Update crates/mpz-ot/src/ideal/rot.rs

Co-authored-by: th4s <th4s@metavoid.xyz>

---------

Co-authored-by: th4s <th4s@metavoid.xyz>
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

Successfully merging this pull request may close these issues.

2 participants