File: ranbits.8

package info (click to toggle)
freeswan 2.04-11.3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 23,340 kB
  • ctags: 12,260
  • sloc: ansic: 72,499; sh: 14,497; asm: 3,312; perl: 3,153; xml: 2,961; makefile: 2,702; tcl: 620; exp: 612; pascal: 228; sed: 206; awk: 124; lisp: 3
file content (77 lines) | stat: -rw-r--r-- 1,535 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.TH IPSEC_RANBITS 8 "22 Aug 2000"
.\" RCSID $Id: ranbits.8,v 1.8 2002/04/24 07:36:09 mcr Exp $
.SH NAME
ipsec ranbits \- generate random bits in ASCII form
.SH SYNOPSIS
.B ipsec
.B ranbits
[
.B \-\-quick
] [
.B \-\-continuous
] [
.B \-\-bytes
] nbits
.SH DESCRIPTION
.I Ranbits
obtains
.I nbits
(rounded up to the nearest byte)
high-quality random bits from
.IR random (4),
and emits them on standard output as an ASCII string.
The default output format is
.IR datatot (3)
.B h
format:
lowercase hexadecimal with a
.B 0x
prefix and an underscore every 32 bits.
.PP
The
.B \-\-quick
option produces quick-and-dirty random bits:
instead of using the high-quality random bits from
.IR /dev/random ,
which may take some time to supply the necessary bits if
.I nbits
is large,
.I ranbits
uses
.IR /dev/urandom ,
which yields prompt results but lower-quality randomness.
.PP
The
.B \-\-continuous
option uses
.IR datatot (3)
.B x
output format, like
.B h
but without the underscores.
.PP
The
.B \-\-bytes
option causes
.I nbits
to be interpreted as a byte count rather than a bit count.
.SH FILES
/dev/random, /dev/urandom
.SH SEE ALSO
ipsec_datatot(3), random(4)
.SH HISTORY
Written for the Linux FreeS/WAN project
<http://www.freeswan.org>
by Henry Spencer.
.SH BUGS
There is an internal limit on
.IR nbits ,
currently 20000.
.PP
Without
.BR \-\-quick ,
.IR 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.