Home
last modified time | relevance | path

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

12345678910>>...193

/aosp_15_r20/libcore/luni/src/test/java/tests/security/spec/
H A DRSAMultiPrimePrivateCrtKeySpecTest.java27 import java.math.BigInteger;
44 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
45 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
46 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE)
53 * <code>RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
54 * BigInteger publicExponent,
55 * BigInteger privateExponent,
56 * BigInteger primeP,
57 * BigInteger primeQ,
58 * BigInteger primeExponentP,
[all …]
H A DEllipticCurveTest.java22 import java.math.BigInteger;
36 * Test #1 for <code>EllipticCurve(ECField, BigInteger, BigInteger, byte[])</code>
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()
[all …]
H A DRSAPrivateCrtKeySpecTest.java27 import java.math.BigInteger;
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()
53 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
54 BigInteger.ONE); in testRSAPrivateCrtKeySpec01()
65 BigInteger.ONE, in testRSAPrivateCrtKeySpec02()
[all …]
/aosp_15_r20/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/sec/
H A DSECNamedCurves.java3 import java.math.BigInteger;
39 private static BigInteger fromHex(String hex) in fromHex()
41 return new BigInteger(1, Hex.decodeStrict(hex)); in fromHex()
52 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
53 BigInteger a = fromHex("DB7C2ABF62E35E668076BEAD2088");
54 BigInteger b = fromHex("659EF8BA043916EEDE8911702B22");
56 BigInteger n = fromHex("DB7C2ABF62E35E7628DFAC6561C5");
57 BigInteger h = BigInteger.valueOf(1);
76 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
77 BigInteger a = fromHex("6127C24C05F38A0AAAF65C0EF02C");
[all …]
/aosp_15_r20/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/asn1/sec/
H A DSECNamedCurves.java4 import java.math.BigInteger;
43 private static BigInteger fromHex(String hex) in fromHex()
45 return new BigInteger(1, Hex.decodeStrict(hex)); in fromHex()
56 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
57 BigInteger a = fromHex("DB7C2ABF62E35E668076BEAD2088");
58 BigInteger b = fromHex("659EF8BA043916EEDE8911702B22");
60 BigInteger n = fromHex("DB7C2ABF62E35E7628DFAC6561C5");
61 BigInteger h = BigInteger.valueOf(1);
80 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
81 BigInteger a = fromHex("6127C24C05F38A0AAAF65C0EF02C");
[all …]
/aosp_15_r20/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/sec/
H A DSECNamedCurves.java4 import java.math.BigInteger;
43 private static BigInteger fromHex(String hex) in fromHex()
45 return new BigInteger(1, Hex.decodeStrict(hex)); in fromHex()
56 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
57 BigInteger a = fromHex("DB7C2ABF62E35E668076BEAD2088");
58 BigInteger b = fromHex("659EF8BA043916EEDE8911702B22");
60 BigInteger n = fromHex("DB7C2ABF62E35E7628DFAC6561C5");
61 BigInteger h = BigInteger.valueOf(1);
80 BigInteger p = fromHex("DB7C2ABF62E35E668076BEAD208B");
81 BigInteger a = fromHex("6127C24C05F38A0AAAF65C0EF02C");
[all …]
/aosp_15_r20/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
H A 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 …]
H A DBigIntegerCompareTest.java24 import java.math.BigInteger;
27 * Class: 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()
66 * compareTo(BigInteger a).
75 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos1()
76 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCompareToPosPos1()
81 * compareTo(BigInteger a).
[all …]
H A DBigIntegerXorTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A 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;
40 * java.math.BigInteger#BigInteger(int, java.util.Random)
45 new BigInteger(128, (Random) null); in test_ConstructorILjava_util_Random()
50 bi = new BigInteger(70, rand); in test_ConstructorILjava_util_Random()
[all …]
H A DBigIntegerDivideTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerOperateBitsTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerSubtractTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerModPowTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerAddTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerAndTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
H A DBigIntegerOrTest.java24 import java.math.BigInteger;
27 * Class: 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()
[all …]
/aosp_15_r20/libcore/ojluni/src/test/java/math/BigInteger/
H A DBigIntegerTest.java30 * @summary tests methods in BigInteger (use -Dseed=X to set PRNG seed)
35 package test.java.math.BigInteger;
44 import java.math.BigInteger;
58 * generated by BigInteger adhere to certain identities. Passing
59 * this test is a strong assurance that the BigInteger operations
75 // defined in BigInteger itself:
132 BigInteger bi = new BigInteger(array, ol[0], ol[1]); in constructor()
150 BigInteger bi = new BigInteger(1, array, ol[0], ol[1]); in constructor()
169 BigInteger bi = new BigInteger(signum, magZeroLength); in constructor()
170 Assert.assertEquals(bi.compareTo(BigInteger.ZERO), 0, in constructor()
[all …]
/aosp_15_r20/external/pdfium/third_party/bigint/
H A 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 BigInteger& 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 …]
/aosp_15_r20/external/wycheproof/java/com/google/security/wycheproof/testcases/
H A DEcdhTest.java21 import java.math.BigInteger;
98 final BigInteger s; // private key
101 public EcdhTestVector(String curvename, String pub, BigInteger s, String shared) { in EcdhTestVector()
128 new BigInteger("8af784fe9cebd363df85f598dcc2ab82b2ca725360dadb77b3708032", 16),
135 new BigInteger("051a995be2a8499e2c9331b3b5f3c012048bb02a1a6f044ed93d9bd295fcec16", 16),
143 new BigInteger("ff65a2bf5e1347e2286fb29273fb118a76996038bea2fcfd2032e8663f7588e5"
154 new BigInteger("01f362c182f1eaae2920578a2f30c228e28b996e74d4bd799621300d5f2e6c69"
172 new BigInteger("143be522a9d0420f6bd19b95ce3a5e19c61970c31f13448276546625e607e7c9", 16),
180 new BigInteger("56556c546751dee664ae71baa0189a2e69b1e1f8939a49ed7cc35d7ea98fbcc7", 16),
188 new BigInteger("ee383acde7e5b3e6c246833e183c4272a1714a13097b4b57bc2eeecdccbd69b6"
[all …]
H A DBigIntegerTest.java19 import java.math.BigInteger;
23 * Test BigInteger class.
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"),
[all …]
/aosp_15_r20/external/wycheproof/keystore-cts/java/com/google/security/wycheproof/testcases/
H A DEcdhTest.java20 import java.math.BigInteger;
147 final BigInteger p; // characteristic of the field
148 final BigInteger n; // order of the subgroup
149 final BigInteger a; // parameter a of the Weierstrass representation
150 final BigInteger b; // parameter b of the Weierstrass represnetation
151 final BigInteger gx; // x-coordinate of the generator
152 final BigInteger gy; // y-coordainat of the generator
154 final BigInteger pubx; // x-coordinate of the public point
155 final BigInteger puby; // y-coordinate of the public point
160 BigInteger p, in EcPublicKeyTestVector()
[all …]
/aosp_15_r20/libcore/luni/src/test/java/libcore/java/math/
H A 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()
33 // http://b/2981072 - off-by-one error in BigInteger.valueOf
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()
[all …]
/aosp_15_r20/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/util/
H A DRational.java17 import java.math.BigInteger;
38 public final BigInteger numerator;
39 public final BigInteger denominator;
41 static final BigInteger BI_TWO = BigInteger.valueOf(2);
42 static final BigInteger BI_FIVE = BigInteger.valueOf(5);
43 static final BigInteger BI_MINUS_ONE = BigInteger.valueOf(-1);
44 static final BigInteger BI_TEN = BigInteger.valueOf(10);
58 public static final Rational ZERO = new Rational(BigInteger.ZERO, BigInteger.ONE);
59 public static final Rational ONE = new Rational(BigInteger.ONE, BigInteger.ONE);
60 public static final Rational NaN = new Rational(BigInteger.ZERO, BigInteger.ZERO);
[all …]
/aosp_15_r20/external/tink/java_src/src/main/java/com/google/crypto/tink/internal/
H A DEllipticCurvesUtil.java20 import java.math.BigInteger;
92 BigInteger p = getModulus(ec); in checkPointOnCurve()
93 BigInteger x = point.getAffineX(); in checkPointOnCurve()
94 BigInteger y = point.getAffineY(); in checkPointOnCurve()
106 BigInteger lhs = y.multiply(y).mod(p); in checkPointOnCurve()
107 BigInteger rhs = x.multiply(x).add(ec.getA()).multiply(x).add(ec.getB()).mod(p); in checkPointOnCurve()
134 public static BigInteger getModulus(EllipticCurve curve) throws GeneralSecurityException { in getModulus()
145 final BigInteger p = new BigInteger(decimalP); in getNistCurveSpec()
146 final BigInteger n = new BigInteger(decimalN); in getNistCurveSpec()
147 final BigInteger three = new BigInteger("3"); in getNistCurveSpec()
[all …]

12345678910>>...193