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 @@ -78,11 +78,11 @@ impl ExtendedPoint {
7878 /// Returns an extensible point
7979 /// (3.1) https://iacr.org/archive/asiacrypt2008/53500329/53500329.pdf
8080 pub fn add_extended ( & self , other : & ExtendedPoint ) -> ExtensiblePoint {
81- let A = self . X * other. X ;
82- let B = self . Y * other. Y ;
83- let C = self . T * other. T * FieldElement :: TWISTED_D ;
84- let D = self . Z * other. Z ;
85- let E = ( self . X + self . Y ) * ( other . X + other . Y ) - A - B ;
81+ let A = ( self . Y - self . X ) * ( other. Y - other . X ) ;
82+ let B = ( self . Y + self . X ) * ( other. Y + other . X ) ;
83+ let C = FieldElement :: TWO_TIMES_TWISTED_D * self . T * other. T ;
84+ let D = ( self . Z * other. Z ) . double ( ) ;
85+ let E = B - A ;
8686 let F = D - C ;
8787 let G = D + C ;
8888 let H = B + A ;
You can’t perform that action at this time.
0 commit comments