Lines Matching refs:group
157 static int ec_group_explicit_todata(const EC_GROUP *group, OSSL_PARAM_BLD *tmpl, in ec_group_explicit_todata() argument
168 fid = EC_GROUP_get_field_type(group); in ec_group_explicit_todata()
197 if (!EC_GROUP_get_curve(group, p, a, b, bnctx)) { in ec_group_explicit_todata()
211 const BIGNUM *order = EC_GROUP_get0_order(group); in ec_group_explicit_todata()
237 const EC_POINT *genpt = EC_GROUP_get0_generator(group); in ec_group_explicit_todata()
238 point_conversion_form_t genform = EC_GROUP_get_point_conversion_form(group); in ec_group_explicit_todata()
244 genbuf_len = EC_POINT_point2buf(group, genpt, genform, genbuf, bnctx); in ec_group_explicit_todata()
259 const BIGNUM *cofactor = EC_GROUP_get0_cofactor(group); in ec_group_explicit_todata()
271 unsigned char *seed = EC_GROUP_get0_seed(group); in ec_group_explicit_todata()
272 size_t seed_len = EC_GROUP_get_seed_len(group); in ec_group_explicit_todata()
288 int ossl_ec_group_todata(const EC_GROUP *group, OSSL_PARAM_BLD *tmpl, in ossl_ec_group_todata() argument
297 if (group == NULL) { in ossl_ec_group_todata()
302 genform = EC_GROUP_get_point_conversion_form(group); in ossl_ec_group_todata()
311 encoding_flag = EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE; in ossl_ec_group_todata()
323 group->decoded_from_explicit_params)) in ossl_ec_group_todata()
326 curve_nid = EC_GROUP_get_curve_name(group); in ossl_ec_group_todata()
334 if (!ec_group_explicit_todata(group, tmpl, params, bnctx, genbuf)) in ossl_ec_group_todata()
502 EC_GROUP *group = NULL; in ossl_ec_group_fromdata() local
507 group = EC_GROUP_new_from_params(params, ossl_ec_key_get_libctx(ec), in ossl_ec_group_fromdata()
510 if (!EC_KEY_set_group(ec, group)) in ossl_ec_group_fromdata()
514 EC_GROUP_free(group); in ossl_ec_group_fromdata()
611 if (src->group != NULL in ossl_ec_key_dup()
613 ret->group = ossl_ec_group_new_ex(src->libctx, src->propq, in ossl_ec_key_dup()
614 src->group->meth); in ossl_ec_key_dup()
615 if (ret->group == NULL in ossl_ec_key_dup()
616 || !EC_GROUP_copy(ret->group, src->group)) in ossl_ec_key_dup()
626 if (ret->group == NULL) in ossl_ec_key_dup()
629 ret->pub_key = EC_POINT_new(ret->group); in ossl_ec_key_dup()
638 if (ret->group == NULL) in ossl_ec_key_dup()
644 if (ret->group->meth->keycopy in ossl_ec_key_dup()
645 && ret->group->meth->keycopy(ret, src) == 0) in ossl_ec_key_dup()
745 EC_GROUP *group; in ossl_x509_algor_is_sm2() local
748 if ((group = d2i_ECPKParameters(NULL, &der, derlen)) == NULL) in ossl_x509_algor_is_sm2()
751 ret = (EC_GROUP_get_curve_name(group) == NID_sm2); in ossl_x509_algor_is_sm2()
753 EC_GROUP_free(group); in ossl_x509_algor_is_sm2()
766 EC_GROUP *group = NULL; in ossl_ec_key_param_from_x509_algor() local
791 group = EC_GROUP_new_by_curve_name_ex(libctx, propq, OBJ_obj2nid(poid)); in ossl_ec_key_param_from_x509_algor()
792 if (group == NULL) in ossl_ec_key_param_from_x509_algor()
794 EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE); in ossl_ec_key_param_from_x509_algor()
795 if (EC_KEY_set_group(eckey, group) == 0) in ossl_ec_key_param_from_x509_algor()
797 EC_GROUP_free(group); in ossl_ec_key_param_from_x509_algor()
807 EC_GROUP_free(group); in ossl_ec_key_param_from_x509_algor()