Home
last modified time | relevance | path

Searched full:biginteger (Results 1 – 25 of 505) sorted by relevance

12345678910>>...21

/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/spec/
DRSAMultiPrimePrivateCrtKeySpecTest.java24 import java.math.BigInteger;
40 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
41 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
42 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE)
58 * <code>RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
59 * BigInteger publicExponent,
60 * BigInteger privateExponent,
61 * BigInteger primeP,
62 * BigInteger primeQ,
63 * BigInteger primeExponentP,
[all …]
DRSAPrivateCrtKeySpecTest.java24 import java.math.BigInteger;
52 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
53 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
54 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
55 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
56 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
57 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
58 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
59 BigInteger.ONE); in testRSAPrivateCrtKeySpec01()
70 BigInteger.ONE, in testRSAPrivateCrtKeySpec02()
[all …]
DEllipticCurveTest.java20 import java.math.BigInteger;
35 * Test #1 for <code>EllipticCurve(ECField, BigInteger, BigInteger, byte[])</code>
43 ECFieldFp f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
44 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
45 BigInteger b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
52 a = BigInteger.ZERO; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
53 b = BigInteger.valueOf(23L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
59 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
60 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
61 b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
[all …]
DRSAOtherPrimeInfoTest.java24 import java.math.BigInteger;
44 * Test #1 for <code>RSAOtherPrimeInfo(BigInteger,BigInteger,BigInteger)</code> ctor
50 new RSAOtherPrimeInfo(BigInteger.valueOf(1L), in testRSAOtherPrimeInfo01()
51 BigInteger.valueOf(2L), in testRSAOtherPrimeInfo01()
52 BigInteger.valueOf(3L)); in testRSAOtherPrimeInfo01()
57 * Test #2 for <code>RSAOtherPrimeInfo(BigInteger,BigInteger,BigInteger)</code> ctor
63 BigInteger.valueOf(2L), in testRSAOtherPrimeInfo02()
64 BigInteger.valueOf(3L)); in testRSAOtherPrimeInfo02()
71 * Test #3 for <code>RSAOtherPrimeInfo(BigInteger,BigInteger,BigInteger)</code> ctor
76 new RSAOtherPrimeInfo(BigInteger.valueOf(1L), in testRSAOtherPrimeInfo03()
[all …]
DECPointTest.java24 import java.math.BigInteger;
48 * Test #1 for <code>ECPoint(BigInteger, BigInteger)</code> constructor<br>
54 new ECPoint(BigInteger.ZERO, BigInteger.ZERO); in testECPoint01()
55 new ECPoint(BigInteger.valueOf(-23456L), BigInteger.valueOf(-23456L)); in testECPoint01()
56 new ECPoint(BigInteger.valueOf(123456L), BigInteger.valueOf(123456L)); in testECPoint01()
57 new ECPoint(BigInteger.valueOf(-56L), BigInteger.valueOf(234L)); in testECPoint01()
58 new ECPoint(BigInteger.valueOf(3456L), BigInteger.valueOf(-2344L)); in testECPoint01()
62 * Test #2 for <code>ECPoint(BigInteger x, BigInteger y)</code> constructor<br>
71 new ECPoint(null, BigInteger.ZERO); in testECPoint02()
79 new ECPoint(BigInteger.ZERO, null); in testECPoint02()
[all …]
DDSAPrivateKeySpecTest.java24 import java.math.BigInteger;
49 new BigInteger("1"), in testDSAPrivateKeySpec()
50 new BigInteger("2"), in testDSAPrivateKeySpec()
51 new BigInteger("3"), in testDSAPrivateKeySpec()
52 new BigInteger("4")); in testDSAPrivateKeySpec()
62 new BigInteger("1"), in testGetG()
63 new BigInteger("2"), in testGetG()
64 new BigInteger("3"), in testGetG()
65 new BigInteger("4")); in testGetG()
75 new BigInteger("1"), in testGetP()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/x9/
DX962NamedCurves.java3 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/
DSECNamedCurves.java3 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/pdfium/third_party/bigint/
DBigInteger.hh12 /* A BigInteger object represents a signed integer of size limited only by
16 * A BigInteger is just an aggregate of a BigUnsigned and a sign. (It is no
19 class BigInteger { class
29 // Enumeration for the sign of a BigInteger.
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);
[all …]
DBigInteger.cc7 #include "BigInteger.hh"
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
59 * negative BigInteger instead of an exception. */
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()
[all …]
DBigIntegerUtils.hh10 #include "BigInteger.hh"
15 * - Convenient std::string <-> BigUnsigned/BigInteger conversion routines
16 * - std::ostream << operators for BigUnsigned/BigInteger */
20 std::string bigIntegerToString(const BigInteger &x);
22 BigInteger stringToBigInteger(const std::string &s);
24 // Creates a BigInteger from data such as `char's; read below for details.
26 BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign);
33 std::ostream &operator <<(std::ostream &os, const BigInteger &x);
38 * Converts binary data to a BigInteger.
51 BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign) { in dataToBigInteger()
[all …]
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/spec/
DECParameterSpec_ImplTest.java24 import java.math.BigInteger;
47 …* Test #1 for <code>ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int)</code> constructor<br>
55 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECParameterSpec01()
56 BigInteger.ZERO, in testECParameterSpec01()
57 BigInteger.valueOf(4L)); in testECParameterSpec01()
58 ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); in testECParameterSpec01()
59 new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10); in testECParameterSpec01()
63 …* Test #2 for <code>ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int)</code> constructor<br>
72 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECParameterSpec02()
73 BigInteger.ZERO, in testECParameterSpec02()
[all …]
DEllipticCurve_ImplTest.java24 import java.math.BigInteger;
45 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject02()
46 BigInteger.ONE, in testEqualsObject02()
47 BigInteger.valueOf(19L)); in testEqualsObject02()
51 c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject02()
52 BigInteger.ONE, in testEqualsObject02()
53 BigInteger.valueOf(19L)); in testEqualsObject02()
54 c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(31L)), in testEqualsObject02()
55 BigInteger.valueOf(1L), in testEqualsObject02()
56 BigInteger.valueOf(19L)); in testEqualsObject02()
[all …]
DECPrivateKeySpec_ImplTest.java24 import java.math.BigInteger;
48 * Test #1 for <code>ECPrivateKeySpec(BigInteger, ECParameterSpec)</code> constructor<br>
56 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECPrivateKeySpec01()
57 BigInteger.ZERO, in testECPrivateKeySpec01()
58 BigInteger.valueOf(4L)); in testECPrivateKeySpec01()
59 ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); in testECPrivateKeySpec01()
60 new ECPrivateKeySpec(BigInteger.ZERO, in testECPrivateKeySpec01()
61 new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); in testECPrivateKeySpec01()
66 * Test #2 for <code>ECPrivateKeySpec(BigInteger, ECParameterSpec)</code> constructor<br>
75 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECPrivateKeySpec02()
[all …]
DECPublicKeySpec_ImplTest.java24 import java.math.BigInteger;
56 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECPublicKeySpec01()
57 BigInteger.ZERO, in testECPublicKeySpec01()
58 BigInteger.valueOf(4L)); in testECPublicKeySpec01()
59 ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); in testECPublicKeySpec01()
61 new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10)); in testECPublicKeySpec01()
75 new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)), in testECPublicKeySpec02()
76 BigInteger.ZERO, in testECPublicKeySpec02()
77 BigInteger.valueOf(4L)); in testECPublicKeySpec02()
78 ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L)); in testECPublicKeySpec02()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DDHParameters.java3 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 …]
DRSAPrivateCrtKeyParameters.java3 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 …]
/external/guava/guava-tests/test/com/google/common/math/
DBigIntegerMathTest.java24 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()
107 // Relies on the correctness of isPowerOfTwo(BigInteger).
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/
DPrimes.java3 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);
23 * {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced
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;
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/endo/
DGLVTypeBParameters.java3 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/asn1/pkcs/
DRSAPrivateKey.java3 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 …]
DRSAPrivateKeyStructure.java3 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/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/
DECFieldElement.java3 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 …]
/external/guava/guava/src/com/google/common/math/
DBigIntegerMath.java33 import java.math.BigInteger;
39 * A class for arithmetic on values of type {@code 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()
[all …]
/external/conscrypt/src/main/java/org/conscrypt/
DOpenSSLRSAPrivateCrtKey.java23 import java.math.BigInteger;
33 private BigInteger publicExponent;
35 private BigInteger primeP;
37 private BigInteger primeQ;
39 private BigInteger primeExponentP;
41 private BigInteger primeExponentQ;
43 private BigInteger crtCoefficient;
58 BigInteger modulus = rsaKeySpec.getModulus(); in init()
59 BigInteger privateExponent = rsaKeySpec.getPrivateExponent(); in init()
74 final BigInteger publicExponent = rsaKeySpec.getPublicExponent(); in init()
[all …]

12345678910>>...21