/openssl/crypto/cms/ |
H A D | cms_enc.c | 43 enc = ec->cipher ? 1 : 0; in ossl_cms_EncryptedContent_init_bio() 55 cipher = ec->cipher; in ossl_cms_EncryptedContent_init_bio() 59 if (ec->key != NULL) in ossl_cms_EncryptedContent_init_bio() 105 ec->taglen, ec->tag) <= 0) { in ossl_cms_EncryptedContent_init_bio() 127 if (!ec->key) { in ossl_cms_EncryptedContent_init_bio() 128 ec->key = tkey; in ossl_cms_EncryptedContent_init_bio() 150 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio() 192 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio() 193 ec->key = NULL; in ossl_cms_EncryptedContent_init_bio() 207 ec->cipher = cipher; in ossl_cms_EncryptedContent_init() [all …]
|
H A D | cms_env.c | 526 if (EVP_PKEY_encrypt(pctx, NULL, &eklen, ec->key, ec->keylen) <= 0) in cms_RecipientInfo_ktri_encrypt() 536 if (EVP_PKEY_encrypt(pctx, ek, &eklen, ec->key, ec->keylen) <= 0) in cms_RecipientInfo_ktri_encrypt() 633 OPENSSL_clear_free(ec->key, ec->keylen); in cms_RecipientInfo_ktri_decrypt() 634 ec->key = ek; in cms_RecipientInfo_ktri_decrypt() 869 if (ec == NULL) in cms_RecipientInfo_kekri_encrypt() 940 if (ec == NULL) in cms_RecipientInfo_kekri_decrypt() 991 OPENSSL_clear_free(ec->key, ec->keylen); in cms_RecipientInfo_kekri_decrypt() 992 ec->key = ukey; in cms_RecipientInfo_kekri_decrypt() 1125 OPENSSL_clear_free(ec->key, ec->keylen); in cms_env_clear_ec() 1126 ec->key = NULL; in cms_env_clear_ec() [all …]
|
H A D | cms_pwri.c | 48 CMS_EncryptedContentInfo *ec; in CMS_add0_recipient_password() local 56 ec = ossl_cms_get0_env_enc_content(cms); in CMS_add0_recipient_password() 57 if (ec == NULL) in CMS_add0_recipient_password() 71 kekciph = ec->cipher; in CMS_add0_recipient_password() 293 CMS_EncryptedContentInfo *ec; in ossl_cms_RecipientInfo_pwri_crypt() local 304 ec = ossl_cms_get0_env_enc_content(cms); in ossl_cms_RecipientInfo_pwri_crypt() 365 if (!kek_wrap_key(NULL, &keylen, ec->key, ec->keylen, kekctx, cms_ctx)) in ossl_cms_RecipientInfo_pwri_crypt() 373 if (!kek_wrap_key(key, &keylen, ec->key, ec->keylen, kekctx, cms_ctx)) in ossl_cms_RecipientInfo_pwri_crypt() 391 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_RecipientInfo_pwri_crypt() 392 ec->key = key; in ossl_cms_RecipientInfo_pwri_crypt() [all …]
|
H A D | cms_kari.c | 261 CMS_EncryptedContentInfo *ec; in CMS_RecipientInfo_kari_decrypt() local 271 ec = ossl_cms_get0_env_enc_content(cms); in CMS_RecipientInfo_kari_decrypt() 272 OPENSSL_clear_free(ec->key, ec->keylen); in CMS_RecipientInfo_kari_decrypt() 273 ec->key = cek; in CMS_RecipientInfo_kari_decrypt() 274 ec->keylen = ceklen; in CMS_RecipientInfo_kari_decrypt() 480 CMS_EncryptedContentInfo *ec; in ossl_cms_RecipientInfo_kari_encrypt() local 491 ec = ossl_cms_get0_env_enc_content(cms); in ossl_cms_RecipientInfo_kari_encrypt() 493 if (!cms_wrap_init(kari, ec->cipher)) in ossl_cms_RecipientInfo_kari_encrypt() 516 if (!cms_kek_cipher(&enckey, &enckeylen, ec->key, ec->keylen, in ossl_cms_RecipientInfo_kari_encrypt()
|
/openssl/crypto/ec/ |
H A D | ec_ameth.c | 234 if (pkey->pkey.ec == NULL || EC_KEY_get0_group(pkey->pkey.ec) == NULL) in ec_missing_parameters() 245 if (to->pkey.ec == NULL) { in ec_copy_parameters() 246 to->pkey.ec = EC_KEY_new(); in ec_copy_parameters() 247 if (to->pkey.ec == NULL) in ec_copy_parameters() 274 EC_KEY_free(pkey->pkey.ec); in int_ec_free() 383 EC_KEY *ec; in old_ec_priv_decode() local 425 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_check() 438 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_public_check() 454 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_param_check() 613 if (ec == NULL) { in ec_pkey_import_from() [all …]
|
H A D | ec_backend.c | 107 EC_KEY_set_flags(ec, flags); in ossl_ec_set_check_group_type_from_name() 361 const EC_GROUP *ecg = EC_KEY_get0_group(ec); in ossl_ec_set_ecdh_cofactor_mode() 407 ecg = EC_KEY_get0_group(ec); in ossl_ec_key_fromdata() 504 if (ec == NULL) in ossl_ec_group_fromdata() 510 if (!EC_KEY_set_group(ec, group)) in ossl_ec_group_fromdata() 529 EC_KEY_set_conv_form(ec, format); in ec_key_point_format_fromdata() 546 int flags = EC_KEY_get_enc_flags(ec); in ec_set_include_public() 552 EC_KEY_set_enc_flags(ec, flags); in ec_set_include_public() 560 if (ec == NULL) in ossl_ec_key_otherparams_fromdata() 587 int ossl_ec_key_is_foreign(const EC_KEY *ec) in ossl_ec_key_is_foreign() argument [all …]
|
H A D | ec_pmeth.c | 118 const int sig_sz = ECDSA_size(ec); in pkey_ec_sign() 434 EC_KEY *ec = NULL; in pkey_ec_paramgen() local 442 ec = EC_KEY_new(); in pkey_ec_paramgen() 443 if (ec == NULL) in pkey_ec_paramgen() 447 EC_KEY_free(ec); in pkey_ec_paramgen() 453 EC_KEY *ec = NULL; in pkey_ec_keygen() local 461 ec = EC_KEY_new(); in pkey_ec_keygen() 462 if (ec == NULL) in pkey_ec_keygen() 465 EC_KEY_free(ec); in pkey_ec_keygen() 472 ret = EC_KEY_set_group(ec, dctx->gen_group); in pkey_ec_keygen() [all …]
|
/openssl/providers/implementations/signature/ |
H A D | ecdsa_sig.c | 66 EC_KEY *ec; member 137 if (ec == NULL && ctx->ec == NULL) { in ecdsa_signverify_init() 142 if (ec != NULL) { in ecdsa_signverify_init() 145 if (!EC_KEY_up_ref(ec)) in ecdsa_signverify_init() 147 EC_KEY_free(ctx->ec); in ecdsa_signverify_init() 148 ctx->ec = ec; in ecdsa_signverify_init() 175 size_t ecsize = ECDSA_size(ctx->ec); in ecdsa_sign() 384 EC_KEY_free(ctx->ec); in ecdsa_freectx() 403 dstctx->ec = NULL; in ecdsa_dupctx() 408 if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec)) in ecdsa_dupctx() [all …]
|
H A D | sm2_sig.c | 66 EC_KEY *ec; member 142 if (ec == NULL && psm2ctx->ec == NULL) { in sm2sig_signature_init() 147 if (ec != NULL) { in sm2sig_signature_init() 148 if (!EC_KEY_up_ref(ec)) in sm2sig_signature_init() 150 EC_KEY_free(psm2ctx->ec); in sm2sig_signature_init() 151 psm2ctx->ec = ec; in sm2sig_signature_init() 164 size_t ecsize = ECDSA_size(ctx->ec); in sm2sig_sign() 332 EC_KEY_free(ctx->ec); in sm2sig_freectx() 347 dstctx->ec = NULL; in sm2sig_dupctx() 351 if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec)) in sm2sig_dupctx() [all …]
|
/openssl/providers/implementations/keymgmt/ |
H A D | ec_kmgmt.c | 238 if (ec == NULL) in otherparams_to_params() 385 EC_KEY *ec = keydata; in common_import() local 1045 EC_KEY *ec = templ; in ec_gen_set_template() local 1237 EC_KEY *ec = NULL; in ec_gen() local 1278 return ec; in ec_gen() 1281 EC_KEY_free(ec); in ec_gen() 1293 EC_KEY *ec = NULL; in sm2_gen() local 1328 return ec; in sm2_gen() 1331 EC_KEY_free(ec); in sm2_gen() 1362 EC_KEY *ec = NULL; in common_load() local [all …]
|
/openssl/providers/ |
H A D | fips.module.sources | 161 crypto/ec/ec2_oct.c 162 crypto/ec/ec2_smpl.c 163 crypto/ec/ec_asn1.c 165 crypto/ec/ec_check.c 167 crypto/ec/ec_cvt.c 168 crypto/ec/ec_key.c 170 crypto/ec/ec_lib.c 172 crypto/ec/ec_mult.c 173 crypto/ec/ec_oct.c 182 crypto/ec/ecp_oct.c [all …]
|
H A D | fips-sources.checksums | 161 ae1637d89287c9d22a34bdc0d67f6e01262a2f8dcef9b61369dba8c334f5a80d crypto/ec/ec2_oct.c 162 6bbbf570ce31f5b579f7e03ec9f8a774663c7c1eb5e475bd31f8fee94a021ffc crypto/ec/ec2_smpl.c 163 69d64accd498583e65df2dc43730eee2922217a7bfefda2cd1a9da176e3d1dcd crypto/ec/ec_asn1.c 165 86e2becf9b3870979e2abefa1bd318e1a31820d275e2b50e03b17fc287abb20a crypto/ec/ec_check.c 167 8cfd0dcfb5acbf6105691a2d5e2826dba1ff3906707bc9dd6ff9bffcc306468f crypto/ec/ec_cvt.c 168 28726bc957ea821639b1023e5bff0e77ced61bae31f96c165e33aadfe0bc5c9a crypto/ec/ec_key.c 170 2db28a620fa62889c816dca25bb1153c99af2e8604beb3b1655495da96f2c965 crypto/ec/ec_lib.c 172 fa901b996eb0e460359cd470843bdb03af7a77a2f1136c5e1d30daef70f3e4d2 crypto/ec/ec_mult.c 173 129c6b42417bfcf582f4a959cfd65433e6f85b158274f4fa38f9c62615ac9166 crypto/ec/ec_oct.c 182 51cb98e7e9c241e33261589f0d74103238baaa850e333c61ff1da360e127518a crypto/ec/ecp_oct.c [all …]
|
H A D | encoders.inc | 24 #define ENCODER_STRUCTURE_EC "ec" 59 ENCODER_TEXT("EC", ec, yes), 109 ENCODER_w_structure("EC", ec, yes, der, type_specific_no_pub), 110 ENCODER_w_structure("EC", ec, yes, pem, type_specific_no_pub), 112 ENCODER("EC", ec, yes, blob), 179 ENCODER_w_structure("EC", ec, yes, der, PrivateKeyInfo), 180 ENCODER_w_structure("EC", ec, yes, pem, PrivateKeyInfo), 244 ENCODER_w_structure("EC", ec, yes, der, EC), 245 ENCODER_w_structure("EC", ec, yes, pem, EC), 269 ENCODER_w_structure("EC", ec, yes, der, X9_62), [all …]
|
H A D | decoders.inc | 24 #define DECODER_STRUCTURE_EC "ec" 57 DECODER_w_structure("EC", der, PrivateKeyInfo, ec, yes), 58 DECODER_w_structure("EC", der, SubjectPublicKeyInfo, ec, yes), 59 DECODER_w_structure("EC", der, type_specific_no_pub, ec, yes), 60 DECODER_w_structure("EC", der, EC, ec, yes),
|
/openssl/providers/common/der/ |
H A D | der_ecx_key.c | 14 int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec) in ossl_DER_w_algorithmIdentifier_X25519() argument 23 int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec) in ossl_DER_w_algorithmIdentifier_X448() argument 32 int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec) in ossl_DER_w_algorithmIdentifier_ED25519() argument 41 int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec) in ossl_DER_w_algorithmIdentifier_ED448() argument
|
/openssl/include/crypto/ |
H A D | ec.h | 75 int ossl_ec_group_fromdata(EC_KEY *ec, const OSSL_PARAM params[]); 79 int ossl_ec_key_otherparams_fromdata(EC_KEY *ec, const OSSL_PARAM params[]); 80 int ossl_ec_key_is_foreign(const EC_KEY *ec); 89 int ossl_ec_set_ecdh_cofactor_mode(EC_KEY *ec, int mode); 97 int ossl_ec_set_check_group_type_from_name(EC_KEY *ec, const char *name);
|
/openssl/providers/implementations/encode_decode/ |
H A D | encode_key2any.c | 1314 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, type_specific_no_pub, der); 1333 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, type_specific_no_pub, pem); 1382 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, EncryptedPrivateKeyInfo, der); 1384 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, PrivateKeyInfo, der); 1385 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, PrivateKeyInfo, pem); 1386 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, SubjectPublicKeyInfo, der); 1387 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, SubjectPublicKeyInfo, pem); 1443 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, EC, der); 1444 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, EC, pem); 1463 MAKE_ENCODER(ec, ec, EVP_PKEY_EC, X9_62, der); [all …]
|
H A D | encode_key2text.c | 493 const EC_KEY *ec = key; in ec_to_text() local 500 if (out == NULL || ec == NULL) { in ec_to_text() 505 if ((group = EC_KEY_get0_group(ec)) == NULL) { in ec_to_text() 519 const BIGNUM *priv_key = EC_KEY_get0_private_key(ec); in ec_to_text() 525 priv_len = EC_KEY_priv2buf(ec, &priv); in ec_to_text() 530 const EC_POINT *pub_pt = EC_KEY_get0_public_key(ec); in ec_to_text() 537 pub_len = EC_KEY_key2buf(ec, EC_KEY_get_conv_form(ec), &pub, NULL); in ec_to_text() 553 ret = ec_param_to_text(out, group, ossl_ec_key_get_libctx(ec)); in ec_to_text() 881 MAKE_TEXT_ENCODER(ec, ec); 883 MAKE_TEXT_ENCODER(sm2, ec);
|
H A D | encode_key2blob.c | 175 MAKE_BLOB_ENCODER(ec, ec, PUBLIC_KEY); 177 MAKE_BLOB_ENCODER(sm2, ec, PUBLIC_KEY);
|
/openssl/providers/common/include/prov/ |
H A D | der_ecx.h.in | 22 int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec); 23 int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec); 24 int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec); 25 int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
H A D | der_sm2.h.in | 12 #include "crypto/ec.h" 23 int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec); 26 EC_KEY *ec, int mdnid);
|
H A D | der_ec.h.in | 12 #include "crypto/ec.h" 23 int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec); 26 EC_KEY *ec, int mdnid);
|
/openssl/crypto/asn1/ |
H A D | d2i_pu.c | 76 ret->pkey.ec = copy->pkey.ec; in d2i_PublicKey() 77 copy->pkey.ec = NULL; in d2i_PublicKey() 79 if (!o2i_ECPublicKey(&ret->pkey.ec, pp, length)) { in d2i_PublicKey()
|
/openssl/doc/man1/ |
H A D | openssl-ec.pod.in | 10 openssl-ec - EC key processing 14 B<openssl> B<ec> 38 The L<openssl-ec(1)> command processes EC keys. They can be converted between 131 Possible value are: B<named_curve>, i.e. the ec parameters are 132 specified by an OID, or B<explicit> where the ec parameters are 162 openssl ec -in key.pem -des3 -out keyout.pem 166 openssl ec -in key.pem -outform DER -out keyout.der 170 openssl ec -in key.pem -text -noout 174 openssl ec -in key.pem -pubout -out pubkey.pem 178 openssl ec -in key.pem -param_enc explicit -out keyout.pem [all …]
|
/openssl/test/certs/ |
H A D | setup.sh | 121 ./mkcert.sh genca "CA" ca-key-ec-explicit ca-cert-ec-explicit root-key root-cert 123 ./mkcert.sh genca "CA" ca-key-ec-named ca-cert-ec-named root-key root-cert 206 ./mkcert.sh genee server.example ee-key-ec-explicit ee-cert-ec-explicit ca-key-ec-named ca-cert-ec-… 208 ./mkcert.sh genee server.example ee-key-ec-named-explicit \ 209 ee-cert-ec-named-explicit ca-key-ec-explicit ca-cert-ec-explicit 211 ./mkcert.sh genee server.example ee-key-ec-named-named \ 212 ee-cert-ec-named-named ca-key-ec-named ca-cert-ec-named 425 OPENSSL_KEYALG=ec OPENSSL_KEYBITS=brainpoolP256r1 ./mkcert.sh genee \
|