aboutsummaryrefslogtreecommitdiffstats
path: root/rngtest.1.in
blob: 43ead988d5a9ab96e97b12207d5f9349abf787da (plain)
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
78
79
80
81
82
83
84
85
86
87
88
.\" Copyright (c) 2004 Henrique de Moraes Holschuh -- hmh@debian.org
.\"
.TH RNGTEST 1 "March 2004" "@PACKAGE@ @VERSION@"

.SH NAME
rngtest \- Check the randomness of data using FIPS 140-2 tests

.SH SYNOPSIS
.B rngtest
[\fB\-c\fR \fIn\fR | \fB\-\-blockcount=\fIn\fR]
[\fB\-b\fR \fIn\fR | \fB\-\-blockstats=\fIn\fR]
[\fB\-t\fR \fIn\fR | \fB\-\-timedstats=\fIn\fR]
[\fB\-p\fR | \fB\-\-pipe\fR]
[\fB\-?\fR] [\fB\-\-help\fR]
[\fB\-V\fR] [\fB\-\-version\fR]
.RI

.SH DESCRIPTION
\fIrngtest\fR works on blocks of 20000 bits at a time, using the FIPS 140-2
(errata of 2001-10-10) tests to verify the randomness of the block of data.
.PP
It takes input from \fIstdin\fR, and outputs statistics to \fIstderr\fR,
optionally echoing blocks that passed the FIPS tests to \fIstdout\fR
(when operating in \fIpipe mode\fR).  Errors are sent to \fIstderr\fR.
.PP
At startup, \fIrngtest\fR will trow away the first 32 bits of data when
operating in \fIpipe mode\fR.  It will use the next 32 bits of data to
bootstrap the FIPS tests (even when not operating in \fIpipe mode\fR).
These bits are not tested for randomness.
.PP
Statistics are dumped to \fIstderr\fR when the program exits.

.SH OPTIONS
.TP
\fB\-p\fR, \fB\-\-pipe\fR
Enable \fIpipe mode\fR.  All data blocks that pass the FIPS tests are
echoed to \fIstdout\fR, and \fIrngtest\fR operates in silent mode.
.TP
\fB\-c\fR \fIn\fR, \fB\-\-blockcount=\fIn\fR (default: 0)
Exit after processing n input blocks, if n is not zero.
.TP
\fB\-b\fR \fIn\fR, \fB\-\-blockstats=\fIn\fR (default: 0)
Dump statistics every n blocks, if n is not zero.
.TP
\fB\-t\fR \fIn\fR, \fB\-\-timedstats=\fIn\fR (default: 0)
Dump statistics every n seconds, if n is not zero.
.TP
\fB\-?\fR, \fB\-\-help\fR
Give a short summary of all program options.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print program version

.SH STATISTICS
\fIrngtest\fR will dump statistics to \fIstderr\fR when it exits, and
when told to by \fIblockstats\fR or \fItimedstats\fR.
.PP
\fBFIPS 140-2 successes\fR and \fBFIPS 140-2 failures\fR counts the number of
20000-bit blocks either accepted or rejected by the FIPS 140-2 tests.  The
other statistics show a breakdown of the FIPS 140-2 failures by FIPS 
140-2 test.  See the FIPS 140-2 document for more information (note that these
tests are defined on FIPS 140-1 and FIPS 140-2 errata of 2001-10-10. They
were removed in FIPS 140-2 errata of 2002-12-03).
.PP
The speed statistics are taken for every 20000-bit block transferred or
processed.

.SH EXIT STATUS
.TP
\fB0\fR if no errors happen, and no blocks fail the FIPS tests.
.TP
\fB1\fR if no errors happen, but at least one block fails the FIPS tests.
.TP
\fB10\fR if there are problems with the parameters.
.TP
\fB11\fR if an input/output error happens.
.TP
\fB12\fR if an operating system or resource starvation error happens.

.SH SEE ALSO
random(4), rngd(8)
.TP
FIPS PUB 140-2 Security Requirements for Cryptographic Modules, NIST, 
http://csrc.nist.gov/cryptval/140-2.htm

.SH AUTHORS
Henrique de Moraes Holschuh <hmh@debian.org>