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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 =head1 NAME
     3  prng - pseudo-random number generator
     5 =head1 SYNOPSIS
     7  prng [count]
     9 =head1 DESCRIPTION
    11 B<Prng> generates 32-bit pseudo-random integers using the
    12 Blum-Blum-Shub (BBS) quadratic residue generator.  It is seeded using
    13 the standard C library's rand() function, which itself seeded from the
    14 system clock and the process ID number.  Thus, the values generated
    15 are not particularly useful for cryptographic applications, but they
    16 are in general much better than the typical output of the usual
    17 multiplicative congruency generator used by most runtime libraries.
    19 You may optionally specify how many random values should be generated
    20 by giving a I<count> argument on the command line.  If you do not
    21 specify a count, only one random value will be generated.  The results
    22 are output to the standard output in decimal notation, one value per
    23 line.
    25 =head1 RESTRICTIONS
    27 As stated above, B<prng> uses the C library's rand() function to seed
    28 the generator, so it is not terribly suitable for cryptographic
    29 applications.  Also note that each time you run the program, a new
    30 seed is generated, so it is better to run it once with a I<count>
    31 parameter than it is to run it multiple times to generate several
    32 values.
    34 =head1 AUTHOR
    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

mercurial