diff options
Diffstat (limited to 'src/lib/libssl/src/doc')
21 files changed, 853 insertions, 44 deletions
diff --git a/src/lib/libssl/src/doc/apps/CA.pl.pod b/src/lib/libssl/src/doc/apps/CA.pl.pod index 83e4c0af81..9d287f0c4d 100644 --- a/src/lib/libssl/src/doc/apps/CA.pl.pod +++ b/src/lib/libssl/src/doc/apps/CA.pl.pod | |||
@@ -102,6 +102,35 @@ the request and finally create a PKCS#12 file containing it. | |||
102 | CA.pl -signreq | 102 | CA.pl -signreq |
103 | CA.pl -pkcs12 "My Test Certificate" | 103 | CA.pl -pkcs12 "My Test Certificate" |
104 | 104 | ||
105 | =head1 DSA CERTIFICATES | ||
106 | |||
107 | Although the B<CA.pl> creates RSA CAs and requests it is still possible to | ||
108 | use it with DSA certificates and requests using the L<req(1)|req(1)> command | ||
109 | directly. The following example shows the steps that would typically be taken. | ||
110 | |||
111 | Create some DSA parameters: | ||
112 | |||
113 | openssl dsaparam -out dsap.pem 1024 | ||
114 | |||
115 | Create a DSA CA certificate and private key: | ||
116 | |||
117 | openssl req -x509 -newkey dsa:dsap.pem -keyout cacert.pem -out cacert.pem | ||
118 | |||
119 | Create the CA directories and files: | ||
120 | |||
121 | CA.pl -newca | ||
122 | |||
123 | enter cacert.pem when prompted for the CA file name. | ||
124 | |||
125 | Create a DSA certificate request and privat key (a different set of parameters | ||
126 | can optionally be created first): | ||
127 | |||
128 | openssl req -out newreq.pem -newkey dsa:dsap.pem | ||
129 | |||
130 | Sign the request: | ||
131 | |||
132 | CA.pl -signreq | ||
133 | |||
105 | =head1 NOTES | 134 | =head1 NOTES |
106 | 135 | ||
107 | Most of the filenames mentioned can be modified by editing the B<CA.pl> script. | 136 | Most of the filenames mentioned can be modified by editing the B<CA.pl> script. |
diff --git a/src/lib/libssl/src/doc/apps/dgst.pod b/src/lib/libssl/src/doc/apps/dgst.pod index cbf2cc529a..fcfd3ecf23 100644 --- a/src/lib/libssl/src/doc/apps/dgst.pod +++ b/src/lib/libssl/src/doc/apps/dgst.pod | |||
@@ -6,7 +6,7 @@ dgst, md5, md2, sha1, sha, mdc2, ripemd160 - message digests | |||
6 | 6 | ||
7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
8 | 8 | ||
9 | [B<dgst>] | 9 | B<openssl> B<dgst> |
10 | [B<-md5|-md2|-sha1|-sha|mdc2|-ripemd160>] | 10 | [B<-md5|-md2|-sha1|-sha|mdc2|-ripemd160>] |
11 | [B<-c>] | 11 | [B<-c>] |
12 | [B<-d>] | 12 | [B<-d>] |
diff --git a/src/lib/libssl/src/doc/apps/dhparam.pod b/src/lib/libssl/src/doc/apps/dhparam.pod index 6b237ec05a..15aabf4ac8 100644 --- a/src/lib/libssl/src/doc/apps/dhparam.pod +++ b/src/lib/libssl/src/doc/apps/dhparam.pod | |||
@@ -6,18 +6,19 @@ dhparam - DH parameter manipulation and generation | |||
6 | 6 | ||
7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
8 | 8 | ||
9 | B<openssl dh> | 9 | B<openssl dhparam> |
10 | [B<-inform DER|PEM>] | 10 | [B<-inform DER|PEM>] |
11 | [B<-outform DER|PEM>] | 11 | [B<-outform DER|PEM>] |
12 | [B<-in filename>] | 12 | [B<-in> I<filename>] |
13 | [B<-out filename>] | 13 | [B<-out> I<filename>] |
14 | [B<-dsaparam>] | ||
14 | [B<-noout>] | 15 | [B<-noout>] |
15 | [B<-text>] | 16 | [B<-text>] |
16 | [B<-C>] | 17 | [B<-C>] |
17 | [B<-2>] | 18 | [B<-2>] |
18 | [B<-5>] | 19 | [B<-5>] |
19 | [B<-rand file(s)>] | 20 | [B<-rand> I<file(s)>] |
20 | [numbits] | 21 | [I<numbits>] |
21 | 22 | ||
22 | =head1 DESCRIPTION | 23 | =head1 DESCRIPTION |
23 | 24 | ||
@@ -39,23 +40,35 @@ additional header and footer lines. | |||
39 | This specifies the output format, the options have the same meaning as the | 40 | This specifies the output format, the options have the same meaning as the |
40 | B<-inform> option. | 41 | B<-inform> option. |
41 | 42 | ||
42 | =item B<-in filename> | 43 | =item B<-in> I<filename> |
43 | 44 | ||
44 | This specifies the input filename to read parameters from or standard input if | 45 | This specifies the input filename to read parameters from or standard input if |
45 | this option is not specified. | 46 | this option is not specified. |
46 | 47 | ||
47 | =item B<-out filename> | 48 | =item B<-out> I<filename> |
48 | 49 | ||
49 | This specifies the output filename parameters to. Standard output is used | 50 | This specifies the output filename parameters to. Standard output is used |
50 | if this option is not present. The output filename should B<not> be the same | 51 | if this option is not present. The output filename should B<not> be the same |
51 | as the input filename. | 52 | as the input filename. |
52 | 53 | ||
54 | =item B<-dsaparam> | ||
55 | |||
56 | If this option is used, DSA rather than DH parameters are read or created; | ||
57 | they are converted to DH format. Otherwise, "strong" primes (such | ||
58 | that (p-1)/2 is also prime) will be used for DH parameter generation. | ||
59 | |||
60 | DH parameter generation with the B<-dsaparam> option is much faster, | ||
61 | and the recommended exponent length is shorter, which makes DH key | ||
62 | exchange more efficient. Beware that with such DSA-style DH | ||
63 | parameters, a fresh DH key should be created for each use to | ||
64 | avoid small-subgroup attacks that may be possible otherwise. | ||
65 | |||
53 | =item B<-2>, B<-5> | 66 | =item B<-2>, B<-5> |
54 | 67 | ||
55 | The generator to use, either 2 or 5. 2 is the default. If present then the | 68 | The generator to use, either 2 or 5. 2 is the default. If present then the |
56 | input file is ignored and parameters are generated instead. | 69 | input file is ignored and parameters are generated instead. |
57 | 70 | ||
58 | =item B<-rand file(s)> | 71 | =item B<-rand> I<file(s)> |
59 | 72 | ||
60 | a file or files containing random data used to seed the random number | 73 | a file or files containing random data used to seed the random number |
61 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). | 74 | generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>). |
@@ -63,10 +76,10 @@ Multiple files can be specified separated by a OS-dependent character. | |||
63 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | 76 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for |
64 | all others. | 77 | all others. |
65 | 78 | ||
66 | =item B<numbits> | 79 | =item I<numbits> |
67 | 80 | ||
68 | this option specifies that a parameter set should be generated of size | 81 | this option specifies that a parameter set should be generated of size |
69 | B<numbits>. It must be the last option. If not present then a value of 512 | 82 | I<numbits>. It must be the last option. If not present then a value of 512 |
70 | is used. If this option is present then the input file is ignored and | 83 | is used. If this option is present then the input file is ignored and |
71 | parameters are generated instead. | 84 | parameters are generated instead. |
72 | 85 | ||
@@ -81,7 +94,7 @@ this option prints out the DH parameters in human readable form. | |||
81 | =item B<-C> | 94 | =item B<-C> |
82 | 95 | ||
83 | this option converts the parameters into C code. The parameters can then | 96 | this option converts the parameters into C code. The parameters can then |
84 | be loaded by calling the B<get_dhXXX()> function. | 97 | be loaded by calling the B<get_dh>I<numbits>B<()> function. |
85 | 98 | ||
86 | =back | 99 | =back |
87 | 100 | ||
@@ -112,4 +125,9 @@ There should be a way to generate and manipulate DH keys. | |||
112 | 125 | ||
113 | L<dsaparam(1)|dsaparam(1)> | 126 | L<dsaparam(1)|dsaparam(1)> |
114 | 127 | ||
128 | =head1 HISTORY | ||
129 | |||
130 | The B<dhparam> command was added in OpenSSL 0.9.5. | ||
131 | The B<-dsaparam> option was added in OpenSSL 0.9.6. | ||
132 | |||
115 | =cut | 133 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/genrsa.pod b/src/lib/libssl/src/doc/apps/genrsa.pod index a2d878410b..70d35fef0a 100644 --- a/src/lib/libssl/src/doc/apps/genrsa.pod +++ b/src/lib/libssl/src/doc/apps/genrsa.pod | |||
@@ -83,3 +83,6 @@ be much larger (typically 1024 bits). | |||
83 | =head1 SEE ALSO | 83 | =head1 SEE ALSO |
84 | 84 | ||
85 | L<gendsa(1)|gendsa(1)> | 85 | L<gendsa(1)|gendsa(1)> |
86 | |||
87 | =cut | ||
88 | |||
diff --git a/src/lib/libssl/src/doc/apps/openssl.pod b/src/lib/libssl/src/doc/apps/openssl.pod index 9b1320606b..2fc61b6c21 100644 --- a/src/lib/libssl/src/doc/apps/openssl.pod +++ b/src/lib/libssl/src/doc/apps/openssl.pod | |||
@@ -12,6 +12,10 @@ I<command> | |||
12 | [ I<command_opts> ] | 12 | [ I<command_opts> ] |
13 | [ I<command_args> ] | 13 | [ I<command_args> ] |
14 | 14 | ||
15 | B<openssl> [ B<list-standard-commands> | B<list-message-digest-commands> | B<list-cipher-commands> ] | ||
16 | |||
17 | B<openssl> B<no->I<XXX> [ I<arbitrary options> ] | ||
18 | |||
15 | =head1 DESCRIPTION | 19 | =head1 DESCRIPTION |
16 | 20 | ||
17 | OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL | 21 | OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL |
@@ -35,6 +39,22 @@ The B<openssl> program provides a rich variety of commands (I<command> in the | |||
35 | SYNOPSIS above), each of which often has a wealth of options and arguments | 39 | SYNOPSIS above), each of which often has a wealth of options and arguments |
36 | (I<command_opts> and I<command_args> in the SYNOPSIS). | 40 | (I<command_opts> and I<command_args> in the SYNOPSIS). |
37 | 41 | ||
42 | The pseudo-commands B<list-standard-commands>, B<list-message-digest-commands>, | ||
43 | and B<list-cipher-commands> output a list (one entry per line) of the names | ||
44 | of all standard commands, message digest commands, or cipher commands, | ||
45 | respectively, that are available in the present B<openssl> utility. | ||
46 | |||
47 | The pseudo-command B<no->I<XXX> tests whether a command of the | ||
48 | specified name is available. If no command named I<XXX> exists, it | ||
49 | returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1 | ||
50 | and prints I<XXX>. In both cases, the output goes to B<stdout> and | ||
51 | nothing is printed to B<stderr>. Additional command line arguments | ||
52 | are always ignored. Since for each cipher there is a command of the | ||
53 | same name, this provides an easy way for shell scripts to test for the | ||
54 | availability of ciphers in the B<openssl> program. (B<no->I<XXX> is | ||
55 | not able to detect pseudo-commands such as B<quit>, | ||
56 | B<list->I<...>B<-commands>, or B<no->I<XXX> itself.) | ||
57 | |||
38 | =head2 STANDARD COMMANDS | 58 | =head2 STANDARD COMMANDS |
39 | 59 | ||
40 | =over 10 | 60 | =over 10 |
@@ -103,6 +123,10 @@ Generation of hashed passwords. | |||
103 | 123 | ||
104 | PKCS#7 Data Management. | 124 | PKCS#7 Data Management. |
105 | 125 | ||
126 | =item L<B<rand>|rand(1)> | ||
127 | |||
128 | Generate pseudo-random bytes. | ||
129 | |||
106 | =item L<B<req>|req(1)> | 130 | =item L<B<req>|req(1)> |
107 | 131 | ||
108 | X.509 Certificate Signing Request (CSR) Management. | 132 | X.509 Certificate Signing Request (CSR) Management. |
@@ -285,14 +309,17 @@ L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, | |||
285 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, | 309 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, |
286 | L<passwd(1)|passwd(1)>, | 310 | L<passwd(1)|passwd(1)>, |
287 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, | 311 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, |
288 | L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, L<s_client(1)|s_client(1)>, | 312 | L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, L<s_client(1)|s_client(1)>, |
289 | L<s_server(1)|s_server(1)>, L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, | 313 | L<s_server(1)|s_server(1)>, L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, |
290 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, | 314 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, |
291 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> | 315 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> |
292 | 316 | ||
293 | =head1 HISTORY | 317 | =head1 HISTORY |
294 | 318 | ||
295 | The openssl(1) document appeared in OpenSSL 0.9.2 | 319 | The openssl(1) document appeared in OpenSSL 0.9.2. |
320 | The B<list->I<XXX>B<-commands> pseudo-commands were added in OpenSSL 0.9.3; | ||
321 | the B<no->I<XXX> pseudo-commands were added in OpenSSL 0.9.5a. | ||
322 | For notes on the availability of other commands, see their individual | ||
323 | manual pages. | ||
296 | 324 | ||
297 | =cut | 325 | =cut |
298 | |||
diff --git a/src/lib/libssl/src/doc/apps/rand.pod b/src/lib/libssl/src/doc/apps/rand.pod new file mode 100644 index 0000000000..f81eab0457 --- /dev/null +++ b/src/lib/libssl/src/doc/apps/rand.pod | |||
@@ -0,0 +1,50 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | rand - generate pseudo-random bytes | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | B<openssl rand> | ||
10 | [B<-out> I<file>] | ||
11 | [B<-rand> I<file(s)>] | ||
12 | [B<-base64>] | ||
13 | I<num> | ||
14 | |||
15 | =head1 DESCRIPTION | ||
16 | |||
17 | The B<rand> command outputs I<num> pseudo-random bytes after seeding | ||
18 | the random number generater once. As in other B<openssl> command | ||
19 | line tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd> | ||
20 | in addition to the files given in the B<-rand> option. A new | ||
21 | I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough | ||
22 | seeding was obtained from these sources. | ||
23 | |||
24 | =head1 OPTIONS | ||
25 | |||
26 | =over 4 | ||
27 | |||
28 | =item B<-out> I<file> | ||
29 | |||
30 | Write to I<file> instead of standard output. | ||
31 | |||
32 | =item B<-rand> I<file(s)> | ||
33 | |||
34 | Use specified file or files or EGD socket (see L<RAND_egd(3)|RAND_egd(3)>) | ||
35 | for seeding the random number generator. | ||
36 | Multiple files can be specified separated by a OS-dependent character. | ||
37 | The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for | ||
38 | all others. | ||
39 | |||
40 | =item B<-base64> | ||
41 | |||
42 | Perform base64 encoding on the output. | ||
43 | |||
44 | =back | ||
45 | |||
46 | =head1 SEE ALSO | ||
47 | |||
48 | L<RAND_bytes(3)|RAND_bytes(3)> | ||
49 | |||
50 | =cut | ||
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod index 3ede134164..2f80375319 100644 --- a/src/lib/libssl/src/doc/apps/s_client.pod +++ b/src/lib/libssl/src/doc/apps/s_client.pod | |||
@@ -22,6 +22,7 @@ B<openssl> B<s_client> | |||
22 | [B<-state>] | 22 | [B<-state>] |
23 | [B<-nbio>] | 23 | [B<-nbio>] |
24 | [B<-crlf>] | 24 | [B<-crlf>] |
25 | [B<-ign_eof>] | ||
25 | [B<-quiet>] | 26 | [B<-quiet>] |
26 | [B<-ssl2>] | 27 | [B<-ssl2>] |
27 | [B<-ssl3>] | 28 | [B<-ssl3>] |
@@ -122,9 +123,15 @@ turns on non-blocking I/O | |||
122 | this option translated a line feed from the terminal into CR+LF as required | 123 | this option translated a line feed from the terminal into CR+LF as required |
123 | by some servers. | 124 | by some servers. |
124 | 125 | ||
126 | =item B<-ign_eof> | ||
127 | |||
128 | inhibit shutting down the connection when end of file is reached in the | ||
129 | input. | ||
130 | |||
125 | =item B<-quiet> | 131 | =item B<-quiet> |
126 | 132 | ||
127 | inhibit printing of session and certificate information. | 133 | inhibit printing of session and certificate information. This implicitely |
134 | turns on B<-ign_eof> as well. | ||
128 | 135 | ||
129 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> | 136 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> |
130 | 137 | ||
@@ -155,9 +162,10 @@ command for more information. | |||
155 | 162 | ||
156 | If a connection is established with an SSL server then any data received | 163 | If a connection is established with an SSL server then any data received |
157 | from the server is displayed and any key presses will be sent to the | 164 | from the server is displayed and any key presses will be sent to the |
158 | server. If the line begins with an B<R> then the session will be | 165 | server. When used interactively (which means neither B<-quiet> nor B<-ign_eof> |
159 | renegotiated. If the line begins with a B<Q> the connection will be closed | 166 | have been given), the session will be renegociated if the line begins with an |
160 | down. | 167 | B<R>, and if the line begins with a B<Q> or if end of file is reached, the |
168 | connection will be closed down. | ||
161 | 169 | ||
162 | =head1 NOTES | 170 | =head1 NOTES |
163 | 171 | ||
diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod index b127182bbb..e4ae5468da 100644 --- a/src/lib/libssl/src/doc/apps/x509.pod +++ b/src/lib/libssl/src/doc/apps/x509.pod | |||
@@ -212,9 +212,10 @@ clears all the prohibited or rejected uses of the certificate. | |||
212 | 212 | ||
213 | =item B<-addtrust arg> | 213 | =item B<-addtrust arg> |
214 | 214 | ||
215 | adds a trusted certificate use. Currently acceptable values | 215 | adds a trusted certificate use. Any object name can be used here |
216 | are B<all> (any purpose), B<sslclient> (SSL client use), B<sslserver> | 216 | but currently only B<clientAuth> (SSL client use), B<serverAuth> |
217 | (SSL server use) B<email> (S/MIME email) and B<objsign> (Object signing). | 217 | (SSL server use) and B<emailProtection> (S/MIME email) are used. |
218 | Other OpenSSL applications may define additional uses. | ||
218 | 219 | ||
219 | =item B<-addreject arg> | 220 | =item B<-addreject arg> |
220 | 221 | ||
diff --git a/src/lib/libssl/src/doc/crypto/DH_set_method.pod b/src/lib/libssl/src/doc/crypto/DH_set_method.pod index dca41d8dbc..a8f75bdd9d 100644 --- a/src/lib/libssl/src/doc/crypto/DH_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/DH_set_method.pod | |||
@@ -56,7 +56,7 @@ the default method is used. | |||
56 | /* compute shared secret */ | 56 | /* compute shared secret */ |
57 | int (*compute_key)(unsigned char *key, BIGNUM *pub_key, DH *dh); | 57 | int (*compute_key)(unsigned char *key, BIGNUM *pub_key, DH *dh); |
58 | 58 | ||
59 | /* compute r = a ^ p mod m. May be NULL */ | 59 | /* compute r = a ^ p mod m (May be NULL for some implementations) */ |
60 | int (*bn_mod_exp)(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 60 | int (*bn_mod_exp)(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, |
61 | const BIGNUM *m, BN_CTX *ctx, | 61 | const BIGNUM *m, BN_CTX *ctx, |
62 | BN_MONT_CTX *m_ctx); | 62 | BN_MONT_CTX *m_ctx); |
diff --git a/src/lib/libssl/src/doc/crypto/DSA_set_method.pod b/src/lib/libssl/src/doc/crypto/DSA_set_method.pod index 0b13ec9237..edec46413d 100644 --- a/src/lib/libssl/src/doc/crypto/DSA_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/DSA_set_method.pod | |||
@@ -62,12 +62,13 @@ struct | |||
62 | int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, | 62 | int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, |
63 | DSA_SIG *sig, DSA *dsa); | 63 | DSA_SIG *sig, DSA *dsa); |
64 | 64 | ||
65 | /* compute rr = a1^p1 * a2^p2 mod m. May be NULL */ | 65 | /* compute rr = a1^p1 * a2^p2 mod m (May be NULL for some |
66 | implementations) */ | ||
66 | int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, | 67 | int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, |
67 | BIGNUM *a2, BIGNUM *p2, BIGNUM *m, | 68 | BIGNUM *a2, BIGNUM *p2, BIGNUM *m, |
68 | BN_CTX *ctx, BN_MONT_CTX *in_mont); | 69 | BN_CTX *ctx, BN_MONT_CTX *in_mont); |
69 | 70 | ||
70 | /* compute r = a ^ p mod m. May be NULL */ | 71 | /* compute r = a ^ p mod m (May be NULL for some implementations) */ |
71 | int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, | 72 | int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, |
72 | const BIGNUM *p, const BIGNUM *m, | 73 | const BIGNUM *p, const BIGNUM *m, |
73 | BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 74 | BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod b/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod new file mode 100644 index 0000000000..9707a4b399 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/EVP_OpenInit.pod | |||
@@ -0,0 +1,51 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/evp.h> | ||
10 | |||
11 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, | ||
12 | int ekl,unsigned char *iv,EVP_PKEY *priv); | ||
13 | void EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
14 | int *outl, unsigned char *in, int inl); | ||
15 | void EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
16 | int *outl); | ||
17 | |||
18 | =head1 DESCRIPTION | ||
19 | |||
20 | The EVP envelope routines are a high level interface to envelope | ||
21 | decryption. They decrypt a public key encrypted symmetric key and | ||
22 | then decrypt data using it. | ||
23 | |||
24 | EVP_OpenInit() initialises a cipher context B<ctx> for decryption | ||
25 | with cipher B<type>. It decrypts the encrypted symmetric key of length | ||
26 | B<ekl> bytes passed in the B<ek> parameter using the private key B<priv>. | ||
27 | The IV is supplied in the B<iv> parameter. | ||
28 | |||
29 | EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties | ||
30 | as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as | ||
31 | documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual | ||
32 | page. | ||
33 | |||
34 | =head1 RETURN VALUES | ||
35 | |||
36 | EVP_OpenInit() returns -1 on error or an non zero integer (actually the | ||
37 | recovered secret key size) if successful. | ||
38 | |||
39 | EVP_SealUpdate() does not return a value. | ||
40 | |||
41 | EVP_SealFinal() returns 0 if the decrypt failed or 1 for success. | ||
42 | |||
43 | =head1 SEE ALSO | ||
44 | |||
45 | L<evp(3)|evp(3)>,L<rand(3)|rand(3)> | ||
46 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | ||
47 | L<EVP_SealInit(3)|EVP_SealInit(3)> | ||
48 | |||
49 | =head1 HISTORY | ||
50 | |||
51 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod new file mode 100644 index 0000000000..1579d110fa --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod | |||
@@ -0,0 +1,70 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/evp.h> | ||
10 | |||
11 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, | ||
12 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); | ||
13 | void EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
14 | int *outl, unsigned char *in, int inl); | ||
15 | void EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
16 | int *outl); | ||
17 | |||
18 | =head1 DESCRIPTION | ||
19 | |||
20 | The EVP envelope routines are a high level interface to envelope | ||
21 | encryption. They generate a random key and then "envelope" it by | ||
22 | using public key encryption. Data can then be encrypted using this | ||
23 | key. | ||
24 | |||
25 | EVP_SealInit() initialises a cipher context B<ctx> for encryption | ||
26 | with cipher B<type> using a random secret key and IV supplied in | ||
27 | the B<iv> parameter. B<type> is normally supplied by a function such | ||
28 | as EVP_des_cbc(). The secret key is encrypted using one or more public | ||
29 | keys, this allows the same encrypted data to be decrypted using any | ||
30 | of the corresponding private keys. B<ek> is an array of buffers where | ||
31 | the public key encrypted secret key will be written, each buffer must | ||
32 | contain enough room for the corresponding encrypted key: that is | ||
33 | B<ek[i]> must have room for B<EVP_PKEY_size(pubk[i])> bytes. The actual | ||
34 | size of each encrypted secret key is written to the array B<ekl>. B<pubk> is | ||
35 | an array of B<npubk> public keys. | ||
36 | |||
37 | EVP_SealUpdate() and EVP_SealFinal() have exactly the same properties | ||
38 | as the EVP_EncryptUpdate() and EVP_EncryptFinal() routines, as | ||
39 | documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual | ||
40 | page. | ||
41 | |||
42 | =head1 RETURN VALUES | ||
43 | |||
44 | EVP_SealInit() returns -1 on error or B<npubk> if successful. | ||
45 | |||
46 | EVP_SealUpdate() and EVP_SealFinal() do not return values. | ||
47 | |||
48 | =head1 NOTES | ||
49 | |||
50 | Because a random secret key is generated the random number generator | ||
51 | must be seeded before calling EVP_SealInit(). | ||
52 | |||
53 | The public key must be RSA because it is the only OpenSSL public key | ||
54 | algorithm that supports key transport. | ||
55 | |||
56 | Envelope encryption is the usual method of using public key encryption | ||
57 | on large amounts of data, this is because public key encryption is slow | ||
58 | but symmetric encryption is fast. So symmetric encryption is used for | ||
59 | bulk encryption and the small random symmetric key used is transferred | ||
60 | using public key encryption. | ||
61 | |||
62 | =head1 SEE ALSO | ||
63 | |||
64 | L<evp(3)|evp(3)>,L<rand(3)|rand(3)> | ||
65 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | ||
66 | L<EVP_OpenInit(3)|EVP_OpenInit(3)> | ||
67 | |||
68 | =head1 HISTORY | ||
69 | |||
70 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod new file mode 100644 index 0000000000..bbc9203c9c --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod | |||
@@ -0,0 +1,85 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | EVP_SignInit, EVP_SignUpdate, EVP_SignFinal - EVP signing functions | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/evp.h> | ||
10 | |||
11 | void EVP_SignInit(EVP_MD_CTX *ctx, const EVP_MD *type); | ||
12 | void EVP_SignUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt); | ||
13 | int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *sig,unsigned int *s, EVP_PKEY *pkey); | ||
14 | |||
15 | int EVP_PKEY_size(EVP_PKEY *pkey); | ||
16 | |||
17 | =head1 DESCRIPTION | ||
18 | |||
19 | The EVP signature routines are a high level interface to digital | ||
20 | signatures. | ||
21 | |||
22 | EVP_SignInit() initialises a signing context B<ctx> to using digest | ||
23 | B<type>: this will typically be supplied by a function such as | ||
24 | EVP_sha1(). | ||
25 | |||
26 | EVP_SignUpdate() hashes B<cnt> bytes of data at B<d> into the | ||
27 | signature context B<ctx>. This funtion can be called several times on the | ||
28 | same B<ctx> to include additional data. | ||
29 | |||
30 | EVP_SignFinal() signs the data in B<ctx> using the private key B<pkey> | ||
31 | and places the signature in B<sig>. If the B<s> parameter is not NULL | ||
32 | then the number of bytes of data written (i.e. the length of the signature) | ||
33 | will be written to the integer at B<s>, at most EVP_PKEY_size(pkey) bytes | ||
34 | will be written. After calling EVP_SignFinal() no additional calls to | ||
35 | EVP_SignUpdate() can be made, but EVP_SignInit() can be called to initialiase | ||
36 | a new signature operation. | ||
37 | |||
38 | EVP_PKEY_size() returns the maximum size of a signature in bytes. The actual | ||
39 | signature returned by EVP_SignFinal() may be smaller. | ||
40 | |||
41 | =head1 RETURN VALUES | ||
42 | |||
43 | EVP_SignInit() and EVP_SignUpdate() do not return values. | ||
44 | |||
45 | EVP_SignFinal() returns 1 for success and 0 for failure. | ||
46 | |||
47 | EVP_PKEY_size() returns the maximum size of a signature in bytes. | ||
48 | |||
49 | The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. | ||
50 | |||
51 | =head1 NOTES | ||
52 | |||
53 | The B<EVP> interface to digital signatures should almost always be used in | ||
54 | preference to the low level interfaces. This is because the code then becomes | ||
55 | transparent to the algorithm used and much more flexible. | ||
56 | |||
57 | Due to the link between message digests and public key algorithms the correct | ||
58 | digest algorithm must be used with the correct public key type. A list of | ||
59 | algorithms and associated public key algorithms appears in | ||
60 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>. | ||
61 | |||
62 | When signing with DSA private keys the random number generator must be seeded | ||
63 | or the operation will fail. The random number generator does not need to be | ||
64 | seeded for RSA signatures. | ||
65 | |||
66 | =head1 BUGS | ||
67 | |||
68 | Several of the functions do not return values: maybe they should. Although the | ||
69 | internal digest operations will never fail some future hardware based operations | ||
70 | might. | ||
71 | |||
72 | =head1 SEE ALSO | ||
73 | |||
74 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | ||
75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | ||
76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | ||
77 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | ||
78 | L<sha(3)|sha(3)>, L<digest(1)|digest(1)> | ||
79 | |||
80 | =head1 HISTORY | ||
81 | |||
82 | EVP_SignInit(), EVP_SignUpdate() and EVP_SignFinal() are | ||
83 | available in all versions of SSLeay and OpenSSL. | ||
84 | |||
85 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod new file mode 100644 index 0000000000..3b5e07f4ad --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod | |||
@@ -0,0 +1,71 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | EVP_VerifyInit, EVP_VerifyUpdate, EVP_VerifyFinal - EVP signature verification functions | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/evp.h> | ||
10 | |||
11 | void EVP_VerifyInit(EVP_MD_CTX *ctx, const EVP_MD *type); | ||
12 | void EVP_VerifyUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt); | ||
13 | int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf, unsigned int siglen,EVP_PKEY *pkey); | ||
14 | |||
15 | =head1 DESCRIPTION | ||
16 | |||
17 | The EVP signature verification routines are a high level interface to digital | ||
18 | signatures. | ||
19 | |||
20 | EVP_VerifyInit() initialises a verification context B<ctx> to using digest | ||
21 | B<type>: this will typically be supplied by a function such as EVP_sha1(). | ||
22 | |||
23 | EVP_VerifyUpdate() hashes B<cnt> bytes of data at B<d> into the | ||
24 | verification context B<ctx>. This funtion can be called several times on the | ||
25 | same B<ctx> to include additional data. | ||
26 | |||
27 | EVP_VerifyFinal() verifies the data in B<ctx> using the public key B<pkey> | ||
28 | and against the B<siglen> bytes at B<sigbuf>. After calling EVP_VerifyFinal() | ||
29 | no additional calls to EVP_VerifyUpdate() can be made, but EVP_VerifyInit() | ||
30 | can be called to initialiase a new verification operation. | ||
31 | |||
32 | =head1 RETURN VALUES | ||
33 | |||
34 | EVP_VerifyInit() and EVP_VerifyUpdate() do not return values. | ||
35 | |||
36 | EVP_VerifyFinal() returns 1 for a correct signature, 0 for failure and -1 if some | ||
37 | other error occurred. | ||
38 | |||
39 | The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. | ||
40 | |||
41 | =head1 NOTES | ||
42 | |||
43 | The B<EVP> interface to digital signatures should almost always be used in | ||
44 | preference to the low level interfaces. This is because the code then becomes | ||
45 | transparent to the algorithm used and much more flexible. | ||
46 | |||
47 | Due to the link between message digests and public key algorithms the correct | ||
48 | digest algorithm must be used with the correct public key type. A list of | ||
49 | algorithms and associated public key algorithms appears in | ||
50 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>. | ||
51 | |||
52 | =head1 BUGS | ||
53 | |||
54 | Several of the functions do not return values: maybe they should. Although the | ||
55 | internal digest operations will never fail some future hardware based operations | ||
56 | might. | ||
57 | |||
58 | =head1 SEE ALSO | ||
59 | |||
60 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | ||
61 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | ||
62 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | ||
63 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | ||
64 | L<sha(3)|sha(3)>, L<digest(1)|digest(1)> | ||
65 | |||
66 | =head1 HISTORY | ||
67 | |||
68 | EVP_VerifyInit(), EVP_VerifyUpdate() and EVP_VerifyFinal() are | ||
69 | available in all versions of SSLeay and OpenSSL. | ||
70 | |||
71 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/RAND_add.pod b/src/lib/libssl/src/doc/crypto/RAND_add.pod index 0a13ec2a92..67c66f3e0c 100644 --- a/src/lib/libssl/src/doc/crypto/RAND_add.pod +++ b/src/lib/libssl/src/doc/crypto/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 |
diff --git a/src/lib/libssl/src/doc/crypto/RAND_set_rand_method.pod b/src/lib/libssl/src/doc/crypto/RAND_set_rand_method.pod index 466e9b8767..464eba416d 100644 --- a/src/lib/libssl/src/doc/crypto/RAND_set_rand_method.pod +++ b/src/lib/libssl/src/doc/crypto/RAND_set_rand_method.pod | |||
@@ -34,10 +34,12 @@ RAND_get_rand_method() returns a pointer to the current method. | |||
34 | void (*cleanup)(void); | 34 | void (*cleanup)(void); |
35 | void (*add)(const void *buf, int num, int entropy); | 35 | void (*add)(const void *buf, int num, int entropy); |
36 | int (*pseudorand)(unsigned char *buf, int num); | 36 | int (*pseudorand)(unsigned char *buf, int num); |
37 | int (*status)(void); | ||
37 | } RAND_METHOD; | 38 | } RAND_METHOD; |
38 | 39 | ||
39 | The components point to the implementation of RAND_seed(), | 40 | The components point to the implementation of RAND_seed(), |
40 | RAND_bytes(), RAND_cleanup(), RAND_add() and RAND_pseudo_rand(). | 41 | RAND_bytes(), RAND_cleanup(), RAND_add(), RAND_pseudo_rand() |
42 | and RAND_status(). | ||
41 | Each component may be NULL if the function is not implemented. | 43 | Each component may be NULL if the function is not implemented. |
42 | 44 | ||
43 | =head1 RETURN VALUES | 45 | =head1 RETURN VALUES |
diff --git a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod index deb1183a23..14b0b4cf35 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod | |||
@@ -87,10 +87,11 @@ the default method is used. | |||
87 | int (*rsa_priv_dec)(int flen, unsigned char *from, | 87 | int (*rsa_priv_dec)(int flen, unsigned char *from, |
88 | unsigned char *to, RSA *rsa, int padding); | 88 | unsigned char *to, RSA *rsa, int padding); |
89 | 89 | ||
90 | /* compute r0 = r0 ^ I mod rsa->n. May be NULL */ | 90 | /* compute r0 = r0 ^ I mod rsa->n (May be NULL for some |
91 | implementations) */ | ||
91 | int (*rsa_mod_exp)(BIGNUM *r0, BIGNUM *I, RSA *rsa); | 92 | int (*rsa_mod_exp)(BIGNUM *r0, BIGNUM *I, RSA *rsa); |
92 | 93 | ||
93 | /* compute r = a ^ p mod m. May be NULL */ | 94 | /* compute r = a ^ p mod m (May be NULL for some implementations) */ |
94 | int (*bn_mod_exp)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 95 | int (*bn_mod_exp)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, |
95 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 96 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
96 | 97 | ||
diff --git a/src/lib/libssl/src/doc/crypto/blowfish.pod b/src/lib/libssl/src/doc/crypto/blowfish.pod index e8c7114311..e0b777418f 100644 --- a/src/lib/libssl/src/doc/crypto/blowfish.pod +++ b/src/lib/libssl/src/doc/crypto/blowfish.pod | |||
@@ -57,28 +57,31 @@ everything after the first 64 bits is ignored. | |||
57 | 57 | ||
58 | The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt() | 58 | The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt() |
59 | all operate on variable length data. They all take an initialisation vector | 59 | all operate on variable length data. They all take an initialisation vector |
60 | B<ivec> which must be initially filled with zeros, but then just need to be | 60 | B<ivec> which needs to be passed along into the next call of the same function |
61 | passed along into the next call of the same function for the same message. | 61 | for the same message. B<ivec> may be initialised with anything, but the |
62 | recipient needs to know what it was initialised with, or it won't be able | ||
63 | to decrypt. Some programs and protocols simplify this, like SSH, where | ||
64 | B<ivec> is simply initialised to zero. | ||
62 | BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while | 65 | BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while |
63 | BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable | 66 | BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable |
64 | number of bytes (the amount does not have to be an exact multiple of 8). The | 67 | number of bytes (the amount does not have to be an exact multiple of 8). The |
65 | purpose of the latter two is to simulate stream ciphers, and therefore, they | 68 | purpose of the latter two is to simulate stream ciphers, and therefore, they |
66 | need the parameter B<num>, which is a pointer to an integer where the current | 69 | need the parameter B<num>, which is a pointer to an integer where the current |
67 | offset in B<ivec> is stored between calls. This integer must be initialised | 70 | offset in B<ivec> is stored between calls. This integer must be initialised |
68 | to zero when B<ivec> is filled with zeros. | 71 | to zero when B<ivec> is initialised. |
69 | 72 | ||
70 | BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It | 73 | BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It |
71 | encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>, | 74 | encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>, |
72 | putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or | 75 | putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or |
73 | decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte | 76 | decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte |
74 | long initialisation vector, which must be initially filled with zeros. | 77 | long initialisation vector. |
75 | 78 | ||
76 | BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback. | 79 | BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback. |
77 | It encrypts or decrypts the bytes in B<in> using the key B<schedule>, | 80 | It encrypts or decrypts the bytes in B<in> using the key B<schedule>, |
78 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) | 81 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) |
79 | or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an | 82 | or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an |
80 | 8 byte long initialisation vector, which must be initially filled with zeros. | 83 | 8 byte long initialisation vector. B<num> must point at an integer which must |
81 | B<num> must point at an integer which must be initially zero. | 84 | be initially zero. |
82 | 85 | ||
83 | BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback. | 86 | BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback. |
84 | It uses the same parameters as BF_cfb64_encrypt(), which must be initialised | 87 | It uses the same parameters as BF_cfb64_encrypt(), which must be initialised |
diff --git a/src/lib/libssl/src/doc/crypto/des.pod b/src/lib/libssl/src/doc/crypto/des.pod new file mode 100644 index 0000000000..c553210ef2 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/des.pod | |||
@@ -0,0 +1,376 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | des_random_key, des_set_key, des_key_sched, des_set_key_checked, | ||
6 | des_set_key_unchecked, des_set_odd_parity, des_is_weak_key, | ||
7 | des_ecb_encrypt, des_ecb2_encrypt, des_ecb3_encrypt, des_ncbc_encrypt, | ||
8 | des_cfb_encrypt, des_ofb_encrypt, des_pcbc_encrypt, des_cfb64_encrypt, | ||
9 | des_ofb64_encrypt, des_xcbc_encrypt, des_ede2_cbc_encrypt, | ||
10 | des_ede2_cfb64_encrypt, des_ede2_ofb64_encrypt, des_ede3_cbc_encrypt, | ||
11 | des_ede3_cbcm_encrypt, des_ede3_cfb64_encrypt, des_ede3_ofb64_encrypt, | ||
12 | des_read_password, des_read_2passwords, des_read_pw_string, | ||
13 | des_cbc_cksum, des_quad_cksum, des_string_to_key, des_string_to_2keys, | ||
14 | des_fcrypt, des_crypt, des_enc_read, des_enc_write - DES encryption | ||
15 | |||
16 | =head1 SYNOPSIS | ||
17 | |||
18 | #include <openssl/des.h> | ||
19 | |||
20 | void des_random_key(des_cblock *ret); | ||
21 | |||
22 | int des_set_key(const_des_cblock *key, des_key_schedule schedule); | ||
23 | int des_key_sched(const_des_cblock *key, des_key_schedule schedule); | ||
24 | int des_set_key_checked(const_des_cblock *key, | ||
25 | des_key_schedule schedule); | ||
26 | void des_set_key_unchecked(const_des_cblock *key, | ||
27 | des_key_schedule schedule); | ||
28 | |||
29 | void des_set_odd_parity(des_cblock *key); | ||
30 | int des_is_weak_key(const_des_cblock *key); | ||
31 | |||
32 | void des_ecb_encrypt(const_des_cblock *input, des_cblock *output, | ||
33 | des_key_schedule ks, int enc); | ||
34 | void des_ecb2_encrypt(const_des_cblock *input, des_cblock *output, | ||
35 | des_key_schedule ks1, des_key_schedule ks2, int enc); | ||
36 | void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output, | ||
37 | des_key_schedule ks1, des_key_schedule ks2, | ||
38 | des_key_schedule ks3, int enc); | ||
39 | |||
40 | void des_ncbc_encrypt(const unsigned char *input, unsigned char *output, | ||
41 | long length, des_key_schedule schedule, des_cblock *ivec, | ||
42 | int enc); | ||
43 | void des_cfb_encrypt(const unsigned char *in, unsigned char *out, | ||
44 | int numbits, long length, des_key_schedule schedule, | ||
45 | des_cblock *ivec, int enc); | ||
46 | void des_ofb_encrypt(const unsigned char *in, unsigned char *out, | ||
47 | int numbits, long length, des_key_schedule schedule, | ||
48 | des_cblock *ivec); | ||
49 | void des_pcbc_encrypt(const unsigned char *input, unsigned char *output, | ||
50 | long length, des_key_schedule schedule, des_cblock *ivec, | ||
51 | int enc); | ||
52 | void des_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
53 | long length, des_key_schedule schedule, des_cblock *ivec, | ||
54 | int *num, int enc); | ||
55 | void des_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
56 | long length, des_key_schedule schedule, des_cblock *ivec, | ||
57 | int *num); | ||
58 | |||
59 | void des_xcbc_encrypt(const unsigned char *input, unsigned char *output, | ||
60 | long length, des_key_schedule schedule, des_cblock *ivec, | ||
61 | const_des_cblock *inw, const_des_cblock *outw, int enc); | ||
62 | |||
63 | void des_ede2_cbc_encrypt(const unsigned char *input, | ||
64 | unsigned char *output, long length, des_key_schedule ks1, | ||
65 | des_key_schedule ks2, des_cblock *ivec, int enc); | ||
66 | void des_ede2_cfb64_encrypt(const unsigned char *in, | ||
67 | unsigned char *out, long length, des_key_schedule ks1, | ||
68 | des_key_schedule ks2, des_cblock *ivec, int *num, int enc); | ||
69 | void des_ede2_ofb64_encrypt(const unsigned char *in, | ||
70 | unsigned char *out, long length, des_key_schedule ks1, | ||
71 | des_key_schedule ks2, des_cblock *ivec, int *num); | ||
72 | |||
73 | void des_ede3_cbc_encrypt(const unsigned char *input, | ||
74 | unsigned char *output, long length, des_key_schedule ks1, | ||
75 | des_key_schedule ks2, des_key_schedule ks3, des_cblock *ivec, | ||
76 | int enc); | ||
77 | void des_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out, | ||
78 | long length, des_key_schedule ks1, des_key_schedule ks2, | ||
79 | des_key_schedule ks3, des_cblock *ivec1, des_cblock *ivec2, | ||
80 | int enc); | ||
81 | void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
82 | long length, des_key_schedule ks1, des_key_schedule ks2, | ||
83 | des_key_schedule ks3, des_cblock *ivec, int *num, int enc); | ||
84 | void des_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
85 | long length, des_key_schedule ks1, | ||
86 | des_key_schedule ks2, des_key_schedule ks3, | ||
87 | des_cblock *ivec, int *num); | ||
88 | |||
89 | int des_read_password(des_cblock *key, const char *prompt, int verify); | ||
90 | int des_read_2passwords(des_cblock *key1, des_cblock *key2, | ||
91 | const char *prompt, int verify); | ||
92 | int des_read_pw_string(char *buf, int length, const char *prompt, | ||
93 | int verify); | ||
94 | |||
95 | DES_LONG des_cbc_cksum(const unsigned char *input, des_cblock *output, | ||
96 | long length, des_key_schedule schedule, | ||
97 | const_des_cblock *ivec); | ||
98 | DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[], | ||
99 | long length, int out_count, des_cblock *seed); | ||
100 | void des_string_to_key(const char *str, des_cblock *key); | ||
101 | void des_string_to_2keys(const char *str, des_cblock *key1, | ||
102 | des_cblock *key2); | ||
103 | |||
104 | char *des_fcrypt(const char *buf, const char *salt, char *ret); | ||
105 | char *des_crypt(const char *buf, const char *salt); | ||
106 | char *crypt(const char *buf, const char *salt); | ||
107 | |||
108 | int des_enc_read(int fd, void *buf, int len, des_key_schedule sched, | ||
109 | des_cblock *iv); | ||
110 | int des_enc_write(int fd, const void *buf, int len, | ||
111 | des_key_schedule sched, des_cblock *iv); | ||
112 | |||
113 | =head1 DESCRIPTION | ||
114 | |||
115 | This library contains a fast implementation of the DES encryption | ||
116 | algorithm. | ||
117 | |||
118 | There are two phases to the use of DES encryption. The first is the | ||
119 | generation of a I<des_key_schedule> from a key, the second is the | ||
120 | actual encryption. A DES key is of type I<des_cblock>. This type is | ||
121 | consists of 8 bytes with odd parity. The least significant bit in | ||
122 | each byte is the parity bit. The key schedule is an expanded form of | ||
123 | the key; it is used to speed the encryption process. | ||
124 | |||
125 | des_random_key() generates a random key. The PRNG must be seeded | ||
126 | prior to using this function (see L<rand(3)|rand(3)>; for backward | ||
127 | compatibility the function des_random_seed() is available as well). | ||
128 | If the PRNG could not generate a secure key, 0 is returned. In | ||
129 | earlier versions of the library, des_random_key() did not generate | ||
130 | secure keys. | ||
131 | |||
132 | Before a DES key can be used, it must be converted into the | ||
133 | architecture dependant I<des_key_schedule> via the | ||
134 | des_set_key_checked() or des_set_key_unchecked() function. | ||
135 | |||
136 | des_set_key_checked() will check that the key passed is of odd parity | ||
137 | and is not a week or semi-weak key. If the parity is wrong, then -1 | ||
138 | is returned. If the key is a weak key, then -2 is returned. If an | ||
139 | error is returned, the key schedule is not generated. | ||
140 | |||
141 | des_set_key() (called des_key_sched() in the MIT library) works like | ||
142 | des_set_key_checked() if the I<des_check_key> flag is non-zero, | ||
143 | otherwise like des_set_key_unchecked(). These functions are available | ||
144 | for compatibility; it is recommended to use a function that does not | ||
145 | depend on a global variable. | ||
146 | |||
147 | des_set_odd_parity() (called des_fixup_key_parity() in the MIT | ||
148 | library) sets the parity of the passed I<key> to odd. | ||
149 | |||
150 | des_is_weak_key() returns 1 is the passed key is a weak key, 0 if it | ||
151 | is ok. The probability that a randomly generated key is weak is | ||
152 | 1/2^52, so it is not really worth checking for them. | ||
153 | |||
154 | The following routines mostly operate on an input and output stream of | ||
155 | I<des_cblock>s. | ||
156 | |||
157 | des_ecb_encrypt() is the basic DES encryption routine that encrypts or | ||
158 | decrypts a single 8-byte I<des_cblock> in I<electronic code book> | ||
159 | (ECB) mode. It always transforms the input data, pointed to by | ||
160 | I<input>, into the output data, pointed to by the I<output> argument. | ||
161 | If the I<encrypt> argument is non-zero (DES_ENCRYPT), the I<input> | ||
162 | (cleartext) is encrypted in to the I<output> (ciphertext) using the | ||
163 | key_schedule specified by the I<schedule> argument, previously set via | ||
164 | I<des_set_key>. If I<encrypt> is zero (DES_DECRYPT), the I<input> (now | ||
165 | ciphertext) is decrypted into the I<output> (now cleartext). Input | ||
166 | and output may overlap. des_ecb_encrypt() does not return a value. | ||
167 | |||
168 | des_ecb3_encrypt() encrypts/decrypts the I<input> block by using | ||
169 | three-key Triple-DES encryption in ECB mode. This involves encrypting | ||
170 | the input with I<ks1>, decrypting with the key schedule I<ks2>, and | ||
171 | then encrypting with I<ks3>. This routine greatly reduces the chances | ||
172 | of brute force breaking of DES and has the advantage of if I<ks1>, | ||
173 | I<ks2> and I<ks3> are the same, it is equivalent to just encryption | ||
174 | using ECB mode and I<ks1> as the key. | ||
175 | |||
176 | The macro des_ecb2_encrypt() is provided to perform two-key Triple-DES | ||
177 | encryption by using I<ks1> for the final encryption. | ||
178 | |||
179 | des_ncbc_encrypt() encrypts/decrypts using the I<cipher-block-chaining> | ||
180 | (CBC) mode of DES. If the I<encrypt> argument is non-zero, the | ||
181 | routine cipher-block-chain encrypts the cleartext data pointed to by | ||
182 | the I<input> argument into the ciphertext pointed to by the I<output> | ||
183 | argument, using the key schedule provided by the I<schedule> argument, | ||
184 | and initialization vector provided by the I<ivec> argument. If the | ||
185 | I<length> argument is not an integral multiple of eight bytes, the | ||
186 | last block is copied to a temporary area and zero filled. The output | ||
187 | is always an integral multiple of eight bytes. | ||
188 | |||
189 | des_xcbc_encrypt() is RSA's DESX mode of DES. It uses I<inw> and | ||
190 | I<outw> to 'whiten' the encryption. I<inw> and I<outw> are secret | ||
191 | (unlike the iv) and are as such, part of the key. So the key is sort | ||
192 | of 24 bytes. This is much better than CBC DES. | ||
193 | |||
194 | des_ede3_cbc_encrypt() implements outer triple CBC DES encryption with | ||
195 | three keys. This means that each DES operation inside the CBC mode is | ||
196 | really an C<C=E(ks3,D(ks2,E(ks1,M)))>. This mode is used by SSL. | ||
197 | |||
198 | The des_ede2_cbc_encrypt() macro implements two-key Triple-DES by | ||
199 | reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>. | ||
200 | This form of Triple-DES is used by the RSAREF library. | ||
201 | |||
202 | des_pcbc_encrypt() encrypt/decrypts using the propagating cipher block | ||
203 | chaing mode used by Kerberos v4. Its parameters are the same as | ||
204 | des_ncbc_encrypt(). | ||
205 | |||
206 | des_cfb_encrypt() encrypt/decrypts using cipher feedback mode. This | ||
207 | method takes an array of characters as input and outputs and array of | ||
208 | characters. It does not require any padding to 8 character groups. | ||
209 | Note: the I<ivec> variable is changed and the new changed value needs to | ||
210 | be passed to the next call to this function. Since this function runs | ||
211 | a complete DES ECB encryption per I<numbits>, this function is only | ||
212 | suggested for use when sending small numbers of characters. | ||
213 | |||
214 | des_cfb64_encrypt() | ||
215 | implements CFB mode of DES with 64bit feedback. Why is this | ||
216 | useful you ask? Because this routine will allow you to encrypt an | ||
217 | arbitrary number of bytes, no 8 byte padding. Each call to this | ||
218 | routine will encrypt the input bytes to output and then update ivec | ||
219 | and num. num contains 'how far' we are though ivec. If this does | ||
220 | not make much sense, read more about cfb mode of DES :-). | ||
221 | |||
222 | des_ede3_cfb64_encrypt() and des_ede2_cfb64_encrypt() is the same as | ||
223 | des_cfb64_encrypt() except that Triple-DES is used. | ||
224 | |||
225 | des_ofb_encrypt() encrypts using output feedback mode. This method | ||
226 | takes an array of characters as input and outputs and array of | ||
227 | characters. It does not require any padding to 8 character groups. | ||
228 | Note: the I<ivec> variable is changed and the new changed value needs to | ||
229 | be passed to the next call to this function. Since this function runs | ||
230 | a complete DES ECB encryption per numbits, this function is only | ||
231 | suggested for use when sending small numbers of characters. | ||
232 | |||
233 | des_ofb64_encrypt() is the same as des_cfb64_encrypt() using Output | ||
234 | Feed Back mode. | ||
235 | |||
236 | des_ede3_ofb64_encrypt() and des_ede2_ofb64_encrypt() is the same as | ||
237 | des_ofb64_encrypt(), using Triple-DES. | ||
238 | |||
239 | The following functions are included in the DES library for | ||
240 | compatibility with the MIT Kerberos library. des_read_pw_string() | ||
241 | is also available under the name EVP_read_pw_string(). | ||
242 | |||
243 | des_read_pw_string() writes the string specified by I<prompt> to | ||
244 | standarf output, turns echo off and reads in input string from the | ||
245 | terminal. The string is returned in I<buf>, which must have space for | ||
246 | at least I<length> bytes. If I<verify> is set, the user is asked for | ||
247 | the password twice and unless the two copies match, an error is | ||
248 | returned. A return code of -1 indicates a system error, 1 failure due | ||
249 | to use interaction, and 0 is success. | ||
250 | |||
251 | des_read_password() does the same and converts the password to a DES | ||
252 | key by calling des_string_to_key(); des_read_2password() operates in | ||
253 | the same way as des_read_password() except that it generates two keys | ||
254 | by using the des_string_to_2key() function. des_string_to_key() is | ||
255 | available for backward compatibility with the MIT library. New | ||
256 | applications should use a cryptographic hash function. The same | ||
257 | applies for des_string_to_2key(). | ||
258 | |||
259 | des_cbc_cksum() produces an 8 byte checksum based on the input stream | ||
260 | (via CBC encryption). The last 4 bytes of the checksum are returned | ||
261 | and the complete 8 bytes are placed in I<output>. This function is | ||
262 | used by Kerberos v4. Other applications should use | ||
263 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead. | ||
264 | |||
265 | des_quad_cksum() is a Kerberos v4 function. It returns a 4 byte | ||
266 | checksum from the input bytes. The algorithm can be iterated over the | ||
267 | input, depending on I<out_count>, 1, 2, 3 or 4 times. If I<output> is | ||
268 | non-NULL, the 8 bytes generated by each pass are written into | ||
269 | I<output>. | ||
270 | |||
271 | The following are DES-based tranformations: | ||
272 | |||
273 | des_fcrypt() is a fast version of the unix crypt(3) function. This | ||
274 | version takes only a small amount of space relative to other fast | ||
275 | crypt() implementations. This is different to the normal crypt in | ||
276 | that the third parameter is the buffer that the return value is | ||
277 | written into. It needs to be at least 14 bytes long. This function | ||
278 | is thread safe, unlike the normal crypt. | ||
279 | |||
280 | des_crypt() is a faster replacement for the normal system crypt(). | ||
281 | This function calls des_fcrypt() with a static array passed as the | ||
282 | third parameter. This emulates the normal non-thread safe semantics | ||
283 | of crypt(3). | ||
284 | |||
285 | des_enc_write() writes I<len> bytes to file descriptor I<fd> from | ||
286 | buffer I<buf>. The data is encrypted via I<pcbc_encrypt> (default) | ||
287 | using I<sched> for the key and I<iv> as a starting vector. The actual | ||
288 | data send down I<fd> consists of 4 bytes (in network byte order) | ||
289 | containing the length of the following encrypted data. The encrypted | ||
290 | data then follows, padded with random data out to a multiple of 8 | ||
291 | bytes. | ||
292 | |||
293 | des_enc_read() is used to read I<len> bytes from file descriptor | ||
294 | I<fd> into buffer I<buf>. The data being read from I<fd> is assumed to | ||
295 | have come from des_enc_write() and is decrypted using I<sched> for | ||
296 | the key schedule and I<iv> for the initial vector. | ||
297 | |||
298 | B<Warning:> The data format used by des_enc_write() and des_enc_read() | ||
299 | has a cryptographic weakness: When asked to write more than MAXWRITE | ||
300 | bytes, des_enc_write() will split the data into several chunks that | ||
301 | are all encrypted using the same IV. So don't use these functions | ||
302 | unless you are sure you know what you do (in which case you might not | ||
303 | want to use them anyway). They cannot handle non-blocking sockets. | ||
304 | des_enc_read() uses an internal state and thus cannot be used on | ||
305 | multiple files. | ||
306 | |||
307 | I<des_rw_mode> is used to specify the encryption mode to use with | ||
308 | des_enc_read() and des_end_write(). If set to I<DES_PCBC_MODE> (the | ||
309 | default), des_pcbc_encrypt is used. If set to I<DES_CBC_MODE> | ||
310 | des_cbc_encrypt is used. | ||
311 | |||
312 | =head1 NOTES | ||
313 | |||
314 | Single-key DES is insecure due to its short key size. ECB mode is | ||
315 | not suitable for most applications; see L<des_modes(7)|des_modes(7)>. | ||
316 | |||
317 | The L<evp(3)|evp(3)> library provides higher-level encryption functions. | ||
318 | |||
319 | =head1 BUGS | ||
320 | |||
321 | des_3cbc_encrypt() is flawed and must not be used in applications. | ||
322 | |||
323 | des_cbc_encrypt() does not modify B<ivec>; use des_ncbc_encrypt() | ||
324 | instead. | ||
325 | |||
326 | des_cfb_encrypt() and des_ofb_encrypt() operates on input of 8 bits. | ||
327 | What this means is that if you set numbits to 12, and length to 2, the | ||
328 | first 12 bits will come from the 1st input byte and the low half of | ||
329 | the second input byte. The second 12 bits will have the low 8 bits | ||
330 | taken from the 3rd input byte and the top 4 bits taken from the 4th | ||
331 | input byte. The same holds for output. This function has been | ||
332 | implemented this way because most people will be using a multiple of 8 | ||
333 | and because once you get into pulling bytes input bytes apart things | ||
334 | get ugly! | ||
335 | |||
336 | des_read_pw_string() is the most machine/OS dependent function and | ||
337 | normally generates the most problems when porting this code. | ||
338 | |||
339 | =head1 CONFORMING TO | ||
340 | |||
341 | ANSI X3.106 | ||
342 | |||
343 | The B<des> library was written to be source code compatible with | ||
344 | the MIT Kerberos library. | ||
345 | |||
346 | =head1 SEE ALSO | ||
347 | |||
348 | crypt(3), L<des_modes(3)|des_modes(3)>, L<evp(3)|evp(3)>, L<rand(3)|rand(3)> | ||
349 | |||
350 | =head1 HISTORY | ||
351 | |||
352 | des_cbc_cksum(), des_cbc_encrypt(), des_ecb_encrypt(), | ||
353 | des_is_weak_key(), des_key_sched(), des_pcbc_encrypt(), | ||
354 | des_quad_cksum(), des_random_key(), des_read_password() and | ||
355 | des_string_to_key() are available in the MIT Kerberos library; | ||
356 | des_check_key_parity(), des_fixup_key_parity() and des_is_weak_key() | ||
357 | are available in newer versions of that library. | ||
358 | |||
359 | des_set_key_checked() and des_set_key_unchecked() were added in | ||
360 | OpenSSL 0.9.5. | ||
361 | |||
362 | des_generate_random_block(), des_init_random_number_generator(), | ||
363 | des_new_random_key(), des_set_random_generator_seed() and | ||
364 | des_set_sequence_number() and des_rand_data() are used in newer | ||
365 | versions of Kerberos but are not implemented here. | ||
366 | |||
367 | des_random_key() generated cryptographically weak random data in | ||
368 | SSLeay and in OpenSSL prior version 0.9.5, as well as in the original | ||
369 | MIT library. | ||
370 | |||
371 | =head1 AUTHOR | ||
372 | |||
373 | Eric Young (eay@cryptsoft.com). Modified for the OpenSSL project | ||
374 | (http://www.openssl.org). | ||
375 | |||
376 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/des_modes.pod b/src/lib/libssl/src/doc/crypto/des_modes.pod index d8148c86fc..1aa3ac763b 100644 --- a/src/lib/libssl/src/doc/crypto/des_modes.pod +++ b/src/lib/libssl/src/doc/crypto/des_modes.pod | |||
@@ -248,3 +248,6 @@ it to: | |||
248 | 248 | ||
249 | L<blowfish(3)|blowfish(3)>, L<des(3)|des(3)>, L<idea(3)|idea(3)>, | 249 | L<blowfish(3)|blowfish(3)>, L<des(3)|des(3)>, L<idea(3)|idea(3)>, |
250 | L<rc2(3)|rc2(3)> | 250 | L<rc2(3)|rc2(3)> |
251 | |||
252 | =cut | ||
253 | |||
diff --git a/src/lib/libssl/src/doc/crypto/rsa.pod b/src/lib/libssl/src/doc/crypto/rsa.pod index 0486c044a6..eb8ba612c4 100644 --- a/src/lib/libssl/src/doc/crypto/rsa.pod +++ b/src/lib/libssl/src/doc/crypto/rsa.pod | |||
@@ -86,8 +86,9 @@ contain public as well as private RSA keys: | |||
86 | In public keys, the private exponent and the related secret values are | 86 | In public keys, the private exponent and the related secret values are |
87 | B<NULL>. | 87 | B<NULL>. |
88 | 88 | ||
89 | B<dmp1>, B<dmq1> and B<iqmp> may be B<NULL> in private keys, but the | 89 | B<p>, B<q>, B<dmp1>, B<dmq1> and B<iqmp> may be B<NULL> in private |
90 | RSA operations are much faster when these values are available. | 90 | keys, but the RSA operations are much faster when these values are |
91 | available. | ||
91 | 92 | ||
92 | =head1 CONFORMING TO | 93 | =head1 CONFORMING TO |
93 | 94 | ||