diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/crypt/arc4random.3 | 26 |
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 |
50 | The | 50 | The |
51 | .Fn arc4random | 51 | .Fn arc4random |
52 | function uses the key stream generator employed by the | 52 | function provides a high quality 32-bit pseudo-random |
53 | arc4 cipher, which uses 8*8 8 bit S-Boxes. | 53 | number very quickly. |
54 | .Fn arc4random | ||
55 | seeds itself on a regular basis from the kernel strong random number | ||
56 | subsystem described in | ||
57 | .Xr random 4 . | ||
58 | On each call, an ARC4 generator is used to generate a new result. | ||
59 | The | ||
60 | .Fn arc4random | ||
61 | function uses the ARC4 ciper key stream generator, | ||
62 | which uses 8*8 8 bit S-Boxes. | ||
54 | The S-Boxes can be in about (2**1700) states. | 63 | The S-Boxes can be in about (2**1700) states. |
55 | .Pp | 64 | .Pp |
65 | .Fn arc4random | ||
66 | fits into a middle ground not covered by other subsystems such as | ||
67 | the strong, slow, and resource expensive random | ||
68 | devices described in | ||
69 | .Xr random 4 | ||
70 | versus the fast but poor quality interfaces described in | ||
71 | .Xr rand 3 , | ||
72 | .Xr random 3 , | ||
73 | and | ||
74 | .Xr drand48 3 . | ||
75 | .Pp | ||
56 | The | 76 | The |
57 | .Fn arc4random_stir | 77 | .Fn arc4random_stir |
58 | function reads data from | 78 | function reads data from |