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 {
78
78
/// Returns an extensible point
79
79
/// (3.1) https://iacr.org/archive/asiacrypt2008/53500329/53500329.pdf
80
80
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 ;
86
86
let F = D - C ;
87
87
let G = D + C ;
88
88
let H = B + A ;
You can’t perform that action at this time.
0 commit comments