Home
last modified time | relevance | path

Searched refs:dctx (Results 1 – 25 of 42) sorted by relevance

12

/openssl/crypto/dh/
H A Ddh_pmeth.c56 DH_PKEY_CTX *dctx; in pkey_dh_init() local
58 if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) { in pkey_dh_init()
64 dctx->generator = 2; in pkey_dh_init()
67 ctx->data = dctx; in pkey_dh_init()
78 if (dctx != NULL) { in pkey_dh_cleanup()
93 dctx = dst->data; in pkey_dh_copy()
99 dctx->md = sctx->md; in pkey_dh_copy()
134 dctx->pad = p1; in pkey_dh_ctrl()
423 if (dctx->pad) in pkey_dh_derive()
437 if (!dctx->kdf_outlen || !dctx->kdf_oid) in pkey_dh_derive()
[all …]
/openssl/crypto/ec/
H A Dec_pmeth.c49 EC_PKEY_CTX *dctx; in pkey_ec_init() local
51 if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) { in pkey_ec_init()
58 ctx->data = dctx; in pkey_ec_init()
68 dctx = dst->data; in pkey_ec_copy()
74 dctx->md = sctx->md; in pkey_ec_copy()
97 if (dctx != NULL) { in pkey_ec_cleanup()
134 type = (dctx->md != NULL) ? EVP_MD_get_type(dctx->md) : NID_sha1; in pkey_ec_sign()
157 if (dctx->md) in pkey_ec_verify()
187 eckey = dctx->co_key ? dctx->co_key in pkey_ec_derive()
240 dctx->kdf_ukm, dctx->kdf_ukmlen, dctx->kdf_md, in pkey_ec_kdf_derive()
[all …]
/openssl/crypto/dsa/
H A Ddsa_pmeth.c40 DSA_PKEY_CTX *dctx = OPENSSL_malloc(sizeof(*dctx)); in pkey_dsa_init() local
42 if (dctx == NULL) in pkey_dsa_init()
44 dctx->nbits = 2048; in pkey_dsa_init()
45 dctx->qbits = 224; in pkey_dsa_init()
46 dctx->pmd = NULL; in pkey_dsa_init()
47 dctx->md = NULL; in pkey_dsa_init()
49 ctx->data = dctx; in pkey_dsa_init()
63 dctx = dst->data; in pkey_dsa_copy()
74 OPENSSL_free(dctx); in pkey_dsa_cleanup()
91 if (dctx->md != NULL && tbslen != (size_t)EVP_MD_get_size(dctx->md)) in pkey_dsa_sign()
[all …]
/openssl/providers/implementations/ciphers/
H A Dcipher_des_hw.c22 PROV_DES_CTX *dctx = (PROV_DES_CTX *)ctx; in cipher_hw_des_initkey() local
24 DES_key_schedule *ks = &dctx->dks.ks; in cipher_hw_des_initkey()
26 dctx->dstream.cbc = NULL; in cipher_hw_des_initkey()
31 dctx->dstream.cbc = ctx->enc ? des_t4_cbc_encrypt : in cipher_hw_des_initkey()
45 PROV_DES_CTX *dctx = (PROV_DES_CTX *)dst; in cipher_hw_des_copyctx() local
47 *dctx = *sctx; in cipher_hw_des_copyctx()
48 dst->ks = &dctx->dks.ks; in cipher_hw_des_copyctx()
68 PROV_DES_CTX *dctx = (PROV_DES_CTX *)ctx; in cipher_hw_des_cbc_cipher() local
69 DES_key_schedule *key = &(dctx->dks.ks); in cipher_hw_des_cbc_cipher()
71 if (dctx->dstream.cbc != NULL) { in cipher_hw_des_cbc_cipher()
[all …]
H A Dcipher_aes_xts_hw.c93 PROV_AES_XTS_CTX *dctx = (PROV_AES_XTS_CTX *)dst; in cipher_hw_aes_xts_copyctx() local
95 *dctx = *sctx; in cipher_hw_aes_xts_copyctx()
96 dctx->xts.key1 = &dctx->ks1.ks; in cipher_hw_aes_xts_copyctx()
97 dctx->xts.key2 = &dctx->ks2.ks; in cipher_hw_aes_xts_copyctx()
H A Dcipher_desx_hw.c44 PROV_TDES_CTX *dctx = (PROV_TDES_CTX *)dst; in cipher_hw_desx_copyctx() local
46 *dctx = *sctx; in cipher_hw_desx_copyctx()
47 dst->ks = &dctx->tks.ks; in cipher_hw_desx_copyctx()
H A Dcipher_tdes_hw.c52 PROV_TDES_CTX *dctx = (PROV_TDES_CTX *)dst; in ossl_cipher_hw_tdes_copyctx() local
54 *dctx = *sctx; in ossl_cipher_hw_tdes_copyctx()
55 dst->ks = &dctx->tks.ks; in ossl_cipher_hw_tdes_copyctx()
/openssl/doc/man3/
H A DOSSL_DECODER_from_bio.pod52 OSSL_DECODER_CTX *dctx;
59 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, format, structure,
63 if (dctx == NULL) {
67 OSSL_DECODER_CTX_set_passphrase(dctx, pass, strlen(pass));
68 if (OSSL_DECODER_from_bio(dctx, bio)) {
73 OSSL_DECODER_CTX_free(dctx);
77 OSSL_DECODER_CTX *dctx;
86 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, format, structure,
91 if (dctx == NULL) {
96 if (OSSL_DECODER_from_data(dctx, &data, &datalen)) {
[all …]
/openssl/demos/encode/
H A Drsa_encode.c33 OSSL_DECODER_CTX *dctx = NULL; in load_key() local
46 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "PEM", NULL, "RSA", in load_key()
49 if (dctx == NULL) { in load_key()
64 if (OSSL_DECODER_CTX_set_passphrase(dctx, in load_key()
73 if (OSSL_DECODER_from_fp(dctx, f) == 0) { in load_key()
80 OSSL_DECODER_CTX_free(dctx); in load_key()
/openssl/doc/man7/
H A Dprovider-digest.pod21 void OSSL_FUNC_digest_freectx(void *dctx);
22 void *OSSL_FUNC_digest_dupctx(void *dctx);
25 int OSSL_FUNC_digest_init(void *dctx, const OSSL_PARAM params[]);
36 const OSSL_PARAM *OSSL_FUNC_digest_gettable_ctx_params(void *dctx,
38 const OSSL_PARAM *OSSL_FUNC_digest_settable_ctx_params(void *dctx,
46 int OSSL_FUNC_digest_get_ctx_params(void *dctx, OSSL_PARAM params[]);
108 the I<dctx> parameter.
112 I<dctx> parameter and return the duplicate copy.
117 provider side digest context in the I<dctx> parameter.
153 provider side digest context I<dctx> to I<params>.
[all …]
H A DEVP_KEYEXCH-DH.pod89 EVP_PKEY_CTX *dctx = EVP_PKEY_CTX_new_from_pkey(NULL, host_key, NULL);
91 EVP_PKEY_derive_init(dctx);
96 EVP_PKEY_CTX_set_params(dctx, params);
98 EVP_PKEY_derive_set_peer(dctx, peer_pub_key);
101 EVP_PKEY_derive(dctx, NULL, &secret_len);
104 EVP_PKEY_derive(dctx, secret, &secret_len);
107 EVP_PKEY_CTX_free(dctx);
H A DEVP_KEYEXCH-ECDH.pod76 EVP_PKEY_CTX *dctx = EVP_PKEY_CTX_new_from_pkey(NULL, host_key, NULL);
78 EVP_PKEY_derive_init(dctx);
90 EVP_PKEY_CTX_set_params(dctx, params);
92 EVP_PKEY_derive_set_peer(dctx, peer_pub_key);
93 EVP_PKEY_derive(dctx, secret, &secret_len);
96 EVP_PKEY_CTX_free(dctx);
/openssl/crypto/evp/
H A Dm_sigver.c477 dctx = EVP_PKEY_CTX_dup(pctx); in EVP_DigestSignFinal()
478 if (dctx == NULL) in EVP_DigestSignFinal()
481 r = dctx->op.sig.signature->digest_sign_final(dctx->op.sig.algctx, in EVP_DigestSignFinal()
484 EVP_PKEY_CTX_free(dctx); in EVP_DigestSignFinal()
506 if (dctx == NULL) in EVP_DigestSignFinal()
508 r = dctx->pmeth->signctx(dctx, sigret, siglen, ctx); in EVP_DigestSignFinal()
509 EVP_PKEY_CTX_free(dctx); in EVP_DigestSignFinal()
603 dctx = EVP_PKEY_CTX_dup(pctx); in EVP_DigestVerifyFinal()
604 if (dctx == NULL) in EVP_DigestVerifyFinal()
607 r = dctx->op.sig.signature->digest_verify_final(dctx->op.sig.algctx, in EVP_DigestVerifyFinal()
[all …]
H A Devp_pkey.c75 OSSL_DECODER_CTX *dctx = NULL; in EVP_PKCS82PKEY_ex() local
84 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", "PrivateKeyInfo", in EVP_PKCS82PKEY_ex()
86 if (dctx == NULL in EVP_PKCS82PKEY_ex()
87 || !OSSL_DECODER_from_data(dctx, &p8_data, &len)) in EVP_PKCS82PKEY_ex()
92 OSSL_DECODER_CTX_free(dctx); in EVP_PKCS82PKEY_ex()
H A Dbio_md.c133 EVP_MD_CTX *ctx, *dctx, **pctx; in md_ctrl() local
184 dctx = BIO_get_data(dbio); in md_ctrl()
185 if (!EVP_MD_CTX_copy_ex(dctx, ctx)) in md_ctrl()
H A Dbio_enc.c297 BIO_ENC_CTX *ctx, *dctx; in enc_ctrl() local
374 dctx = BIO_get_data(dbio); in enc_ctrl()
375 dctx->cipher = EVP_CIPHER_CTX_new(); in enc_ctrl()
376 if (dctx->cipher == NULL) in enc_ctrl()
378 ret = EVP_CIPHER_CTX_copy(dctx->cipher, ctx->cipher); in enc_ctrl()
/openssl/crypto/hmac/
H A Dhmac.c204 int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) in HMAC_CTX_copy() argument
206 if (!hmac_ctx_alloc_mds(dctx)) in HMAC_CTX_copy()
208 if (!EVP_MD_CTX_copy_ex(dctx->i_ctx, sctx->i_ctx)) in HMAC_CTX_copy()
210 if (!EVP_MD_CTX_copy_ex(dctx->o_ctx, sctx->o_ctx)) in HMAC_CTX_copy()
212 if (!EVP_MD_CTX_copy_ex(dctx->md_ctx, sctx->md_ctx)) in HMAC_CTX_copy()
214 dctx->md = sctx->md; in HMAC_CTX_copy()
217 hmac_ctx_cleanup(dctx); in HMAC_CTX_copy()
/openssl/test/
H A Dendecoder_legacy_test.c311 OSSL_DECODER_CTX *dctx = NULL; in test_protected_PEM() local
335 || !TEST_ptr(dctx = in test_protected_PEM()
340 || !TEST_true(OSSL_DECODER_from_bio(dctx, membio_provided)) in test_protected_PEM()
360 OSSL_DECODER_CTX_free(dctx); in test_protected_PEM()
379 OSSL_DECODER_CTX *dctx = NULL; in test_unprotected_PEM() local
402 || !TEST_ptr(dctx = in test_unprotected_PEM()
407 || !TEST_true(OSSL_DECODER_from_bio(dctx, membio_provided)) in test_unprotected_PEM()
427 OSSL_DECODER_CTX_free(dctx); in test_unprotected_PEM()
449 OSSL_DECODER_CTX *dctx = NULL; in test_DER() local
469 || !TEST_ptr(dctx = in test_DER()
[all …]
/openssl/crypto/rsa/
H A Drsa_pmeth.c84 RSA_PKEY_CTX *dctx, *sctx; in pkey_rsa_copy() local
89 dctx = dst->data; in pkey_rsa_copy()
90 dctx->nbits = sctx->nbits; in pkey_rsa_copy()
92 dctx->pub_exp = BN_dup(sctx->pub_exp); in pkey_rsa_copy()
93 if (!dctx->pub_exp) in pkey_rsa_copy()
96 dctx->pad_mode = sctx->pad_mode; in pkey_rsa_copy()
97 dctx->md = sctx->md; in pkey_rsa_copy()
98 dctx->mgf1md = sctx->mgf1md; in pkey_rsa_copy()
99 dctx->saltlen = sctx->saltlen; in pkey_rsa_copy()
101 OPENSSL_free(dctx->oaep_label); in pkey_rsa_copy()
[all …]
/openssl/crypto/asn1/
H A Dd2i_pr.c30 OSSL_DECODER_CTX *dctx = NULL; in d2i_PrivateKey_decoder() local
49 dctx = OSSL_DECODER_CTX_new_for_pkey(ppkey, "DER", in d2i_PrivateKey_decoder()
54 if (dctx == NULL) in d2i_PrivateKey_decoder()
57 ret = OSSL_DECODER_from_data(dctx, pp, &len); in d2i_PrivateKey_decoder()
58 OSSL_DECODER_CTX_free(dctx); in d2i_PrivateKey_decoder()
/openssl/demos/signature/
H A DEVP_Signature_demo.c46 OSSL_DECODER_CTX *dctx = NULL; in get_key() local
61 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", NULL, "EC", in get_key()
63 (void)OSSL_DECODER_from_data(dctx, &data, &data_len); in get_key()
64 OSSL_DECODER_CTX_free(dctx); in get_key()
/openssl/demos/encrypt/
H A Drsa_encrypt.c38 OSSL_DECODER_CTX *dctx = NULL; in get_key() local
53 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", NULL, "RSA", in get_key()
55 (void)OSSL_DECODER_from_data(dctx, &data, &data_len); in get_key()
56 OSSL_DECODER_CTX_free(dctx); in get_key()
/openssl/crypto/pem/
H A Dpem_pkey.c40 OSSL_DECODER_CTX *dctx = NULL; in pem_read_bio_key_decoder() local
47 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "PEM", NULL, NULL, in pem_read_bio_key_decoder()
50 if (dctx == NULL) in pem_read_bio_key_decoder()
56 if (!OSSL_DECODER_CTX_set_pem_password_cb(dctx, cb, u)) in pem_read_bio_key_decoder()
60 while (!OSSL_DECODER_from_bio(dctx, bp) || pkey == NULL) in pem_read_bio_key_decoder()
91 OSSL_DECODER_CTX_free(dctx); in pem_read_bio_key_decoder()
/openssl/crypto/engine/
H A Deng_openssl.c475 OSSL_HMAC_PKEY_CTX *sctx, *dctx; in ossl_hmac_copy() local
481 dctx = EVP_PKEY_CTX_get_data(dst); in ossl_hmac_copy()
482 dctx->md = sctx->md; in ossl_hmac_copy()
483 if (!HMAC_CTX_copy(dctx->ctx, sctx->ctx)) in ossl_hmac_copy()
486 if (!ASN1_OCTET_STRING_set(&dctx->ktmp, in ossl_hmac_copy()
/openssl/providers/fips/
H A Dself_test_kats.c366 EVP_PKEY_CTX *kactx = NULL, *dctx = NULL; in self_test_ka() local
410 dctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, NULL); in self_test_ka()
411 if (dctx == NULL) in self_test_ka()
414 if (EVP_PKEY_derive_init(dctx) <= 0 in self_test_ka()
415 || EVP_PKEY_derive_set_peer(dctx, peerkey) <= 0 in self_test_ka()
416 || EVP_PKEY_derive(dctx, secret, &secret_len) <= 0) in self_test_ka()
430 EVP_PKEY_CTX_free(dctx); in self_test_ka()

Completed in 68 milliseconds

12