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:
2
ecc.h
2
ecc.h
@ -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).
|
||||
|
Reference in New Issue
Block a user