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

Support prime fields with (64 * k)-bit modulus #509

Merged
merged 18 commits into from
Dec 9, 2022
Merged

Support prime fields with (64 * k)-bit modulus #509

merged 18 commits into from
Dec 9, 2022

Conversation

weikengchen
Copy link
Member

@weikengchen weikengchen commented Nov 3, 2022

Description

This PR removes the requirement that the top bit in a limb must be zero.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

N/A:

  • Wrote unit tests

derive

derive

debug

debug

fix R

fix assert

fix assert

fix assert

debug mul

fix

debug

fix

test

fix

inv

test

debug

debug

debug

debug

carry

carry

carry

next

next

next

test

square in place

square in place

square in place

fix

fix

test

show carry2

test the exact one

test the exact one

fix

carry2 is right

one bit lost

understand the bit shift

understand the bit shift

shift

remove debug

remove debug info
@weikengchen weikengchen requested review from a team as code owners November 3, 2022 04:40
@weikengchen weikengchen requested review from Pratyush and mmagician and removed request for a team November 3, 2022 04:40
@weikengchen weikengchen changed the title Support exactly 64 * K bits Support prime fields with 64 * K-bit modulus Nov 3, 2022
@weikengchen weikengchen changed the title Support prime fields with 64 * K-bit modulus Support prime fields with (64 *k)-bit modulus Nov 3, 2022
@weikengchen weikengchen changed the title Support prime fields with (64 *k)-bit modulus Support prime fields with (64 * k)-bit modulus Nov 3, 2022
Copy link
Member

@Pratyush Pratyush left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this! I left some questions.

@weikengchen
Copy link
Member Author

Let me do an explicit separation.

@Pratyush
Copy link
Member

Pratyush commented Nov 3, 2022

Thanks, I will review this later today

kevinssgh pushed a commit to kevinssgh/algebra that referenced this pull request Dec 2, 2022
kevinssgh and others added 2 commits December 5, 2022 10:48
* applied recommended changes for pr #509 on original repository.

* update doc comment and removed temporary unit test
@Pratyush
Copy link
Member

Pratyush commented Dec 5, 2022

This mostly looks good! The last thing to do would be to add a test case in test-curves

Copy link
Member Author

@weikengchen weikengchen left a comment

Choose a reason for hiding this comment

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

Just a note: as discussed this morning Pratyush will do a pass and likely a performance evaluation as well. The PR is ready from my side.

CHANGELOG.md Outdated Show resolved Hide resolved
@Pratyush Pratyush merged commit 80aa0b2 into master Dec 9, 2022
@Pratyush Pratyush deleted the carry_256 branch December 9, 2022 02:07
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.

5 participants