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 {
133
133
typeforce ( types . Buffer256bit , buffer ) ;
134
134
const x = new BN ( buffer ) ;
135
135
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
138
138
. redPow ( BN_3 )
139
139
. add ( BN_7 )
140
140
. mod ( EC_P ) ;
@@ -145,8 +145,9 @@ function liftX(buffer: Buffer): Buffer | null {
145
145
return null ;
146
146
}
147
147
const y1 = ( y & 1 ) === 0 ? y : EC_P . sub ( y ) ;
148
+ // TODO: which is the best format to return the coordinates?
148
149
return Buffer . concat ( [
149
- Buffer . from ( x . toBuffer ( 'be' ) ) ,
150
+ Buffer . from ( x1 . toBuffer ( 'be' ) ) ,
150
151
Buffer . from ( y1 . toBuffer ( 'be' ) ) ,
151
152
] ) ;
152
153
}
You can’t perform that action at this time.
0 commit comments