mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 07:35:52 +00:00
[FIX] Point coordinates should be converted to psuedo mersenne primes
This commit is contained in:
@@ -11,8 +11,16 @@ sjcl.ecc.point = function(curve,x,y) {
|
|||||||
if (x === undefined) {
|
if (x === undefined) {
|
||||||
this.isIdentity = true;
|
this.isIdentity = true;
|
||||||
} else {
|
} else {
|
||||||
|
if (x instanceof sjcl.bn) {
|
||||||
|
x = new curve.field(x);
|
||||||
|
}
|
||||||
|
if (y instanceof sjcl.bn) {
|
||||||
|
y = new curve.field(y);
|
||||||
|
}
|
||||||
|
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
|
|
||||||
this.isIdentity = false;
|
this.isIdentity = false;
|
||||||
}
|
}
|
||||||
this.curve = curve;
|
this.curve = curve;
|
||||||
|
|||||||
Reference in New Issue
Block a user