-
Notifications
You must be signed in to change notification settings - Fork 1.1k
group: Avoid using infinity field directly in other modules #1764
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,17 +96,13 @@ static void testutil_random_ge_test(secp256k1_ge *ge) { | |
| break; | ||
| } | ||
| } while(1); | ||
| ge->infinity = 0; | ||
| } | ||
|
|
||
| static void testutil_random_ge_jacobian_test(secp256k1_gej *gej, const secp256k1_ge *ge) { | ||
| secp256k1_fe z2, z3; | ||
| testutil_random_fe_non_zero_test(&gej->z); | ||
| secp256k1_fe_sqr(&z2, &gej->z); | ||
| secp256k1_fe_mul(&z3, &z2, &gej->z); | ||
| secp256k1_fe_mul(&gej->x, &ge->x, &z2); | ||
| secp256k1_fe_mul(&gej->y, &ge->y, &z3); | ||
| gej->infinity = ge->infinity; | ||
| secp256k1_fe z; | ||
| testutil_random_fe_non_zero_test(&z); | ||
| secp256k1_gej_set_ge(gej, ge); | ||
| secp256k1_gej_rescale(gej, &z); | ||
|
Comment on lines
-103
to
+105
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had a hard time following these changes. Could you shed a bit more light on them?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What this function does is take a
More details:
Or another answer: If you look into |
||
| } | ||
|
|
||
| static void testutil_random_gej_test(secp256k1_gej *gej) { | ||
|
|
||
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.
Why is it correct to drop this line?
Uh oh!
There was an error while loading. Please reload this page.
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.
secp256k1_ge_set_xo_varsets this already.secp256k1/src/group_impl.h
Line 355 in c8206b1