Home
last modified time | relevance | path

Searched refs:BigInteger (Results 1 – 25 of 207) sorted by relevance

123456789

/libcore/luni/src/test/java/tests/security/spec/
DRSAMultiPrimePrivateCrtKeySpecTest.java27 import java.math.BigInteger;
42 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
43 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
44 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE)
66 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
67 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
68 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
69 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
70 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
71 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
[all …]
DRSAPrivateCrtKeySpecTest.java27 import java.math.BigInteger;
45 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
46 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
47 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
48 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
49 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
50 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
51 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
52 BigInteger.ONE); in testRSAPrivateCrtKeySpec01()
63 BigInteger.ONE, in testRSAPrivateCrtKeySpec02()
[all …]
DEllipticCurveTest.java22 import java.math.BigInteger;
44 ECFieldFp f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
45 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
46 BigInteger b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
53 a = BigInteger.ZERO; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
54 b = BigInteger.valueOf(23L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
60 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
61 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
62 b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
79 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
[all …]
DDSAPrivateKeySpecTest.java27 import java.math.BigInteger;
42 new BigInteger("1"), in testDSAPrivateKeySpec()
43 new BigInteger("2"), in testDSAPrivateKeySpec()
44 new BigInteger("3"), in testDSAPrivateKeySpec()
45 new BigInteger("4")); in testDSAPrivateKeySpec()
55 new BigInteger("1"), in testGetG()
56 new BigInteger("2"), in testGetG()
57 new BigInteger("3"), in testGetG()
58 new BigInteger("4")); in testGetG()
68 new BigInteger("1"), in testGetP()
[all …]
DDSAPublicKeySpecTest.java27 import java.math.BigInteger;
42 new BigInteger("1"), // y in testDSAPublicKeySpec()
43 new BigInteger("2"), // p in testDSAPublicKeySpec()
44 new BigInteger("3"), // q in testDSAPublicKeySpec()
45 new BigInteger("4"));// g in testDSAPublicKeySpec()
55 new BigInteger("1"), // y in testGetG()
56 new BigInteger("2"), // p in testGetG()
57 new BigInteger("3"), // q in testGetG()
58 new BigInteger("4"));// g in testGetG()
68 new BigInteger("1"), // y in testGetP()
[all …]
DECPointTest.java27 import java.math.BigInteger;
47 new ECPoint(BigInteger.ZERO, BigInteger.ZERO); in testECPoint01()
48 new ECPoint(BigInteger.valueOf(-23456L), BigInteger.valueOf(-23456L)); in testECPoint01()
49 new ECPoint(BigInteger.valueOf(123456L), BigInteger.valueOf(123456L)); in testECPoint01()
50 new ECPoint(BigInteger.valueOf(-56L), BigInteger.valueOf(234L)); in testECPoint01()
51 new ECPoint(BigInteger.valueOf(3456L), BigInteger.valueOf(-2344L)); in testECPoint01()
64 new ECPoint(null, BigInteger.ZERO); in testECPoint02()
72 new ECPoint(BigInteger.ZERO, null); in testECPoint02()
96 BigInteger x = BigInteger.valueOf(-23456L); in testGetAffineX01()
97 ECPoint p = new ECPoint(x, BigInteger.valueOf(23456L)); in testGetAffineX01()
[all …]
DRSAOtherPrimeInfoTest.java27 import java.math.BigInteger;
43 new RSAOtherPrimeInfo(BigInteger.valueOf(1L), in testRSAOtherPrimeInfo01()
44 BigInteger.valueOf(2L), in testRSAOtherPrimeInfo01()
45 BigInteger.valueOf(3L)); in testRSAOtherPrimeInfo01()
56 BigInteger.valueOf(2L), in testRSAOtherPrimeInfo02()
57 BigInteger.valueOf(3L)); in testRSAOtherPrimeInfo02()
69 new RSAOtherPrimeInfo(BigInteger.valueOf(1L), in testRSAOtherPrimeInfo03()
71 BigInteger.valueOf(3L)); in testRSAOtherPrimeInfo03()
83 new RSAOtherPrimeInfo(BigInteger.valueOf(1L), in testRSAOtherPrimeInfo04()
84 BigInteger.valueOf(2L), in testRSAOtherPrimeInfo04()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerXorTest.java24 import java.math.BigInteger;
38 BigInteger aNumber = new BigInteger(numA); in testZeroPos()
39 BigInteger bNumber = new BigInteger(numB); in testZeroPos()
40 BigInteger result = aNumber.xor(bNumber); in testZeroPos()
51 BigInteger aNumber = new BigInteger(numA); in testZeroNeg()
52 BigInteger bNumber = new BigInteger(numB); in testZeroNeg()
53 BigInteger result = aNumber.xor(bNumber); in testZeroNeg()
64 BigInteger aNumber = new BigInteger(numA); in testPosZero()
65 BigInteger bNumber = new BigInteger(numB); in testPosZero()
66 BigInteger result = aNumber.xor(bNumber); in testPosZero()
[all …]
DOldBigIntegerTest.java20 import java.math.BigInteger;
25 BigInteger minusOne = new BigInteger("-1", 10);
27 BigInteger two = new BigInteger("2", 10);
29 BigInteger aZillion = new BigInteger("100000000000000000000000000000000000000000000000000", 10);
33 BigInteger bi;
35 BigInteger bi2;
37 BigInteger bi3;
45 new BigInteger(128, (Random) null); in test_ConstructorILjava_util_Random()
50 bi = new BigInteger(70, rand); in test_ConstructorILjava_util_Random()
51 bi2 = new BigInteger(70, rand); in test_ConstructorILjava_util_Random()
[all …]
DBigIntegerModPowTest.java24 import java.math.BigInteger;
41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowException()
42 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowException()
43 BigInteger modulus = new BigInteger(mSign, mBytes); in testModPowException()
51 BigInteger.ZERO.modPow(new BigInteger("-1"), new BigInteger("10")); in testModPowException()
69 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowPosExp()
70 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowPosExp()
71 BigInteger modulus = new BigInteger(mSign, mBytes); in testModPowPosExp()
72 BigInteger result = aNumber.modPow(exp, modulus); in testModPowPosExp()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowNegExp()
[all …]
DBigIntegerCompareTest.java24 import java.math.BigInteger;
38 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsPositive()
39 BigInteger result = aNumber.abs(); in testAbsPositive()
55 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsNegative()
56 BigInteger result = aNumber.abs(); in testAbsNegative()
75 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos1()
76 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCompareToPosPos1()
90 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos2()
91 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCompareToPosPos2()
104 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToEqualPos()
[all …]
DBigIntegerDivideTest.java24 import java.math.BigInteger;
39 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
40 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
54 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
55 BigInteger bNumber = BigInteger.ZERO; in testCase2()
72 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
73 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
74 BigInteger result = aNumber.divide(bNumber); in testCase3()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase4()
93 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase4()
[all …]
DBigIntegerAddTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
42 BigInteger result = aNumber.add(bNumber); in testCase1()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
62 BigInteger result = aNumber.add(bNumber); in testCase2()
82 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
83 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
84 BigInteger result = aNumber.add(bNumber); in testCase3()
[all …]
DBigIntegerAndTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroPos()
42 BigInteger result = aNumber.and(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroNeg()
62 BigInteger result = aNumber.and(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero()
81 BigInteger bNumber = new BigInteger(bSign, bBytes); in testPosZero()
82 BigInteger result = aNumber.and(bNumber); in testPosZero()
[all …]
DBigIntegerSubtractTest.java24 import java.math.BigInteger;
41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
42 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
43 BigInteger result = aNumber.subtract(bNumber); in testCase1()
62 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
63 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
64 BigInteger result = aNumber.subtract(bNumber); in testCase2()
84 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
85 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
86 BigInteger result = aNumber.subtract(bNumber); in testCase3()
[all …]
DBigIntegerOrTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroPos()
42 BigInteger result = aNumber.or(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroNeg()
62 BigInteger result = aNumber.or(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero()
81 BigInteger bNumber = new BigInteger(bSign, bBytes); in testPosZero()
82 BigInteger result = aNumber.or(bNumber); in testPosZero()
[all …]
DBigIntegerOperateBitsTest.java24 import java.math.BigInteger;
36 BigInteger aNumber = new BigInteger("0"); in testBitCountZero()
44BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875"); in testBitCountNeg()
52BigInteger aNumber = new BigInteger("1237863475634356475758293787348763874628376723865787236874872… in testBitCountPos()
60 BigInteger aNumber = new BigInteger("0"); in testBitLengthZero()
70 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive1()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive2()
90 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive3()
100 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthNegative1()
110 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthNegative2()
[all …]
DBigIntegerTest.java20 import java.math.BigInteger;
25 BigInteger minusTwo = new BigInteger("-2", 10);
27 BigInteger minusOne = new BigInteger("-1", 10);
29 BigInteger zero = new BigInteger("0", 10);
31 BigInteger one = new BigInteger("1", 10);
33 BigInteger two = new BigInteger("2", 10);
35 BigInteger ten = new BigInteger("10", 10);
37 BigInteger sixteen = new BigInteger("16", 10);
39 BigInteger oneThousand = new BigInteger("1000", 10);
41 BigInteger aZillion = new BigInteger(
[all …]
DBigIntegerMultiplyTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
42 BigInteger result = aNumber.multiply(bNumber); in testCase1()
61 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
62 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
63 BigInteger result = aNumber.multiply(bNumber); in testCase2()
83 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
84 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
85 BigInteger result = aNumber.multiply(bNumber); in testCase3()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java19 import java.math.BigInteger;
25 BigInteger firstBig = new BigInteger("30003543667898318853"); in test_hashCode()
26 BigInteger secondBig = new BigInteger("3298535022597"); in test_hashCode()
27 BigInteger andedBigs = firstBig.and(secondBig); in test_hashCode()
28 BigInteger toCompareBig = BigInteger.valueOf(andedBigs.longValue()); in test_hashCode()
38 assertEquals(i, BigInteger.valueOf(i).intValue()); in test_valueOf()
45 new BigInteger("1", 10); in test_invalidBigIntegerStringConversions()
46 new BigInteger("1a", 16); in test_invalidBigIntegerStringConversions()
47 new BigInteger("-1", 10); in test_invalidBigIntegerStringConversions()
48 new BigInteger("-1a", 16); in test_invalidBigIntegerStringConversions()
[all …]
/libcore/ojluni/src/main/java/java/security/spec/
DRSAPrivateCrtKeySpec.java28 import java.math.BigInteger;
48 private final BigInteger publicExponent;
49 private final BigInteger primeP;
50 private final BigInteger primeQ;
51 private final BigInteger primeExponentP;
52 private final BigInteger primeExponentQ;
53 private final BigInteger crtCoefficient;
73 public RSAPrivateCrtKeySpec(BigInteger modulus, in RSAPrivateCrtKeySpec()
74 BigInteger publicExponent, in RSAPrivateCrtKeySpec()
75 BigInteger privateExponent, in RSAPrivateCrtKeySpec()
[all …]
DRSAMultiPrimePrivateCrtKeySpec.java28 import java.math.BigInteger;
51 private final BigInteger publicExponent;
52 private final BigInteger primeP;
53 private final BigInteger primeQ;
54 private final BigInteger primeExponentP;
55 private final BigInteger primeExponentQ;
56 private final BigInteger crtCoefficient;
89 public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, in RSAMultiPrimePrivateCrtKeySpec()
90 BigInteger publicExponent, in RSAMultiPrimePrivateCrtKeySpec()
91 BigInteger privateExponent, in RSAMultiPrimePrivateCrtKeySpec()
[all …]
/libcore/luni/src/test/java/tests/security/interfaces/
DUtil.java17 import java.math.BigInteger;
33 static final BigInteger P = new BigInteger(
44 static final BigInteger Q = new BigInteger(
50 static final BigInteger G = new BigInteger(
61 static final BigInteger RND_RET = new BigInteger("10");
67 BigInteger.valueOf(3233), BigInteger.valueOf(17),
68 BigInteger.valueOf(2753), BigInteger.valueOf(61),
69 BigInteger.valueOf(53), BigInteger.valueOf(53),
70 BigInteger.valueOf(49), BigInteger.valueOf(52));
77 new ECFieldFp(BigInteger.valueOf(23)),
[all …]
DRSAMultiPrimePrivateCrtKeyTest.java21 import java.math.BigInteger;
33 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
34 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
35 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE)
38 private final BigInteger publicExponent = BigInteger.ONE;
39 private final BigInteger primeExponentP = BigInteger.ONE;
40 private final BigInteger primeExponentQ = BigInteger.ONE;
41 private final BigInteger primeP = BigInteger.ONE;
42 private final BigInteger primeQ = BigInteger.ONE;
43 private final BigInteger crtCoefficient = BigInteger.ONE;
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/interfaces/
DRSAMultiPrimePrivateCrtKeyImpl.java21 import java.math.BigInteger;
31 private BigInteger crtCoefficient = null;
32 private BigInteger publicExponent = null;
33 private BigInteger primeExponentP = null;
34 private BigInteger primeExponentQ = null;
35 private BigInteger primeP = null;
36 private BigInteger primeQ = null;
39 public RSAMultiPrimePrivateCrtKeyImpl(BigInteger publicExp, in RSAMultiPrimePrivateCrtKeyImpl()
40 BigInteger primeExpP, in RSAMultiPrimePrivateCrtKeyImpl()
41 BigInteger primeExpQ, in RSAMultiPrimePrivateCrtKeyImpl()
[all …]

123456789