diff options
author | Niels Möller <nisse@lysator.liu.se> | 2021-11-15 19:48:26 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2021-11-15 19:48:26 +0100 |
commit | 64ce8c77c713b267a7ad16da3ac075e099238a41 (patch) | |
tree | 51cb4792850e014d76283eb258fd43d7ffddbfa5 | |
parent | a6f9bdeb450f9d0bbd5576b7d156a51c8ddaf094 (diff) | |
download | nettle-64ce8c77c713b267a7ad16da3ac075e099238a41.tar.gz |
Randomize more tests
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | testsuite/ecc-modinv-test.c | 1 | ||||
-rw-r--r-- | testsuite/ecc-mul-a-test.c | 1 | ||||
-rw-r--r-- | testsuite/ecc-mul-g-test.c | 2 | ||||
-rw-r--r-- | testsuite/ecc-redc-test.c | 1 | ||||
-rw-r--r-- | testsuite/ecc-sqrt-test.c | 2 | ||||
-rw-r--r-- | testsuite/eddsa-compress-test.c | 1 |
7 files changed, 18 insertions, 4 deletions
@@ -1,11 +1,17 @@ 2021-11-15 Niels Möller <nisse@lysator.liu.se> + * testsuite/eddsa-compress-test.c (test_main): Use test_randomize. + * testsuite/ecc-redc-test.c (test_main): Likewise. + * testsuite/ecc-mul-g-test.c (test_main): Likewise. + * testsuite/ecc-mul-a-test.c (test_main): Likewise. + * testsuite/ecc-modinv-test.c (test_modulo): Trim allocation for result area. - * testsuite/ecc-sqrt-test.c (test_sqrt, test_sqrt_ratio): Likewise. - - * testsuite/ecc-sqrt-test.c (test_sqrt_ratio): Fix sqrt_ratio test - for v = 0, failure is expected. + (test_main): Use test_randomize. + * testsuite/ecc-sqrt-test.c (test_sqrt): Trim allocation. + (test_sqrt_ratio): Trim allocation. Fix sqrt_ratio test for v = 0, + failure is expected. + (test_main): Use test_randomize. 2021-11-13 Niels Möller <nisse@lysator.liu.se> diff --git a/testsuite/ecc-modinv-test.c b/testsuite/ecc-modinv-test.c index 4abfdc7d..aecfb43b 100644 --- a/testsuite/ecc-modinv-test.c +++ b/testsuite/ecc-modinv-test.c @@ -140,6 +140,7 @@ test_main (void) unsigned i; gmp_randinit_default (rands); + test_randomize(rands); for (i = 0; ecc_curves[i]; i++) { diff --git a/testsuite/ecc-mul-a-test.c b/testsuite/ecc-mul-a-test.c index a865d487..9d19762f 100644 --- a/testsuite/ecc-mul-a-test.c +++ b/testsuite/ecc-mul-a-test.c @@ -8,6 +8,7 @@ test_main (void) unsigned i; gmp_randinit_default (rands); + test_randomize (rands); mpz_init (r); for (i = 0; ecc_curves[i]; i++) diff --git a/testsuite/ecc-mul-g-test.c b/testsuite/ecc-mul-g-test.c index 461901af..e2396ad0 100644 --- a/testsuite/ecc-mul-g-test.c +++ b/testsuite/ecc-mul-g-test.c @@ -8,6 +8,8 @@ test_main (void) unsigned i; gmp_randinit_default (rands); + test_randomize(rands); + mpz_init (r); for (i = 0; ecc_curves[i]; i++) diff --git a/testsuite/ecc-redc-test.c b/testsuite/ecc-redc-test.c index 3e029792..476a6db1 100644 --- a/testsuite/ecc-redc-test.c +++ b/testsuite/ecc-redc-test.c @@ -51,6 +51,7 @@ test_main (void) mpz_t r; gmp_randinit_default (rands); + test_randomize(rands); mpz_init (r); diff --git a/testsuite/ecc-sqrt-test.c b/testsuite/ecc-sqrt-test.c index 377e1870..3bb915c8 100644 --- a/testsuite/ecc-sqrt-test.c +++ b/testsuite/ecc-sqrt-test.c @@ -292,6 +292,8 @@ test_main (void) unsigned i; gmp_randinit_default (rands); + test_randomize(rands); + for (i = 0; ecc_curves[i]; i++) { if (ecc_curves[i]->p.sqrt) diff --git a/testsuite/eddsa-compress-test.c b/testsuite/eddsa-compress-test.c index 640421c5..e17a869c 100644 --- a/testsuite/eddsa-compress-test.c +++ b/testsuite/eddsa-compress-test.c @@ -42,6 +42,7 @@ void test_main (void) unsigned i; gmp_randinit_default (rands); + test_randomize(rands); for (i = 0; ecc_curves[i]; i++) { |