summaryrefslogtreecommitdiff
path: root/randraw.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a copyright year.tege2002-05-141-1/+1
|
* (lc): Remove an unused variable.tege2002-05-061-1/+0
|
* (lc): Undo: Let mpn_rshift put result in place to avoid extra MPN_COPY.tege2002-04-181-9/+9
|
* (lc): Return non-nonsense return value for seed=0 case.tege2002-04-151-104/+51
| | | | | | | | | Check for m2exp being non-zero early; remove all other tests of m2exp. Remove redundant MPN_ZERO call. Let mpn_rshift put result in place to avoid extra MPN_COPY. Remove confusing comment before function `lc' describing BBS algorithm. Misc simplification and cleanups. Nailify. Needs further work.
* * randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.Kevin Ryde2001-07-101-1/+1
| | | | | | Only gmp_randinit needs to check for an invalid algorithm choice, after that rstate->_mp_alg should be valid and an ASSERT of that suffices.
* * randraw.c (lc): Change mpn_mul_basecase->mpn_mul,Kevin Ryde2001-06-121-5/+5
| | | | mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
* Remove K&R function headers.tege2001-01-021-14/+1
|
* Corresponding changes for:tege2000-12-121-13/+13
| | | | | | * gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_ to keep out of user name space. (__gmp_randata_lc): Likewise.
* Copyright (C) -> Copyright.Kevin Ryde2000-10-151-1/+1
|
* *** empty log message ***tege2000-07-241-4/+4
|
* (lc): Major overhaul (pending rewrite).tege2000-05-111-167/+73
| | | | (_gmp_rand): Rewrite.
* * randraw.c: Add a couple of casts to TMP_ALLOC.Kevin Ryde2000-04-291-2/+2
|
* (_gmp_rand): Fix bug with _LONG_LONG_LIMB.Linus Nordberg2000-04-121-64/+134
| | | | | | | | | | (lc): Change return type. Use one temporary storage instead of two. Handle seed of size 0. Avoid modulus operation in some cases. Abort if M is not a power of 2. Fix bug with 64-bit limbs. Fix bug with small seed, small A and large M.
* Fix typo.Linus Nordberg2000-04-101-1/+1
|
* Rename most of the random number functions, structs and some of the struct ↵Linus Nordberg2000-04-101-21/+21
| | | | members.
* (gmp_rand_getraw): Handle the case where (1) the LC scheme doesn'tLinus Nordberg2000-04-051-7/+40
| | | | | generate even limbs and (2) more than one LC invokation is necessary to produce the requested number of bits.
* Fix spelling.Linus Nordberg2000-04-041-1/+1
|
* New file; essentially a copy of mpn/generic/rawrandom.c.Linus Nordberg2000-04-041-0/+351
(gmp_rand_getraw): New function (formerly known as mpn_rawrandom).