-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add secp256k1_fe_add_int function #1217
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
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 |
---|---|---|
|
@@ -227,7 +227,7 @@ static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int o | |
secp256k1_fe_sqr(&x2, x); | ||
secp256k1_fe_mul(&x3, x, &x2); | ||
r->infinity = 0; | ||
secp256k1_fe_add(&x3, &secp256k1_fe_const_b); | ||
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.
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. @roconnor-blockstream Good catch. Do you want to open a PR to remove it? 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 suppose I can do that. |
||
secp256k1_fe_add_int(&x3, SECP256K1_B); | ||
if (!secp256k1_fe_sqrt(&r->y, &x3)) { | ||
return 0; | ||
} | ||
|
@@ -282,7 +282,7 @@ static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) { | |
/* y^2 = x^3 + 7 */ | ||
secp256k1_fe_sqr(&y2, &a->y); | ||
secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); | ||
secp256k1_fe_add(&x3, &secp256k1_fe_const_b); | ||
secp256k1_fe_add_int(&x3, SECP256K1_B); | ||
secp256k1_fe_normalize_weak(&x3); | ||
return secp256k1_fe_equal_var(&y2, &x3); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.