/security/nss/lib/freebl/mpi/doc/prng.pod

http://github.com/zpao/v8monkey · Unknown · 41 lines · 29 code · 12 blank · 0 comment · 0 complexity · 76e6169f8ee4a9e2373e980afdfbd383 MD5 · raw file

  1. =head1 NAME
  2. prng - pseudo-random number generator
  3. =head1 SYNOPSIS
  4. prng [count]
  5. =head1 DESCRIPTION
  6. B<Prng> generates 32-bit pseudo-random integers using the
  7. Blum-Blum-Shub (BBS) quadratic residue generator. It is seeded using
  8. the standard C library's rand() function, which itself seeded from the
  9. system clock and the process ID number. Thus, the values generated
  10. are not particularly useful for cryptographic applications, but they
  11. are in general much better than the typical output of the usual
  12. multiplicative congruency generator used by most runtime libraries.
  13. You may optionally specify how many random values should be generated
  14. by giving a I<count> argument on the command line. If you do not
  15. specify a count, only one random value will be generated. The results
  16. are output to the standard output in decimal notation, one value per
  17. line.
  18. =head1 RESTRICTIONS
  19. As stated above, B<prng> uses the C library's rand() function to seed
  20. the generator, so it is not terribly suitable for cryptographic
  21. applications. Also note that each time you run the program, a new
  22. seed is generated, so it is better to run it once with a I<count>
  23. parameter than it is to run it multiple times to generate several
  24. values.
  25. =head1 AUTHOR
  26. Michael J. Fromberger <sting@linguist.dartmouth.edu>
  27. Copyright (C) 1998 Michael J. Fromberger, All Rights Reserved
  28. Thayer School of Engineering, Dartmouth College, Hanover, NH USA
  29. $Date: 2000/07/14 00:44:36 $