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: decouple assignment from definition #78

Merged
merged 15 commits into from
Oct 24, 2023
Merged

Conversation

sinui0
Copy link
Collaborator

@sinui0 sinui0 commented Oct 17, 2023

This PR decouples assignment of values from the definition of values, and is the first step needed to support pre-garbling circuits in the offline phase.

Changes

  • Introduced the PrimitiveType trait in mpz-circuits to help statically distinguish between array values and primitives.
  • Renamed ValueRegistry and EncodingRegistry to ValueMemory and EncodingMemory
  • Updates the Memory trait methods, introducing assign.
  • Removes the ugly and complex ValueConfig and ValueIdConfig structs
  • Moves ValueId and ValueRef into mpz-garble from mpz-core
  • Introduces an ArrayRef type which is a variant of ValueRef which enforces some invariants which simplifies logic everywhere.
  • Updates Generator, Evaluator and DEAP to accomodate these changes.

@sinui0 sinui0 requested review from themighty1 and th4s October 17, 2023 22:41
@sinui0 sinui0 linked an issue Oct 18, 2023 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.

Nice 👍

garble/mpz-garble/src/protocol/deap/mod.rs Outdated Show resolved Hide resolved
@sinui0 sinui0 requested a review from th4s October 20, 2023 03:13
@sinui0
Copy link
Collaborator Author

sinui0 commented Oct 20, 2023

@th4s sry I had to make a couple changes after finding issues integrating with tlsn

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.

👍

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

garble/mpz-garble/src/generator/mod.rs Outdated Show resolved Hide resolved
garble/mpz-garble/src/memory.rs Outdated Show resolved Hide resolved
garble/mpz-garble/src/memory.rs Outdated Show resolved Hide resolved
@sinui0 sinui0 merged commit 5171baa into dev Oct 24, 2023
@sinui0 sinui0 deleted the refactor/vm-memory branch October 24, 2023 19:48
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.

Support pre-transferring garbled circuit gates
3 participants