Lines Matching refs:BigInteger
58 function BigInteger(a,b,c) {
66 // return new, unset BigInteger
67 function nbi() { return new BigInteger(null); }
148 BigInteger.prototype.am = fn;
239 if(mi) BigInteger.ZERO.subTo(this,this);
281 function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
427 if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
482 BigInteger.ONE.dlShiftTo(ys,t);
496 if(ts != ms) BigInteger.ZERO.subTo(q,q);
501 if(ts < 0) BigInteger.ZERO.subTo(r,r);
508 if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
570 if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
622 if(e > 0xffffffff || e < 1) return BigInteger.ONE;
641 BigInteger.prototype.copyTo = bnpCopyTo;
642 BigInteger.prototype.fromInt = bnpFromInt;
643 BigInteger.prototype.fromString = bnpFromString;
644 BigInteger.prototype.clamp = bnpClamp;
645 BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
646 BigInteger.prototype.drShiftTo = bnpDRShiftTo;
647 BigInteger.prototype.lShiftTo = bnpLShiftTo;
648 BigInteger.prototype.rShiftTo = bnpRShiftTo;
649 BigInteger.prototype.subTo = bnpSubTo;
650 BigInteger.prototype.multiplyTo = bnpMultiplyTo;
651 BigInteger.prototype.squareTo = bnpSquareTo;
652 BigInteger.prototype.divRemTo = bnpDivRemTo;
653 BigInteger.prototype.invDigit = bnpInvDigit;
654 BigInteger.prototype.isEven = bnpIsEven;
655 BigInteger.prototype.exp = bnpExp;
658 BigInteger.prototype.toString = bnToString;
659 BigInteger.prototype.negate = bnNegate;
660 BigInteger.prototype.abs = bnAbs;
661 BigInteger.prototype.compareTo = bnCompareTo;
662 BigInteger.prototype.bitLength = bnBitLength;
663 BigInteger.prototype.mod = bnMod;
664 BigInteger.prototype.modPowInt = bnModPowInt;
667 BigInteger.ZERO = nbv(0);
668 BigInteger.ONE = nbv(1);
753 if(mi) BigInteger.ZERO.subTo(this,this);
759 // new BigInteger(int,int,RNG)
764 this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
768 if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
773 // new BigInteger(int,RNG)
920 var r = BigInteger.ONE.shiftLeft(n);
1061 BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
1199 if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
1232 if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
1263 var n1 = this.subtract(BigInteger.ONE);
1273 if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
1277 if(y.compareTo(BigInteger.ONE) == 0) return false;
1286 BigInteger.prototype.chunkSize = bnpChunkSize;
1287 BigInteger.prototype.toRadix = bnpToRadix;
1288 BigInteger.prototype.fromRadix = bnpFromRadix;
1289 BigInteger.prototype.fromNumber = bnpFromNumber;
1290 BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
1291 BigInteger.prototype.changeBit = bnpChangeBit;
1292 BigInteger.prototype.addTo = bnpAddTo;
1293 BigInteger.prototype.dMultiply = bnpDMultiply;
1294 BigInteger.prototype.dAddOffset = bnpDAddOffset;
1295 BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
1296 BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
1297 BigInteger.prototype.modInt = bnpModInt;
1298 BigInteger.prototype.millerRabin = bnpMillerRabin;
1301 BigInteger.prototype.clone = bnClone;
1302 BigInteger.prototype.intValue = bnIntValue;
1303 BigInteger.prototype.byteValue = bnByteValue;
1304 BigInteger.prototype.shortValue = bnShortValue;
1305 BigInteger.prototype.signum = bnSigNum;
1306 BigInteger.prototype.toByteArray = bnToByteArray;
1307 BigInteger.prototype.equals = bnEquals;
1308 BigInteger.prototype.min = bnMin;
1309 BigInteger.prototype.max = bnMax;
1310 BigInteger.prototype.and = bnAnd;
1311 BigInteger.prototype.or = bnOr;
1312 BigInteger.prototype.xor = bnXor;
1313 BigInteger.prototype.andNot = bnAndNot;
1314 BigInteger.prototype.not = bnNot;
1315 BigInteger.prototype.shiftLeft = bnShiftLeft;
1316 BigInteger.prototype.shiftRight = bnShiftRight;
1317 BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
1318 BigInteger.prototype.bitCount = bnBitCount;
1319 BigInteger.prototype.testBit = bnTestBit;
1320 BigInteger.prototype.setBit = bnSetBit;
1321 BigInteger.prototype.clearBit = bnClearBit;
1322 BigInteger.prototype.flipBit = bnFlipBit;
1323 BigInteger.prototype.add = bnAdd;
1324 BigInteger.prototype.subtract = bnSubtract;
1325 BigInteger.prototype.multiply = bnMultiply;
1326 BigInteger.prototype.divide = bnDivide;
1327 BigInteger.prototype.remainder = bnRemainder;
1328 BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
1329 BigInteger.prototype.modPow = bnModPow;
1330 BigInteger.prototype.modInverse = bnModInverse;
1331 BigInteger.prototype.pow = bnPow;
1332 BigInteger.prototype.gcd = bnGCD;
1333 BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
1335 // BigInteger interfaces not implemented in jsbn:
1337 // BigInteger(int signum, byte[] magnitude)
1342 // static BigInteger valueOf(long val)
1456 return new BigInteger(str,r);
1495 return new BigInteger(ba);
1598 var ee = new BigInteger(E,16);
1601 this.p = new BigInteger(B-qs,1,rng);
1602 if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;
1605 this.q = new BigInteger(qs,1,rng);
1606 if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;
1613 var p1 = this.p.subtract(BigInteger.ONE);
1614 var q1 = this.q.subtract(BigInteger.ONE);
1616 if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {