tlsfuzzer / python-ecdsa

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

Remove unnecessary adds from mul_add #324

Closed vojtechsu closed 9 months ago

vojtechsu commented 9 months ago

For the computation of mul_add, four adds are being precomputed (A+B, A-B, -A+B, -A-B). Two of them are unnecessary as A+B and -A-B only differ in the sign of the y-coordinate. The same holds for -A+B and A-B.

tomato42 commented 9 months ago

good point, thanks

sorry, I mixed up branches on push and closed this one unintentionally, I've restored the patch in PR #326