Home
last modified time | relevance | path

Searched refs:gctx (Results 1 – 19 of 19) sorted by relevance

/openssl/providers/implementations/keymgmt/
H A Ddsa_kmgmt.c417 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in dsa_gen_init()
434 gctx = NULL; in dsa_gen_init()
436 return gctx; in dsa_gen_init()
453 OPENSSL_clear_free(gctx->seed, gctx->seedlen); in dsa_set_gen_seed()
471 if (gctx == NULL) in dsa_gen_set_params()
563 if (gctx == NULL) in dsa_gen_get_params()
591 return gctx->cb(params, gctx->cbarg); in dsa_gencb()
650 && !ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) in dsa_gen()
660 ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops); in dsa_gen()
665 gctx->pbits, gctx->qbits, in dsa_gen()
[all …]
H A Ddh_kmgmt.c460 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in dh_gen_init_base()
483 gctx = NULL; in dh_gen_init_base()
485 return gctx; in dh_gen_init_base()
514 OPENSSL_clear_free(gctx->seed, gctx->seedlen); in dh_set_gen_seed()
532 if (gctx == NULL) in dh_gen_common_set_params()
693 return gctx->cb(params, gctx->cbarg); in dh_gencb()
736 dh = ossl_dh_new_by_nid_ex(gctx->libctx, gctx->group_nid); in dh_gen()
751 if (!ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) in dh_gen()
761 ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops); in dh_gen()
813 if (gctx == NULL) in dh_gen_cleanup()
[all …]
H A Dec_kmgmt.c1008 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in ec_gen_init()
1018 return gctx; in ec_gen_init()
1200 gctx->gen, gctx->gen_len)) in ec_gen_set_group_from_params()
1257 if (gctx == NULL) in ec_gen_get_params()
1325 if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) in ec_gen()
1358 if (gctx == NULL in sm2_gen()
1403 if (gctx == NULL) in ec_gen_cleanup()
1406 OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen); in ec_gen_cleanup()
1408 BN_free(gctx->p); in ec_gen_cleanup()
1409 BN_free(gctx->a); in ec_gen_cleanup()
[all …]
H A Decx_kmgmt.c499 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in ecx_gen_init()
514 gctx = NULL; in ecx_gen_init()
516 return gctx; in ecx_gen_init()
548 if (gctx == NULL) in ecx_gen_set_params()
688 if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0, in ecx_gen()
703 if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) { in ecx_gen()
846 OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen); in ecx_gen_cleanup()
1057 if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) { in MAKE_KEYMGMT_FUNCTIONS()
1114 if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) { in s390x_ecx_keygen448()
1179 sha = EVP_MD_fetch(gctx->libctx, "SHA512", gctx->propq); in s390x_ecd_keygen25519()
[all …]
H A Dmac_legacy_kmgmt.c383 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in mac_gen_init_common()
387 return gctx; in mac_gen_init_common()
395 if (gctx != NULL && !mac_gen_set_params(gctx, params)) { in mac_gen_init()
397 gctx = NULL; in mac_gen_init()
399 return gctx; in mac_gen_init()
407 if (gctx != NULL && !cmac_gen_set_params(gctx, params)) { in cmac_gen_init()
409 gctx = NULL; in cmac_gen_init()
411 return gctx; in cmac_gen_init()
419 if (gctx == NULL) in mac_gen_set_params()
522 OPENSSL_secure_clear_free(gctx->priv_key, gctx->priv_key_len); in mac_gen_cleanup()
[all …]
H A Drsa_kmgmt.c447 return gctx->cb(params, gctx->cbarg); in rsa_gencb()
462 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in gen_init()
477 return gctx; in gen_init()
480 if (gctx != NULL) in gen_init()
482 OPENSSL_free(gctx); in gen_init()
528 gctx->rsa_type, gctx->libctx)) in rsa_gen_set_params()
606 gctx->cb = osslcb; in rsa_gen()
607 gctx->cbarg = cbarg; in rsa_gen()
620 (int)gctx->nbits, (int)gctx->primes, in rsa_gen()
643 if (gctx == NULL) in rsa_gen_cleanup()
[all …]
H A Dtemplate_kmgmt.c324 struct template_gen_ctx *gctx = genctx; in template_gen_set_params() local
326 if (gctx == NULL) in template_gen_set_params()
336 struct template_gen_ctx *gctx = NULL; in template_gen_init() local
345 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) { in template_gen_init()
346 gctx->provctx = provctx; in template_gen_init()
347 gctx->selection = selection; in template_gen_init()
350 OPENSSL_free(gctx); in template_gen_init()
351 gctx = NULL; in template_gen_init()
354 return gctx; in template_gen_init()
373 if (gctx == NULL) in template_gen()
[all …]
/openssl/crypto/evp/
H A De_aria.c227 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, in aria_gcm_init_key()
249 memcpy(gctx->iv, iv, gctx->ivlen); in aria_gcm_init_key()
305 memcpy(gctx->iv, ptr, gctx->ivlen); in aria_gcm_ctrl()
324 if (gctx->iv_gen == 0 || gctx->key_set == 0) in aria_gcm_ctrl()
326 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aria_gcm_ctrl()
329 memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg); in aria_gcm_ctrl()
334 ctr64_inc(gctx->iv + gctx->ivlen - 8); in aria_gcm_ctrl()
339 if (gctx->iv_gen == 0 || gctx->key_set == 0 in aria_gcm_ctrl()
342 memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg); in aria_gcm_ctrl()
343 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aria_gcm_ctrl()
[all …]
H A De_aes.c257 memcpy(gctx->iv, iv, gctx->ivlen); in aesni_gcm_init_key()
621 memcpy(gctx->iv, iv, gctx->ivlen); in aes_t4_gcm_init_key()
1528 s390x_aes_gcm_setiv(gctx, gctx->iv); in s390x_aes_gcm_ctrl()
1538 ctr64_inc(gctx->iv + gctx->ivlen - 8); in s390x_aes_gcm_ctrl()
1548 s390x_aes_gcm_setiv(gctx, gctx->iv); in s390x_aes_gcm_ctrl()
1639 memcpy(gctx->iv, iv, gctx->ivlen); in s390x_aes_gcm_init_key()
1738 s390x_kma(gctx->ares, gctx->areslen, gctx->mres, gctx->mreslen, tmp, in s390x_aes_gcm_cipher()
1770 OPENSSL_cleanse(gctx, sizeof(*gctx)); in s390x_aes_gcm_cleanup()
2718 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
2734 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
[all …]
/openssl/test/
H A Devp_extra_test2.c350 EVP_PKEY_CTX *gctx = NULL; in test_dh_tofrom_data_select() local
359 && TEST_int_gt(EVP_PKEY_keygen_init(gctx), 0) in test_dh_tofrom_data_select()
369 EVP_PKEY_CTX_free(gctx); in test_dh_tofrom_data_select()
378 EVP_PKEY_CTX *gctx = NULL; in test_dh_paramgen() local
387 && TEST_int_gt(EVP_PKEY_paramgen_init(gctx), 0) in test_dh_paramgen()
389 && TEST_true(EVP_PKEY_paramgen(gctx, &pkey)) in test_dh_paramgen()
392 EVP_PKEY_CTX_free(gctx); in test_dh_paramgen()
393 gctx = NULL; in test_dh_paramgen()
399 EVP_PKEY_CTX_free(gctx); in test_dh_paramgen()
1178 EVP_PKEY_CTX *ctx = NULL, *gctx = NULL; in test_dsa_fromdata_digest_prop() local
[all …]
H A Dfake_rsaprov.c238 unsigned char *gctx = NULL; in fake_rsa_gen_init() local
240 if (!TEST_ptr(gctx = OPENSSL_malloc(1))) in fake_rsa_gen_init()
243 *gctx = 1; in fake_rsa_gen_init()
245 return gctx; in fake_rsa_gen_init()
250 unsigned char *gctx = genctx; in fake_rsa_gen() local
254 if (!TEST_ptr(gctx) in fake_rsa_gen()
255 || !TEST_mem_eq(gctx, sizeof(*gctx), inited, sizeof(inited))) in fake_rsa_gen()
H A Devp_libctx_test.c734 EVP_PKEY_CTX *gctx = NULL; in gen_dh_key() local
741 if (!TEST_ptr(gctx = EVP_PKEY_CTX_new_from_name(libctx, "DH", NULL)) in gen_dh_key()
742 || !TEST_int_gt(EVP_PKEY_keygen_init(gctx), 0) in gen_dh_key()
743 || !TEST_true(EVP_PKEY_CTX_set_params(gctx, params)) in gen_dh_key()
744 || !TEST_true(EVP_PKEY_keygen(gctx, &pkey))) in gen_dh_key()
747 EVP_PKEY_CTX_free(gctx); in gen_dh_key()
H A Dtls-provider.c927 struct xor_gen_ctx *gctx = NULL; in xor_gen_init() local
933 if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) in xor_gen_init()
934 gctx->selection = selection; in xor_gen_init()
936 gctx->libctx = PROV_XOR_LIBCTX_OF(provctx); in xor_gen_init()
938 if (!xor_gen_set_params(gctx, params)) { in xor_gen_init()
939 OPENSSL_free(gctx); in xor_gen_init()
942 return gctx; in xor_gen_init()
947 struct xor_gen_ctx *gctx = genctx; in xor_gen_set_params() local
950 if (gctx == NULL) in xor_gen_set_params()
976 struct xor_gen_ctx *gctx = genctx; in xor_gen() local
[all …]
/openssl/doc/man7/
H A DEVP_PKEY-DSA.pod96 EVP_PKEY_CTX *gctx = NULL;
98 gctx = EVP_PKEY_CTX_new_from_pkey(NULL, param_key, NULL);
99 EVP_PKEY_keygen_init(gctx);
100 EVP_PKEY_generate(gctx, &key);
101 EVP_PKEY_CTX_free(gctx);
H A DEVP_PKEY-EC.pod248 EVP_PKEY_CTX *gctx =
251 EVP_PKEY_keygen_init(gctx);
256 EVP_PKEY_CTX_set_params(gctx, params);
258 EVP_PKEY_generate(gctx, &key);
263 EVP_PKEY_CTX_free(gctx);
271 EVP_PKEY_CTX *gctx =
274 EVP_PKEY_keygen_init(gctx);
286 EVP_PKEY_CTX_set_params(gctx, params);
288 EVP_PKEY_generate(gctx, &key);
292 EVP_PKEY_CTX_free(gctx);
H A DEVP_PKEY-DH.pod227 EVP_PKEY_CTX *gctx = EVP_PKEY_CTX_new_from_pkey(NULL, param_key, NULL);
229 EVP_PKEY_keygen_init(gctx);
230 EVP_PKEY_generate(gctx, &key);
234 EVP_PKEY_CTX_free(gctx);
/openssl/apps/
H A Dreq.c1489 EVP_PKEY_CTX *gctx = NULL; in set_keygen_ctx() local
1604 gctx = EVP_PKEY_CTX_new(param, keygen_engine); in set_keygen_ctx()
1606 gctx = EVP_PKEY_CTX_new_from_pkey(app_get0_libctx(), in set_keygen_ctx()
1623 if (gctx == NULL) { in set_keygen_ctx()
1628 if (EVP_PKEY_keygen_init(gctx) <= 0) { in set_keygen_ctx()
1630 EVP_PKEY_CTX_free(gctx); in set_keygen_ctx()
1633 if (keylen == -1 && (EVP_PKEY_CTX_is_a(gctx, "RSA") in set_keygen_ctx()
1634 || EVP_PKEY_CTX_is_a(gctx, "RSA-PSS"))) in set_keygen_ctx()
1643 if (EVP_PKEY_CTX_set_params(gctx, params) <= 0) { in set_keygen_ctx()
1645 EVP_PKEY_CTX_free(gctx); in set_keygen_ctx()
[all …]
/openssl/include/crypto/
H A Daes_platform.h89 # define AES_GCM_ASM_PPC(gctx) ((gctx)->ctr==aes_p8_ctr32_encrypt_blocks && \ argument
90 (gctx)->gcm.funcs.ghash==gcm_ghash_p8)
125 # define AES_GCM_ASM(gctx) (((gctx)->ctr==aes_v8_ctr32_encrypt_blocks_unroll12_eor3 || \ argument
126 (gctx)->ctr==aes_v8_ctr32_encrypt_blocks) && \
127 (gctx)->gcm.funcs.ghash==gcm_ghash_v8)
/openssl/providers/implementations/ciphers/
H A Dcipher_aes_gcm_hw_s390x.inc99 /* gctx->mres already returned to the caller */

Completed in 96 milliseconds