Lines Matching defs:mod

778         return u.mod(this).equals(ZERO);
798 j = -j; // 3 (011) or 7 (111) mod 8
807 j = -j; // 3 (011) or 5 (101) mod 8
812 if ((p & u & 2) != 0) // p = u = 3 (mod 4)?
814 // And reduce u mod p
815 u = n.mod(BigInteger.valueOf(p)).intValue();
824 j = -j; // 3 (011) or 5 (101) mod 8
831 if ((u & p & 2) != 0) // u = p = 3 (mod 4)?
845 u2 = u.multiply(v).mod(n);
847 v2 = v.square().add(d.multiply(u.square())).mod(n);
855 u2 = u.add(v).mod(n);
860 v2 = v.add(d.multiply(u)).mod(n);
1544 * Returns a BigInteger whose value is {@code (this mod m}). This method
1549 * @return {@code this mod m}
1553 public BigInteger mod(BigInteger m) {
1563 * <tt>(this<sup>exponent</sup> mod m)</tt>. (Unlike {@code pow}, this
1568 * @return <tt>this<sup>exponent</sup> mod m</tt>
1596 ? this.mod(m) : this);
1603 * (m2), exponentiate mod m1, manually exponentiate mod m2, and
1615 ? this.mod(m1) : this);
1617 // Caculate (base ** exponent) mod m1.
1621 // Calculate (this ** exponent) mod m2
1629 (a2.multiply(m1).multiply(y2)).mod(m);
1639 * Returns a BigInteger whose value is x to the power of y mod z.
1710 int[] mod = z.mag;
1711 int modLen = mod.length;
1732 int inv = -MutableBigInteger.inverseMod32(mod[modLen-1]);
1739 b2 = new MutableBigInteger(mod);
1755 b = montReduce(b, mod, modLen, inv);
1765 table[i] = montReduce(prod, mod, modLen, inv);
1837 a = montReduce(a, mod, modLen, inv);
1850 a = montReduce(a, mod, modLen, inv);
1860 b = montReduce(t2, mod, modLen, inv);
1870 * Montgomery reduce n, modulo mod. This reduces modulo mod and divides
1873 private static int[] montReduce(int[] n, int[] mod, int mlen, int inv) {
1880 int carry = mulAdd(n, mod, offset, mlen, inv * nEnd);
1886 c += subN(n, mod, mlen);
1888 while (intArrayCmpToLen(n, mod, mlen) >= 0)
1889 subN(n, mod, mlen);
1967 * Returns a BigInteger whose value is (this ** exponent) mod (2**p)
1995 * Returns a BigInteger whose value is this mod(2**p).
2016 * Returns a BigInteger whose value is {@code (this}<sup>-1</sup> {@code mod m)}.
2019 * @return {@code this}<sup>-1</sup> {@code mod m}.
2021 * has no multiplicative inverse mod m (that is, this BigInteger
2031 // Calculate (this mod m)
2034 modVal = this.mod(m);