OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / utils / ranbits.8
1 .TH IPSEC_RANBITS 8 "22 Aug 2000"
2 .\" RCSID $Id: ranbits.8,v 1.7 2001/05/31 21:57:33 henry Exp $
3 .SH NAME
4 ipsec ranbits \- generate random bits in ASCII form
5 .SH SYNOPSIS
6 .B ipsec
7 .B ranbits
8 [
9 .B \-\-quick
10 ] [
11 .B \-\-continuous
12 ] [
13 .B \-\-bytes
14 ] nbits
15 .SH DESCRIPTION
16 .I Ranbits
17 obtains
18 .I nbits
19 (rounded up to the nearest byte)
20 high-quality random bits from
21 .IR random (4),
22 and emits them on standard output as an ASCII string.
23 The default output format is
24 .IR datatot (3)
25 .B h
26 format:
27 lowercase hexadecimal with a
28 .B 0x
29 prefix and an underscore every 32 bits.
30 .PP
31 The
32 .B \-\-quick
33 option produces quick-and-dirty random bits:
34 instead of using the high-quality random bits from
35 .IR /dev/random ,
36 which may take some time to supply the necessary bits if
37 .I nbits
38 is large,
39 .I ranbits
40 uses
41 .IR /dev/urandom ,
42 which yields prompt results but lower-quality randomness.
43 .PP
44 The
45 .B \-\-continuous
46 option uses
47 .IR datatot (3)
48 .B x
49 output format, like
50 .B h
51 but without the underscores.
52 .PP
53 The
54 .B \-\-bytes
55 option causes
56 .I nbits
57 to be interpreted as a byte count rather than a bit count.
58 .SH FILES
59 /dev/random, /dev/urandom
60 .SH SEE ALSO
61 ipsec_datatot(3), random(4)
62 .SH HISTORY
63 Written for the Linux FreeS/WAN project
64 <http://www.freeswan.org>
65 by Henry Spencer.
66 .SH BUGS
67 There is an internal limit on
68 .IR nbits ,
69 currently 20000.
70 .PP
71 Without
72 .BR \-\-quick ,
73 .IR ranbits 's
74 run time is difficult to predict.
75 A request for a large number of bits,
76 at a time when the system's entropy pool is low on randomness,
77 may take quite a while to satisfy.