File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
ed448-goldilocks/src/curve/twedwards Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ impl ExtensiblePoint {
7676 /// Returns an extensible point
7777 /// (3.1) https://iacr.org/archive/asiacrypt2008/53500329/53500329.pdf
7878 pub fn add_extended ( & self , other : & ExtendedPoint ) -> ExtensiblePoint {
79- let A = self . X * other. X ;
80- let B = self . Y * other. Y ;
81- let C = self . T1 * self . T2 * other. T * FieldElement :: TWISTED_D ;
82- let D = self . Z * other. Z ;
83- let E = ( self . X + self . Y ) * ( other . X + other . Y ) - A - B ;
79+ let A = ( self . Y - self . X ) * ( other. Y - other . X ) ;
80+ let B = ( self . Y + self . X ) * ( other. Y + other . X ) ;
81+ let C = FieldElement :: TWO_TIMES_TWISTED_D * self . T1 * self . T2 * other. T ;
82+ let D = ( self . Z * other. Z ) . double ( ) ;
83+ let E = B - A ;
8484 let F = D - C ;
8585 let G = D + C ;
8686 let H = B + A ;
You can’t perform that action at this time.
0 commit comments