Generator of secure random data
random [-hpt] [-i #] [-l library[:init_string]] [-m mode] [-s path] [-U string]
QNX Neutrino
(QNX Neutrino 7.0 or later) The default permissions on these files are 0666, to allow non-root users to contribute entropy.
(QNX Neutrino 7.0 or later) The state is saved whenever you write to the /dev/random or /dev/urandom resource manager, or after 8192 reseedings.
In the second form, the primary group is the one specified for user_name in /etc/passwd.
The random service runs in the background providing a source of secure, pseudo-random data suitable for encryption and security. The service builds its internal pool of pseudo-random data from entropy sources specified when it is started. These sources may include timers, interrupts, and detailed system runtime information. The service makes this random data available by providing device entries that any application can read:
These device entries provide the same functionality.
The user controls all of the sources to be used to collect entropy by specifying source options on the command line.
Start the random service using three PC interrupts as sources:
random -i12 -i14 -i15
From an application, read 4 bytes of random data like this:
int data; int fd; fd = open( "/dev/random", O_RDWR ); if( fd == -1 ) { exit( 1 ); } read( fd, &data, sizeof( data ) ); close( fd );
If an error occurs, random sends a description of the error to slogger2 and doesn't create /dev/random or /dev/urandom.
The random service uses the core algorithm from the Fortuna pseudo-random number generator (PRNG) devised by Bruce Schneier and Niels Ferguson.
The random service doesn't work unless you specify at least one source for entropy, using the -p, -t, -i, or -l options.