CPRNG(8) BSD System Manager's Manual CPRNG(8)
cprng - CPU Oscillation Random Number Generator
cprng [-p] cprng [-p] -rnumber
cprng generates random numbers by taking the difference between the cy- clic clock of the mainboard and the CPU. This algorithm is often known as "truerand" and only works if the CPU and timer interrupt are driven by separate stroke sources, and works better the more idle the system is, because otherwise basically the scheduler is measured. Normal mode of operation is to run in the background and periodically feed some bytes into the kernel random(9) subsystem by writes to /dev/urandom. If you have better entropy sources, like a hardware RNG on some chipsets, or a combination of much disc, network and interactive I/O, or if your interrupt and CPU clocks are not driven by separate ticks, you might want to disable cprng in /etc/rc.conf. The options are as follows: -p Use ITIMER_PROF as timer source. This one is often more reliably from a different clock source than ITIMER_REAL, but does not ex- ist on some operating systems. -rnumber Instead of becoming a daemon and running in the background with low priority, feeding generated entropy into /dev/urandom, create number bytes of entropy and write it to standard output while running with high priority, then exit. The number argument must be decimal and between 1 and 1024, inclusive. This is the pre- ferred mode of operation on other operating systems. Output qual- ity can be measured with MirPorts ports/math/ent and this option.
arc4random(3), RC4(3), random(4), random(9) http://www.cs.berkeley.edu/~daw/rnd/mab-rand http://fourmilab.ch/random/
The cprng daemon first appeared in MirOS #10.
The cprng utility was written by Thorsten Glaser <firstname.lastname@example.org>.
The output produced by the -r option is debiased using the von Neumann compressor (whitener) algorithm, but still not yet suitable for direct use. It can be fed into the kernel random(9) subsystem on MirOS and OpenBSD, but not, for example, on FreeBSD or GNU/Linux. Post-processing with RC4(3) and mixing with other entropy sources is highly recommended. Measure output quality with John Walker's ent utility before use on any system. Take special attention to the Chi-Square values. MirOS BSD #10-current September 28, 2007 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.