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

Rewrite KOS15 #37

Merged
merged 13 commits into from
Aug 11, 2023
Merged

Rewrite KOS15 #37

merged 13 commits into from
Aug 11, 2023

Conversation

sinui0
Copy link
Collaborator

@sinui0 sinui0 commented Jul 21, 2023

This PR reimplements KOS15, fixing some security and performance issues. There might be a couple odds and ends that still need to be buttoned up, but I wanted to open this now and start getting feedback sooner.

Changes

  1. Incorporates changes from Rewrite CO15 #36 block refactor, fixed key aes, cointoss #28
  2. Decouples CO15 from KOS, making it generic over the base OT instead.
  3. Fixes the consistency check, performing the cointoss after the receiver has committed to their extension payload.
  4. Fixes the committed sender functionality, where the replay protocol uses the committed receiver functionality from the base OT to open and enforce the authenticity of the delta used by the sender in the setup.
  5. Implemented incremental extension, where both parties can re-extend their base OTs multiple times (performing a consistency check for every extension).
  6. Added toggle-able parallelism using rayon.
  7. Support the "split" functionality without actually splitting the internal state into multiple instances. This preserves support for parallelism/concurrency in the actor implementation (coming in another PR).

@sinui0 sinui0 requested review from themighty1 and th4s July 21, 2023 03:26
@sinui0 sinui0 force-pushed the refactor/co15-2 branch from 3423569 to 7d82343 Compare July 26, 2023 00:18
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.

🚀 Very clean and nice. Have some comments...

matrix-transpose/src/lib.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/mod.rs Outdated Show resolved Hide resolved
@@ -0,0 +1,85 @@
use derive_builder::Builder;

/// KOS15 sender configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a sentence explaining why Sender and Receiver each have sender_commit and receiver_commit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the unused configurations

ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Can we have some tests for check and verify failures, for the KOS check and KOS committed OT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is tested in the core crate

ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@themighty1 themighty1 left a comment

Choose a reason for hiding this comment

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

I have not fully reviewed yet since some of my feedback depends on the things we are discussing on discord.
I'll review again when we agree on the final design.

ot/mpz-ot-core/src/kos/sender.rs Show resolved Hide resolved
ot/mpz-ot-core/src/kos/sender.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/sender.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/sender.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/sender.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Show resolved Hide resolved
Base automatically changed from refactor/co15-2 to ot-work August 4, 2023 18:46
Copy link
Collaborator

@themighty1 themighty1 left a comment

Choose a reason for hiding this comment

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

gw!!!

ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot-core/src/kos/receiver.rs Show resolved Hide resolved
ot/mpz-ot/src/kos/receiver.rs Outdated Show resolved Hide resolved
ot/mpz-ot/src/kos/sender.rs Show resolved Hide resolved
@sinui0 sinui0 mentioned this pull request Aug 11, 2023
@sinui0 sinui0 merged commit e52da1d into ot-work Aug 11, 2023
@sinui0 sinui0 deleted the refactor/kos-3 branch August 11, 2023 21:00
sinui0 added a commit that referenced this pull request Aug 30, 2023
* refactor kos15

* remove panic

* fix derandomize

* fix --no-default-features, and unused import

* rebase fixes

* sample delta with cointoss

* remove unused config

* update committed sender comments

* PR comments

* PR changes

* add minimum extend check

* decouple PayloadRecord

* final PR changes
sinui0 added a commit that referenced this pull request Aug 30, 2023
* refactor kos15

* remove panic

* fix derandomize

* fix --no-default-features, and unused import

* rebase fixes

* sample delta with cointoss

* remove unused config

* update committed sender comments

* PR comments

* PR changes

* add minimum extend check

* decouple PayloadRecord

* final PR changes
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.

Improve performance of verify function for receiver in Committed OT
3 participants