Home
last modified time | relevance | path

Searched refs:eckey (Results 1 – 25 of 32) sorted by relevance

12

/third_party/openssl/crypto/ec/
Dec_key.c177 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey) in EC_KEY_get0_engine() argument
179 return eckey->engine; in EC_KEY_get0_engine()
182 int EC_KEY_generate_key(EC_KEY *eckey) in EC_KEY_generate_key() argument
184 if (eckey == NULL || eckey->group == NULL) { in EC_KEY_generate_key()
188 if (eckey->meth->keygen != NULL) in EC_KEY_generate_key()
189 return eckey->meth->keygen(eckey); in EC_KEY_generate_key()
194 int ossl_ec_key_gen(EC_KEY *eckey) in ossl_ec_key_gen() argument
196 return eckey->group->meth->keygen(eckey); in ossl_ec_key_gen()
199 int ec_key_simple_generate_key(EC_KEY *eckey) in ec_key_simple_generate_key() argument
210 if (eckey->priv_key == NULL) { in ec_key_simple_generate_key()
[all …]
Decdsa_sign.c14 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) in ECDSA_do_sign() argument
16 return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey); in ECDSA_do_sign()
21 EC_KEY *eckey) in ECDSA_do_sign_ex() argument
23 if (eckey->meth->sign_sig != NULL) in ECDSA_do_sign_ex()
24 return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); in ECDSA_do_sign_ex()
30 *sig, unsigned int *siglen, EC_KEY *eckey) in ECDSA_sign() argument
32 return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey); in ECDSA_sign()
37 const BIGNUM *r, EC_KEY *eckey) in ECDSA_sign_ex() argument
39 if (eckey->meth->sign != NULL) in ECDSA_sign_ex()
40 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
[all …]
Decdsa_vrf.c21 const ECDSA_SIG *sig, EC_KEY *eckey) in ECDSA_do_verify() argument
23 if (eckey->meth->verify_sig != NULL) in ECDSA_do_verify()
24 return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey); in ECDSA_do_verify()
36 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) in ECDSA_verify() argument
38 if (eckey->meth->verify != NULL) in ECDSA_verify()
39 return eckey->meth->verify(type, dgst, dgst_len, sigbuf, sig_len, in ECDSA_verify()
40 eckey); in ECDSA_verify()
Decdsa_ossl.c19 const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey) in ossl_ecdsa_sign() argument
23 s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey); in ossl_ecdsa_sign()
33 static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, in ecdsa_sign_setup() argument
46 if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL) { in ecdsa_sign_setup()
50 if ((priv_key = EC_KEY_get0_private_key(eckey)) == NULL) { in ecdsa_sign_setup()
55 if (!EC_KEY_can_sign(eckey)) { in ecdsa_sign_setup()
148 int ossl_ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, in ossl_ecdsa_sign_setup() argument
151 return ecdsa_sign_setup(eckey, ctx_in, kinvp, rp, NULL, 0); in ossl_ecdsa_sign_setup()
156 EC_KEY *eckey) in ossl_ecdsa_sign_sig() argument
166 group = EC_KEY_get0_group(eckey); in ossl_ecdsa_sign_sig()
[all …]
Dec_ameth.c111 EC_KEY *eckey = NULL; in eckey_type2param() local
119 if ((eckey = d2i_ECParameters(NULL, &pm, pmlen)) == NULL) { in eckey_type2param()
129 if ((eckey = EC_KEY_new()) == NULL) { in eckey_type2param()
137 if (EC_KEY_set_group(eckey, group) == 0) in eckey_type2param()
145 return eckey; in eckey_type2param()
148 EC_KEY_free(eckey); in eckey_type2param()
158 EC_KEY *eckey = NULL; in eckey_pub_decode() local
165 eckey = eckey_type2param(ptype, pval); in eckey_pub_decode()
167 if (!eckey) { in eckey_pub_decode()
173 if (!o2i_ECPublicKey(&eckey, &p, pklen)) { in eckey_pub_decode()
[all …]
Dec_kmeth.c128 const EC_KEY *eckey, in ECDH_compute_key() argument
134 if (eckey->meth->compute_key == NULL) { in ECDH_compute_key()
142 if (!eckey->meth->compute_key(&sec, &seclen, pub_key, eckey)) in ECDH_compute_key()
211 EC_KEY *eckey), in EC_KEY_METHOD_set_sign() argument
212 int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, in EC_KEY_METHOD_set_sign() argument
218 EC_KEY *eckey)) in EC_KEY_METHOD_set_sign()
229 int sig_len, EC_KEY *eckey), in EC_KEY_METHOD_set_verify() argument
233 EC_KEY *eckey)) in EC_KEY_METHOD_set_verify()
286 EC_KEY *eckey), in EC_KEY_METHOD_get_sign() argument
287 int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, in EC_KEY_METHOD_get_sign() argument
[all …]
Dec_local.h171 size_t (*priv2oct)(const EC_KEY *eckey, unsigned char *buf, size_t len);
172 int (*oct2priv)(EC_KEY *eckey, const unsigned char *buf, size_t len);
173 int (*set_private)(EC_KEY *eckey, const BIGNUM *priv_key);
174 int (*keygen)(EC_KEY *eckey);
175 int (*keycheck)(const EC_KEY *eckey);
176 int (*keygenpub)(EC_KEY *eckey);
178 void (*keyfinish)(EC_KEY *eckey);
593 size_t ec_key_simple_priv2oct(const EC_KEY *eckey,
595 int ec_key_simple_oct2priv(EC_KEY *eckey, const unsigned char *buf, size_t len);
596 int ec_key_simple_generate_key(EC_KEY *eckey);
[all …]
Dec_pmeth.c157 EC_KEY *eckey; in pkey_ec_derive() local
164 eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec; in pkey_ec_derive()
168 group = EC_KEY_get0_group(eckey); in pkey_ec_derive()
181 ret = ECDH_compute_key(key, outlen, pubkey, eckey, 0); in pkey_ec_derive()
/third_party/openssl/apps/
Dec.c71 EC_KEY *eckey = NULL; in ec_main() local
179 eckey = d2i_EC_PUBKEY_bio(in, NULL); in ec_main()
181 eckey = d2i_ECPrivateKey_bio(in, NULL); in ec_main()
189 eckey = EVP_PKEY_get1_EC_KEY(pkey); in ec_main()
194 eckey = PEM_read_bio_EC_PUBKEY(in, NULL, NULL, NULL); in ec_main()
196 eckey = PEM_read_bio_ECPrivateKey(in, NULL, NULL, passin); in ec_main()
198 if (eckey == NULL) { in ec_main()
208 group = EC_KEY_get0_group(eckey); in ec_main()
211 EC_KEY_set_conv_form(eckey, form); in ec_main()
214 EC_KEY_set_asn1_flag(eckey, asn1_flag); in ec_main()
[all …]
Decparam.c400 EC_KEY *eckey = EC_KEY_new(); in ecparam_main() local
402 if (eckey == NULL) in ecparam_main()
405 if (EC_KEY_set_group(eckey, group) == 0) { in ecparam_main()
407 EC_KEY_free(eckey); in ecparam_main()
413 EC_KEY_set_conv_form(eckey, form); in ecparam_main()
415 if (!EC_KEY_generate_key(eckey)) { in ecparam_main()
417 EC_KEY_free(eckey); in ecparam_main()
423 i = i2d_ECPrivateKey_bio(out, eckey); in ecparam_main()
425 i = PEM_write_bio_ECPrivateKey(out, eckey, NULL, in ecparam_main()
427 EC_KEY_free(eckey); in ecparam_main()
/third_party/openssl/doc/man3/
DECDSA_SIG_new.pod21 int ECDSA_size(const EC_KEY *eckey);
24 unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
26 EC_KEY *eckey);
29 const unsigned char *sig, int siglen, EC_KEY *eckey);
31 const ECDSA_SIG *sig, EC_KEY* eckey);
35 EC_KEY *eckey);
36 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
39 const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
73 created with the private EC key B<eckey>.
76 B<dgst> using the private EC key B<eckey>. The DER encoded signatures is
[all …]
DEC_KEY_new.pod32 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
40 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
41 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
50 int EC_KEY_oct2key(EC_KEY *eckey, const unsigned char *buf, size_t len, BN_CTX *ctx);
51 size_t EC_KEY_key2buf(const EC_KEY *eckey, point_conversion_form_t form,
54 int EC_KEY_oct2priv(EC_KEY *eckey, const unsigned char *buf, size_t len);
55 size_t EC_KEY_priv2oct(const EC_KEY *eckey, unsigned char *buf, size_t len);
57 size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf);
87 B<eckey> object. B<eckey> must have an EC_GROUP object associated with it
132 EC_POINT in B<eckey>.
[all …]
/third_party/mbedtls/tests/suites/
Dtest_suite_pkparse.function81 mbedtls_ecp_keypair *eckey;
83 eckey = mbedtls_pk_ec( ctx );
84 TEST_ASSERT( mbedtls_ecp_check_pubkey( &eckey->grp, &eckey->Q ) == 0 );
107 mbedtls_ecp_keypair *eckey;
109 eckey = mbedtls_pk_ec( ctx );
110 TEST_ASSERT( mbedtls_ecp_check_privkey( &eckey->grp, &eckey->d ) == 0 );
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dcrypto_openssl.c2145 EC_KEY *eckey; in crypto_ecdh_get_pubkey() local
2151 eckey = EVP_PKEY_get1_EC_KEY(ecdh->pkey); in crypto_ecdh_get_pubkey()
2152 if (!eckey) in crypto_ecdh_get_pubkey()
2155 pubkey = EC_KEY_get0_public_key(eckey); in crypto_ecdh_get_pubkey()
2192 EC_KEY_free(eckey); in crypto_ecdh_get_pubkey()
2211 EC_KEY *eckey = NULL; in crypto_ecdh_set_peerkey() local
2245 eckey = EC_KEY_new_by_curve_name(ecdh->ec->nid); in crypto_ecdh_set_peerkey()
2246 if (!eckey || EC_KEY_set_public_key(eckey, pub) != 1) { in crypto_ecdh_set_peerkey()
2254 if (!peerkey || EVP_PKEY_set1_EC_KEY(peerkey, eckey) != 1) in crypto_ecdh_set_peerkey()
2285 EC_KEY_free(eckey); in crypto_ecdh_set_peerkey()
[all …]
/third_party/libwebsockets/lib/tls/openssl/
Dlws-genec.c528 EC_KEY *eckey; in lws_genecdsa_hash_sign_jws() local
544 eckey = EVP_PKEY_get1_EC_KEY(EVP_PKEY_CTX_get0_pkey(ctx->ctx[0])); in lws_genecdsa_hash_sign_jws()
565 ecdsasig = ECDSA_do_sign(in, (int)hs, eckey); in lws_genecdsa_hash_sign_jws()
566 EC_KEY_free(eckey); in lws_genecdsa_hash_sign_jws()
611 EC_KEY *eckey; in lws_genecdsa_hash_sig_verify_jws() local
655 eckey = EVP_PKEY_get1_EC_KEY(EVP_PKEY_CTX_get0_pkey(ctx->ctx[0])); in lws_genecdsa_hash_sig_verify_jws()
657 n = ECDSA_do_verify(in, hlen, ecsig, eckey); in lws_genecdsa_hash_sig_verify_jws()
658 EC_KEY_free(eckey); in lws_genecdsa_hash_sig_verify_jws()
685 EC_KEY *eckey[2]; in lws_genecdh_compute_shared_secret() local
693 eckey[LDHS_OURS] = EVP_PKEY_get1_EC_KEY( in lws_genecdh_compute_shared_secret()
[all …]
/third_party/openssl/include/openssl/
Dec.h872 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
917 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
919 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
927 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
953 int EC_KEY_can_sign(const EC_KEY *eckey);
1010 size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf);
1192 EC_KEY *eckey);
1206 EC_KEY *eckey);
1218 const ECDSA_SIG *sig, EC_KEY *eckey);
1227 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
[all …]
Dx509.h414 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
415 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
416 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
417 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
452 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
453 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
454 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
455 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
/third_party/openssl/crypto/pem/
Dpem_all.c29 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey);
131 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey) in IMPLEMENT_PEM_rw_const()
140 if (eckey) { in IMPLEMENT_PEM_rw_const()
141 EC_KEY_free(*eckey); in IMPLEMENT_PEM_rw_const()
142 *eckey = dtmp; in IMPLEMENT_PEM_rw_const()
163 EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, in IMPLEMENT_PEM_rw_const()
168 return pkey_get_eckey(pktmp, eckey); /* will free pktmp */ in IMPLEMENT_PEM_rw_const()
/third_party/openssl/crypto/x509/
Dx_all.c311 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey) in d2i_EC_PUBKEY_fp() argument
313 return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, fp, eckey); in d2i_EC_PUBKEY_fp()
316 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey) in i2d_EC_PUBKEY_fp() argument
318 return ASN1_i2d_fp_of(EC_KEY, i2d_EC_PUBKEY, fp, eckey); in i2d_EC_PUBKEY_fp()
321 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey) in d2i_ECPrivateKey_fp() argument
323 return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, fp, eckey); in d2i_ECPrivateKey_fp()
326 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey) in i2d_ECPrivateKey_fp() argument
328 return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey); in i2d_ECPrivateKey_fp()
331 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey) in d2i_EC_PUBKEY_bio() argument
333 return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, bp, eckey); in d2i_EC_PUBKEY_bio()
[all …]
/third_party/openssl/test/
Decdsatest.c201 EC_KEY *eckey_neg = NULL, *eckey = NULL; in test_builtin() local
223 || !TEST_ptr(eckey = EC_KEY_new_by_curve_name(nid)) in test_builtin()
224 || !TEST_true(EC_KEY_generate_key(eckey)) in test_builtin()
226 || !TEST_true(EVP_PKEY_assign_EC_KEY(pkey, eckey)) in test_builtin()
234 sig_len = ECDSA_size(eckey); in test_builtin()
240 || !TEST_int_le(sig_len, ECDSA_size(eckey)) in test_builtin()
Devp_extra_test.c1139 EC_KEY *eckey = NULL; in test_invalide_ec_char2_pub_range_decode() local
1144 eckey = d2i_EC_PUBKEY_bio(bio, NULL); in test_invalide_ec_char2_pub_range_decode()
1145 ret = (ec_der_pub_keys[id].valid && TEST_ptr(eckey)) in test_invalide_ec_char2_pub_range_decode()
1146 || TEST_ptr_null(eckey); in test_invalide_ec_char2_pub_range_decode()
1148 EC_KEY_free(eckey); in test_invalide_ec_char2_pub_range_decode()
1508 EC_KEY *eckey = NULL; in test_EVP_PKEY_check() local
1534 || !TEST_ptr(eckey = d2i_EC_PUBKEY_bio(pubkey, NULL)) in test_EVP_PKEY_check()
1536 || !TEST_true(EVP_PKEY_assign_EC_KEY(pkey, eckey))) in test_EVP_PKEY_check()
1540 if (!TEST_ptr(eckey = d2i_ECParameters(NULL, &p, input_len)) in test_EVP_PKEY_check()
1543 || !TEST_true(EVP_PKEY_assign_EC_KEY(pkey, eckey))) in test_EVP_PKEY_check()
/third_party/openssl/include/crypto/
Dsm2.h49 unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
55 const unsigned char *sig, int siglen, EC_KEY *eckey);
/third_party/openssl/crypto/sm2/
Dsm2_sign.c410 unsigned char *sig, unsigned int *siglen, EC_KEY *eckey) in sm2_sign() argument
423 s = sm2_sig_gen(eckey, e); in sm2_sign()
441 const unsigned char *sig, int sig_len, EC_KEY *eckey) in sm2_verify() argument
472 ret = sm2_sig_verify(eckey, s, e); in sm2_verify()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
Ddpp.c471 EC_KEY *eckey; in dpp_get_pubkey_point() local
475 eckey = EVP_PKEY_get1_EC_KEY(pkey); in dpp_get_pubkey_point()
476 if (!eckey) in dpp_get_pubkey_point()
478 EC_KEY_set_conv_form(eckey, POINT_CONVERSION_UNCOMPRESSED); in dpp_get_pubkey_point()
479 len = i2o_ECPublicKey(eckey, NULL); in dpp_get_pubkey_point()
483 EC_KEY_free(eckey); in dpp_get_pubkey_point()
489 EC_KEY_free(eckey); in dpp_get_pubkey_point()
494 res = i2o_ECPublicKey(eckey, &pos); in dpp_get_pubkey_point()
495 EC_KEY_free(eckey); in dpp_get_pubkey_point()
519 EC_KEY *eckey = NULL; in dpp_set_pubkey_point_group() local
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
Dcrypto_openssl.c2031 EC_KEY *eckey; in crypto_ecdh_get_pubkey() local
2037 eckey = EVP_PKEY_get1_EC_KEY(ecdh->pkey); in crypto_ecdh_get_pubkey()
2038 if (!eckey) in crypto_ecdh_get_pubkey()
2041 pubkey = EC_KEY_get0_public_key(eckey); in crypto_ecdh_get_pubkey()
2078 EC_KEY_free(eckey); in crypto_ecdh_get_pubkey()
2097 EC_KEY *eckey = NULL; in crypto_ecdh_set_peerkey() local
2131 eckey = EC_KEY_new_by_curve_name(ecdh->ec->nid); in crypto_ecdh_set_peerkey()
2132 if (!eckey || EC_KEY_set_public_key(eckey, pub) != 1) { in crypto_ecdh_set_peerkey()
2140 if (!peerkey || EVP_PKEY_set1_EC_KEY(peerkey, eckey) != 1) in crypto_ecdh_set_peerkey()
2171 EC_KEY_free(eckey); in crypto_ecdh_set_peerkey()

12