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

feat: lazy ot #186

Merged
merged 4 commits into from
Oct 31, 2024
Merged

feat: lazy ot #186

merged 4 commits into from
Oct 31, 2024

Conversation

sinui0
Copy link
Collaborator

@sinui0 sinui0 commented Oct 23, 2024

This PR refactors our OT crates to have lazy interfaces. It also disposes of committed/verifiable functionality as we no longer need it. Dependent crates are in a broken state and will be fixed in following PRs. Ferret is also omitted temporarily.

@sinui0 sinui0 requested a review from th4s October 23, 2024 03:08
@sinui0 sinui0 marked this pull request as ready for review October 23, 2024 22:02
@sinui0 sinui0 requested a review from themighty1 October 24, 2024 00:54
@sinui0 sinui0 linked an issue Oct 24, 2024 that may be closed by this pull request
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.

lgtm 🚀 nice work

crates/mpz-common/Cargo.toml Outdated Show resolved Hide resolved
crates/mpz-ot-core/src/cot/derandomize.rs Outdated Show resolved Hide resolved
crates/mpz-ot-core/src/cot/derandomize.rs Show resolved Hide resolved
crates/mpz-ot-core/src/ideal/cot.rs Show resolved Hide resolved
crates/mpz-ot-core/src/cot/derandomize.rs Outdated Show resolved Hide resolved
crates/mpz-ot-core/src/kos/receiver.rs Show resolved Hide resolved
crates/mpz-ot/src/cot/derandomize.rs Outdated Show resolved Hide resolved
@sinui0 sinui0 merged commit b81b562 into alpha.1 Oct 31, 2024
@sinui0 sinui0 deleted the refactor/ot branch October 31, 2024 14:20
@themighty1 themighty1 restored the refactor/ot branch November 8, 2024 13:54
@themighty1 themighty1 deleted the refactor/ot branch November 8, 2024 14:52
@themighty1
Copy link
Collaborator

LGTM, except one q above @sinui0

@themighty1 themighty1 mentioned this pull request Nov 8, 2024
@sinui0
Copy link
Collaborator Author

sinui0 commented Nov 9, 2024

LGTM, except one q above @sinui0

I dont see a q

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.

the q should now be seen

},
);

while let Some(Queued { count, sender }) = self.queue.pop_front() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if the sender payload length is less than what was queued, then there will be partial or empty OTReceiverOutput. Is this the intended behavior? why is such behavior needed?
seems like a footgun which will be hard to debug.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@sinui0 ---^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The length of the entire queue gets processed at once, this should always have the correct number. The assumption is that new messages will not be queued in between transfers. This should probably be documented, or enforced via type state.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@sinui0
Sorry, I'll try to more accurately describe the issue because your response didn't seem to address it.

Suppose, the receiver queues 60 OTs.
Suppose in receive the length of SenderPayload is 30.

Why is it not an error that the receiver will get only 30 OTs out of the 60 that they intended to receive?

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.

Preprocessing Lazy API
3 participants