diff options
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_add.pod')
| -rw-r--r-- | src/lib/libcrypto/doc/RAND_add.pod | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/libcrypto/doc/RAND_add.pod b/src/lib/libcrypto/doc/RAND_add.pod index 0a13ec2a92..67c66f3e0c 100644 --- a/src/lib/libcrypto/doc/RAND_add.pod +++ b/src/lib/libcrypto/doc/RAND_add.pod | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | RAND_add, RAND_seed, RAND_screen - add entropy to the PRNG | 5 | RAND_add, RAND_seed, RAND_status, RAND_event, RAND_screen - add |
| 6 | entropy to the PRNG | ||
| 6 | 7 | ||
| 7 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 8 | 9 | ||
| @@ -14,6 +15,7 @@ RAND_add, RAND_seed, RAND_screen - add entropy to the PRNG | |||
| 14 | 15 | ||
| 15 | int RAND_status(void); | 16 | int RAND_status(void); |
| 16 | 17 | ||
| 18 | int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam); | ||
| 17 | void RAND_screen(void); | 19 | void RAND_screen(void); |
| 18 | 20 | ||
| 19 | =head1 DESCRIPTION | 21 | =head1 DESCRIPTION |
| @@ -40,17 +42,24 @@ or L<RAND_load_file(3)|RAND_load_file(3)>. | |||
| 40 | 42 | ||
| 41 | RAND_seed() is equivalent to RAND_add() when B<num == entropy>. | 43 | RAND_seed() is equivalent to RAND_add() when B<num == entropy>. |
| 42 | 44 | ||
| 45 | RAND_event() collects the entropy from Windows events such as mouse | ||
| 46 | movements and other user interaction. It should be called with the | ||
| 47 | B<iMsg>, B<wParam> and B<lParam> arguments of I<all> messages sent to | ||
| 48 | the window procedure. It will estimate the entropy contained in the | ||
| 49 | event message (if any), and add it to the PRNG. The program can then | ||
| 50 | process the messages as usual. | ||
| 51 | |||
| 43 | The RAND_screen() function is available for the convenience of Windows | 52 | The RAND_screen() function is available for the convenience of Windows |
| 44 | programmers. It adds the current contents of the screen to the PRNG. | 53 | programmers. It adds the current contents of the screen to the PRNG. |
| 45 | For applications that can catch Windows events, seeding the PRNG with | 54 | For applications that can catch Windows events, seeding the PRNG by |
| 46 | the parameters of B<WM_MOUSEMOVE> events is a significantly better | 55 | calling RAND_event() is a significantly better source of |
| 47 | source of randomness. It should be noted that both methods cannot be | 56 | randomness. It should be noted that both methods cannot be used on |
| 48 | used on servers that run without user interaction. | 57 | servers that run without user interaction. |
| 49 | 58 | ||
| 50 | =head1 RETURN VALUES | 59 | =head1 RETURN VALUES |
| 51 | 60 | ||
| 52 | RAND_status() returns 1 if the PRNG has been seeded with enough data, | 61 | RAND_status() and RAND_event() return 1 if the PRNG has been seeded |
| 53 | 0 otherwise. | 62 | with enough data, 0 otherwise. |
| 54 | 63 | ||
| 55 | The other functions do not return values. | 64 | The other functions do not return values. |
| 56 | 65 | ||
| @@ -63,6 +72,6 @@ L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)> | |||
| 63 | 72 | ||
| 64 | RAND_seed() and RAND_screen() are available in all versions of SSLeay | 73 | RAND_seed() and RAND_screen() are available in all versions of SSLeay |
| 65 | and OpenSSL. RAND_add() and RAND_status() have been added in OpenSSL | 74 | and OpenSSL. RAND_add() and RAND_status() have been added in OpenSSL |
| 66 | 0.9.5. | 75 | 0.9.5, RAND_event() in OpenSSL 0.9.5a. |
| 67 | 76 | ||
| 68 | =cut | 77 | =cut |
