Lines Matching refs:group
22 int ossl_ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, in ossl_ec_GFp_simple_set_compressed_coordinates() argument
32 ctx = new_ctx = BN_CTX_new_ex(group->libctx); in ossl_ec_GFp_simple_set_compressed_coordinates()
54 if (!BN_nnmod(x, x_, group->field, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
56 if (group->meth->field_decode == 0) { in ossl_ec_GFp_simple_set_compressed_coordinates()
58 if (!group->meth->field_sqr(group, tmp2, x_, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
60 if (!group->meth->field_mul(group, tmp1, tmp2, x_, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
63 if (!BN_mod_sqr(tmp2, x_, group->field, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
65 if (!BN_mod_mul(tmp1, tmp2, x_, group->field, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
70 if (group->a_is_minus3) { in ossl_ec_GFp_simple_set_compressed_coordinates()
71 if (!BN_mod_lshift1_quick(tmp2, x, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
73 if (!BN_mod_add_quick(tmp2, tmp2, x, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
75 if (!BN_mod_sub_quick(tmp1, tmp1, tmp2, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
78 if (group->meth->field_decode) { in ossl_ec_GFp_simple_set_compressed_coordinates()
79 if (!group->meth->field_decode(group, tmp2, group->a, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
81 if (!BN_mod_mul(tmp2, tmp2, x, group->field, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
85 if (!group->meth->field_mul(group, tmp2, group->a, x, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
89 if (!BN_mod_add_quick(tmp1, tmp1, tmp2, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
94 if (group->meth->field_decode) { in ossl_ec_GFp_simple_set_compressed_coordinates()
95 if (!group->meth->field_decode(group, tmp2, group->b, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
97 if (!BN_mod_add_quick(tmp1, tmp1, tmp2, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
100 if (!BN_mod_add_quick(tmp1, tmp1, group->b, group->field)) in ossl_ec_GFp_simple_set_compressed_coordinates()
105 if (!BN_mod_sqrt(y, tmp1, group->field, ctx)) { in ossl_ec_GFp_simple_set_compressed_coordinates()
127 kron = BN_kronecker(x, group->field, ctx); in ossl_ec_GFp_simple_set_compressed_coordinates()
140 if (!BN_usub(y, group->field, y)) in ossl_ec_GFp_simple_set_compressed_coordinates()
148 if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GFp_simple_set_compressed_coordinates()
159 size_t ossl_ec_GFp_simple_point2oct(const EC_GROUP *group, const EC_POINT *point, in ossl_ec_GFp_simple_point2oct() argument
176 if (EC_POINT_is_at_infinity(group, point)) { in ossl_ec_GFp_simple_point2oct()
189 field_len = BN_num_bytes(group->field); in ossl_ec_GFp_simple_point2oct()
202 ctx = new_ctx = BN_CTX_new_ex(group->libctx); in ossl_ec_GFp_simple_point2oct()
214 if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GFp_simple_point2oct()
274 int ossl_ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point, in ossl_ec_GFp_simple_oct2point() argument
309 return EC_POINT_set_to_infinity(group, point); in ossl_ec_GFp_simple_oct2point()
312 field_len = BN_num_bytes(group->field); in ossl_ec_GFp_simple_oct2point()
323 ctx = new_ctx = BN_CTX_new_ex(group->libctx); in ossl_ec_GFp_simple_oct2point()
336 if (BN_ucmp(x, group->field) >= 0) { in ossl_ec_GFp_simple_oct2point()
342 if (!EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx)) in ossl_ec_GFp_simple_oct2point()
347 if (BN_ucmp(y, group->field) >= 0) { in ossl_ec_GFp_simple_oct2point()
362 if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) in ossl_ec_GFp_simple_oct2point()