• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/openssl-1.0.0q/crypto/ec/

Lines Matching refs:group

66 int EC_GROUP_get_basis_type(const EC_GROUP *group)
70 if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
75 while (group->poly[i] != 0)
87 int EC_GROUP_get_trinomial_basis(const EC_GROUP *group, unsigned int *k)
89 if (group == NULL)
92 if (EC_GROUP_method_of(group)->group_set_curve != ec_GF2m_simple_group_set_curve
93 || !((group->poly[0] != 0) && (group->poly[1] != 0) && (group->poly[2] == 0)))
100 *k = group->poly[1];
105 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *group, unsigned int *k1,
108 if (group == NULL)
111 if (EC_GROUP_method_of(group)->group_set_curve != ec_GF2m_simple_group_set_curve
112 || !((group->poly[0] != 0) && (group->poly[1] != 0) && (group->poly[2] != 0) && (group->poly[3] != 0) && (group->poly[4] == 0)))
119 *k1 = group->poly[3];
121 *k2 = group->poly[2];
123 *k3 = group->poly[1];
299 static int ec_asn1_group2fieldid(const EC_GROUP *group, X9_62_FIELDID *field)
304 if (group == NULL || field == NULL)
313 nid = EC_METHOD_get_field_type(EC_GROUP_method_of(group));
329 if (!EC_GROUP_get_curve_GFp(group, tmp, NULL, NULL, NULL))
356 char_two->m = (long)EC_GROUP_get_degree(group);
358 field_type = EC_GROUP_get_basis_type(group);
376 if (!EC_GROUP_get_trinomial_basis(group, &k))
396 if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3))
430 static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
439 if (!group || !curve || !curve->a || !curve->b)
448 nid = EC_METHOD_get_field_type(EC_GROUP_method_of(group));
453 if (!EC_GROUP_get_curve_GFp(group, NULL, tmp_1, tmp_2, NULL))
461 if (!EC_GROUP_get_curve_GF2m(group, NULL, tmp_1, tmp_2, NULL))
524 if (group->seed)
534 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
535 (int)group->seed_len))
563 static ECPARAMETERS *ec_asn1_group2parameters(const EC_GROUP *group,
596 if (!ec_asn1_group2fieldid(group, ret->fieldID))
603 if (!ec_asn1_group2curve(group, ret->curve))
610 if ((point = EC_GROUP_get0_generator(group)) == NULL)
616 form = EC_GROUP_get_point_conversion_form(group);
618 len = EC_POINT_point2oct(group, point, form, NULL, len, NULL);
629 if (!EC_POINT_point2oct(group, point, form, buffer, len, NULL))
646 if (!EC_GROUP_get_order(group, tmp, NULL))
659 if (EC_GROUP_get_cofactor(group, tmp, NULL))
684 ECPKPARAMETERS *ec_asn1_group2pkparameters(const EC_GROUP *group,
707 if (EC_GROUP_get_asn1_flag(group))
712 tmp = EC_GROUP_get_curve_name(group);
728 group, NULL)) == NULL)
1055 EC_GROUP *group = NULL;
1065 if ((group = ec_asn1_pkparameters2group(params)) == NULL)
1075 *a = group;
1078 return(group);
1137 if (ret->group)
1138 EC_GROUP_clear_free(ret->group);
1139 ret->group = ec_asn1_pkparameters2group(priv_key->parameters);
1142 if (ret->group == NULL)
1172 ret->pub_key = EC_POINT_new(ret->group);
1194 if (!EC_POINT_oct2point(ret->group, ret->pub_key,
1203 if (!EC_POINT_mul(ret->group, ret->pub_key, ret->priv_key, NULL, NULL, NULL))
1234 if (a == NULL || a->group == NULL || a->priv_key == NULL ||
1275 a->group, priv_key->parameters)) == NULL)
1292 tmp_len = EC_POINT_point2oct(a->group, a->pub_key,
1307 if (!EC_POINT_point2oct(a->group, a->pub_key,
1345 return i2d_ECPKParameters(a->group, out);
1371 if (!d2i_ECPKParameters(&ret->group, in, len))
1384 if (a == NULL || (*a) == NULL || (*a)->group == NULL)
1393 (ret->pub_key = EC_POINT_new(ret->group)) == NULL)
1398 if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL))
1420 buf_len = EC_POINT_point2oct(a->group, a->pub_key,
1436 if (!EC_POINT_point2oct(a->group, a->pub_key, a->conv_form,