summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt
diff options
context:
space:
mode:
authorderaadt <>2000-04-28 21:16:25 +0000
committerderaadt <>2000-04-28 21:16:25 +0000
commit88eb8a9fd1d1420faecd6764f8df42f57216ad27 (patch)
tree96bb9a63be2046d9954d06bae31eff17655fee71 /src/lib/libc/crypt
parentb5b18ae06e453476bdb397376d48f10620aec1a9 (diff)
downloadopenbsd-88eb8a9fd1d1420faecd6764f8df42f57216ad27.tar.gz
openbsd-88eb8a9fd1d1420faecd6764f8df42f57216ad27.tar.bz2
openbsd-88eb8a9fd1d1420faecd6764f8df42f57216ad27.zip
flesh
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r--src/lib/libc/crypt/arc4random.326
1 files changed, 23 insertions, 3 deletions
diff --git a/src/lib/libc/crypt/arc4random.3 b/src/lib/libc/crypt/arc4random.3
index 0343338a54..5fcea4e492 100644
--- a/src/lib/libc/crypt/arc4random.3
+++ b/src/lib/libc/crypt/arc4random.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: arc4random.3,v 1.15 2000/04/28 21:02:55 deraadt Exp $ 1.\" $OpenBSD: arc4random.3,v 1.16 2000/04/28 21:16:25 deraadt Exp $
2.\" 2.\"
3.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 3.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
4.\" All rights reserved. 4.\" All rights reserved.
@@ -49,10 +49,30 @@
49.Sh DESCRIPTION 49.Sh DESCRIPTION
50The 50The
51.Fn arc4random 51.Fn arc4random
52function uses the key stream generator employed by the 52function provides a high quality 32-bit pseudo-random
53arc4 cipher, which uses 8*8 8 bit S-Boxes. 53number very quickly.
54.Fn arc4random
55seeds itself on a regular basis from the kernel strong random number
56subsystem described in
57.Xr random 4 .
58On each call, an ARC4 generator is used to generate a new result.
59The
60.Fn arc4random
61function uses the ARC4 ciper key stream generator,
62which uses 8*8 8 bit S-Boxes.
54The S-Boxes can be in about (2**1700) states. 63The S-Boxes can be in about (2**1700) states.
55.Pp 64.Pp
65.Fn arc4random
66fits into a middle ground not covered by other subsystems such as
67the strong, slow, and resource expensive random
68devices described in
69.Xr random 4
70versus the fast but poor quality interfaces described in
71.Xr rand 3 ,
72.Xr random 3 ,
73and
74.Xr drand48 3 .
75.Pp
56The 76The
57.Fn arc4random_stir 77.Fn arc4random_stir
58function reads data from 78function reads data from