-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix mul, generator and add hardcoded tests #51
Conversation
src/field/gf_101_2.rs
Outdated
fn test_generator_order() { | ||
let generator = F2::generator(); | ||
let generator = F2::ONE; | ||
let mut x = generator; | ||
for _ in 1..F2::ORDER { | ||
x *= generator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct right? We are just multiplying one together a bunch of times, this test would pass no matter what right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops lol yes, how did i miss this. fixed it now. Now, we're multiplying 1 by generator, order-1 times, which is the multiplicative order of the group defined by field.
* chore: tests + scalar multiplication * fmt * wip: compiles, but generator point is broken * wip * fix mul, generator and add hardcoded tests (#51) * fix mul, generator and add hardcoded tests * fix generator test * wip * fix: test fails when rng has no inverse --------- Co-authored-by: Sambhav <[email protected]>
commit 2637594 Author: Waylon Jepsen <[email protected]> Date: Thu May 9 10:38:12 2024 -0600 curves: Second curve group and some test (#49) * chore: tests + scalar multiplication * fmt * wip: compiles, but generator point is broken * wip * fix mul, generator and add hardcoded tests (#51) * fix mul, generator and add hardcoded tests * fix generator test * wip * fix: test fails when rng has no inverse --------- Co-authored-by: Sambhav <[email protected]> commit def9371 Author: Waylon Jepsen <[email protected]> Date: Thu May 9 09:36:25 2024 -0600 docs: readme (#46) * docs: readme * wip: pairing check * docs * Update README.md Co-authored-by: Colin Roberts <[email protected]> * Update README.md Co-authored-by: Colin Roberts <[email protected]> --------- Co-authored-by: Colin Roberts <[email protected]> commit ab0d374 Author: Sambhav <[email protected]> Date: Wed May 8 03:00:15 2024 +0530 Extension field (#44) * feat: extension field init * add test * add more tests and comments * move pow impl default to trait commit f9aa66e Author: Waylon Jepsen <[email protected]> Date: Tue May 7 09:00:35 2024 -0600 curves in sage (#39) commit 63ce62f Author: Waylon Jepsen <[email protected]> Date: Mon May 6 17:46:22 2024 -0600 fix: lock commit d1c84eb Author: Colin Roberts <[email protected]> Date: Mon May 6 16:39:25 2024 -0700 feat: home-baked `FiniteField` trait (#38) * feat: new `FiniteField` trait Now everything compiles again. Will work to clean this all up and get all the tests to pass. * fix: `GF101` tests pass * fix: reimplement monty optimizations * clean: udeps --------- Co-authored-by: Waylon Jepsen <[email protected]> commit 96c8b66 Merge: fb27e5f 62a9a57 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon May 6 23:26:56 2024 +0000 Merge pull request #42 from pluto/dependabot/cargo/anyhow-1.0.83 Bump anyhow from 1.0.82 to 1.0.83 commit 62a9a57 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 6 23:26:43 2024 +0000 Bump anyhow from 1.0.82 to 1.0.83 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.82 to 1.0.83. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](dtolnay/anyhow@1.0.82...1.0.83) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
fixes mul and multiplicative generator of extension field