MirBSD manpage: cprng(8)

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.

             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)




     The cprng daemon first appeared in MirBSD #10.


     The cprng utility was written by Thorsten Glaser <tg@mirbsd.de>.


     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 MirBSD 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.

     This utility has been retired and is no longer part of MirBSD.

MirBSD #10-current              April 12, 2015                               1

Generated on 2021-12-07 11:28:18 by $MirOS: src/scripts/roff2htm,v 1.103 2021/01/23 20:24:35 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2021 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.