Searched defs:modulus (Results 1 - 25 of 52) sorted by relevance

123

/external/dropbear/libtomcrypt/src/pk/ecc/
H A Dltc_ecc_map.c29 @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 Decc_test.c32 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 Dltc_ecc_projective_dbl_point.c30 @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 Dltc_ecc_projective_add_point.c31 @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 Dltc_ecc_mulmod_timing.c33 @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 Dltc_ecc_mul2add.c34 @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 Dltc_ecc_mulmod.c35 @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/crypto/params/
H A DRSAKeyParameters.java8 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 DRSAPrivateCrtKeyParameters.java19 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 Dmont.c6 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/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
H A DRSAPublicKey.java17 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 DRSAPrivateKey.java18 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
H A DRSAPrivateKeyStructure.java21 private BigInteger modulus; field in class:RSAPrivateKeyStructure
54 BigInteger modulus,
64 this.modulus = modulus;
86 modulus = ((ASN1Integer)e.nextElement()).getValue();
108 return modulus;
151 * modulus INTEGER, -- n
53 RSAPrivateKeyStructure( 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 DRSAPublicKeyStructure.java20 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/wpa_supplicant_8/hostapd/src/crypto/
H A Dcrypto_internal-modexp.c18 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 Dcrypto_internal-modexp.c18 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 Dcrypto_internal-modexp.c18 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/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
H A DJCERSAPublicKey.java22 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;
128 buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl);
H A DJCERSAPrivateKey.java29 protected BigInteger modulus; field in class:JCERSAPrivateKey
41 this.modulus = key.getModulus();
48 this.modulus = spec.getModulus();
55 this.modulus = key.getModulus();
61 return modulus;
131 this.modulus = (BigInteger)in.readObject();
143 out.writeObject(modulus);
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
H A DBCRSAPublicKey.java20 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;
126 buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl);
H A DBCRSAPrivateKey.java29 protected BigInteger modulus; field in class:BCRSAPrivateKey
41 this.modulus = key.getModulus();
48 this.modulus = spec.getModulus();
55 this.modulus = key.getModulus();
61 return modulus;
/external/dropbear/libtomcrypt/testprof/
H A Decc_test.c35 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, m
[all...]
/external/chromium/crypto/
H A Drsa_private_key.h52 // that will be parsed & serialized (modulus(), etc...) during Import(),
79 std::vector<uint8>* modulus() { return &modulus_; }; function in class:crypto::PrivateKeyInfoCodec
154 // The byte-significance of the stored components (modulus, etc..).
/external/openssh/
H A Ddh.c135 logit("WARNING: %s does not exist, using fixed modulus",
265 dh_new_group_asc(const char *gen, const char *modulus) argument
272 if (BN_hex2bn(&dh->p, modulus) == 0)
286 dh_new_group(BIGNUM *gen, BIGNUM *modulus) argument
292 dh->p = modulus;
/external/openssl/apps/
H A Ddsa.c92 * -modulus - print the DSA public key
113 int modulus=0; local
186 else if (strcmp(*argv,"-modulus") == 0)
187 modulus=1;
234 BIO_printf(bio_err," -modulus print the DSA public value\n");
320 if (modulus)

Completed in 1193 milliseconds

123