Lines Matching refs:conf
45651 function BaseCurve(type, conf) {
45653 this.p = new BN(conf.p, 16); // Use Montgomery, when there is no fast reduction for the prime
45655 this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); // Useful for many curves
45661 this.n = conf.n && new BN(conf.n, 16);
45662 this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); // Temporary arrays
46015 function EdwardsCurve(conf) {
46017 this.twisted = (conf.a | 0) !== 1;
46018 this.mOneA = this.twisted && (conf.a | 0) === -1;
46020 Base.call(this, 'edwards', conf);
46021 this.a = new BN(conf.a, 16).umod(this.red.m);
46023 this.c = new BN(conf.c, 16).toRed(this.red);
46025 this.d = new BN(conf.d, 16).toRed(this.red);
46028 this.oneC = (conf.c | 0) === 1;
46399 function MontCurve(conf) {
46400 Base.call(this, 'mont', conf);
46401 this.a = new BN(conf.a, 16).toRed(this.red);
46402 this.b = new BN(conf.b, 16).toRed(this.red);
46580 function ShortCurve(conf) {
46581 Base.call(this, 'short', conf);
46582 this.a = new BN(conf.a, 16).toRed(this.red);
46583 this.b = new BN(conf.b, 16).toRed(this.red);
46588 this.endo = this._getEndomorphism(conf);
46596 ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
46603 if (conf.beta) {
46604 beta = new BN(conf.beta, 16).toRed(this.red);
46613 if (conf.lambda) {
46614 lambda = new BN(conf.lambda, 16);
46630 if (conf.basis) {
46631 basis = conf.basis.map(function (vec) {