PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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