HomeSort by relevance Sort by last modified time
    Searched refs:modulus (Results 1 - 25 of 86) sorted by null

1 2 3 4

  /external/bouncycastle/src/main/java/org/bouncycastle/crypto/params/
RSAKeyParameters.java 8 private BigInteger modulus; field in class:RSAKeyParameters
13 BigInteger modulus,
18 this.modulus = modulus;
24 return modulus;
RSAPrivateCrtKeyParameters.java 19 BigInteger modulus,
28 super(true, modulus, privateExponent);
  /libcore/luni/src/main/java/java/security/spec/
RSAPrivateKeySpec.java 30 // Modulus
31 private final BigInteger modulus; field in class:RSAPrivateKeySpec
36 * Creates a new {@code RSAPrivateKeySpec} with the specified modulus and
39 * @param modulus
40 * the modulus {@code n}.
44 public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent) {
45 this.modulus = modulus;
50 * Returns the modulus {@code n}.
52 * @return the modulus {@code n}
    [all...]
RSAPublicKeySpec.java 30 // Modulus
31 private final BigInteger modulus; field in class:RSAPublicKeySpec
36 * Creates a new {@code RSAPublicKeySpec} with the specified modulus and
39 * @param modulus
40 * the modulus {@code n}.
44 public RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent) {
45 this.modulus = modulus;
50 * Returns the modulus {@code n}.
52 * @return the modulus {@code n}
    [all...]
RSAPrivateCrtKeySpec.java 46 * modulus, public exponent, private exponent, prime factors, prime
49 * @param modulus
50 * the modulus {@code n}.
66 public RSAPrivateCrtKeySpec(BigInteger modulus,
75 super(modulus, privateExponent);
  /external/dropbear/libtommath/etc/
mont.c 6 mp_int modulus, R, p, pp; local
11 mp_init_multi(&modulus, &R, &p, &pp, NULL);
17 /* make up the odd modulus */
18 mp_rand(&modulus, x);
19 modulus.dp[0] |= 1;
22 mp_montgomery_calc_normalization(&R, &modulus);
23 mp_montgomery_setup(&modulus, &mp);
29 mp_montgomery_reduce(&pp, &modulus, mp);
  /external/dropbear/libtomcrypt/src/pk/ecc/
ltc_ecc_map.c 29 @param modulus The modulus of the field the ECC curve is in
33 int ltc_ecc_map(ecc_point *P, void *modulus, void *mp)
39 LTC_ARGCHK(modulus != NULL);
47 if ((err = mp_montgomery_reduce(P->z, modulus, mp)) != CRYPT_OK) { goto done; }
50 if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; }
54 if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; }
56 if ((err = mp_mod(t1, modulus, t1)) != CRYPT_OK) { goto done; }
60 if ((err = mp_montgomery_reduce(P->x, modulus, mp)) != CRYPT_OK) { goto done; }
62 if ((err = mp_montgomery_reduce(P->y, modulus, mp)) != CRYPT_OK) { goto done;
    [all...]
ltc_ecc_projective_add_point.c 31 @param modulus The modulus of the field the ECC curve is in
35 int ltc_ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp)
43 LTC_ARGCHK(modulus != NULL);
51 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; }
57 return ltc_ecc_projective_dbl_point(P, R, modulus, mp);
68 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
71 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; }
74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
77 if ((err = mp_montgomery_reduce(y, modulus, mp)) != CRYPT_OK) { goto done;
    [all...]
ltc_ecc_projective_dbl_point.c 30 @param modulus The modulus of the field the ECC curve is in
34 int ltc_ecc_projective_dbl_point(ecc_point *P, ecc_point *R, void *modulus, void *mp)
41 LTC_ARGCHK(modulus != NULL);
56 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
59 if ((err = mp_montgomery_reduce(R->z, modulus, mp)) != CRYPT_OK) { goto done; }
62 if (mp_cmp(R->z, modulus) != LTC_MP_LT) {
63 if ((err = mp_sub(R->z, modulus, R->z)) != CRYPT_OK) { goto done; }
69 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; }
73 if (mp_cmp(t1, modulus) != LTC_MP_LT)
    [all...]
ltc_ecc_mulmod_timing.c 33 @param modulus The modulus of the field the ECC curve is in
37 int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map)
48 LTC_ARGCHK(modulus != NULL);
51 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) {
58 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) {
82 if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; }
83 if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; }
84 if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; }
94 if ((err = ltc_mp.ecc_ptdbl(tG, M[1], modulus, mp)) != CRYPT_OK) { goto done;
    [all...]
ecc_test.c 32 void *modulus, *order; local
36 if ((err = mp_init_multi(&modulus, &order, NULL)) != CRYPT_OK) {
43 mp_clear_multi(modulus, order, NULL);
53 if ((err = mp_read_radix(modulus, (char *)ltc_ecc_sets[i].prime, 16)) != CRYPT_OK) { goto done; }
57 if ((err = mp_prime_is_prime(modulus, 8, &primality)) != CRYPT_OK) { goto done; }
76 if ((err = ltc_mp.ecc_ptmul(order, G, GG, modulus, 1)) != CRYPT_OK) { goto done; }
86 mp_clear_multi(order, modulus, NULL);
ltc_ecc_mul2add.c 34 @param modulus Modulus for curve
40 void *modulus)
54 LTC_ARGCHK(modulus != NULL);
97 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) {
103 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) {
108 if ((err = mp_mulmod(A->x, mu, modulus, precomp[1]->x)) != CRYPT_OK) { goto ERR_MU; }
109 if ((err = mp_mulmod(A->y, mu, modulus, precomp[1]->y)) != CRYPT_OK) { goto ERR_MU; }
110 if ((err = mp_mulmod(A->z, mu, modulus, precomp[1]->z)) != CRYPT_OK) { goto ERR_MU; }
112 if ((err = mp_mulmod(B->x, mu, modulus, precomp[1<<2]->x)) != CRYPT_OK) { goto ERR_MU;
    [all...]
ltc_ecc_mulmod.c 35 @param modulus The modulus of the field the ECC curve is in
39 int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map)
50 LTC_ARGCHK(modulus != NULL);
53 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) {
60 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) {
89 if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; }
90 if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; }
91 if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; }
98 if ((err = ltc_mp.ecc_ptdbl(tG, M[0], modulus, mp)) != CRYPT_OK) { goto done;
    [all...]
  /external/bouncycastle/src/main/java/org/bouncycastle/asn1/x509/
RSAPublicKeyStructure.java 17 private BigInteger modulus; field in class:RSAPublicKeyStructure
44 BigInteger modulus,
47 this.modulus = modulus;
62 modulus = DERInteger.getInstance(e.nextElement()).getPositiveValue();
68 return modulus;
80 * modulus INTEGER, -- n
  /external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/
JCERSAPrivateKey.java 28 protected BigInteger modulus; field in class:JCERSAPrivateKey
40 this.modulus = key.getModulus();
47 this.modulus = spec.getModulus();
54 this.modulus = key.getModulus();
60 return modulus;
132 this.modulus = (BigInteger)in.readObject();
144 out.writeObject(modulus);
JCERSAPublicKey.java 21 private BigInteger modulus; field in class:JCERSAPublicKey
27 this.modulus = key.getModulus();
34 this.modulus = spec.getModulus();
41 this.modulus = key.getModulus();
52 this.modulus = pubKey.getModulus();
62 * return the modulus.
64 * @return the modulus.
68 return modulus;
129 buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl);
  /external/dropbear/libtomcrypt/src/math/
