Lines Matching refs:group

188 static int ec_asn1_group2fieldid(const EC_GROUP *group, X9_62_FIELDID *field)  in ec_asn1_group2fieldid()  argument
193 if (group == NULL || field == NULL) in ec_asn1_group2fieldid()
200 nid = EC_GROUP_get_field_type(group); in ec_asn1_group2fieldid()
213 if (!EC_GROUP_get_curve(group, tmp, NULL, NULL, NULL)) { in ec_asn1_group2fieldid()
242 char_two->m = (long)EC_GROUP_get_degree(group); in ec_asn1_group2fieldid()
244 field_type = EC_GROUP_get_basis_type(group); in ec_asn1_group2fieldid()
259 if (!EC_GROUP_get_trinomial_basis(group, &k)) in ec_asn1_group2fieldid()
274 if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)) in ec_asn1_group2fieldid()
310 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve) in ec_asn1_group2curve() argument
317 if (!group || !curve || !curve->a || !curve->b) in ec_asn1_group2curve()
326 if (!EC_GROUP_get_curve(group, NULL, tmp_1, tmp_2, NULL)) { in ec_asn1_group2curve()
336 len = ((size_t)EC_GROUP_get_degree(group) + 7) / 8; in ec_asn1_group2curve()
354 if (group->seed) { in ec_asn1_group2curve()
361 if (!ASN1_BIT_STRING_set(curve->seed, group->seed, in ec_asn1_group2curve()
362 (int)group->seed_len)) { in ec_asn1_group2curve()
381 ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group, in EC_GROUP_get_ecparameters() argument
404 if (!ec_asn1_group2fieldid(group, ret->fieldID)) { in EC_GROUP_get_ecparameters()
410 if (!ec_asn1_group2curve(group, ret->curve)) { in EC_GROUP_get_ecparameters()
416 if ((point = EC_GROUP_get0_generator(group)) == NULL) { in EC_GROUP_get_ecparameters()
421 form = EC_GROUP_get_point_conversion_form(group); in EC_GROUP_get_ecparameters()
423 len = EC_POINT_point2buf(group, point, form, &buffer, NULL); in EC_GROUP_get_ecparameters()
436 tmp = EC_GROUP_get0_order(group); in EC_GROUP_get_ecparameters()
449 tmp = EC_GROUP_get0_cofactor(group); in EC_GROUP_get_ecparameters()
467 ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group, in EC_GROUP_get_ecpkparameters() argument
486 if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) { in EC_GROUP_get_ecpkparameters()
490 tmp = EC_GROUP_get_curve_name(group); in EC_GROUP_get_ecpkparameters()
509 EC_GROUP_get_ecparameters(group, NULL)) == NULL) in EC_GROUP_get_ecpkparameters()
887 EC_GROUP *group = NULL; in d2i_ECPKParameters() local
896 if ((group = EC_GROUP_new_from_ecpkparameters(params)) == NULL) { in d2i_ECPKParameters()
902 group->decoded_from_explicit_params = 1; in d2i_ECPKParameters()
906 *a = group; in d2i_ECPKParameters()
911 return group; in d2i_ECPKParameters()
951 EC_GROUP_free(ret->group); in d2i_ECPrivateKey()
952 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters); in d2i_ECPrivateKey()
953 if (ret->group != NULL in d2i_ECPrivateKey()
955 ret->group->decoded_from_explicit_params = 1; in d2i_ECPrivateKey()
958 if (ret->group == NULL) { in d2i_ECPrivateKey()
975 if (EC_GROUP_get_curve_name(ret->group) == NID_sm2) in d2i_ECPrivateKey()
979 ret->pub_key = EC_POINT_new(ret->group); in d2i_ECPrivateKey()
996 if (ret->group->meth->keygenpub == NULL in d2i_ECPrivateKey()
997 || ret->group->meth->keygenpub(ret) == 0) in d2i_ECPrivateKey()
1025 if (a == NULL || a->group == NULL || in i2d_ECPrivateKey()
1050 EC_GROUP_get_ecpkparameters(a->group, in i2d_ECPrivateKey()
1094 return i2d_ECPKParameters(a->group, out); in i2d_ECParameters()
1114 if (!d2i_ECPKParameters(&ret->group, in, len)) { in d2i_ECParameters()
1122 if (EC_GROUP_get_curve_name(ret->group) == NID_sm2) in d2i_ECParameters()
1137 if (a == NULL || (*a) == NULL || (*a)->group == NULL) { in o2i_ECPublicKey()
1164 buf_len = EC_POINT_point2oct(a->group, a->pub_key, in i2o_ECPublicKey()
1176 if (!EC_POINT_point2oct(a->group, a->pub_key, a->conv_form, in i2o_ECPublicKey()
1313 const EC_GROUP *group; in ECDSA_size() local
1318 group = EC_KEY_get0_group(ec); in ECDSA_size()
1319 if (group == NULL) in ECDSA_size()
1322 bn = EC_GROUP_get0_order(group); in ECDSA_size()