/openssl/test/ |
H A D | evp_kdf_test.c | 862 OSSL_PARAM params[7], *p = params; in test_kdf_scrypt() local 905 OSSL_PARAM params[4], *p = params; in test_kdf_ss_hash() local 943 OSSL_PARAM params[4], *p = params; in test_kdf_x963() local 1386 OSSL_PARAM params[8], *p = params; in test_kdf_kbkdf_fixedinfo() local 1440 OSSL_PARAM params[5], *p = params; in test_kdf_kbkdf_kmac() local 1592 OSSL_PARAM params[6], *p = params; in test_kdf_ss_hmac() local 1633 OSSL_PARAM params[7], *p = params; in test_kdf_ss_kmac() local 1685 OSSL_PARAM params[6], *p = params; in test_kdf_sshkdf() local 1794 OSSL_PARAM params[4], *p = params; in test_kdf_x942_asn1() local 1830 OSSL_PARAM params[4], *p = params; in test_kdf_krb5kdf() local [all …]
|
H A D | ffc_internal_test.c | 177 FFC_PARAMS params; in ffc_params_validate_g_unverified_test() local 247 FFC_PARAMS params; in ffc_params_validate_pq_test() local 349 FFC_PARAMS params; in ffc_params_gen_test() local 370 FFC_PARAMS params; in ffc_params_gen_canonicalg_test() local 373 params.gindex = 1; in ffc_params_gen_canonicalg_test() 395 FFC_PARAMS params; in ffc_params_fips186_2_gen_validate_test() local 444 FFC_PARAMS *params; in ffc_public_validate_test() local 524 BN_free(params->p); in ffc_public_validate_test() 525 params->p = NULL; in ffc_public_validate_test() 542 FFC_PARAMS *params; in ffc_private_validate_test() local [all …]
|
H A D | params_test.c | 134 for (; params->key != NULL; params++) in raw_set_params() 136 obj->p1 = *(int *)params->data; in raw_set_params() 156 OPENSSL_strnlen(params->data, params->data_size); in raw_set_params() 165 obj->p6_l = params->data_size; in raw_set_params() 175 for (; params->key != NULL; params++) in raw_get_params() 184 if (!TEST_size_t_ge(params->data_size, params->return_size)) in raw_get_params() 186 BN_bn2nativepad(obj->p3, params->data, params->return_size); in raw_get_params() 189 if (!TEST_size_t_gt(params->data_size, params->return_size)) in raw_get_params() 194 if (!TEST_size_t_gt(params->data_size, params->return_size)) in raw_get_params() 384 static OSSL_PARAM params[10]; in construct_api_params() local [all …]
|
H A D | provider_status_test.c | 99 return self_test_events(params, arg, "On Demand", 0); in self_test_on_demand() 104 return self_test_events(params, arg, "On Loading", 0); in self_test_on_load() 110 OSSL_PARAM params[5]; in get_provider_params() local 128 params[4] = OSSL_PARAM_construct_end(); in get_provider_params() 129 OSSL_PARAM_set_all_unmodified(params); in get_provider_params() 132 if (!TEST_true(OSSL_PARAM_modified(params + 0)) in get_provider_params() 133 || !TEST_true(OSSL_PARAM_modified(params + 1)) in get_provider_params() 134 || !TEST_true(OSSL_PARAM_modified(params + 2)) in get_provider_params() 135 || !TEST_true(OSSL_PARAM_modified(params + 3)) in get_provider_params() 149 OSSL_PARAM params[2]; in test_provider_status() local [all …]
|
H A D | param_build_test.c | 33 params = params_blt; in template_public_single_zero_test() 43 if (params != params_blt) in template_public_single_zero_test() 44 OPENSSL_free(params); in template_public_single_zero_test() 65 params = params_blt; in template_private_single_zero_test() 77 if (params != params_blt) in template_private_single_zero_test() 78 OPENSSL_free(params); in template_private_single_zero_test() 128 params = params_blt; in template_public_test() 218 if (params != params_blt) in template_public_test() 219 OPENSSL_free(params); in template_public_test() 283 params = params_blt; in template_private_test() [all …]
|
/openssl/crypto/ffc/ |
H A D | ffc_params.c | 22 memset(params, 0, sizeof(*params)); in ossl_ffc_params_init() 23 params->pcounter = -1; in ossl_ffc_params_init() 31 BN_clear_free(params->p); in ossl_ffc_params_cleanup() 35 OPENSSL_clear_free(params->seed, params->seedlen); in ossl_ffc_params_cleanup() 37 BN_free(params->p); in ossl_ffc_params_cleanup() 38 BN_free(params->q); in ossl_ffc_params_cleanup() 39 BN_free(params->g); in ossl_ffc_params_cleanup() 40 BN_free(params->j); in ossl_ffc_params_cleanup() 116 params->h = index; in ossl_ffc_params_set_h() 121 params->flags = flags; in ossl_ffc_params_set_flags() [all …]
|
H A D | ffc_params_validate.c | 58 if (params == NULL || params->p == NULL || params->q == NULL) in ossl_ffc_params_FIPS186_4_validate() 62 L = BN_num_bits(params->p); in ossl_ffc_params_FIPS186_4_validate() 63 N = BN_num_bits(params->q); in ossl_ffc_params_FIPS186_4_validate() 76 if (params == NULL || params->p == NULL || params->q == NULL) { in ossl_ffc_params_FIPS186_2_validate() 82 L = BN_num_bits(params->p); in ossl_ffc_params_FIPS186_2_validate() 83 N = BN_num_bits(params->q); in ossl_ffc_params_FIPS186_2_validate() 102 if (params == NULL) in ossl_ffc_params_simple_validate() 108 if (!ossl_ffc_params_copy(&tmpparams, params)) in ossl_ffc_params_simple_validate() 115 if (params->flags & FFC_PARAM_FLAG_VALIDATE_LEGACY) in ossl_ffc_params_simple_validate() 144 if (params == NULL) in ossl_ffc_params_full_validate() [all …]
|
H A D | ffc_params_generate.c | 540 md = EVP_MD_fetch(libctx, params->mdname, params->mdprops); in ossl_ffc_params_FIPS186_4_gen_verify() 596 if ((params->p == NULL) != (params->q == NULL)) { in ossl_ffc_params_FIPS186_4_gen_verify() 624 p = params->p; in ossl_ffc_params_FIPS186_4_gen_verify() 625 q = params->q; in ossl_ffc_params_FIPS186_4_gen_verify() 782 if (params->p == NULL || params->q == NULL || params->g == NULL) in ossl_ffc_params_FIPS186_4_gen_verify() 787 params->h = hret; in ossl_ffc_params_FIPS186_4_gen_verify() 836 md = EVP_MD_fetch(libctx, params->mdname, params->mdprops); in ossl_ffc_params_FIPS186_2_gen_verify() 906 if ((params->p != NULL) != (params->q != NULL)) { in ossl_ffc_params_FIPS186_2_gen_verify() 929 p = params->p; in ossl_ffc_params_FIPS186_2_gen_verify() 930 q = params->q; in ossl_ffc_params_FIPS186_2_gen_verify() [all …]
|
H A D | ffc_backend.c | 20 int ossl_ffc_params_fromdata(FFC_PARAMS *ffc, const OSSL_PARAM params[]) in ossl_ffc_params_fromdata() argument 27 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME); in ossl_ffc_params_fromdata() 44 param_p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_P); in ossl_ffc_params_fromdata() 45 param_g = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_G); in ossl_ffc_params_fromdata() 46 param_q = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_Q); in ossl_ffc_params_fromdata() 53 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_GINDEX); in ossl_ffc_params_fromdata() 59 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PCOUNTER); in ossl_ffc_params_fromdata() 65 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_COFACTOR); in ossl_ffc_params_fromdata() 68 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_H); in ossl_ffc_params_fromdata() 74 prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_SEED); in ossl_ffc_params_fromdata() [all …]
|
/openssl/crypto/dh/ |
H A D | dh_check.c | 84 if (!BN_is_odd(dh->params.p)) in DH_check_params() 174 if (dh->params.q != NULL) { in DH_check() 175 if (BN_ucmp(dh->params.p, dh->params.q) > 0) in DH_check() 184 else if (BN_cmp(dh->params.g, dh->params.p) >= 0) in DH_check() 188 if (!BN_mod_exp(t1, dh->params.g, dh->params.q, dh->params.p, ctx)) in DH_check() 199 if (!BN_div(t1, t2, dh->params.p, dh->params.q, ctx)) in DH_check() 259 if (dh->params.q != NULL && BN_ucmp(dh->params.p, dh->params.q) < 0) { in DH_check_pub_key() 288 if (dh->params.q != NULL) { in ossl_dh_check_priv_key() 289 upper = dh->params.q; in ossl_dh_check_priv_key() 338 if (dh->params.p == NULL in ossl_dh_check_pairwise() [all …]
|
H A D | dh_group_params.c | 34 ossl_ffc_named_group_set(&dh->params, group); in dh_param_init() 35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init() 63 dh->params.nid = NID_undef; /* flush cached value */ in ossl_dh_cache_named_group() 66 if (dh->params.p == NULL in ossl_dh_cache_named_group() 67 || dh->params.g == NULL) in ossl_dh_cache_named_group() 70 if ((group = ossl_ffc_numbers_to_dh_named_group(dh->params.p, in ossl_dh_cache_named_group() 71 dh->params.q, in ossl_dh_cache_named_group() 73 if (dh->params.q == NULL) in ossl_dh_cache_named_group() 74 dh->params.q = (BIGNUM *)ossl_ffc_named_group_get_q(group); in ossl_dh_cache_named_group() 76 dh->params.nid = ossl_ffc_named_group_get_uid(group); in ossl_dh_cache_named_group() [all …]
|
H A D | dh_key.c | 52 if (dh->params.q != NULL in ossl_dh_compute_key() 58 if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) { in ossl_dh_compute_key() 93 if (BN_copy(pminus1, dh->params.p) == NULL in ossl_dh_compute_key() 102 ret = BN_bn2binpad(z, key, BN_num_bytes(dh->params.p)); in ossl_dh_compute_key() 156 pad = BN_num_bytes(dh->params.p) - rv; in DH_compute_key_padded() 256 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p, in ossl_dh_generate_public_key() 280 if (dh->params.q != NULL in generate_key() 317 if (dh->params.q == NULL in generate_key() 326 if (dh->params.q == NULL) in generate_key() 329 if (dh->params.q == NULL) { in generate_key() [all …]
|
/openssl/include/internal/ |
H A D | ffc.h | 125 void ossl_ffc_params_init(FFC_PARAMS *params); 126 void ossl_ffc_params_cleanup(FFC_PARAMS *params); 132 int ossl_ffc_params_set_seed(FFC_PARAMS *params, 134 void ossl_ffc_params_set_gindex(FFC_PARAMS *params, int index); 136 void ossl_ffc_params_set_h(FFC_PARAMS *params, int index); 142 int ossl_ffc_params_set_validate_params(FFC_PARAMS *params, 174 const FFC_PARAMS *params, 177 const FFC_PARAMS *params, 180 const FFC_PARAMS *params, 194 int ossl_ffc_validate_public_key(const FFC_PARAMS *params, [all …]
|
/openssl/crypto/evp/ |
H A D | evp_lib.c | 327 OSSL_PARAM params[10]; in evp_cipher_cache_constants() local 547 params[0] = in EVP_CIPHER_CTX_original_iv() 564 params[0] = in EVP_CIPHER_CTX_iv() 578 params[0] = in EVP_CIPHER_CTX_iv_noconst() 591 params[0] = in EVP_CIPHER_CTX_get_updated_iv() 600 params[0] = in EVP_CIPHER_CTX_get_original_iv() 1281 OSSL_PARAM params[3]; in EVP_CIPHER_CTX_get_algor_params() local 1298 if (OSSL_PARAM_modified(¶ms[0]) && params[0].return_size != 0) in EVP_CIPHER_CTX_get_algor_params() 1300 if (OSSL_PARAM_modified(¶ms[1]) && params[1].return_size != 0) in EVP_CIPHER_CTX_get_algor_params() 1314 derk = params[i].key; in EVP_CIPHER_CTX_get_algor_params() [all …]
|
H A D | dsa_ctrl.c | 33 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dsa_paramgen_type() local 42 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_dsa_paramgen_type() 48 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dsa_paramgen_gindex() local 56 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_dsa_paramgen_gindex() 64 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dsa_paramgen_seed() local 73 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_dsa_paramgen_seed() 79 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dsa_paramgen_bits() local 88 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_dsa_paramgen_bits() 94 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dsa_paramgen_q_bits() local 103 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_dsa_paramgen_q_bits() [all …]
|
H A D | dh_ctrl.c | 52 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_paramgen_gindex() local 60 return evp_pkey_ctx_set_params_strict(ctx, params); in EVP_PKEY_CTX_set_dh_paramgen_gindex() 68 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_paramgen_seed() local 93 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_paramgen_prime_len() local 107 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_paramgen_subprime_len() local 122 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_paramgen_generator() local 240 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_dh_kdf_outlen() local 269 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_get_dh_kdf_outlen() local 293 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set0_dh_kdf_ukm() local 324 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_get0_dh_kdf_ukm() local [all …]
|
H A D | ec_ctrl.c | 43 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_ecdh_cofactor_mode() local 64 ret = evp_pkey_ctx_set_params_strict(ctx, params); in EVP_PKEY_CTX_set_ecdh_cofactor_mode() 73 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_get_ecdh_cofactor_mode() local 83 ret = evp_pkey_ctx_get_params_strict(ctx, params); in EVP_PKEY_CTX_get_ecdh_cofactor_mode() 151 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set_ecdh_kdf_outlen() local 170 ret = evp_pkey_ctx_set_params_strict(ctx, params); in EVP_PKEY_CTX_set_ecdh_kdf_outlen() 180 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_get_ecdh_kdf_outlen() local 190 ret = evp_pkey_ctx_get_params_strict(ctx, params); in EVP_PKEY_CTX_get_ecdh_kdf_outlen() 213 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_set0_ecdh_kdf_ukm() local 247 OSSL_PARAM params[2], *p = params; in EVP_PKEY_CTX_get0_ecdh_kdf_ukm() local [all …]
|
/openssl/crypto/dsa/ |
H A D | dsa_ossl.c | 88 if (dsa->params.p == NULL in ossl_dsa_do_sign_int() 89 || dsa->params.q == NULL in ossl_dsa_do_sign_int() 90 || dsa->params.g == NULL) { in ossl_dsa_do_sign_int() 229 if (!dsa->params.p || !dsa->params.q || !dsa->params.g) { in dsa_sign_setup() 235 if (BN_is_zero(dsa->params.p) in dsa_sign_setup() 325 if (!dsa->meth->bn_mod_exp(dsa, r, dsa->params.g, k, dsa->params.p, in dsa_sign_setup() 329 if (!BN_mod_exp_mont(r, dsa->params.g, k, dsa->params.p, ctx, in dsa_sign_setup() 364 if (dsa->params.p == NULL in dsa_do_verify() 365 || dsa->params.q == NULL in dsa_do_verify() 366 || dsa->params.g == NULL) { in dsa_do_verify() [all …]
|
/openssl/providers/implementations/macs/ |
H A D | blake2_mac_impl.c | 38 BLAKE2_PARAM params; member 51 BLAKE2_PARAM_INIT(&macctx->params); in blake2_mac_new() 87 return macctx->params.digest_length; in blake2_mac_size() 101 BLAKE2_PARAM_SET_KEY_LENGTH(&macctx->params, (uint8_t)keylen); in blake2_setkey() 106 size_t keylen, const OSSL_PARAM params[]) in blake2_mac_init() argument 115 } else if (macctx->params.key_length == 0) { in blake2_mac_init() 120 return BLAKE2_INIT_KEY(&macctx->ctx, &macctx->params, macctx->key); in blake2_mac_init() 158 static int blake2_get_ctx_params(void *vmacctx, OSSL_PARAM params[]) in blake2_get_ctx_params() argument 162 if ((p = OSSL_PARAM_locate(params, OSSL_MAC_PARAM_SIZE)) != NULL in blake2_get_ctx_params() 194 if (ossl_param_is_empty(params)) in blake2_mac_set_ctx_params() [all …]
|
/openssl/providers/implementations/keymgmt/ |
H A D | ec_kmgmt.c | 457 OSSL_PARAM *params = NULL; in ec_export() local 515 ok = param_cb(params, cbarg); in ec_export() 516 OSSL_PARAM_free(params); in ec_export() 708 if ((p = OSSL_PARAM_locate(params, in common_get_params() 741 if ((p = OSSL_PARAM_locate(params, in common_get_params() 756 ret = ec_get_ecm_params(ecg, params) in common_get_params() 835 if (ossl_param_is_empty(params)) in ec_set_params() 1147 OSSL_PARAM *params = NULL; in ec_gen_set_group_from_params() local 1203 params = OSSL_PARAM_BLD_to_param(bld); in ec_gen_set_group_from_params() 1204 if (params == NULL) in ec_gen_set_group_from_params() [all …]
|
H A D | template_kmgmt.c | 150 OSSL_PARAM *params = NULL; in template_export() local 171 params = OSSL_PARAM_BLD_to_param(tmpl); in template_export() 172 if (params == NULL) in template_export() 175 ret = param_cb(params, cbarg); in template_export() 176 OSSL_PARAM_free(params); in template_export() 191 if (ossl_param_is_empty(params)) in ossl_template_key_fromdata() 251 static int template_get_params(void *key, OSSL_PARAM params[]) in template_get_params() argument 257 if (ossl_param_is_empty(params)) in template_get_params() 299 if (ossl_param_is_empty(params)) in template_set_params() 334 const OSSL_PARAM params[]) in template_gen_init() argument [all …]
|
/openssl/providers/implementations/kdfs/ |
H A D | sskdf.c | 186 OSSL_PARAM params[2]; in kmac_init() local 194 params[1] = OSSL_PARAM_construct_end(); in kmac_init() 196 if (!EVP_MAC_CTX_set_params(ctx, params)) in kmac_init() 214 if (EVP_MAC_CTX_set_params(ctx, params) <= 0) in kmac_init() 414 const OSSL_PARAM params[]) in sskdf_derive() argument 560 if (ossl_param_is_empty(params)) in sskdf_common_set_ctx_params() 615 if (ossl_param_is_empty(params)) in sskdf_set_ctx_params() 622 if (!sskdf_common_set_ctx_params(ctx, params)) in sskdf_set_ctx_params() 650 if (ossl_param_is_empty(params)) in sskdf_common_get_ctx_params() 665 if (ossl_param_is_empty(params)) in sskdf_get_ctx_params() [all …]
|
/openssl/util/ |
H A D | withlibctx.pl | 46 my @params; 82 @params = split(",", $pre); 83 my @params = grep(s/^\s*|\s*$//g, @params); 84 formatparams($indent, @params); 98 my @params = @_; 100 if (@params) { 101 my $param = shift @params; 105 print "," if @params; 107 while (@params) { 108 my $param = shift @params; [all …]
|
/openssl/demos/pkey/ |
H A D | EVP_PKEY_DSA_paramgen.c | 25 OSSL_PARAM params[7]; in main() local 39 params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_FFC_TYPE, in main() 41 params[1] = OSSL_PARAM_construct_uint(OSSL_PKEY_PARAM_FFC_PBITS, &pbits); in main() 42 params[2] = OSSL_PARAM_construct_uint(OSSL_PKEY_PARAM_FFC_QBITS, &qbits); in main() 43 params[3] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_FFC_GINDEX, &gindex); in main() 44 params[4] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_FFC_DIGEST, in main() 46 params[5] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_FFC_DIGEST_PROPS, in main() 48 params[6] = OSSL_PARAM_construct_end(); in main() 52 || EVP_PKEY_CTX_set_params(ctx, params) <= 0 in main()
|
/openssl/include/openssl/ |
H A D | core_dispatch.h | 332 (void *vctx, OSSL_PARAM params[])) 427 (void *mctx, OSSL_PARAM params[])) 458 (void *kctx, OSSL_PARAM params[])) 492 const OSSL_PARAM params[])) 515 (void *vctx, OSSL_PARAM params[])) 610 (void *genctx, OSSL_PARAM params[])) 792 const OSSL_PARAM params[])) 803 const OSSL_PARAM params[])) 814 (void *ctx, OSSL_PARAM params[])) 822 (void *ctx, OSSL_PARAM params[])) [all …]
|