1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 10:37:38 -05:00

Fix two misstatements of the Montgomery curve equation.

I got it right in all the serious code (or else my Curve25519 key
exchange wouldn't have worked), but I wrote it down wrongly in the
comment in ecc.h, putting the coefficient b on the RHS x term rather
than the LHS y^2. Then I repeated the same error in the point
decompression function in eccref.py.
This commit is contained in:
Simon Tatham
2019-01-03 15:26:33 +00:00
parent 4eb1dedb66
commit 992f98d5d7
2 changed files with 3 additions and 3 deletions

2
ecc.h
View File

@ -108,7 +108,7 @@ void ecc_weierstrass_get_affine(WeierstrassPoint *wp, mp_int **x, mp_int **y);
* Montgomery curves.
*
* A curve in this form is defined by two parameters a,b, and the
* curve equation is y^2 = x^3 + ax^2 + bx.
* curve equation is by^2 = x^3 + ax^2 + x.
*
* As with Weierstrass curves, there's an additional point at infinity
* that is the identity element, and the inverse of (x,y) is (x,-y).