Lines Matching refs:BigInteger
50 function BigInteger(a,b,c) {
58 // return new, unset BigInteger
59 function nbi() { return new BigInteger(null); }
140 BigInteger.prototype.am = fn;
231 if(mi) BigInteger.ZERO.subTo(this,this);
273 function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
419 if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
474 BigInteger.ONE.dlShiftTo(ys,t);
488 if(ts != ms) BigInteger.ZERO.subTo(q,q);
493 if(ts < 0) BigInteger.ZERO.subTo(r,r);
500 if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
562 if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
614 if(e > 0xffffffff || e < 1) return BigInteger.ONE;
633 BigInteger.prototype.copyTo = bnpCopyTo;
634 BigInteger.prototype.fromInt = bnpFromInt;
635 BigInteger.prototype.fromString = bnpFromString;
636 BigInteger.prototype.clamp = bnpClamp;
637 BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
638 BigInteger.prototype.drShiftTo = bnpDRShiftTo;
639 BigInteger.prototype.lShiftTo = bnpLShiftTo;
640 BigInteger.prototype.rShiftTo = bnpRShiftTo;
641 BigInteger.prototype.subTo = bnpSubTo;
642 BigInteger.prototype.multiplyTo = bnpMultiplyTo;
643 BigInteger.prototype.squareTo = bnpSquareTo;
644 BigInteger.prototype.divRemTo = bnpDivRemTo;
645 BigInteger.prototype.invDigit = bnpInvDigit;
646 BigInteger.prototype.isEven = bnpIsEven;
647 BigInteger.prototype.exp = bnpExp;
650 BigInteger.prototype.toString = bnToString;
651 BigInteger.prototype.negate = bnNegate;
652 BigInteger.prototype.abs = bnAbs;
653 BigInteger.prototype.compareTo = bnCompareTo;
654 BigInteger.prototype.bitLength = bnBitLength;
655 BigInteger.prototype.mod = bnMod;
656 BigInteger.prototype.modPowInt = bnModPowInt;
659 BigInteger.ZERO = nbv(0);
660 BigInteger.ONE = nbv(1);
745 if(mi) BigInteger.ZERO.subTo(this,this);
751 // new BigInteger(int,int,RNG)
756 this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
760 if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
765 // new BigInteger(int,RNG)
912 var r = BigInteger.ONE.shiftLeft(n);
1053 BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
1191 if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
1224 if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
1255 var n1 = this.subtract(BigInteger.ONE);
1265 if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
1269 if(y.compareTo(BigInteger.ONE) == 0) return false;
1278 BigInteger.prototype.chunkSize = bnpChunkSize;
1279 BigInteger.prototype.toRadix = bnpToRadix;
1280 BigInteger.prototype.fromRadix = bnpFromRadix;
1281 BigInteger.prototype.fromNumber = bnpFromNumber;
1282 BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
1283 BigInteger.prototype.changeBit = bnpChangeBit;
1284 BigInteger.prototype.addTo = bnpAddTo;
1285 BigInteger.prototype.dMultiply = bnpDMultiply;
1286 BigInteger.prototype.dAddOffset = bnpDAddOffset;
1287 BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
1288 BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
1289 BigInteger.prototype.modInt = bnpModInt;
1290 BigInteger.prototype.millerRabin = bnpMillerRabin;
1293 BigInteger.prototype.clone = bnClone;
1294 BigInteger.prototype.intValue = bnIntValue;
1295 BigInteger.prototype.byteValue = bnByteValue;
1296 BigInteger.prototype.shortValue = bnShortValue;
1297 BigInteger.prototype.signum = bnSigNum;
1298 BigInteger.prototype.toByteArray = bnToByteArray;
1299 BigInteger.prototype.equals = bnEquals;
1300 BigInteger.prototype.min = bnMin;
1301 BigInteger.prototype.max = bnMax;
1302 BigInteger.prototype.and = bnAnd;
1303 BigInteger.prototype.or = bnOr;
1304 BigInteger.prototype.xor = bnXor;
1305 BigInteger.prototype.andNot = bnAndNot;
1306 BigInteger.prototype.not = bnNot;
1307 BigInteger.prototype.shiftLeft = bnShiftLeft;
1308 BigInteger.prototype.shiftRight = bnShiftRight;
1309 BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
1310 BigInteger.prototype.bitCount = bnBitCount;
1311 BigInteger.prototype.testBit = bnTestBit;
1312 BigInteger.prototype.setBit = bnSetBit;
1313 BigInteger.prototype.clearBit = bnClearBit;
1314 BigInteger.prototype.flipBit = bnFlipBit;
1315 BigInteger.prototype.add = bnAdd;
1316 BigInteger.prototype.subtract = bnSubtract;
1317 BigInteger.prototype.multiply = bnMultiply;
1318 BigInteger.prototype.divide = bnDivide;
1319 BigInteger.prototype.remainder = bnRemainder;
1320 BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
1321 BigInteger.prototype.modPow = bnModPow;
1322 BigInteger.prototype.modInverse = bnModInverse;
1323 BigInteger.prototype.pow = bnPow;
1324 BigInteger.prototype.gcd = bnGCD;
1325 BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
1327 // BigInteger interfaces not implemented in jsbn:
1329 // BigInteger(int signum, byte[] magnitude)
1334 // static BigInteger valueOf(long val)
1448 return new BigInteger(str,r);
1487 return new BigInteger(ba);
1590 var ee = new BigInteger(E,16);
1593 this.p = new BigInteger(B-qs,1,rng);
1594 if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;
1597 this.q = new BigInteger(qs,1,rng);
1598 if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;
1605 var p1 = this.p.subtract(BigInteger.ONE);
1606 var q1 = this.q.subtract(BigInteger.ONE);
1608 if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {