summaryrefslogtreecommitdiff
path: root/lib/libc/crypt
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-04-28 21:16:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-04-28 21:16:26 +0000
commite6b3bebefd4fc64a7c201260ca72e300df9bd5bd (patch)
tree1edb8d595a38131eff53bb6f9bcec471e043050c /lib/libc/crypt
parentc9f4804d458f54d54c8d99a241feee035b096b25 (diff)
flesh
Diffstat (limited to 'lib/libc/crypt')
-rw-r--r--lib/libc/crypt/arc4random.326
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/libc/crypt/arc4random.3 b/lib/libc/crypt/arc4random.3
index 0343338a54c..5fcea4e4929 100644
--- a/lib/libc/crypt/arc4random.3
+++ b/lib/libc/crypt/arc4random.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: arc4random.3,v 1.15 2000/04/28 21:02:55 deraadt Exp $
+.\" $OpenBSD: arc4random.3,v 1.16 2000/04/28 21:16:25 deraadt Exp $
.\"
.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
.\" All rights reserved.
@@ -49,10 +49,30 @@
.Sh DESCRIPTION
The
.Fn arc4random
-function uses the key stream generator employed by the
-arc4 cipher, which uses 8*8 8 bit S-Boxes.
+function provides a high quality 32-bit pseudo-random
+number very quickly.
+.Fn arc4random
+seeds itself on a regular basis from the kernel strong random number
+subsystem described in
+.Xr random 4 .
+On each call, an ARC4 generator is used to generate a new result.
+The
+.Fn arc4random
+function uses the ARC4 ciper key stream generator,
+which uses 8*8 8 bit S-Boxes.
The S-Boxes can be in about (2**1700) states.
.Pp
+.Fn arc4random
+fits into a middle ground not covered by other subsystems such as
+the strong, slow, and resource expensive random
+devices described in
+.Xr random 4
+versus the fast but poor quality interfaces described in
+.Xr rand 3 ,
+.Xr random 3 ,
+and
+.Xr drand48 3 .
+.Pp
The
.Fn arc4random_stir
function reads data from