Home
last modified time | relevance | path

Searched refs:rsa (Results 1 – 25 of 268) sorted by relevance

1234567891011

/external/openssl/crypto/rsa/
Drsa_gen.c74 static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
81 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) in RSA_generate_key_ex() argument
84 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_generate_key_ex()
85 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_generate_key_ex()
91 if(rsa->meth->rsa_keygen) in RSA_generate_key_ex()
92 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); in RSA_generate_key_ex()
95 return FIPS_rsa_generate_key_ex(rsa, bits, e_value, cb); in RSA_generate_key_ex()
97 return rsa_builtin_keygen(rsa, bits, e_value, cb); in RSA_generate_key_ex()
100 static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) in rsa_builtin_keygen() argument
121 if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; in rsa_builtin_keygen()
[all …]
Drsa_eay.c121 unsigned char *to, RSA *rsa,int padding);
123 unsigned char *to, RSA *rsa,int padding);
125 unsigned char *to, RSA *rsa,int padding);
127 unsigned char *to, RSA *rsa,int padding);
128 static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx);
129 static int RSA_eay_init(RSA *rsa);
130 static int RSA_eay_finish(RSA *rsa);
154 unsigned char *to, RSA *rsa, int padding) in RSA_eay_public_encrypt() argument
161 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) in RSA_eay_public_encrypt()
167 if (BN_ucmp(rsa->n, rsa->e) <= 0) in RSA_eay_public_encrypt()
[all …]
Drsa_crpt.c76 RSA *rsa, int padding) in RSA_public_encrypt() argument
79 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_public_encrypt()
80 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_public_encrypt()
86 return(rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding)); in RSA_public_encrypt()
90 RSA *rsa, int padding) in RSA_private_encrypt() argument
93 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_private_encrypt()
94 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_private_encrypt()
100 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding)); in RSA_private_encrypt()
104 RSA *rsa, int padding) in RSA_private_decrypt() argument
107 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_private_decrypt()
[all …]
Drsa_null.c73 unsigned char *to, RSA *rsa,int padding);
75 unsigned char *to, RSA *rsa,int padding);
77 unsigned char *to, RSA *rsa,int padding);
79 unsigned char *to, RSA *rsa,int padding);
81 static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa);
83 static int RSA_null_init(RSA *rsa);
84 static int RSA_null_finish(RSA *rsa);
108 unsigned char *to, RSA *rsa, int padding) in RSA_null_public_encrypt() argument
115 unsigned char *to, RSA *rsa, int padding) in RSA_null_private_encrypt() argument
122 unsigned char *to, RSA *rsa, int padding) in RSA_null_private_decrypt() argument
[all …]
Drsa.h90 RSA *rsa,int padding);
93 RSA *rsa,int padding);
96 RSA *rsa,int padding);
99 RSA *rsa,int padding);
100 int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
104 int (*init)(RSA *rsa); /* called at new */
105 int (*finish)(RSA *rsa); /* called at free */
117 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
121 const RSA *rsa);
126 int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
[all …]
Drsa_sign.c71 unsigned char *sigret, unsigned int *siglen, RSA *rsa) in RSA_sign() argument
81 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_sign()
82 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_sign()
88 if((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign) in RSA_sign()
90 return rsa->meth->rsa_sign(type, m, m_len, in RSA_sign()
91 sigret, siglen, rsa); in RSA_sign()
124 j=RSA_size(rsa); in RSA_sign()
141 i=RSA_private_encrypt(i,s,sigret,rsa,RSA_PKCS1_PADDING); in RSA_sign()
158 RSA *rsa) in int_rsa_verify() argument
165 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in int_rsa_verify()
[all …]
Drsa_pmeth.c169 RSA *rsa = ctx->pkey->pkey.rsa; in pkey_fips_check_ctx() local
173 if (rsa->flags & RSA_FLAG_NON_FIPS_ALLOW) in pkey_fips_check_ctx()
175 if (!(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) && rv) in pkey_fips_check_ctx()
190 RSA *rsa = ctx->pkey->pkey.rsa; in pkey_rsa_sign() local
213 ret = FIPS_rsa_sign_digest(rsa, tbs, tbslen, rctx->md, in pkey_rsa_sign()
232 tbs, tbslen, sig, &sltmp, rsa); in pkey_rsa_sign()
246 sig, rsa, RSA_X931_PADDING); in pkey_rsa_sign()
252 tbs, tbslen, sig, &sltmp, rsa); in pkey_rsa_sign()
261 if (!RSA_padding_add_PKCS1_PSS_mgf1(rsa, in pkey_rsa_sign()
266 ret = RSA_private_encrypt(RSA_size(rsa), rctx->tbuf, in pkey_rsa_sign()
[all …]
Drsa_depr.c76 RSA *rsa = RSA_new(); in RSA_generate_key() local
79 if(!rsa || !e) goto err; in RSA_generate_key()
92 if(RSA_generate_key_ex(rsa, bits, e, &cb)) { in RSA_generate_key()
94 return rsa; in RSA_generate_key()
98 if(rsa) RSA_free(rsa); in RSA_generate_key()
/external/chromium_org/third_party/openssl/openssl/crypto/rsa/
Drsa_gen.c74 static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
81 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) in RSA_generate_key_ex() argument
84 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_generate_key_ex()
85 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_generate_key_ex()
91 if(rsa->meth->rsa_keygen) in RSA_generate_key_ex()
92 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); in RSA_generate_key_ex()
95 return FIPS_rsa_generate_key_ex(rsa, bits, e_value, cb); in RSA_generate_key_ex()
97 return rsa_builtin_keygen(rsa, bits, e_value, cb); in RSA_generate_key_ex()
100 static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) in rsa_builtin_keygen() argument
121 if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; in rsa_builtin_keygen()
[all …]
Drsa_eay.c121 unsigned char *to, RSA *rsa,int padding);
123 unsigned char *to, RSA *rsa,int padding);
125 unsigned char *to, RSA *rsa,int padding);
127 unsigned char *to, RSA *rsa,int padding);
128 static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx);
129 static int RSA_eay_init(RSA *rsa);
130 static int RSA_eay_finish(RSA *rsa);
154 unsigned char *to, RSA *rsa, int padding) in RSA_eay_public_encrypt() argument
161 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) in RSA_eay_public_encrypt()
167 if (BN_ucmp(rsa->n, rsa->e) <= 0) in RSA_eay_public_encrypt()
[all …]
Drsa_crpt.c76 RSA *rsa, int padding) in RSA_public_encrypt() argument
79 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_public_encrypt()
80 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_public_encrypt()
86 return(rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding)); in RSA_public_encrypt()
90 RSA *rsa, int padding) in RSA_private_encrypt() argument
93 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_private_encrypt()
94 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_private_encrypt()
100 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding)); in RSA_private_encrypt()
104 RSA *rsa, int padding) in RSA_private_decrypt() argument
107 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_private_decrypt()
[all …]
Drsa_null.c73 unsigned char *to, RSA *rsa,int padding);
75 unsigned char *to, RSA *rsa,int padding);
77 unsigned char *to, RSA *rsa,int padding);
79 unsigned char *to, RSA *rsa,int padding);
81 static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa);
83 static int RSA_null_init(RSA *rsa);
84 static int RSA_null_finish(RSA *rsa);
108 unsigned char *to, RSA *rsa, int padding) in RSA_null_public_encrypt() argument
115 unsigned char *to, RSA *rsa, int padding) in RSA_null_private_encrypt() argument
122 unsigned char *to, RSA *rsa, int padding) in RSA_null_private_decrypt() argument
[all …]
Drsa.h90 RSA *rsa,int padding);
93 RSA *rsa,int padding);
96 RSA *rsa,int padding);
99 RSA *rsa,int padding);
100 int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
104 int (*init)(RSA *rsa); /* called at new */
105 int (*finish)(RSA *rsa); /* called at free */
117 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
121 const RSA *rsa);
126 int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
[all …]
Drsa_sign.c71 unsigned char *sigret, unsigned int *siglen, RSA *rsa) in RSA_sign() argument
81 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in RSA_sign()
82 && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW)) in RSA_sign()
88 if((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign) in RSA_sign()
90 return rsa->meth->rsa_sign(type, m, m_len, in RSA_sign()
91 sigret, siglen, rsa); in RSA_sign()
124 j=RSA_size(rsa); in RSA_sign()
141 i=RSA_private_encrypt(i,s,sigret,rsa,RSA_PKCS1_PADDING); in RSA_sign()
158 RSA *rsa) in int_rsa_verify() argument
165 if (FIPS_mode() && !(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) in int_rsa_verify()
[all …]
Drsa_pmeth.c169 RSA *rsa = ctx->pkey->pkey.rsa; in pkey_fips_check_ctx() local
173 if (rsa->flags & RSA_FLAG_NON_FIPS_ALLOW) in pkey_fips_check_ctx()
175 if (!(rsa->meth->flags & RSA_FLAG_FIPS_METHOD) && rv) in pkey_fips_check_ctx()
190 RSA *rsa = ctx->pkey->pkey.rsa; in pkey_rsa_sign() local
213 ret = FIPS_rsa_sign_digest(rsa, tbs, tbslen, rctx->md, in pkey_rsa_sign()
232 tbs, tbslen, sig, &sltmp, rsa); in pkey_rsa_sign()
246 sig, rsa, RSA_X931_PADDING); in pkey_rsa_sign()
252 tbs, tbslen, sig, &sltmp, rsa); in pkey_rsa_sign()
261 if (!RSA_padding_add_PKCS1_PSS_mgf1(rsa, in pkey_rsa_sign()
266 ret = RSA_private_encrypt(RSA_size(rsa), rctx->tbuf, in pkey_rsa_sign()
[all …]
Drsa_depr.c76 RSA *rsa = RSA_new(); in RSA_generate_key() local
79 if(!rsa || !e) goto err; in RSA_generate_key()
92 if(RSA_generate_key_ex(rsa, bits, e, &cb)) { in RSA_generate_key()
94 return rsa; in RSA_generate_key()
98 if(rsa) RSA_free(rsa); in RSA_generate_key()
/external/chromium_org/third_party/tlslite/tlslite/utils/
DOpenSSL_RSAKey.py30 self.rsa = None
35 self.rsa = m2.rsa_new()
36 m2.rsa_set_n(self.rsa, numberToMPI(n))
37 m2.rsa_set_e(self.rsa, numberToMPI(e))
40 if self.rsa:
41 m2.rsa_free(self.rsa)
45 if not self.rsa:
47 return mpiToNumber(m2.rsa_get_e(self.rsa))
49 if not self.rsa:
51 return mpiToNumber(m2.rsa_get_n(self.rsa))
[all …]
/external/openssl/include/openssl/
Drsa.h90 RSA *rsa,int padding);
93 RSA *rsa,int padding);
96 RSA *rsa,int padding);
99 RSA *rsa,int padding);
100 int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
104 int (*init)(RSA *rsa); /* called at new */
105 int (*finish)(RSA *rsa); /* called at free */
117 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
121 const RSA *rsa);
126 int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
[all …]
/external/chromium_org/third_party/openssl/openssl/include/openssl/
Drsa.h90 RSA *rsa,int padding);
93 RSA *rsa,int padding);
96 RSA *rsa,int padding);
99 RSA *rsa,int padding);
100 int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
104 int (*init)(RSA *rsa); /* called at new */
105 int (*finish)(RSA *rsa); /* called at free */
117 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
121 const RSA *rsa);
126 int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
[all …]
/external/openssh/
Dsshconnect1.c91 packet_put_bignum(key->rsa->n); in try_agent_authentication()
221 packet_put_bignum(public->rsa->n); in try_rsa_authentication()
300 respond_to_rsa_challenge(challenge, private->rsa); in try_rsa_authentication()
336 packet_put_int(BN_num_bits(host_key->rsa->n)); in try_rhosts_rsa_authentication()
337 packet_put_bignum(host_key->rsa->e); in try_rhosts_rsa_authentication()
338 packet_put_bignum(host_key->rsa->n); in try_rhosts_rsa_authentication()
364 respond_to_rsa_challenge(challenge, host_key->rsa); in try_rhosts_rsa_authentication()
505 packet_get_bignum(server_key->rsa->e); in ssh_kex()
506 packet_get_bignum(server_key->rsa->n); in ssh_kex()
508 rbits = BN_num_bits(server_key->rsa->n); in ssh_kex()
[all …]
/external/chromium_org/third_party/openssl/openssl/crypto/pem/
Dpvkfmt.c375 RSA *rsa = NULL; in b2i_rsa() local
379 rsa = RSA_new(); in b2i_rsa()
381 if (!rsa || !ret) in b2i_rsa()
383 rsa->e = BN_new(); in b2i_rsa()
384 if (!rsa->e) in b2i_rsa()
386 if (!BN_set_word(rsa->e, read_ledword(&p))) in b2i_rsa()
388 if (!read_lebn(&p, nbyte, &rsa->n)) in b2i_rsa()
392 if (!read_lebn(&p, hnbyte, &rsa->p)) in b2i_rsa()
394 if (!read_lebn(&p, hnbyte, &rsa->q)) in b2i_rsa()
396 if (!read_lebn(&p, hnbyte, &rsa->dmp1)) in b2i_rsa()
[all …]
/external/openssl/crypto/pem/
Dpvkfmt.c375 RSA *rsa = NULL; in b2i_rsa() local
379 rsa = RSA_new(); in b2i_rsa()
381 if (!rsa || !ret) in b2i_rsa()
383 rsa->e = BN_new(); in b2i_rsa()
384 if (!rsa->e) in b2i_rsa()
386 if (!BN_set_word(rsa->e, read_ledword(&p))) in b2i_rsa()
388 if (!read_lebn(&p, nbyte, &rsa->n)) in b2i_rsa()
392 if (!read_lebn(&p, hnbyte, &rsa->p)) in b2i_rsa()
394 if (!read_lebn(&p, hnbyte, &rsa->q)) in b2i_rsa()
396 if (!read_lebn(&p, hnbyte, &rsa->dmp1)) in b2i_rsa()
[all …]
/external/openssl/apps/
Drsa.c104 RSA *rsa=NULL; in MAIN() local
296 rsa = EVP_PKEY_get1_RSA(pkey); in MAIN()
300 if (rsa == NULL) in MAIN()
326 if (!RSA_print(out,rsa,0)) in MAIN()
336 BN_print(out,rsa->n); in MAIN()
342 int r = RSA_check_key(rsa); in MAIN()
377 i=i2d_RSAPublicKey_bio(out,rsa); in MAIN()
379 i=i2d_RSA_PUBKEY_bio(out,rsa); in MAIN()
381 else i=i2d_RSAPrivateKey_bio(out,rsa); in MAIN()
390 size=i2d_RSA_NET(rsa,NULL,NULL, sgckey); in MAIN()
[all …]
/external/chromium_org/third_party/openssl/openssl/apps/
Drsa.c104 RSA *rsa=NULL; in MAIN() local
296 rsa = EVP_PKEY_get1_RSA(pkey); in MAIN()
300 if (rsa == NULL) in MAIN()
326 if (!RSA_print(out,rsa,0)) in MAIN()
336 BN_print(out,rsa->n); in MAIN()
342 int r = RSA_check_key(rsa); in MAIN()
377 i=i2d_RSAPublicKey_bio(out,rsa); in MAIN()
379 i=i2d_RSA_PUBKEY_bio(out,rsa); in MAIN()
381 else i=i2d_RSAPrivateKey_bio(out,rsa); in MAIN()
390 size=i2d_RSA_NET(rsa,NULL,NULL, sgckey); in MAIN()
[all …]
/external/openssl/ssl/
Dssl_rsa.c152 int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) in SSL_use_RSAPrivateKey() argument
157 if (rsa == NULL) in SSL_use_RSAPrivateKey()
173 RSA_up_ref(rsa); in SSL_use_RSAPrivateKey()
174 EVP_PKEY_assign_RSA(pkey,rsa); in SSL_use_RSAPrivateKey()
205 (RSA_flags(pkey->pkey.rsa) & RSA_METHOD_FLAG_NO_CHECK)) in ssl_set_pkey()
233 RSA *rsa=NULL; in SSL_use_RSAPrivateKey_file() local
250 rsa=d2i_RSAPrivateKey_bio(in,NULL); in SSL_use_RSAPrivateKey_file()
255 rsa=PEM_read_bio_RSAPrivateKey(in,NULL, in SSL_use_RSAPrivateKey_file()
263 if (rsa == NULL) in SSL_use_RSAPrivateKey_file()
268 ret=SSL_use_RSAPrivateKey(ssl,rsa); in SSL_use_RSAPrivateKey_file()
[all …]

1234567891011