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

Use 2-NAF for representing ATE_LOOP_COUNT in MNT Miller loop #445

Merged
merged 23 commits into from
Aug 28, 2022

Conversation

mmagician
Copy link
Member

@mmagician mmagician commented Jul 29, 2022

Description

closes: #19

Benchmarks (over 100 runs):

MNT6_753:

  • 123 instead of 174 additions
  • binary repr: test mnt6_753::miller_loop ... bench: 9,326,999 ns/iter (+/- 481,194)
  • 2-NAF: test mnt6_753::miller_loop ... bench: 8,622,133 ns/iter (+/- 546,760)

MNT2_298:

  • 48 instead of 70 additions
  • binary repr: test mnt6_298::miller_loop ... bench: 892,824 ns/iter (+/- 71,584)
  • 2-naf: test mnt6_298::miller_loop ... bench: 819,195 ns/iter (+/- 80,998)

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.
  • Wrote unit tests
  • 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

@mmagician mmagician requested a review from Pratyush July 29, 2022 18:15
ec/src/models/mnt6/g2.rs Outdated Show resolved Hide resolved
ec/src/models/mnt6/mod.rs Outdated Show resolved Hide resolved
@weikengchen
Copy link
Member

We should probably wait for https://github.com/arkworks-rs/r1cs-std/pull/96/files before merging this one.

ec/src/models/mnt4/g2.rs Outdated Show resolved Hide resolved
ec/src/models/mnt6/g2.rs Outdated Show resolved Hide resolved
ec/src/models/mnt6/mod.rs Outdated Show resolved Hide resolved
ec/src/models/mnt4/mod.rs Outdated Show resolved Hide resolved
@Pratyush Pratyush merged commit 6263006 into arkworks-rs:master Aug 28, 2022
@mmagician mmagician deleted the mnt-miller-wnaf branch October 17, 2022 18: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.

Optimize MNT4/6 pairing (2-NAF Miller loop)
4 participants