diff --git a/src/js/sjcl/core/ecc.js b/src/js/sjcl/core/ecc.js index b36e7221..9a5a9b88 100644 --- a/src/js/sjcl/core/ecc.js +++ b/src/js/sjcl/core/ecc.js @@ -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;