/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/ |
H A D | RSAKeyParameters.java | 8 private BigInteger modulus; field in class:RSAKeyParameters 13 BigInteger modulus, 18 this.modulus = modulus; 24 return modulus; 11 RSAKeyParameters( boolean isPrivate, BigInteger modulus, BigInteger exponent) argument
|
H A D | RSAPrivateCrtKeyParameters.java | 19 BigInteger modulus, 28 super(true, modulus, privateExponent); 18 RSAPrivateCrtKeyParameters( BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger p, BigInteger q, BigInteger dP, BigInteger dQ, BigInteger qInv) argument
|
/external/dropbear/libtommath/etc/ |
H A D | 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/openssh/regress/ |
H A D | ssh2putty.sh | 27 modulus=` 28 openssl rsa -noout -modulus -in $KEYFILE | grep ^Modulus= | 33 echo "rsa2@$PORT:$HOST $public_exponent,$modulus"
|
/external/dropbear/libtomcrypt/src/pk/ecc/ |
H A D | 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) argument 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, m [all...] |
H A D | 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) argument 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, m [all...] |
H A D | 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) argument 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) ! [all...] |
H A D | 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) argument 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, m [all...] |
H A D | 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);
|
H A D | 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; } 113 if ((err = mp_mulmod(B->y, mu, modulus, precom 37 ltc_ecc_mul2add(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, void *modulus) argument [all...] |
H A D | 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) argument 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, m [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/ |
H A D | RSAPublicKey.java | 17 private BigInteger modulus; field in class:RSAPublicKey 44 BigInteger modulus, 47 this.modulus = modulus; 62 modulus = ASN1Integer.getInstance(e.nextElement()).getPositiveValue(); 68 return modulus; 80 * modulus INTEGER, -- n 43 RSAPublicKey( BigInteger modulus, BigInteger publicExponent) argument
|
H A D | RSAPrivateKey.java | 18 private BigInteger modulus; field in class:RSAPrivateKey 52 BigInteger modulus, 62 this.modulus = modulus; 84 modulus = ((ASN1Integer)e.nextElement()).getValue(); 106 return modulus; 149 * modulus INTEGER, -- n 51 RSAPrivateKey( BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/x509/ |
H A D | RSAPublicKeyStructure.java | 20 private BigInteger modulus; field in class:RSAPublicKeyStructure 47 BigInteger modulus, 50 this.modulus = modulus; 65 modulus = ASN1Integer.getInstance(e.nextElement()).getPositiveValue(); 71 return modulus; 83 * modulus INTEGER, -- n 46 RSAPublicKeyStructure( BigInteger modulus, BigInteger publicExponent) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/ |
H A D | 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; 128 this.modulus = (BigInteger)in.readObject(); 140 out.writeObject(modulus);
|
H A D | JCERSAPublicKey.java | 22 private BigInteger modulus; field in class:JCERSAPublicKey 28 this.modulus = key.getModulus(); 35 this.modulus = spec.getModulus(); 42 this.modulus = key.getModulus(); 53 this.modulus = pubKey.getModulus(); 63 * return the modulus. 65 * @return the modulus. 69 return modulus; 126 buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl);
|
/external/dropbear/libtomcrypt/src/math/ |
H A D | tfm_desc.c | 408 static int tfm_ecc_projective_dbl_point(ecc_point *P, ecc_point *R, void *modulus, void *Mp) argument 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, m 525 tfm_ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *Mp) argument [all...] |
/external/apache-harmony/math/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigIntegerModPowTest.java | 32 * modPow: non-positive modulus 43 BigInteger modulus = new BigInteger(mSign, mBytes); 45 aNumber.modPow(exp, modulus); 71 BigInteger modulus = new BigInteger(mSign, mBytes); 72 BigInteger result = aNumber.modPow(exp, modulus); 94 BigInteger modulus = new BigInteger(mSign, mBytes); 95 BigInteger result = aNumber.modPow(exp, modulus); 128 * modInverse: non-positive modulus 136 BigInteger modulus = new BigInteger(mSign, mBytes); 138 aNumber.modInverse(modulus); [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/ |
H A D | BCRSAPublicKey.java | 20 private BigInteger modulus; field in class:BCRSAPublicKey 26 this.modulus = key.getModulus(); 33 this.modulus = spec.getModulus(); 40 this.modulus = key.getModulus(); 51 this.modulus = pubKey.getModulus(); 61 * return the modulus. 63 * @return the modulus. 67 return modulus; 124 buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl);
|
H A D | BCRSAPrivateKey.java | 28 protected BigInteger modulus; field in class:BCRSAPrivateKey 40 this.modulus = key.getModulus(); 47 this.modulus = spec.getModulus(); 54 this.modulus = key.getModulus(); 60 return modulus;
|
/external/wpa_supplicant_8/hostapd/src/crypto/ |
H A D | crypto_internal-modexp.c | 18 const u8 *modulus, size_t modulus_len, 35 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) 16 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
|
/external/wpa_supplicant_8/src/crypto/ |
H A D | crypto_internal-modexp.c | 18 const u8 *modulus, size_t modulus_len, 35 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) 16 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
|
/external/wpa_supplicant_8/wpa_supplicant/src/crypto/ |
H A D | crypto_internal-modexp.c | 18 const u8 *modulus, size_t modulus_len, 35 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) 16 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
|
/external/stlport/test/unit/ |
H A D | modulus_test.cpp | 35 transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, modulus<int>());
|
/external/dropbear/libtomcrypt/src/math/fp/ |
H A D | ltc_ecc_fp_mulmod.c | 667 /* build the LUT by spacing the bits of the input by #modulus/FP_LUT bits apart 672 static int build_lut(int idx, void *modulus, void *mp, void *mu) argument 686 bitlen = mp_unsigned_bin_size(modulus) << 3; 699 if ((mp_mulmod(fp_cache[idx].g->x, mu, modulus, fp_cache[idx].LUT[1]->x) != CRYPT_OK) || 700 (mp_mulmod(fp_cache[idx].g->y, mu, modulus, fp_cache[idx].LUT[1]->y) != CRYPT_OK) || 701 (mp_mulmod(fp_cache[idx].g->z, mu, modulus, fp_cache[idx].LUT[1]->z) != CRYPT_OK)) { goto ERR; } 711 if ((err = ltc_mp.ecc_ptdbl(fp_cache[idx].LUT[1<<x], fp_cache[idx].LUT[1<<x], modulus, mp)) != CRYPT_OK) { 724 fp_cache[idx].LUT[y], modulus, mp)) != CRYPT_OK) { 734 if ((err = mp_montgomery_reduce(fp_cache[idx].LUT[x]->z, modulus, mp)) != CRYPT_OK) { goto ERR; } 737 if ((err = mp_invmod(fp_cache[idx].LUT[x]->z, modulus, fp_cach 779 accel_fp_mul(int idx, void *k, ecc_point *R, void *modulus, void *mp, int map) argument 902 accel_fp_mul2add(int idx1, int idx2, void *kA, void *kB, ecc_point *R, void *modulus, void *mp) argument 1110 ltc_ecc_fp_mul2add(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, void *modulus) argument 1222 ltc_ecc_fp_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map) argument [all...] |