summaryrefslogtreecommitdiff
path: root/rand.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-09-12 03:07:15 +0200
committerKevin Ryde <user42@zip.com.au>2002-09-12 03:07:15 +0200
commit5972b5cb0b77792c25d7086753641db215be13c2 (patch)
tree7fcf9003d70cd1d75851724b9175565cc135e430 /rand.c
parentb2450f47e71a2234df37b8cc98d5a7e4a452bb51 (diff)
downloadgmp-5972b5cb0b77792c25d7086753641db215be13c2.tar.gz
2002-09-12 Pedro Gimeno <pggimeno@wanadoo.es>
* rand.c: Remove old disabled BBS code.
Diffstat (limited to 'rand.c')
-rw-r--r--rand.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/rand.c b/rand.c
index cc42ff088..5e383e2c2 100644
--- a/rand.c
+++ b/rand.c
@@ -1,6 +1,6 @@
/* gmp_randinit (state, algorithm, ...) -- Initialize a random state.
-Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -64,47 +64,3 @@ gmp_randinit (va_alist)
}
va_end (ap);
}
-
-
-
-#if 0
- case GMP_RAND_ALG_BBS: /* Blum, Blum, and Shub. */
- {
- mpz_t p, q;
- mpz_t ztmp;
-
- /* FIXME: Generate p and q. They must be ``large'' primes,
- congruent to 3 mod 4. Should we ensure that they meet some
- of the criterias for being ``hard primes''?*/
-
- /* These are around 128 bits. */
- mpz_init_set_str (p, "148028650191182616877187862194899201391", 10);
- mpz_init_set_str (q, "315270837425234199477225845240496832591", 10);
-
- /* Allocate algorithm specific data. */
- rstate->data.bbs = (__gmp_rand_data_bbs *)
- (*__gmp_allocate_func) (sizeof (__gmp_rand_data_bbs));
-
- mpz_init (rstate->data.bbs->bi); /* The Blum integer. */
- mpz_mul (rstate->data.bbs->bi, p, q);
-
- /* Find a seed, x, with gcd (x, bi) == 1. */
- mpz_init (ztmp);
- while (1)
- {
- mpz_gcd (ztmp, seed, rstate->data.bbs->bi);
- if (!mpz_cmp_ui (ztmp, 1))
- break;
- mpz_add_ui (seed, seed, 1);
- }
-
- rstate->alg = alg;
- rstate->size = size; /* FIXME: Remove. */
- mpz_set (rstate->seed, seed);
-
- mpz_clear (p);
- mpz_clear (q);
- mpz_clear (ztmp);
- break;
- }
-#endif /* 0 */