• Home
  • Raw
  • Download

Lines Matching refs:group

76 static size_t ec_GFp_simple_point2oct(const EC_GROUP *group,  in ec_GFp_simple_point2oct()  argument
90 if (EC_POINT_is_at_infinity(group, point)) { in ec_GFp_simple_point2oct()
95 const size_t field_len = BN_num_bytes(&group->field); in ec_GFp_simple_point2oct()
124 if (!EC_POINT_get_affine_coordinates_GFp(group, point, x, y, ctx)) { in ec_GFp_simple_point2oct()
166 static int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point, in ec_GFp_simple_oct2point() argument
187 const size_t field_len = BN_num_bytes(&group->field); in ec_GFp_simple_oct2point()
217 if (BN_ucmp(x, &group->field) >= 0) { in ec_GFp_simple_oct2point()
223 if (!EC_POINT_set_compressed_coordinates_GFp(group, point, x, y_bit, ctx)) { in ec_GFp_simple_oct2point()
230 if (BN_ucmp(y, &group->field) >= 0) { in ec_GFp_simple_oct2point()
235 if (!EC_POINT_set_affine_coordinates_GFp(group, point, x, y, ctx)) { in ec_GFp_simple_oct2point()
250 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point, in EC_POINT_oct2point() argument
252 if (EC_GROUP_cmp(group, point->group, NULL) != 0) { in EC_POINT_oct2point()
256 return ec_GFp_simple_oct2point(group, point, buf, len, ctx); in EC_POINT_oct2point()
259 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, in EC_POINT_point2oct() argument
262 if (EC_GROUP_cmp(group, point->group, NULL) != 0) { in EC_POINT_point2oct()
266 return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx); in EC_POINT_point2oct()
269 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, in EC_POINT_set_compressed_coordinates_GFp() argument
272 if (EC_GROUP_cmp(group, point->group, NULL) != 0) { in EC_POINT_set_compressed_coordinates_GFp()
277 if (BN_is_negative(x) || BN_cmp(x, &group->field) >= 0) { in EC_POINT_set_compressed_coordinates_GFp()
303 !EC_GROUP_get_curve_GFp(group, NULL, a, b, ctx)) { in EC_POINT_set_compressed_coordinates_GFp()
312 if (!BN_mod_sqr(tmp2, x, &group->field, ctx) || in EC_POINT_set_compressed_coordinates_GFp()
313 !BN_mod_mul(tmp1, tmp2, x, &group->field, ctx)) { in EC_POINT_set_compressed_coordinates_GFp()
318 if (group->a_is_minus3) { in EC_POINT_set_compressed_coordinates_GFp()
319 if (!BN_mod_lshift1_quick(tmp2, x, &group->field) || in EC_POINT_set_compressed_coordinates_GFp()
320 !BN_mod_add_quick(tmp2, tmp2, x, &group->field) || in EC_POINT_set_compressed_coordinates_GFp()
321 !BN_mod_sub_quick(tmp1, tmp1, tmp2, &group->field)) { in EC_POINT_set_compressed_coordinates_GFp()
325 if (!BN_mod_mul(tmp2, a, x, &group->field, ctx) || in EC_POINT_set_compressed_coordinates_GFp()
326 !BN_mod_add_quick(tmp1, tmp1, tmp2, &group->field)) { in EC_POINT_set_compressed_coordinates_GFp()
332 if (!BN_mod_add_quick(tmp1, tmp1, b, &group->field)) { in EC_POINT_set_compressed_coordinates_GFp()
336 if (!BN_mod_sqrt(y, tmp1, &group->field, ctx)) { in EC_POINT_set_compressed_coordinates_GFp()
354 if (!BN_usub(y, &group->field, y)) { in EC_POINT_set_compressed_coordinates_GFp()
363 if (!EC_POINT_set_affine_coordinates_GFp(group, point, x, y, ctx)) { in EC_POINT_set_compressed_coordinates_GFp()