File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,8 @@ function liftX(buffer: Buffer): Buffer | null {
133133 typeforce ( types . Buffer256bit , buffer ) ;
134134 const x = new BN ( buffer ) ;
135135 if ( x . gte ( EC_P ) ) return null ;
136- const xRed = x . toRed ( EC_P_REDUCTION ) ;
137- const ySq = xRed
136+ const x1 = x . toRed ( EC_P_REDUCTION ) ;
137+ const ySq = x1
138138 . redPow ( BN_3 )
139139 . add ( BN_7 )
140140 . mod ( EC_P ) ;
@@ -145,8 +145,9 @@ function liftX(buffer: Buffer): Buffer | null {
145145 return null ;
146146 }
147147 const y1 = ( y & 1 ) === 0 ? y : EC_P . sub ( y ) ;
148+ // TODO: which is the best format to return the coordinates?
148149 return Buffer . concat ( [
149- Buffer . from ( x . toBuffer ( 'be' ) ) ,
150+ Buffer . from ( x1 . toBuffer ( 'be' ) ) ,
150151 Buffer . from ( y1 . toBuffer ( 'be' ) ) ,
151152 ] ) ;
152153}
You can’t perform that action at this time.
0 commit comments