Skip to content

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

@DreamWuGit

Description

@DreamWuGit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions