Home
last modified time | relevance | path

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

12

/openssl/crypto/ec/
H A Dec_key.c212 if (eckey == NULL || eckey->group == NULL) { in EC_KEY_generate_key()
219 ret = eckey->meth->keygen(eckey); in EC_KEY_generate_key()
233 ret = eckey->group->meth->keygen(eckey); in ossl_ec_key_gen()
423 eckey->pub_key = EC_POINT_new(eckey->group); in ossl_ec_generate_key_dhkem()
459 ret = EC_POINT_mul(eckey->group, eckey->pub_key, eckey->priv_key, NULL, in ossl_ec_key_simple_generate_public_key()
471 if (eckey == NULL || eckey->group == NULL || eckey->pub_key == NULL) { in EC_KEY_check_key()
481 return eckey->group->meth->keycheck(eckey); in EC_KEY_check_key()
532 if (eckey == NULL || eckey->group == NULL || eckey->pub_key == NULL) { in ossl_ec_key_public_check_quick()
607 if (eckey == NULL || eckey->group == NULL || eckey->priv_key == NULL) { in ossl_ec_key_private_check()
1004 return eckey->group->meth->priv2oct(eckey, buf, len); in EC_KEY_priv2oct()
[all …]
H A Decdsa_sign.c22 return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey); in ECDSA_do_sign()
27 EC_KEY *eckey) in ECDSA_do_sign_ex() argument
29 if (eckey->meth->sign_sig != NULL) in ECDSA_do_sign_ex()
30 return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); in ECDSA_do_sign_ex()
36 *sig, unsigned int *siglen, EC_KEY *eckey) in ECDSA_sign() argument
43 const BIGNUM *r, EC_KEY *eckey) in ECDSA_sign_ex() argument
45 if (eckey->meth->sign != NULL) in ECDSA_sign_ex()
46 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
51 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, in ECDSA_sign_setup() argument
54 if (eckey->meth->sign_setup != NULL) in ECDSA_sign_setup()
[all …]
H A Decdsa_ossl.c47 return eckey->group->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); in ossl_ecdsa_sign_setup()
52 EC_KEY *eckey) in ossl_ecdsa_sign_sig() argument
71 return eckey->group->meth->ecdsa_verify_sig(dgst, dgst_len, sig, eckey); in ossl_ecdsa_verify_sig()
81 *siglen = ECDSA_size(eckey); in ossl_ecdsa_sign()
147 if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL) { in ecdsa_sign_setup()
156 if (!EC_KEY_can_sign(eckey)) { in ecdsa_sign_setup()
283 group = EC_KEY_get0_group(eckey); in ossl_ecdsa_simple_sign_sig()
295 if (!EC_KEY_can_sign(eckey)) { in ossl_ecdsa_simple_sign_sig()
456 if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL || in ossl_ecdsa_simple_verify_sig()
462 if (!EC_KEY_can_sign(eckey)) { in ossl_ecdsa_simple_verify_sig()
[all …]
H A Decdsa_vrf.c27 const ECDSA_SIG *sig, EC_KEY *eckey) in ECDSA_do_verify() argument
29 if (eckey->meth->verify_sig != NULL) in ECDSA_do_verify()
30 return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey); in ECDSA_do_verify()
42 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) in ECDSA_verify() argument
44 if (eckey->meth->verify != NULL) in ECDSA_verify()
45 return eckey->meth->verify(type, dgst, dgst_len, sigbuf, sig_len, in ECDSA_verify()
46 eckey); in ECDSA_verify()
H A Dec_ameth.c104 EC_KEY *eckey = NULL; in eckey_pub_decode() local
114 if (!eckey) in eckey_pub_decode()
127 EC_KEY_free(eckey); in eckey_pub_decode()
154 if (eckey != NULL) { in eckey_priv_decode_ex()
349 EC_KEY *eckey; in eckey_param_decode() local
425 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_check() local
428 if (eckey->priv_key == NULL) { in ec_pkey_check()
438 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_public_check() local
457 if (eckey->group == NULL) { in ec_pkey_param_check()
476 const EC_KEY *eckey = NULL; in ec_pkey_export_to() local
[all …]
H A Dec_kmeth.c150 const EC_KEY *eckey, in ECDH_compute_key() argument
156 if (eckey->meth->compute_key == NULL) { in ECDH_compute_key()
164 if (!eckey->meth->compute_key(&sec, &seclen, pub_key, eckey)) in ECDH_compute_key()
233 EC_KEY *eckey), in EC_KEY_METHOD_set_sign() argument
240 EC_KEY *eckey)) in EC_KEY_METHOD_set_sign()
251 int sig_len, EC_KEY *eckey), in EC_KEY_METHOD_set_verify() argument
255 EC_KEY *eckey)) in EC_KEY_METHOD_set_verify()
308 EC_KEY *eckey), in EC_KEY_METHOD_get_sign() argument
315 EC_KEY *eckey)) in EC_KEY_METHOD_get_sign()
329 int sig_len, EC_KEY *eckey), in EC_KEY_METHOD_get_verify() argument
[all …]
H A Dec_local.h170 int (*keygen)(EC_KEY *eckey);
171 int (*keycheck)(const EC_KEY *eckey);
172 int (*keygenpub)(EC_KEY *eckey);
174 void (*keyfinish)(EC_KEY *eckey);
183 EC_KEY *eckey);
653 int ossl_ec_key_simple_generate_key(EC_KEY *eckey);
680 const BIGNUM *r, EC_KEY *eckey);
685 EC_KEY *eckey);
698 int ossl_ec_key_gen(EC_KEY *eckey);
716 EC_KEY *eckey);
[all …]
H A Decp_s390x_nistp.c129 EC_KEY *eckey, in ecdsa_s390x_nistp_sign_sig() argument
140 group = EC_KEY_get0_group(eckey); in ecdsa_s390x_nistp_sign_sig()
141 privkey = EC_KEY_get0_private_key(eckey); in ecdsa_s390x_nistp_sign_sig()
147 if (!EC_KEY_can_sign(eckey)) { in ecdsa_s390x_nistp_sign_sig()
186 if (RAND_priv_bytes_ex(eckey->libctx, param + S390X_OFF_RN(len), in ecdsa_s390x_nistp_sign_sig()
236 group = EC_KEY_get0_group(eckey); in ecdsa_s390x_nistp_verify_sig()
237 pubkey = EC_KEY_get0_public_key(eckey); in ecdsa_s390x_nistp_verify_sig()
243 if (!EC_KEY_can_sign(eckey)) { in ecdsa_s390x_nistp_verify_sig()
305 EC_KEY *eckey) \
307 return ecdsa_s390x_nistp_sign_sig(dgst, dgstlen, kinv, r, eckey, \
[all …]
H A Dec_backend.c765 EC_KEY *eckey = NULL; in ossl_ec_key_param_from_x509_algor() local
769 if ((eckey = EC_KEY_new_ex(libctx, propq)) == NULL) { in ossl_ec_key_param_from_x509_algor()
780 if (d2i_ECParameters(&eckey, &pm, pmlen) == NULL) { in ossl_ec_key_param_from_x509_algor()
795 if (EC_KEY_set_group(eckey, group) == 0) in ossl_ec_key_param_from_x509_algor()
803 return eckey; in ossl_ec_key_param_from_x509_algor()
806 EC_KEY_free(eckey); in ossl_ec_key_param_from_x509_algor()
816 EC_KEY *eckey = NULL; in ossl_ec_key_from_pkcs8() local
822 if (eckey == NULL) in ossl_ec_key_from_pkcs8()
826 if (!d2i_ECPrivateKey(&eckey, &p, pklen)) { in ossl_ec_key_from_pkcs8()
831 return eckey; in ossl_ec_key_from_pkcs8()
[all …]
H A Dec_pmeth.c171 EC_KEY *eckey; in pkey_ec_derive() local
185 eckey = dctx->co_key ? dctx->co_key in pkey_ec_derive()
190 group = EC_KEY_get0_group(eckey); in pkey_ec_derive()
206 ret = ECDH_compute_key(key, outlen, pubkey, eckey, 0); in pkey_ec_derive()
/openssl/doc/man3/
H A DECDSA_sign.pod18 int ECDSA_size(const EC_KEY *eckey);
23 EC_KEY *eckey);
28 const ECDSA_SIG *sig, EC_KEY* eckey);
32 EC_KEY *eckey);
67 public key I<eckey>. The parameter I<type> is ignored.
116 EC_KEY *eckey;
119 if (eckey == NULL)
121 if (EC_KEY_generate_key(eckey) == 0)
127 sig = ECDSA_do_sign(digest, 32, eckey);
136 buf_len = ECDSA_size(eckey);
[all …]
H A DEC_KEY_new.pod42 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
50 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
51 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
59 int EC_KEY_oct2key(EC_KEY *eckey, const unsigned char *buf, size_t len, BN_CTX *ctx);
60 size_t EC_KEY_key2buf(const EC_KEY *eckey, point_conversion_form_t form,
63 int EC_KEY_oct2priv(EC_KEY *eckey, const unsigned char *buf, size_t len);
64 size_t EC_KEY_priv2oct(const EC_KEY *eckey, unsigned char *buf, size_t len);
66 size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf);
121 I<eckey> object. I<eckey> must have an EC_GROUP object associated with it
170 EC_POINT in I<eckey>.
[all …]
H A DEC_KEY_get_enc_flags.pod13 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
/openssl/apps/
H A Dec.c69 EVP_PKEY *eckey = NULL; in ec_main() local
176 eckey = load_pubkey(infile, informat, 1, passin, e, "public key"); in ec_main()
178 eckey = load_key(infile, informat, 1, passin, e, "private key"); in ec_main()
180 if (eckey == NULL) { in ec_main()
191 eckey, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, in ec_main()
199 eckey, OSSL_PKEY_PARAM_EC_ENCODING, asn1_encoding)) { in ec_main()
218 if ((pubin && EVP_PKEY_print_public(out, eckey, 0, NULL) <= 0) in ec_main()
219 || (!pubin && EVP_PKEY_print_private(out, eckey, 0, NULL) <= 0)) { in ec_main()
226 pctx = EVP_PKEY_CTX_new_from_pkey(NULL, eckey, NULL); in ec_main()
255 ectx = OSSL_ENCODER_CTX_new_for_pkey(eckey, selection, in ec_main()
[all …]
/openssl/include/crypto/
H A Dec.h62 int ossl_ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx);
63 int ossl_ec_key_public_check_quick(const EC_KEY *eckey, BN_CTX *ctx);
64 int ossl_ec_key_private_check(const EC_KEY *eckey);
65 int ossl_ec_key_pairwise_check(const EC_KEY *eckey, BN_CTX *ctx);
66 OSSL_LIB_CTX *ossl_ec_key_get_libctx(const EC_KEY *eckey);
67 const char *ossl_ec_key_get0_propq(const EC_KEY *eckey);
98 int ossl_ec_generate_key_dhkem(EC_KEY *eckey,
102 EC_KEY *eckey, unsigned int nonce_type,
H A Dsm2.h23 int ossl_sm2_key_private_check(const EC_KEY *eckey);
55 EC_KEY *eckey);
62 EC_KEY *eckey);
/openssl/test/
H A Decdsatest.c190 EC_KEY *eckey_neg = NULL, *eckey = NULL; in test_builtin() local
229 || !TEST_true(EC_KEY_generate_key(eckey)) in test_builtin()
244 temp = ECDSA_size(eckey); in test_builtin()
252 || !TEST_int_le(sig_len, ECDSA_size(eckey)) in test_builtin()
356 EC_KEY *eckey = NULL; in test_ecdsa_sig_NULL() local
361 && TEST_int_eq(EC_KEY_generate_key(eckey), 1) in test_ecdsa_sig_NULL()
363 eckey), 1) in test_ecdsa_sig_NULL()
367 eckey), 1) in test_ecdsa_sig_NULL()
371 eckey), 1) in test_ecdsa_sig_NULL()
381 eckey), 1); in test_ecdsa_sig_NULL()
[all …]
/openssl/crypto/sm2/
H A Dsm2_key.c22 int ossl_sm2_key_private_check(const EC_KEY *eckey) in ossl_sm2_key_private_check() argument
29 if (eckey == NULL in ossl_sm2_key_private_check()
30 || (group = EC_KEY_get0_group(eckey)) == NULL in ossl_sm2_key_private_check()
31 || (priv_key = EC_KEY_get0_private_key(eckey)) == NULL in ossl_sm2_key_private_check()
H A Dsm2_sign.c457 EC_KEY *eckey) in ossl_sm2_internal_sign() argument
475 s = sm2_sig_gen(eckey, e); in ossl_sm2_internal_sign()
498 EC_KEY *eckey) in ossl_sm2_internal_verify() argument
529 ret = sm2_sig_verify(eckey, s, e); in ossl_sm2_internal_verify()
/openssl/include/openssl/
H A Dec.h1094 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_conv_form(EC_KEY *eckey,
1132 OSSL_DEPRECATEDIN_3_0 int EC_KEY_can_sign(const EC_KEY *eckey);
1193 OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_priv2buf(const EC_KEY *eckey,
1474 OSSL_DEPRECATEDIN_3_0 int ECDSA_size(const EC_KEY *eckey);
1505 EC_KEY *eckey),
1512 EC_KEY *eckey));
1519 int sig_len, EC_KEY *eckey),
1522 EC_KEY *eckey));
1549 EC_KEY *eckey),
1556 EC_KEY *eckey));
[all …]
/openssl/crypto/pem/
H A Dpem_all.c34 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey);
134 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey) in IMPLEMENT_PEM_rw()
143 if (eckey) { in IMPLEMENT_PEM_rw()
144 EC_KEY_free(*eckey); in IMPLEMENT_PEM_rw()
145 *eckey = dtmp; in IMPLEMENT_PEM_rw()
166 EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, in IMPLEMENT_PEM_rw()
171 return pkey_get_eckey(pktmp, eckey); /* will free pktmp */ in IMPLEMENT_PEM_rw()
/openssl/crypto/x509/
H A Dx_all.c449 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey) in d2i_EC_PUBKEY_fp() argument
451 return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, fp, eckey); in d2i_EC_PUBKEY_fp()
454 int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey) in i2d_EC_PUBKEY_fp() argument
456 return ASN1_i2d_fp_of(EC_KEY, i2d_EC_PUBKEY, fp, eckey); in i2d_EC_PUBKEY_fp()
459 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey) in d2i_ECPrivateKey_fp() argument
464 int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey) in i2d_ECPrivateKey_fp() argument
466 return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey); in i2d_ECPrivateKey_fp()
469 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey) in d2i_EC_PUBKEY_bio() argument
479 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey) in d2i_ECPrivateKey_bio() argument
484 int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey) in i2d_ECPrivateKey_bio() argument
[all …]
/openssl/providers/implementations/encode_decode/
H A Dencode_key2any.c642 static int prepare_ec_explicit_params(const void *eckey, in prepare_ec_explicit_params() argument
652 params->length = i2d_ECParameters(eckey, &params->data); in prepare_ec_explicit_params()
668 static int prepare_ec_params(const void *eckey, int nid, int save, in prepare_ec_params() argument
672 const EC_GROUP *group = EC_KEY_get0_group(eckey); in prepare_ec_params()
698 return prepare_ec_explicit_params(eckey, pstr, pstrtype); in prepare_ec_params()
704 if (EC_KEY_get0_public_key(eckey) == NULL) { in ec_spki_pub_to_der()
708 return i2o_ECPublicKey(eckey, pder); in ec_spki_pub_to_der()
713 EC_KEY *eckey = (EC_KEY *)veckey; in ec_pki_priv_to_der() local
724 old_flags = EC_KEY_get_enc_flags(eckey); /* save old flags */ in ec_pki_priv_to_der()
725 EC_KEY_set_enc_flags(eckey, old_flags | EC_PKEY_NO_PARAMETERS); in ec_pki_priv_to_der()
[all …]
/openssl/providers/implementations/keymgmt/
H A Dec_kmgmt.c114 int key_to_params(const EC_KEY *eckey, OSSL_PARAM_BLD *tmpl, in key_to_params() argument
126 if (eckey == NULL in key_to_params()
127 || (ecg = EC_KEY_get0_group(eckey)) == NULL) in key_to_params()
130 priv_key = EC_KEY_get0_private_key(eckey); in key_to_params()
131 pub_point = EC_KEY_get0_public_key(eckey); in key_to_params()
139 bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); in key_to_params()
153 point_conversion_form_t format = EC_KEY_get_conv_form(eckey); in key_to_params()
/openssl/crypto/evp/
H A Dctrl_params_translate.c1639 const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey); in get_payload_public_key() local
1640 BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); in get_payload_public_key()
1641 const EC_GROUP *ecg = EC_KEY_get0_group(eckey); in get_payload_public_key()
1642 const EC_POINT *point = EC_KEY_get0_public_key(eckey); in get_payload_public_key()
1671 const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey); in get_payload_public_key_ec() local
1681 if (eckey == NULL) { in get_payload_public_key_ec()
1686 bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); in get_payload_public_key_ec()
1690 point = EC_KEY_get0_public_key(eckey); in get_payload_public_key_ec()
1691 ecg = EC_KEY_get0_group(eckey); in get_payload_public_key_ec()

Completed in 67 milliseconds

12