[FIX] Point coordinates should be converted to psuedo mersenne primes

This commit is contained in:
Evan Schwartz
2014-05-01 13:14:55 -07:00
parent c32216c9e5
commit e19be192bd

View File

@@ -11,8 +11,16 @@ sjcl.ecc.point = function(curve,x,y) {
if (x === undefined) {
this.isIdentity = true;
} 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.y = y;
this.isIdentity = false;
}
this.curve = curve;