Lines Matching refs:ec

101 int ossl_ec_set_check_group_type_from_name(EC_KEY *ec, const char *name)  in ossl_ec_set_check_group_type_from_name()  argument
107 EC_KEY_clear_flags(ec, EC_FLAG_CHECK_NAMED_GROUP_MASK); in ossl_ec_set_check_group_type_from_name()
108 EC_KEY_set_flags(ec, flags); in ossl_ec_set_check_group_type_from_name()
112 static int ec_set_check_group_type_from_param(EC_KEY *ec, const OSSL_PARAM *p) in ec_set_check_group_type_from_param() argument
127 return ossl_ec_set_check_group_type_from_name(ec, name); in ec_set_check_group_type_from_param()
359 int ossl_ec_set_ecdh_cofactor_mode(EC_KEY *ec, int mode) in ossl_ec_set_ecdh_cofactor_mode() argument
361 const EC_GROUP *ecg = EC_KEY_get0_group(ec); in ossl_ec_set_ecdh_cofactor_mode()
381 EC_KEY_set_flags(ec, EC_FLAG_COFACTOR_ECDH); in ossl_ec_set_ecdh_cofactor_mode()
383 EC_KEY_clear_flags(ec, EC_FLAG_COFACTOR_ECDH); in ossl_ec_set_ecdh_cofactor_mode()
396 int ossl_ec_key_fromdata(EC_KEY *ec, const OSSL_PARAM params[], int include_private) in ossl_ec_key_fromdata() argument
407 ecg = EC_KEY_get0_group(ec); in ossl_ec_key_fromdata()
417 ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(ec)); in ossl_ec_key_fromdata()
482 && !EC_KEY_set_private_key(ec, priv_key)) in ossl_ec_key_fromdata()
486 && !EC_KEY_set_public_key(ec, pub_point)) in ossl_ec_key_fromdata()
499 int ossl_ec_group_fromdata(EC_KEY *ec, const OSSL_PARAM params[]) in ossl_ec_group_fromdata() argument
504 if (ec == NULL) in ossl_ec_group_fromdata()
507 group = EC_GROUP_new_from_params(params, ossl_ec_key_get_libctx(ec), in ossl_ec_group_fromdata()
508 ossl_ec_key_get0_propq(ec)); in ossl_ec_group_fromdata()
510 if (!EC_KEY_set_group(ec, group)) in ossl_ec_group_fromdata()
518 static int ec_key_point_format_fromdata(EC_KEY *ec, const OSSL_PARAM params[]) in ec_key_point_format_fromdata() argument
529 EC_KEY_set_conv_form(ec, format); in ec_key_point_format_fromdata()
534 static int ec_key_group_check_fromdata(EC_KEY *ec, const OSSL_PARAM params[]) in ec_key_group_check_fromdata() argument
540 return ec_set_check_group_type_from_param(ec, p); in ec_key_group_check_fromdata()
544 static int ec_set_include_public(EC_KEY *ec, int include) in ec_set_include_public() argument
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()
556 int ossl_ec_key_otherparams_fromdata(EC_KEY *ec, const OSSL_PARAM params[]) in ossl_ec_key_otherparams_fromdata() argument
560 if (ec == NULL) in ossl_ec_key_otherparams_fromdata()
568 || !ossl_ec_set_ecdh_cofactor_mode(ec, mode)) in ossl_ec_key_otherparams_fromdata()
577 || !ec_set_include_public(ec, include)) in ossl_ec_key_otherparams_fromdata()
580 if (!ec_key_point_format_fromdata(ec, params)) in ossl_ec_key_otherparams_fromdata()
582 if (!ec_key_group_check_fromdata(ec, params)) in ossl_ec_key_otherparams_fromdata()
587 int ossl_ec_key_is_foreign(const EC_KEY *ec) in ossl_ec_key_is_foreign() argument
590 if (ec->engine != NULL || EC_KEY_get_method(ec) != EC_KEY_OpenSSL()) in ossl_ec_key_is_foreign()