xref: /openbsd-src/share/man/man4/random.4 (revision d13be5d47e4149db2549a9828e244d59dbc43f15)
1.\"	$OpenBSD: random.4,v 1.29 2011/01/11 15:26:05 deraadt Exp $
2.\"
3.\" Copyright (c) 1996, 1997 Michael Shalayeff
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd $Mdocdate: January 11 2011 $
27.Dt RANDOM 4
28.Os
29.Sh NAME
30.Nm random ,
31.Nm arandom
32.Nd random data source devices
33.Sh SYNOPSIS
34.Fd #include <sys/types.h>
35.Fd #include <dev/rndvar.h>
36.Sh DESCRIPTION
37The various
38.Nm
39devices produce high quality random output data.
40Entropy data is collected from system activity (like disk, network,
41and clock device interrupts and such), and then run through various
42hash or message digest functions to generate the output.
43All the random devices are expected to provide high quality
44pseudo-random output data.
45.Pp
46The
47.Xr arc4random 3
48function in userland libraries seeds itself from this device (or with
49the
50.Xr sysctl 3
51interface),
52providing a second level of ARC4 hashed data without the need to access
53these devices every time.
54.Sh FILES
55.Bl -tag -width /dev/arandom -compact
56.It Pa /dev/random
57.It Pa /dev/arandom
58.El
59.Sh SEE ALSO
60.Xr arc4random 3 ,
61.Xr md5 3 ,
62.Xr random 3 ,
63.Xr amdpm 4 ,
64.Xr glxsb 4 ,
65.Xr pchb 4 ,
66.Xr arc4random 9 ,
67.Xr md5 9
68.Sh HISTORY
69A
70.Nm
71device first appeared in the Linux operating system.
72This is a cloned interface.
73.Pp
74ARC4 routines added by David Mazieres.
75.Sh BUGS
76No randomness testing suite provided.
77