IPSEC_RANBITSSection: Maintenance Commands (8)
Updated: 27 Oct 1998
Index Return to Main Contents
NAMEipsec ranbits - generate random bits in ASCII form
SYNOPSISipsec ranbits [ --quick ] [ --continuous ] [ --bytes ] nbits
DESCRIPTIONRanbits obtains nbits (rounded up to the nearest byte) high-quality random bits from random(4), and emits them on standard output as an ASCII string. The default output format is datatoa(3) h format: lowercase hexadecimal with a 0x prefix and an underscore every 32 bits.
The --quick option produces quick-and-dirty random bits: instead of using the high-quality random bits from /dev/random, which may take some time to supply the necessary bits if nbits is large, ranbits uses /dev/urandom, which yields prompt results but lower-quality randomness.
The --continuous option uses datatoa(3) x output format, like h but without the underscores.
SEE ALSOipsec_datatoa(3), random(4)
HISTORYWritten for the Linux FreeS/WAN project <http://www.xs4all.nl/~freeswan/> by Henry Spencer.
BUGSThere is an internal limit on nbits, currently 4096.
Without --quick, ranbits's run time is difficult to predict. A request for a large number of bits, at a time when the system's entropy pool is low on randomness, may take quite a while to satisfy.
This document was created by man2html, using the manual pages.
Time: 04:38:15 GMT, May 22, 2000