diff --git a/testsuite/ecc-mod-test.c b/testsuite/ecc-mod-test.c index c6330cbed1fdf28b1f8e6499f9a082d81fe9cacb..5caee758081ee79c39e9de1e5576f116e590c7c6 100644 --- a/testsuite/ecc-mod-test.c +++ b/testsuite/ecc-mod-test.c @@ -22,14 +22,14 @@ ref_mod (mp_limb_t *rp, const mp_limb_t *ap, const mp_limb_t *mp, mp_size_t mn) void test_main (void) { - gmp_randstate_t state; + gmp_randstate_t rands; mp_limb_t a[MAX_SIZE]; mp_limb_t m[MAX_SIZE]; mp_limb_t ref[MAX_SIZE]; unsigned i; mpz_t r; - gmp_randinit_default (state); + gmp_randinit_default (rands); mpz_init (r); @@ -40,9 +40,9 @@ test_main (void) for (j = 0; j < COUNT; j++) { if (j & 1) - mpz_rrandomb (r, state, 2*ecc->size * GMP_NUMB_BITS); + mpz_rrandomb (r, rands, 2*ecc->size * GMP_NUMB_BITS); else - mpz_urandomb (r, state, 2*ecc->size * GMP_NUMB_BITS); + mpz_urandomb (r, rands, 2*ecc->size * GMP_NUMB_BITS); mpz_limbs_copy (a, r, 2*ecc->size); @@ -119,6 +119,6 @@ test_main (void) } mpz_clear (r); - gmp_randclear (state); + gmp_randclear (rands); } #endif /* ! NETTLE_USE_MINI_GMP */ diff --git a/testsuite/ecc-modinv-test.c b/testsuite/ecc-modinv-test.c index 2cd5c7e3b6ba8965bfaaeffa6c5de9941eea0b13..31b5c27e934ecf72b0cd24e809bea55a1eaa6a76 100644 --- a/testsuite/ecc-modinv-test.c +++ b/testsuite/ecc-modinv-test.c @@ -40,7 +40,7 @@ ref_modinv (mp_limb_t *rp, const mp_limb_t *ap, const mp_limb_t *mp, mp_size_t m void test_main (void) { - gmp_randstate_t state; + gmp_randstate_t rands; mp_limb_t a[MAX_ECC_SIZE]; mp_limb_t ai[MAX_ECC_SIZE]; mp_limb_t ref[MAX_ECC_SIZE]; @@ -48,7 +48,7 @@ test_main (void) unsigned i; mpz_t r; - gmp_randinit_default (state); + gmp_randinit_default (rands); mpz_init (r); for (i = 0; ecc_curves[i]; i++) @@ -58,9 +58,9 @@ test_main (void) for (j = 0; j < COUNT; j++) { if (j & 1) - mpz_rrandomb (r, state, ecc->size * GMP_NUMB_BITS); + mpz_rrandomb (r, rands, ecc->size * GMP_NUMB_BITS); else - mpz_urandomb (r, state, ecc->size * GMP_NUMB_BITS); + mpz_urandomb (r, rands, ecc->size * GMP_NUMB_BITS); mpz_limbs_copy (a, r, ecc->size); @@ -110,7 +110,7 @@ test_main (void) } } } - gmp_randclear (state); + gmp_randclear (rands); mpz_clear (r); } #endif /* ! NETTLE_USE_MINI_GMP */ diff --git a/testsuite/ecc-mul-a-test.c b/testsuite/ecc-mul-a-test.c index aa7b5c2ba595979c41adef9f5f0daaa9df6a5caf..eef09c725f018721862ff142fb0ce9be9fb642c9 100644 --- a/testsuite/ecc-mul-a-test.c +++ b/testsuite/ecc-mul-a-test.c @@ -11,11 +11,11 @@ test_main (void) void test_main (void) { - gmp_randstate_t state; + gmp_randstate_t rands; mpz_t r; unsigned i; - gmp_randinit_default (state); + gmp_randinit_default (rands); mpz_init (r); for (i = 0; ecc_curves[i]; i++) @@ -72,9 +72,9 @@ test_main (void) for (j = 0; j < 100; j++) { if (j & 1) - mpz_rrandomb (r, state, size * GMP_NUMB_BITS); + mpz_rrandomb (r, rands, size * GMP_NUMB_BITS); else - mpz_urandomb (r, state, size * GMP_NUMB_BITS); + mpz_urandomb (r, rands, size * GMP_NUMB_BITS); /* Reduce so that (almost surely) n < q */ mpz_limbs_copy (n, r, size); @@ -106,6 +106,6 @@ test_main (void) free (scratch); } mpz_clear (r); - gmp_randclear (state); + gmp_randclear (rands); } #endif /* ! NETTLE_USE_MINI_GMP */ diff --git a/testsuite/ecc-mul-g-test.c b/testsuite/ecc-mul-g-test.c index 64bfd2d07544551ef5b8d10735246d0ca74fc540..9db5b9ef46b15f35198852181c943c8d8d21c9c0 100644 --- a/testsuite/ecc-mul-g-test.c +++ b/testsuite/ecc-mul-g-test.c @@ -11,11 +11,11 @@ test_main (void) void test_main (void) { - gmp_randstate_t state; + gmp_randstate_t rands; mpz_t r; unsigned i; - gmp_randinit_default (state); + gmp_randinit_default (rands); mpz_init (r); for (i = 0; ecc_curves[i]; i++) @@ -62,6 +62,6 @@ test_main (void) free (scratch); } mpz_clear (r); - gmp_randclear (state); + gmp_randclear (rands); } #endif /* ! NETTLE_USE_MINI_GMP */ diff --git a/testsuite/ecc-redc-test.c b/testsuite/ecc-redc-test.c index 4ee8b458a5c7ab680898dfb201f06cf92c59d2e1..1b0fe51d5215e694009111e9b997173eabc60bd6 100644 --- a/testsuite/ecc-redc-test.c +++ b/testsuite/ecc-redc-test.c @@ -42,14 +42,14 @@ ref_redc (mp_limb_t *rp, const mp_limb_t *ap, const mp_limb_t *mp, mp_size_t mn) void test_main (void) { - gmp_randstate_t state; + gmp_randstate_t rands; mp_limb_t a[MAX_SIZE]; mp_limb_t m[MAX_SIZE]; mp_limb_t ref[MAX_SIZE]; unsigned i; mpz_t r; - gmp_randinit_default (state); + gmp_randinit_default (rands); mpz_init (r); @@ -63,9 +63,9 @@ test_main (void) for (j = 0; j < COUNT; j++) { if (j & 1) - mpz_rrandomb (r, state, 2*ecc->size * GMP_NUMB_BITS); + mpz_rrandomb (r, rands, 2*ecc->size * GMP_NUMB_BITS); else - mpz_urandomb (r, state, 2*ecc->size * GMP_NUMB_BITS); + mpz_urandomb (r, rands, 2*ecc->size * GMP_NUMB_BITS); mpz_limbs_copy (a, r, 2*ecc->size); @@ -104,6 +104,6 @@ test_main (void) } mpz_clear (r); - gmp_randclear (state); + gmp_randclear (rands); } #endif /* ! NETTLE_USE_MINI_GMP */