tlsfuzzer / python-ecdsa

pure-python ECDSA signature/verification and ECDH key agreement
Other
914 stars 315 forks source link

Use the complete formulas for point doubling and addition #297

Open tomato42 opened 2 years ago

tomato42 commented 2 years ago

https://safecurves.cr.yp.to/ is outdated, there are complete point addition and doubling formulas: https://eprint.iacr.org/2015/1060 we should use them to protect against bugs in special case handling

mratsim commented 1 year ago

I see that you use Jacobian coordinates.

You can also use conditional copies to select between add and doubles:

And for projective coordinates complete formulas: