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

crypto: rework position var #2801

Merged
merged 8 commits into from
Jul 8, 2023
Merged

crypto: rework position var #2801

merged 8 commits into from
Jul 8, 2023

Conversation

redshiftzero
Copy link
Contributor

@redshiftzero redshiftzero commented Jul 7, 2023

This PR:

  • Removes PositionBitsVar, instead allocating PositionVar from a UInt64 (64 bits) while storing the bit constraints so they can be used later, and then constructing a field element (needed for nullifier derivation integrity) from those bits such that it is range constrained.
  • Removes our custom method for converting bits to FqVar, instead using the upstream provided method Boolean<Fq>

redshiftzero and others added 2 commits July 7, 2023 11:12
Co-Authored-By: plaidfinch <finch@penumbralabs.xyz>
There is an upstream method on `Boolean<FpVar<F>>` for constructing
field elements from bits which is more efficient due to it using
double and add, so let's use that.

Co-Authored-By: plaidfinch <finch@penumbralabs.xyz>
@redshiftzero redshiftzero temporarily deployed to smoke-test July 7, 2023 17:33 — with GitHub Actions Inactive
@redshiftzero redshiftzero temporarily deployed to smoke-test July 8, 2023 00:16 — with GitHub Actions Inactive
@redshiftzero redshiftzero changed the title wip: reworking position var crypto: rework position var Jul 8, 2023
@redshiftzero redshiftzero marked this pull request as ready for review July 8, 2023 03:16
@redshiftzero redshiftzero temporarily deployed to smoke-test July 8, 2023 03:19 — with GitHub Actions Inactive
@redshiftzero redshiftzero merged commit d2d5c10 into main Jul 8, 2023
@redshiftzero redshiftzero deleted the positionvar-rework branch July 8, 2023 15:31
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.

1 participant