/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
DHParameterSpecTest.java | 25 import java.math.BigInteger; 44 BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO, 45 BigInteger.ONE, new BigInteger("1000000000000")}; 46 BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO, 47 BigInteger.ONE, new BigInteger("1000000000000")} [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/generators/ |
DSAKeyPairGenerator.java | 12 import java.math.BigInteger; 24 private static final BigInteger ONE = BigInteger.valueOf(1); 38 BigInteger x = generatePrivateKey(dsaParams.getQ(), param.getRandom()); 39 BigInteger y = calculatePublicKey(dsaParams.getP(), dsaParams.getG(), x); 46 private static BigInteger generatePrivateKey(BigInteger q, SecureRandom random) 50 // BigInteger c = new BigInteger(q.bitLength() + 64, random); 57 private static BigInteger calculatePublicKey(BigInteger p, BigInteger g, BigInteger x [all...] |
DHParametersGenerator.java | 5 import java.math.BigInteger; 14 private static final BigInteger TWO = BigInteger.valueOf(2); 44 BigInteger[] safePrimes = DHParametersHelper.generateSafePrimes(size, certainty, random); 46 BigInteger p = safePrimes[0]; 47 BigInteger q = safePrimes[1]; 48 BigInteger g = DHParametersHelper.selectGenerator(p, q, random);
|
/external/bouncycastle/src/main/java/org/bouncycastle/jce/spec/ |
ECParameterSpec.java | 6 import java.math.BigInteger; 18 private BigInteger n; 19 private BigInteger h; 24 BigInteger n) 29 this.h = BigInteger.valueOf(1); 36 BigInteger n, 37 BigInteger h) 49 BigInteger n, 50 BigInteger h, 82 public BigInteger getN( [all...] |
ECNamedCurveParameterSpec.java | 3 import java.math.BigInteger; 23 BigInteger n) 34 BigInteger n, 35 BigInteger h) 46 BigInteger n, 47 BigInteger h,
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
DHParameterSpecTest.java | 26 import java.math.BigInteger; 44 BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO, 45 BigInteger.ONE, new BigInteger("1000000000000")}; 46 BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO, 47 BigInteger.ONE, new BigInteger("1000000000000")} [all...] |
/external/apache-harmony/math/src/test/java/org/apache/harmony/tests/java/math/ |
BigIntegerMultiplyTest.java | 24 import java.math.BigInteger; 27 * Class: java.math.BigInteger 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 41 BigInteger bNumber = new BigInteger(bSign, bBytes); 42 BigInteger result = aNumber.multiply(bNumber); 61 BigInteger aNumber = new BigInteger(aSign, aBytes); 62 BigInteger bNumber = new BigInteger(bSign, bBytes) [all...] |
BigIntegerConvertTest.java | 24 import java.math.BigInteger; 27 * Class: java.math.BigInteger 38 double aNumber = new BigInteger(a).doubleValue(); 49 double aNumber = new BigInteger(a).doubleValue(); 60 double aNumber = new BigInteger(a).doubleValue(); 71 double aNumber = new BigInteger(a).doubleValue(); 82 double aNumber = new BigInteger(a).doubleValue(); 95 double aNumber = new BigInteger(aSign, a).doubleValue(); 109 double aNumber = new BigInteger(aSign, a).doubleValue(); 120 double aNumber = new BigInteger(aSign, a).doubleValue() [all...] |
BigIntegerNotTest.java | 24 import java.math.BigInteger; 27 * Class: java.math.BigInteger 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 41 BigInteger bNumber = new BigInteger(bSign, bBytes); 42 BigInteger result = aNumber.andNot(bNumber); 60 BigInteger aNumber = new BigInteger(aSign, aBytes); 61 BigInteger bNumber = new BigInteger(bSign, bBytes) [all...] |
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/spec/ |
RSAPrivateKeySpecTest.java | 24 import java.math.BigInteger; 45 * Test for <code>RSAPrivateKeySpec(BigInteger,BigInteger)</code> ctor 50 KeySpec ks = new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 51 BigInteger.valueOf(3L)); 61 new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 62 BigInteger.valueOf(3L)); 72 new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 73 BigInteger.valueOf(3L));
|
RSAPublicKeySpecTest.java | 24 import java.math.BigInteger; 52 new RSAPublicKeySpec(BigInteger.valueOf(1234567890L), 53 BigInteger.valueOf(3L)); 76 new RSAPublicKeySpec(BigInteger.valueOf(1234567890L), 77 BigInteger.valueOf(3L)); 78 assertTrue(BigInteger.valueOf(1234567890L).equals(rpks.getModulus())); 87 new RSAPublicKeySpec(BigInteger.valueOf(3L), 88 BigInteger.valueOf(1234567890L)); 89 assertTrue(BigInteger.valueOf(1234567890L).equals(rpks.getPublicExponent()));
|
/libcore/luni/src/main/java/java/security/spec/ |
ECPoint.java | 20 import java.math.BigInteger; 32 private final BigInteger affineX; 34 private final BigInteger affineY; 50 public ECPoint(BigInteger affineX, BigInteger affineY) { 66 public BigInteger getAffineX() { 75 public BigInteger getAffineY() {
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
DSAParamsTest.java | 20 import java.math.BigInteger; 26 private final BigInteger p = new BigInteger("4"); 27 private final BigInteger q = BigInteger.TEN; 28 private final BigInteger g = BigInteger.ZERO;
|
RSAKeyTest.java | 20 import java.math.BigInteger; 37 final BigInteger n = BigInteger.valueOf(3233); 38 final BigInteger d = BigInteger.valueOf(2753); 39 final BigInteger e = BigInteger.valueOf(17);
|
/libcore/luni/src/test/java/tests/security/spec/ |
RSAPrivateKeySpecTest.java | 27 import java.math.BigInteger; 38 * Test for <code>RSAPrivateKeySpec(BigInteger,BigInteger)</code> ctor 43 KeySpec ks = new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 44 BigInteger.valueOf(3L)); 54 new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 55 BigInteger.valueOf(3L)); 65 new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), 66 BigInteger.valueOf(3L));
|
ECParameterSpecTest.java | 21 import java.math.BigInteger; 37 curve = new EllipticCurve(new ECFieldF2m(2), BigInteger.valueOf(1), 38 BigInteger.valueOf(1)); 39 ecpoint = new ECPoint(BigInteger.valueOf(1), BigInteger.valueOf(1)); 40 ecps = new ECParameterSpec(curve, ecpoint, BigInteger.valueOf(1), 1); 51 * test for ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int) constructor 67 assertEquals("wrong order was reteurned", BigInteger.valueOf(1), ecps 72 new ECParameterSpec(null, ecpoint, BigInteger.valueOf(1), 1); 80 new ECParameterSpec(curve, null, BigInteger.valueOf(1), 1) [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/asn1/pkcs/ |
RSAPrivateKeyStructure.java | 3 import java.math.BigInteger; 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; 51 BigInteger modulus [all...] |
/libcore/luni/src/main/java/java/math/ |
Multiplication.java | 21 * Static library that provides all multiplication of {@link BigInteger} methods. 54 * An array with the first powers of ten in {@code BigInteger} version. 57 static final BigInteger[] bigTenPows = new BigInteger[32]; 60 * An array with the first powers of five in {@code BigInteger} version. 63 static final BigInteger bigFivePows[] = new BigInteger[32]; 72 bigFivePows[i] = BigInteger.valueOf(fivePow); 73 bigTenPows[i] = BigInteger.valueOf(fivePow << i); 78 bigTenPows[i] = bigTenPows[i - 1].multiply(BigInteger.TEN) [all...] |
BigInteger.java | 41 public class BigInteger extends Number 42 implements Comparable<BigInteger>, Serializable { 65 /** The {@code BigInteger} constant 0. */ 66 public static final BigInteger ZERO = new BigInteger(0, 0); 68 /** The {@code BigInteger} constant 1. */ 69 public static final BigInteger ONE = new BigInteger(1, 1); 71 /** The {@code BigInteger} constant 10. */ 72 public static final BigInteger TEN = new BigInteger(1, 10) [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/params/ |
ECDomainParameters.java | 3 import java.math.BigInteger; 15 BigInteger n; 16 BigInteger h; 21 BigInteger n) 33 BigInteger n, 34 BigInteger h) 46 BigInteger n, 47 BigInteger h, 67 public BigInteger getN() 72 public BigInteger getH( [all...] |
RSAKeyGenerationParameters.java | 3 import java.math.BigInteger; 11 private BigInteger publicExponent; 15 BigInteger publicExponent, 39 public BigInteger getPublicExponent()
|
/external/bouncycastle/src/main/java/org/bouncycastle/util/ |
BigIntegers.java | 3 import java.math.BigInteger; 7 * BigInteger utilities. 12 private static final BigInteger ZERO = BigInteger.valueOf(0); 21 BigInteger value) 38 * Return a random BigInteger not less than 'min' and not greater than 'max' 43 * @return a random BigInteger value in the range [min,max] 45 public static BigInteger createRandomInRange( 46 BigInteger min, 47 BigInteger max [all...] |
/libcore/luni/src/test/java/libcore/java/math/ |
OldBigIntegerOperateBitsTest.java | 24 import java.math.BigInteger; 31 * java.math.BigInteger#getLowestSetBit() getLowestSetBit for 32 * negative BigInteger 40 BigInteger aNumber = new BigInteger(aSign, aBytes); 46 * java.math.BigInteger#getLowestSetBit() getLowestSetBit for 47 * positive BigInteger 55 BigInteger aNumber = new BigInteger(aSign, aBytes); 63 aNumber = new BigInteger(aSign, aBytes_) [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/signers/ |
ECDSASigner.java | 3 import java.math.BigInteger; 59 public BigInteger[] generateSignature( 62 BigInteger n = key.getParameters().getN(); 63 BigInteger e = calculateE(n, message); 64 BigInteger r = null; 65 BigInteger s = null; 70 BigInteger k = null; 77 k = new BigInteger(nBitLength, random); 84 BigInteger x = p.getX().toBigInteger(); 90 BigInteger d = ((ECPrivateKeyParameters)key).getD() [all...] |
DSASigner.java | 11 import java.math.BigInteger; 57 public BigInteger[] generateSignature( 61 BigInteger m = calculateE(params.getQ(), message); 62 BigInteger k; 67 k = new BigInteger(qBitLength, random); 71 BigInteger r = params.getG().modPow(k, params.getP()).mod(params.getQ()); 76 BigInteger s = k.mod(params.getQ()); 78 BigInteger[] res = new BigInteger[2]; 93 BigInteger r [all...] |