Lines Matching defs:test

38 /* test multiplication with group order, long and negative scalars */
528 /* Restore the point that got mangled in the (x, y + 1) test. */
791 struct c2_curve_test *const test = char2_curve_tests + n;
801 || !TEST_true(BN_hex2bn(&p, test->p))
802 || !TEST_true(BN_hex2bn(&a, test->a))
803 || !TEST_true(BN_hex2bn(&b, test->b))
808 || !TEST_true(BN_hex2bn(&x, test->x))
809 || !TEST_true(BN_hex2bn(&y, test->y))
813 /* Change test based on whether binary point compression is enabled or not. */
821 test->y_bit,
824 || !TEST_true(BN_hex2bn(&z, test->order))
825 || !TEST_true(BN_hex2bn(&cof, test->cof))
829 TEST_info("%s -- Generator", test->name);
833 if (!TEST_true(BN_hex2bn(&z, test->y))
844 || !TEST_true(BN_hex2bn(&z, test->order))
845 || !TEST_true(BN_hex2bn(&cof, test->cof))
848 TEST_info("%s -- Generator:", test->name);
853 if (!TEST_int_eq(EC_GROUP_get_degree(group), test->degree)
981 /* Change test based on whether binary point compression is enabled or not. */
991 /* Change test based on whether binary point compression is enabled or not. */
1029 /* Change test based on whether binary point compression is enabled or not. */
1050 /* Change test based on whether binary point compression is enabled or not. */
1314 const struct nistp_test_params *test = nistp_tests_params + idx;
1323 test->degree);
1335 || !TEST_ptr(NISTP = EC_GROUP_new_by_curve_name(test->nid))
1336 || !TEST_true(BN_hex2bn(&p, test->p))
1338 || !TEST_true(BN_hex2bn(&a, test->a))
1339 || !TEST_true(BN_hex2bn(&b, test->b))
1345 || !TEST_true(BN_hex2bn(&x, test->Qx))
1346 || !TEST_true(BN_hex2bn(&y, test->Qy))
1356 || !TEST_true(BN_hex2bn(&x, test->Gx))
1357 || !TEST_true(BN_hex2bn(&y, test->Gy))
1359 || !TEST_true(BN_hex2bn(&order, test->order))
1361 || !TEST_int_eq(EC_GROUP_get_degree(NISTP), test->degree))
1364 TEST_note("NIST test vectors ... ");
1365 if (!TEST_true(BN_hex2bn(&n, test->d)))
1378 /* set the scalar to m=n/2, where n is the NIST test scalar */
1382 /* test the non-standard generator */
1419 /* regression test for felem_neg bug */
1494 * This test validates a named curve's group parameters using
2112 * can compute the cofactor automatically, roughly 4*sqrt(p). So test that:
2148 * For named curves, test that:
2150 * - a nonsensical cofactor throws an error (negative test)
2163 TEST_info("Curve %s cardinality test", OBJ_nid2sn(nid));
2209 /* negative test for invalid cofactor */
2213 /* negative test for NULL order */
2215 /* negative test for zero order */
2218 /* negative test for negative order */
2222 /* negative test for too large order */
2264 /* test for binary curves */
2270 /* test for prime curves */
2322 * Nonetheless it increases the test coverage for EC_POINT_is_at_infinity,
2340 * This test self-validates EC_POINT_hex2point() and EC_POINT_point2hex()