xref: /netbsd-src/sbin/rndctl/rndctl.8 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\"	$NetBSD: rndctl.8,v 1.18 2011/10/01 02:55:00 pgoyette Exp $
2.\"
3.\" Copyright (c) 1997 Michael Graff
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\"    derived from this software without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.Dd January 4, 2009
30.Dt RNDCTL 8
31.Os
32.Sh NAME
33.Nm rndctl
34.Nd in-kernel random number generator management tool
35.Sh SYNOPSIS
36.Nm
37.Fl CcEe
38.Op Fl d Ar devname | Fl t Ar devtype
39.Nm
40.Fl ls
41.Op Fl d Ar devname | Fl t Ar devtype
42.Sh DESCRIPTION
43The
44.Nm
45program displays statistics on the current state of the
46.Xr rnd 4
47pseudo-driver, and allows the administrator to control which sources
48are allowed to contribute to the randomness pool maintained by
49.Xr rnd 4 ,
50as well as whether a given source counts as strongly random.
51.Pp
52The following options are available:
53.Bl -tag -width 123456
54.It Fl C
55Disable collection of timing information for the given
56device name or device type.
57.It Fl c
58Enable collection of timing information for the given
59device name or device type.
60.It Fl d
61Only the device named
62.Ar devname
63is altered or displayed.
64This is mutually exclusive with
65.Fl t .
66.It Fl E
67Disable entropy estimation from the collected timing information for
68the given device name or device type.
69If collection is still enabled, timing information is still
70collected and mixed into the internal entropy pool,
71but no entropy is assumed to be present.
72.It Fl e
73Enable entropy estimation using the collected timing information
74for the given device name or device type.
75.It Fl l
76List all sources, or, if the
77.Fl t
78or
79.Fl d
80flags are specified, only those specified by the
81.Ar devtype
82or
83.Ar devname
84specified.
85.It Fl s
86Display statistics on the current state of the random collection pool.
87.It Fl t
88All devices of type
89.Ar devtype
90are altered or displayed.
91This is mutually exclusive with
92.Fl d .
93.Pp
94The available types are:
95.Bl -tag -width "diskx"
96.It Ic disk
97Physical hard drives.
98.It Ic net
99Network interfaces.
100.It Ic tape
101Tape devices.
102.It Ic tty
103Terminal, mouse, or other user input devices.
104.It Ic rng
105Random number generators.
106.El
107.El
108.Sh FILES
109.Bl -tag -width /dev/urandomx -compact
110.It Pa /dev/random
111Returns
112.Dq good
113values only.
114.It Pa /dev/urandom
115Always returns data, degenerates to a pseudo-random generator.
116.El
117.Sh SEE ALSO
118.Xr rnd 4 ,
119.Xr rnd 9
120.Sh HISTORY
121The
122.Nm
123program was first made available in
124.Nx 1.3 .
125.Sh AUTHORS
126The
127.Nm
128program was written by
129.An Michael Graff
130.Aq explorer@flame.org .
131.Sh BUGS
132Turning on entropy estimation from unsafe or predictable sources will
133weaken system security, while turning on entropy collection from such
134sources may weaken system security.
135.Pp
136Care should be taken when using this command.
137