tfm_desc.c 408 static int tfm_ecc_projective_dbl_point(ecc_point *P, ecc_point *R, void *modulus, void *Mp)
415 LTC_ARGCHK(modulus != NULL);
431 fp_montgomery_reduce(&t1, modulus, mp);
434 fp_montgomery_reduce(R->z, modulus, mp);
437 if (fp_cmp(R->z, modulus) != FP_LT) {
438 fp_sub(R->z, modulus, R->z);
444 fp_add(&t2, modulus, &t2);
448 if (fp_cmp(&t1, modulus) != FP_LT) {
449 fp_sub(&t1, modulus, &t1);
453 fp_montgomery_reduce(&t2, modulus, mp)
    [all...]
  /external/apache-harmony/math/src/test/java/org/apache/harmony/tests/java/math/
BigIntegerModPowTest.java 32 * modPow: non-positive modulus
43 BigInteger modulus = new BigInteger(mSign, mBytes); local
45 aNumber.modPow(exp, modulus);
71 BigInteger modulus = new BigInteger(mSign, mBytes); local
72 BigInteger result = aNumber.modPow(exp, modulus);
94 BigInteger modulus = new BigInteger(mSign, mBytes); local
95 BigInteger result = aNumber.modPow(exp, modulus);
128 * modInverse: non-positive modulus
136 BigInteger modulus = new BigInteger(mSign, mBytes); local
138 aNumber.modInverse(modulus);
153 BigInteger modulus = new BigInteger(mSign, mBytes); local
171 BigInteger modulus = new BigInteger(mSign, mBytes); local
191 BigInteger modulus = new BigInteger(mSign, mBytes); local
211 BigInteger modulus = new BigInteger(mSign, mBytes); local
229 BigInteger modulus = new BigInteger(mBytes); local
    [all...]
  /external/wpa_supplicant_8/src/crypto/
crypto_internal-modexp.c 24 const u8 *modulus, size_t modulus_len,
41 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0)
  /external/stlport/test/unit/
modulus_test.cpp 35 transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, modulus<int>());
  /ndk/tests/device/test-gnustl-full/unit/
modulus_test.cpp 35 transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, modulus<int>());
  /ndk/tests/device/test-stlport/unit/
modulus_test.cpp 35 transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, modulus<int>());
  /external/dropbear/libtomcrypt/src/math/fp/
ltc_ecc_fp_mulmod.c     [all...]
  /external/bouncycastle/src/main/java/org/bouncycastle/asn1/pkcs/
RSAPrivateKeyStructure.java 18 private BigInteger modulus; field in class:RSAPrivateKeyStructure
51 BigInteger modulus,
61 this.modulus = modulus;
83 modulus = ((DERInteger)e.nextElement()).getValue();
105 return modulus;
148 * modulus INTEGER, -- n
  /external/dropbear/libtomcrypt/testprof/
ecc_test.c 35 void *modulus, *mp, *kA, *kB, *rA, *rB; local
40 DO(mp_init_multi(&kA, &kB, &rA, &rB, &modulus, NULL));
58 DO(mp_read_radix(modulus, ltc_ecc_sets[z].prime, 16));
59 DO(mp_montgomery_setup(modulus, &mp));
70 DO(ltc_mp.ecc_ptmul(rA, G, A, modulus, 1));
73 DO(ltc_mp.ecc_ptmul(rB, G, B, modulus, 1));
82 DO(ltc_mp.ecc_ptmul(kA, A, C1, modulus, 0));
83 DO(ltc_mp.ecc_ptmul(kB, B, C2, modulus, 0));
84 DO(ltc_mp.ecc_ptadd(C1, C2, C1, modulus, mp));
85 DO(ltc_mp.ecc_map(C1, modulus, mp))
    [all...]

Completed in 1496 milliseconds

1 2 3 4