diff options
author | miod <> | 2014-07-09 17:56:43 +0000 |
---|---|---|
committer | miod <> | 2014-07-09 17:56:43 +0000 |
commit | b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a (patch) | |
tree | 5be9b59ec7ebadf006e37ac06006c858c860f945 /src/lib/libcrypto/doc/RAND.pod | |
parent | 8f147593f649791212451b70b61f2560f8cd408b (diff) | |
download | openbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.tar.gz openbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.tar.bz2 openbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.zip |
Update to match the current state of crypto/rand, and remove MLINKS for
RAND_event and RAND_screen.
Diffstat (limited to 'src/lib/libcrypto/doc/RAND.pod')
-rw-r--r-- | src/lib/libcrypto/doc/RAND.pod | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/src/lib/libcrypto/doc/RAND.pod b/src/lib/libcrypto/doc/RAND.pod index 8f803f33eb..5472ba8b41 100644 --- a/src/lib/libcrypto/doc/RAND.pod +++ b/src/lib/libcrypto/doc/RAND.pod | |||
@@ -8,51 +8,16 @@ rand - pseudo-random number generator | |||
8 | 8 | ||
9 | #include <openssl/rand.h> | 9 | #include <openssl/rand.h> |
10 | 10 | ||
11 | int RAND_set_rand_engine(ENGINE *engine); | ||
12 | |||
13 | int RAND_bytes(unsigned char *buf, int num); | 11 | int RAND_bytes(unsigned char *buf, int num); |
14 | int RAND_pseudo_bytes(unsigned char *buf, int num); | 12 | int RAND_pseudo_bytes(unsigned char *buf, int num); |
15 | 13 | ||
16 | void RAND_seed(const void *buf, int num); | ||
17 | void RAND_add(const void *buf, int num, int entropy); | ||
18 | int RAND_status(void); | ||
19 | |||
20 | int RAND_load_file(const char *file, long max_bytes); | ||
21 | int RAND_write_file(const char *file); | ||
22 | const char *RAND_file_name(char *file, size_t num); | ||
23 | |||
24 | void RAND_set_rand_method(const RAND_METHOD *meth); | ||
25 | const RAND_METHOD *RAND_get_rand_method(void); | ||
26 | RAND_METHOD *RAND_SSLeay(void); | ||
27 | |||
28 | void RAND_cleanup(void); | ||
29 | |||
30 | =head1 DESCRIPTION | 14 | =head1 DESCRIPTION |
31 | 15 | ||
32 | Since the introduction of the ENGINE API, the recommended way of controlling | 16 | These functions give access to the systems cryptographically secure |
33 | default implementations is by using the ENGINE API functions. The default | 17 | pseudo-random number generator (PRNG). It is used by other library functions |
34 | B<RAND_METHOD>, as set by RAND_set_rand_method() and returned by | 18 | for example to generate random keys, and applications can use it when they |
35 | RAND_get_rand_method(), is only used if no ENGINE has been set as the default | ||
36 | "rand" implementation. Hence, these two functions are no longer the recommened | ||
37 | way to control defaults. | ||
38 | |||
39 | If an alternative B<RAND_METHOD> implementation is being used (either set | ||
40 | directly or as provided by an ENGINE module), then it is entirely responsible | ||
41 | for the generation and management of a cryptographically secure PRNG stream. The | ||
42 | mechanisms described below relate solely to the software PRNG implementation | ||
43 | built in to OpenSSL and used by default. | ||
44 | |||
45 | These functions implement a cryptographically secure pseudo-random | ||
46 | number generator (PRNG). It is used by other library functions for | ||
47 | example to generate random keys, and applications can use it when they | ||
48 | need randomness. | 19 | need randomness. |
49 | 20 | ||
50 | A cryptographic PRNG must be seeded with unpredictable data such as | ||
51 | mouse movements or keys pressed at random by the user. This is | ||
52 | described in L<RAND_add(3)|RAND_add(3)>. Its state can be saved in a seed file | ||
53 | (see L<RAND_load_file(3)|RAND_load_file(3)>) to avoid having to go through the | ||
54 | seeding process whenever the application is started. | ||
55 | |||
56 | L<RAND_bytes(3)|RAND_bytes(3)> describes how to obtain random data from the | 21 | L<RAND_bytes(3)|RAND_bytes(3)> describes how to obtain random data from the |
57 | PRNG. | 22 | PRNG. |
58 | 23 | ||
@@ -63,10 +28,7 @@ L<arc4random_buf(3)> random number generator. | |||
63 | 28 | ||
64 | =head1 SEE ALSO | 29 | =head1 SEE ALSO |
65 | 30 | ||
66 | L<BN_rand(3)|BN_rand(3)>, L<RAND_add(3)|RAND_add(3)>, | 31 | L<BN_rand(3)|BN_rand(3)>, |
67 | L<RAND_load_file(3)|RAND_load_file(3)>, | 32 | L<RAND_bytes(3)|RAND_bytes(3)> |
68 | L<RAND_bytes(3)|RAND_bytes(3)>, | ||
69 | L<RAND_set_rand_method(3)|RAND_set_rand_method(3)>, | ||
70 | L<RAND_cleanup(3)|RAND_cleanup(3)> | ||
71 | 33 | ||
72 | =cut | 34 | =cut |