/external/wycheproof/java/com/google/security/wycheproof/testcases/ |
D | BigIntegerTest.java | 19 import java.math.BigInteger; 28 public static final BigInteger[] NONPRIMES = 29 new BigInteger[] { 31 new BigInteger("-1"), 32 new BigInteger("0"), 33 new BigInteger("1"), 35 new BigInteger("147573952589676412927"), 36 new BigInteger("2361183241434822606847"), 38 new BigInteger("1194649"), 39 new BigInteger("12327121"), [all …]
|
D | EcdhTest.java | 19 import java.math.BigInteger; 96 final BigInteger s; // private key 99 public EcdhTestVector(String curvename, String pub, BigInteger s, String shared) { in EcdhTestVector() 126 new BigInteger("8af784fe9cebd363df85f598dcc2ab82b2ca725360dadb77b3708032", 16), 133 new BigInteger("051a995be2a8499e2c9331b3b5f3c012048bb02a1a6f044ed93d9bd295fcec16", 16), 141 new BigInteger("ff65a2bf5e1347e2286fb29273fb118a76996038bea2fcfd2032e8663f7588e5" 152 new BigInteger("01f362c182f1eaae2920578a2f30c228e28b996e74d4bd799621300d5f2e6c69" 170 new BigInteger("143be522a9d0420f6bd19b95ce3a5e19c61970c31f13448276546625e607e7c9", 16), 178 new BigInteger("56556c546751dee664ae71baa0189a2e69b1e1f8939a49ed7cc35d7ea98fbcc7", 16), 186 new BigInteger("ee383acde7e5b3e6c246833e183c4272a1714a13097b4b57bc2eeecdccbd69b6" [all …]
|
D | DhTest.java | 21 import java.math.BigInteger; 143 final BigInteger p = in ike1536() 144 new BigInteger( in ike1536() 152 final BigInteger g = new BigInteger("2"); in ike1536() 157 final BigInteger p = in ike2048() 158 new BigInteger( in ike2048() 168 final BigInteger g = new BigInteger("2"); in ike2048() 176 final BigInteger p = in openJdk1024() 177 new BigInteger( in openJdk1024() 183 final BigInteger unusedQ = new BigInteger("9760508f15230bccb292b982a2eb840bf0581cf5", 16); in openJdk1024() [all …]
|
/external/pdfium/third_party/bigint/ |
D | BigInteger.hh | 19 class BigInteger { class 38 BigInteger() : sign(zero), mag() {} in BigInteger() function in BigInteger 41 BigInteger(const BigInteger &x) : sign(x.sign), mag(x.mag) {}; in BigInteger() function in BigInteger 44 void operator=(const BigInteger &x); 47 BigInteger(const Blk *b, Index blen, Sign s); 50 BigInteger(const Blk *b, Index blen) : mag(b, blen) { in BigInteger() function in BigInteger 55 BigInteger(const BigUnsigned &x, Sign s); 58 BigInteger(const BigUnsigned &x) : mag(x) { in BigInteger() function in BigInteger 63 BigInteger(unsigned long x); 64 BigInteger( long x); [all …]
|
D | BigInteger.cc | 9 void BigInteger::operator =(const BigInteger &x) { in operator =() 19 BigInteger::BigInteger(const Blk *b, Index blen, Sign s) : mag(b, blen) { in BigInteger() function in BigInteger 38 BigInteger::BigInteger(const BigUnsigned &x, Sign s) : mag(x) { in BigInteger() function in BigInteger 62 BigInteger::BigInteger(unsigned long x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger() function in BigInteger 63 BigInteger::BigInteger(unsigned int x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger() function in BigInteger 64 BigInteger::BigInteger(unsigned short x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger() function in BigInteger 70 BigInteger::Blk magOf(X x) { in magOf() 73 return BigInteger::Blk(x < 0 ? UX(-x) : x); in magOf() 76 BigInteger::Sign signOf(X x) { in signOf() 77 return (x == 0) ? BigInteger::zero in signOf() [all …]
|
D | BigIntegerUtils.hh | 20 std::string bigIntegerToString(const BigInteger &x); 22 BigInteger stringToBigInteger(const std::string &s); 26 BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign); 33 std::ostream &operator <<(std::ostream &os, const BigInteger &x); 51 BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign) { in dataToBigInteger() 54 unsigned int piecesPerBlock = sizeof(BigInteger::Blk) / sizeof(T); in dataToBigInteger() 58 BigInteger::Blk *blocks = new BigInteger::Blk[numBlocks]; in dataToBigInteger() 60 BigInteger::Index blockNum, pieceNum, pieceNumHere; in dataToBigInteger() 64 BigInteger::Blk curBlock = 0; in dataToBigInteger() 67 curBlock |= (BigInteger::Blk(data[pieceNum]) << (pieceSizeInBits * pieceNumHere)); in dataToBigInteger() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/x9/ |
D | X962NamedCurves.java | 3 import java.math.BigInteger; 22 BigInteger n = new BigInteger("ffffffffffffffffffffffff99def836146bc9b1b4d22831", 16); 23 BigInteger h = BigInteger.valueOf(1); 26 new BigInteger("6277101735386680763835789423207666416083908700390324961279"), 27 new BigInteger("fffffffffffffffffffffffffffffffefffffffffffffffc", 16), 28 new BigInteger("64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1", 16), 44 BigInteger n = new BigInteger("fffffffffffffffffffffffe5fb1a724dc80418648d8dd31", 16); 45 BigInteger h = BigInteger.valueOf(1); 48 new BigInteger("6277101735386680763835789423207666416083908700390324961279"), 49 new BigInteger("fffffffffffffffffffffffffffffffefffffffffffffffc", 16), [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/sec/ |
D | SECNamedCurves.java | 3 import java.math.BigInteger; 30 private static BigInteger fromHex( in fromHex() 33 return new BigInteger(1, Hex.decode(hex)); in fromHex() 44 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B"); 45 BigInteger a = fromHex("DB7C2ABF62E35E668076BEAD2088"); 46 BigInteger b = fromHex("659EF8BA043916EEDE8911702B22"); 48 BigInteger n = fromHex("DB7C2ABF62E35E7628DFAC6561C5"); 49 BigInteger h = BigInteger.valueOf(1); 70 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B"); 71 BigInteger a = fromHex("6127C24C05F38A0AAAF65C0EF02C"); [all …]
|
/external/wycheproof/java/com/google/security/wycheproof/ |
D | EcUtil.java | 19 import java.math.BigInteger; 74 final BigInteger p = new BigInteger(decimalP); in getNistCurveSpec() 75 final BigInteger n = new BigInteger(decimalN); in getNistCurveSpec() 76 final BigInteger three = new BigInteger("3"); in getNistCurveSpec() 77 final BigInteger a = p.subtract(three); in getNistCurveSpec() 78 final BigInteger b = new BigInteger(hexB, 16); in getNistCurveSpec() 79 final BigInteger gx = new BigInteger(hexGX, 16); in getNistCurveSpec() 80 final BigInteger gy = new BigInteger(hexGY, 16); in getNistCurveSpec() 138 BigInteger p = in getBrainpoolP256r1Params() 139 new BigInteger("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", 16); in getBrainpoolP256r1Params() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/endo/ |
D | GLVTypeBParameters.java | 3 import java.math.BigInteger; 7 private static void checkVector(BigInteger[] v, String name) in checkVector() 15 protected final BigInteger beta; 16 protected final BigInteger lambda; 17 protected final BigInteger v1A, v1B, v2A, v2B; 18 protected final BigInteger g1, g2; 21 …public GLVTypeBParameters(BigInteger beta, BigInteger lambda, BigInteger[] v1, BigInteger[] v2, Bi… in GLVTypeBParameters() 22 BigInteger g2, int bits) in GLVTypeBParameters() 38 public BigInteger getBeta() in getBeta() 43 public BigInteger getLambda() in getLambda() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/ |
D | RSAPrivateCrtKeyParameters.java | 3 import java.math.BigInteger; 8 private BigInteger e; 9 private BigInteger p; 10 private BigInteger q; 11 private BigInteger dP; 12 private BigInteger dQ; 13 private BigInteger qInv; 19 BigInteger modulus, in RSAPrivateCrtKeyParameters() 20 BigInteger publicExponent, in RSAPrivateCrtKeyParameters() 21 BigInteger privateExponent, in RSAPrivateCrtKeyParameters() [all …]
|
D | DHParameters.java | 3 import java.math.BigInteger; 13 private BigInteger g; 14 private BigInteger p; 15 private BigInteger q; 16 private BigInteger j; 33 BigInteger p, in DHParameters() 34 BigInteger g) in DHParameters() 40 BigInteger p, in DHParameters() 41 BigInteger g, in DHParameters() 42 BigInteger q) in DHParameters() [all …]
|
/external/crcalc/src/com/hp/creals/ |
D | CR.java | 108 import java.math.BigInteger; 196 static final BigInteger big0 = BigInteger.ZERO; 197 static final BigInteger big1 = BigInteger.ONE; 198 static final BigInteger bigm1 = BigInteger.valueOf(-1); 199 static final BigInteger big2 = BigInteger.valueOf(2); 200 static final BigInteger big3 = BigInteger.valueOf(3); 201 static final BigInteger big6 = BigInteger.valueOf(6); 202 static final BigInteger big8 = BigInteger.valueOf(8); 203 static final BigInteger big10 = BigInteger.TEN; 204 static final BigInteger big750 = BigInteger.valueOf(750); [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ |
D | Primes.java | 3 import java.math.BigInteger; 17 private static final BigInteger ONE = BigInteger.valueOf(1); 18 private static final BigInteger TWO = BigInteger.valueOf(2); 19 private static final BigInteger THREE = BigInteger.valueOf(3); 33 private static MROutput provablyCompositeWithFactor(BigInteger factor) in provablyCompositeWithFactor() 44 private BigInteger factor; 46 private MROutput(boolean provablyComposite, BigInteger factor) in MROutput() 52 public BigInteger getFactor() in getFactor() 75 private BigInteger prime; 79 private STOutput(BigInteger prime, byte[] primeSeed, int primeGenCounter) in STOutput() [all …]
|
/external/guava/guava/src/com/google/common/math/ |
D | BigIntegerMath.java | 33 import java.math.BigInteger; 55 public static boolean isPowerOfTwo(BigInteger x) { in isPowerOfTwo() 69 public static int log2(BigInteger x, RoundingMode mode) { in log2() 87 BigInteger halfPower = SQRT2_PRECOMPUTED_BITS.shiftRight( in log2() 101 BigInteger x2 = x.pow(2); in log2() 117 @VisibleForTesting static final BigInteger SQRT2_PRECOMPUTED_BITS = 118 new BigInteger("16a09e667f3bcc908b2fb1366ea957d3e3adec17512775099da2f590b0667322a", 16); 129 public static int log10(BigInteger x, RoundingMode mode) { in log10() 136 BigInteger approxPow = BigInteger.TEN.pow(approxLog10); in log10() 152 approxPow = approxPow.divide(BigInteger.TEN); in log10() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/ |
D | RSAPrivateKey.java | 3 import java.math.BigInteger; 17 private BigInteger version; 18 private BigInteger modulus; 19 private BigInteger publicExponent; 20 private BigInteger privateExponent; 21 private BigInteger prime1; 22 private BigInteger prime2; 23 private BigInteger exponent1; 24 private BigInteger exponent2; 25 private BigInteger coefficient; [all …]
|
D | RSAPrivateKeyStructure.java | 3 import java.math.BigInteger; 21 private BigInteger modulus; 22 private BigInteger publicExponent; 23 private BigInteger privateExponent; 24 private BigInteger prime1; 25 private BigInteger prime2; 26 private BigInteger exponent1; 27 private BigInteger exponent2; 28 private BigInteger coefficient; 54 BigInteger modulus, in RSAPrivateKeyStructure() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
D | BigFraction.java | 21 import java.math.BigInteger; 86 private static final BigInteger ONE_HUNDRED_DOUBLE = BigInteger.valueOf(100); 89 private final BigInteger numerator; 92 private final BigInteger denominator; 103 public BigFraction(final BigInteger num) { in BigFraction() 104 this(num, BigInteger.ONE); in BigFraction() 115 public BigFraction(BigInteger num, BigInteger den) { in BigFraction() 122 if (BigInteger.ZERO.equals(den)) { in BigFraction() 125 if (BigInteger.ZERO.equals(num)) { in BigFraction() 126 numerator = BigInteger.ZERO; in BigFraction() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/ |
D | Tnaf.java | 3 import java.math.BigInteger; 14 private static final BigInteger MINUS_ONE = ECConstants.ONE.negate(); 15 private static final BigInteger MINUS_TWO = ECConstants.TWO.negate(); 16 private static final BigInteger MINUS_THREE = ECConstants.THREE.negate(); 82 public static BigInteger norm(final byte mu, ZTauElement lambda) in norm() 84 BigInteger norm; in norm() 87 BigInteger s1 = lambda.u.multiply(lambda.u); in norm() 90 BigInteger s2 = lambda.u.multiply(lambda.v); in norm() 93 BigInteger s3 = lambda.v.multiply(lambda.v).shiftLeft(1); in norm() 181 BigInteger f0 = lambda0.round(); in round() [all …]
|
D | ECFieldElement.java | 3 import java.math.BigInteger; 14 public abstract BigInteger toBigInteger(); in toBigInteger() 89 BigInteger q, r, x; 91 static BigInteger calculateResidue(BigInteger p) in calculateResidue() 96 BigInteger firstWord = p.shiftRight(bitLength - 64); in calculateResidue() 108 public Fp(BigInteger q, BigInteger x) in Fp() 113 Fp(BigInteger q, BigInteger r, BigInteger x) in Fp() 125 public BigInteger toBigInteger() in toBigInteger() 145 public BigInteger getQ() in getQ() 157 BigInteger x2 = x.add(ECConstants.ONE); in addOne() [all …]
|
D | ECConstants.java | 3 import java.math.BigInteger; 7 public static final BigInteger ZERO = BigInteger.valueOf(0); 8 public static final BigInteger ONE = BigInteger.valueOf(1); 9 public static final BigInteger TWO = BigInteger.valueOf(2); 10 public static final BigInteger THREE = BigInteger.valueOf(3); 11 public static final BigInteger FOUR = BigInteger.valueOf(4); 12 public static final BigInteger EIGHT = BigInteger.valueOf(8);
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/signers/ |
D | DSASigner.java | 3 import java.math.BigInteger; 79 public BigInteger[] generateSignature( in generateSignature() 83 BigInteger q = params.getQ(); in generateSignature() 84 BigInteger m = calculateE(q, message); in generateSignature() 85 BigInteger x = ((DSAPrivateKeyParameters)key).getX(); in generateSignature() 96 BigInteger k = kCalculator.nextK(); in generateSignature() 99 BigInteger r = params.getG().modPow(k.add(getRandomizer(q, random)), params.getP()).mod(q); in generateSignature() 103 BigInteger s = k.mod(q); in generateSignature() 105 return new BigInteger[]{ r, s }; in generateSignature() 115 BigInteger r, in verifySignature() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/ |
D | DSAParametersGenerator.java | 3 import java.math.BigInteger; 23 private static final BigInteger ZERO = BigInteger.valueOf(0); 24 private static final BigInteger ONE = BigInteger.valueOf(1); 25 private static final BigInteger TWO = BigInteger.valueOf(2); 158 BigInteger q = new BigInteger(1, u); in generateParameters_FIPS186_2() 185 BigInteger x = new BigInteger(1, w); in generateParameters_FIPS186_2() 187 BigInteger c = x.mod(q.shiftLeft(1)); in generateParameters_FIPS186_2() 189 BigInteger p = x.subtract(c.subtract(ONE)); in generateParameters_FIPS186_2() 198 BigInteger g = calculateGenerator_FIPS186_2(p, q, random); in generateParameters_FIPS186_2() 206 … private static BigInteger calculateGenerator_FIPS186_2(BigInteger p, BigInteger q, SecureRandom r) in calculateGenerator_FIPS186_2() [all …]
|
/external/conscrypt/common/src/main/java/org/conscrypt/ |
D | OpenSSLRSAPrivateCrtKey.java | 22 import java.math.BigInteger; 36 private BigInteger publicExponent; 38 private BigInteger primeP; 40 private BigInteger primeQ; 42 private BigInteger primeExponentP; 44 private BigInteger primeExponentQ; 46 private BigInteger crtCoefficient; 61 BigInteger modulus = rsaKeySpec.getModulus(); in init() 62 BigInteger privateExponent = rsaKeySpec.getPrivateExponent(); in init() 77 final BigInteger publicExponent = rsaKeySpec.getPublicExponent(); in init() [all …]
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | BigIntegerMathTest.java | 24 import static java.math.BigInteger.ONE; 25 import static java.math.BigInteger.TEN; 26 import static java.math.BigInteger.ZERO; 44 import java.math.BigInteger; 57 BigInteger.ZERO.setBit(2 * BigIntegerMath.SQRT2_PRECOMPUTE_THRESHOLD + 1), FLOOR), in testConstantSqrt2PrecomputedBits() 62 for (BigInteger x : ALL_BIGINTEGER_CANDIDATES) { in testIsPowerOfTwo() 81 BigIntegerMath.log2(BigInteger.valueOf(-1), mode); in testLog2NegativeAlwaysThrows() 88 for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { in testLog2Floor() 98 for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { in testLog2Ceiling() 109 for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { in testLog2Exact() [all …]
|