MirOS Manual: add_audio_randomness(9), add_disk_randomness(9), add_mouse_randomness(9), add_net_randomness(9), add_timer_randomness(9), add_true_randomness(9), add_tty_randomness(9), arc4random(9), get_random_bytes(9), random(9)

RND(9)                        BSD Kernel Manual                         RND(9)

NAME

     random - device kernel interface

SYNOPSIS

     #include <dev/rndvar.h>

     void
     add_true_randomness(int);

     void
     add_timer_randomness(int);

     void
     add_mouse_randomness(int);

     void
     add_tty_randomness(int);

     void
     add_net_randomness(int);

     void
     add_disk_randomness(int);

     void
     add_audio_randomness(int);

     void
     get_random_bytes(void *buf, size_t nbytes);

     u_int32_t
     arc4random(void);

     void
     rnd_addpool_add(uint32_t);

DESCRIPTION

     The add_mouse_randomness(), add_tty_randomness(), add_net_randomness(),
     add_disk_randomness() and add_audio_randomness() routines are used to
     supply data for the random data source device for further processing. The
     processing involves calculating inter-event time delta and measuring en-
     tropy contained in the resulting delta-T; the argument data supplied is
     just mixed into the pool and does not increase the entropy counter.

     add_true_randomness() does not involve the usual timing calculations, and
     causes the supplied data argument to be added to the entropy pool, in-
     creasing the entropy counter by 32 bits.

     add_timer_randomness() will not cause the entropy counter to rise. It is
     used to change the state of the pool periodically, mostly by means of
     timing the random driver's operations.

     get_random_bytes() may be used to retrieve strong random data, just as it
     would by the srandom(4) device.

     arc4random() will give random 32 bit numbers hashed with the ARC4 algo-
     rithm, which appears to be faster and less abusive to the entropy pool.

     rnd_addpool_add() is a macro that can be used to push a 32-bit chunk of
     data from unreliable random sources or userspace into the kernel. This
     macro is safe to be called at almost any situation, except from within
     rnd_addpool_reinit(). The sysctl KERN_PUSHRAND can be used to disable in-
     put from this buffer which is also filled during writes to /dev/wrandom.

SEE ALSO

     arc4random(3), pchb(4), random(4)

CAVEATS

     None of these functions should really be called during the autoconf(4)
     process.

MirOS BSD #10-current           March 26, 1996                               1

Generated on 2010-08-15 07:16:25 by $MirOS: src/scripts/roff2htm,v 1.58 2009/02/17 12:55:22 tg Exp $

These manual pages are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002-2008 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.