Lines Matching refs:group

26 static int group_field_tests(const EC_GROUP *group, BN_CTX *ctx)  in group_field_tests()  argument
31 if (group->meth->field_inv == NULL || group->meth->field_mul == NULL) in group_field_tests()
39 || !TEST_true(group->meth->field_inv(group, b, BN_value_one(), ctx)) in group_field_tests()
42 || !TEST_true(BN_rand(a, BN_num_bits(group->field) - 1, in group_field_tests()
44 || !TEST_true(group->meth->field_inv(group, b, a, ctx)) in group_field_tests()
45 || (group->meth->field_encode && in group_field_tests()
46 !TEST_true(group->meth->field_encode(group, a, a, ctx))) in group_field_tests()
47 || (group->meth->field_encode && in group_field_tests()
48 !TEST_true(group->meth->field_encode(group, b, b, ctx))) in group_field_tests()
49 || !TEST_true(group->meth->field_mul(group, c, a, b, ctx)) in group_field_tests()
50 || (group->meth->field_decode && in group_field_tests()
51 !TEST_true(group->meth->field_decode(group, c, c, ctx))) in group_field_tests()
57 if (!TEST_false(group->meth->field_inv(group, b, a, ctx)) in group_field_tests()
62 || !TEST_false(group->meth->field_inv(group, b, group->field, ctx)) in group_field_tests()
81 EC_GROUP *group = NULL; in field_tests() local
91 || !TEST_ptr(group = EC_GROUP_new(meth)) in field_tests()
95 || !TEST_true(EC_GROUP_set_curve(group, p, a, b, ctx)) in field_tests()
96 || !group_field_tests(group, ctx)) in field_tests()
103 if (group != NULL) in field_tests()
104 EC_GROUP_free(group); in field_tests()
222 EC_GROUP *group = NULL; in field_tests_default() local
228 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)) in field_tests_default()
230 || !group_field_tests(group, ctx)) in field_tests_default()
235 if (group != NULL) in field_tests_default()
236 EC_GROUP_free(group); in field_tests_default()
511 static int montgomery_correctness_test(EC_GROUP *group) in montgomery_correctness_test() argument
519 if (!TEST_true(check_bn_mont_ctx(group->mont_data, group->order, ctx))) { in montgomery_correctness_test()
523 if (group->field_data1 != NULL) { in montgomery_correctness_test()
524 if (!TEST_true(check_bn_mont_ctx(group->field_data1, group->field, ctx))) in montgomery_correctness_test()
536 EC_GROUP *group = NULL; in named_group_creation_test() local
538 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1)) in named_group_creation_test()
539 || !TEST_true(montgomery_correctness_test(group))) in named_group_creation_test()
545 EC_GROUP_free(group); in named_group_creation_test()