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

halo2-ecc: ec_double helper doesn't work for secp256r1 #29

Open
DreamWuGit opened this issue Oct 21, 2024 · 1 comment
Open

halo2-ecc: ec_double helper doesn't work for secp256r1 #29

DreamWuGit opened this issue Oct 21, 2024 · 1 comment

Comments

@DreamWuGit
Copy link

DreamWuGit commented Oct 21, 2024

halo2-ecc/src/ecc/mod.rs helper ec_double helper only work for secp256k1 , not work for p256, need to be updated as following:
if current point is P (x, y)
then
lambda = (3* x ^2 + a) / 2y (mod p)
x_3 = lambda^2 - 2x (mod p)
y_3 = lambda(x_3 -x) (mod p)
the point(x_3, y_3) is the addition result.

@DreamWuGit
Copy link
Author

better to make modification compatible to both two curves instead of creating new helper special use for r1 curve.

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

No branches or pull requests

1 participant