bn -> BN canonical capitalization
This commit is contained in:
parent
f727c5ad25
commit
2caf7c6471
10
lib/point.js
10
lib/point.js
|
@ -1,4 +1,4 @@
|
||||||
var bn = require('./bn');
|
var BN = require('./bn');
|
||||||
var elliptic = require('elliptic');
|
var elliptic = require('elliptic');
|
||||||
|
|
||||||
var ec = elliptic.curves.secp256k1;
|
var ec = elliptic.curves.secp256k1;
|
||||||
|
@ -20,18 +20,18 @@ Point.getG = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
Point.getN = function() {
|
Point.getN = function() {
|
||||||
return bn(ec.curve.n.toArray());
|
return BN(ec.curve.n.toArray());
|
||||||
};
|
};
|
||||||
|
|
||||||
Point.prototype._getX = Point.prototype.getX;
|
Point.prototype._getX = Point.prototype.getX;
|
||||||
Point.prototype.getX = function() {
|
Point.prototype.getX = function() {
|
||||||
var n = bn(this._getX().toArray());
|
var n = BN(this._getX().toArray());
|
||||||
return bn(this._getX().toArray());
|
return BN(this._getX().toArray());
|
||||||
};
|
};
|
||||||
|
|
||||||
Point.prototype._getY = Point.prototype.getY;
|
Point.prototype._getY = Point.prototype.getY;
|
||||||
Point.prototype.getY = function() {
|
Point.prototype.getY = function() {
|
||||||
return bn(this._getY().toArray());
|
return BN(this._getY().toArray());
|
||||||
};
|
};
|
||||||
|
|
||||||
//https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf
|
//https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf
|
||||||
|
|
Loading…
Reference in New Issue