summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-11-02 09:11:53 +0000
committerschwarze <>2016-11-02 09:11:53 +0000
commitb50ac7faef96a45291b0c3201b82185f7579e826 (patch)
tree9166b196a2c833fc7a0154973d11551824a6bfb9
parent506350d1237710b9d86fdb3a794c6e6265f71221 (diff)
downloadopenbsd-b50ac7faef96a45291b0c3201b82185f7579e826.tar.gz
openbsd-b50ac7faef96a45291b0c3201b82185f7579e826.tar.bz2
openbsd-b50ac7faef96a45291b0c3201b82185f7579e826.zip
convert DES and DH manuals from pod to mdoc
-rw-r--r--src/lib/libcrypto/doc/DES_set_key.pod339
-rw-r--r--src/lib/libcrypto/doc/DH_generate_key.pod51
-rw-r--r--src/lib/libcrypto/doc/DH_generate_parameters.pod80
-rw-r--r--src/lib/libcrypto/doc/DH_get_ex_new_index.pod37
-rw-r--r--src/lib/libcrypto/doc/DH_new.pod38
-rw-r--r--src/lib/libcrypto/doc/DH_set_method.pod129
-rw-r--r--src/lib/libcrypto/doc/DH_size.pod33
-rw-r--r--src/lib/libcrypto/man/DES_set_key.3697
-rw-r--r--src/lib/libcrypto/man/DH_generate_key.371
-rw-r--r--src/lib/libcrypto/man/DH_generate_parameters.3125
-rw-r--r--src/lib/libcrypto/man/DH_get_ex_new_index.347
-rw-r--r--src/lib/libcrypto/man/DH_new.344
-rw-r--r--src/lib/libcrypto/man/DH_set_method.3223
-rw-r--r--src/lib/libcrypto/man/DH_size.329
-rw-r--r--src/lib/libcrypto/man/Makefile16
15 files changed, 1244 insertions, 715 deletions
diff --git a/src/lib/libcrypto/doc/DES_set_key.pod b/src/lib/libcrypto/doc/DES_set_key.pod
deleted file mode 100644
index d1bd43c592..0000000000
--- a/src/lib/libcrypto/doc/DES_set_key.pod
+++ /dev/null
@@ -1,339 +0,0 @@
1=pod
2
3=head1 NAME
4
5DES_random_key, DES_set_key, DES_key_sched, DES_set_key_checked,
6DES_set_key_unchecked, DES_set_odd_parity, DES_is_weak_key,
7DES_ecb_encrypt, DES_ecb2_encrypt, DES_ecb3_encrypt, DES_ncbc_encrypt,
8DES_cfb_encrypt, DES_ofb_encrypt, DES_pcbc_encrypt, DES_cfb64_encrypt,
9DES_ofb64_encrypt, DES_xcbc_encrypt, DES_ede2_cbc_encrypt,
10DES_ede2_cfb64_encrypt, DES_ede2_ofb64_encrypt, DES_ede3_cbc_encrypt,
11DES_ede3_cbcm_encrypt, DES_ede3_cfb64_encrypt, DES_ede3_ofb64_encrypt,
12DES_cbc_cksum, DES_quad_cksum, DES_string_to_key, DES_string_to_2keys,
13DES_fcrypt, DES_crypt, DES_enc_read, DES_enc_write - DES encryption
14
15=head1 SYNOPSIS
16
17 #include <openssl/des.h>
18
19 void DES_random_key(DES_cblock *ret);
20
21 int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
22 int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
23 int DES_set_key_checked(const_DES_cblock *key,
24 DES_key_schedule *schedule);
25 void DES_set_key_unchecked(const_DES_cblock *key,
26 DES_key_schedule *schedule);
27
28 void DES_set_odd_parity(DES_cblock *key);
29 int DES_is_weak_key(const_DES_cblock *key);
30
31 void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
32 DES_key_schedule *ks, int enc);
33 void DES_ecb2_encrypt(const_DES_cblock *input, DES_cblock *output,
34 DES_key_schedule *ks1, DES_key_schedule *ks2, int enc);
35 void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
36 DES_key_schedule *ks1, DES_key_schedule *ks2,
37 DES_key_schedule *ks3, int enc);
38
39 void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,
40 long length, DES_key_schedule *schedule, DES_cblock *ivec,
41 int enc);
42 void DES_cfb_encrypt(const unsigned char *in, unsigned char *out,
43 int numbits, long length, DES_key_schedule *schedule,
44 DES_cblock *ivec, int enc);
45 void DES_ofb_encrypt(const unsigned char *in, unsigned char *out,
46 int numbits, long length, DES_key_schedule *schedule,
47 DES_cblock *ivec);
48 void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
49 long length, DES_key_schedule *schedule, DES_cblock *ivec,
50 int enc);
51 void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,
52 long length, DES_key_schedule *schedule, DES_cblock *ivec,
53 int *num, int enc);
54 void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
55 long length, DES_key_schedule *schedule, DES_cblock *ivec,
56 int *num);
57
58 void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output,
59 long length, DES_key_schedule *schedule, DES_cblock *ivec,
60 const_DES_cblock *inw, const_DES_cblock *outw, int enc);
61
62 void DES_ede2_cbc_encrypt(const unsigned char *input,
63 unsigned char *output, long length, DES_key_schedule *ks1,
64 DES_key_schedule *ks2, DES_cblock *ivec, int enc);
65 void DES_ede2_cfb64_encrypt(const unsigned char *in,
66 unsigned char *out, long length, DES_key_schedule *ks1,
67 DES_key_schedule *ks2, DES_cblock *ivec, int *num, int enc);
68 void DES_ede2_ofb64_encrypt(const unsigned char *in,
69 unsigned char *out, long length, DES_key_schedule *ks1,
70 DES_key_schedule *ks2, DES_cblock *ivec, int *num);
71
72 void DES_ede3_cbc_encrypt(const unsigned char *input,
73 unsigned char *output, long length, DES_key_schedule *ks1,
74 DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec,
75 int enc);
76 void DES_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
77 long length, DES_key_schedule *ks1, DES_key_schedule *ks2,
78 DES_key_schedule *ks3, DES_cblock *ivec1, DES_cblock *ivec2,
79 int enc);
80 void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
81 long length, DES_key_schedule *ks1, DES_key_schedule *ks2,
82 DES_key_schedule *ks3, DES_cblock *ivec, int *num, int enc);
83 void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
84 long length, DES_key_schedule *ks1,
85 DES_key_schedule *ks2, DES_key_schedule *ks3,
86 DES_cblock *ivec, int *num);
87
88 DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,
89 long length, DES_key_schedule *schedule,
90 const_DES_cblock *ivec);
91 DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
92 long length, int out_count, DES_cblock *seed);
93 void DES_string_to_key(const char *str, DES_cblock *key);
94 void DES_string_to_2keys(const char *str, DES_cblock *key1,
95 DES_cblock *key2);
96
97 char *DES_fcrypt(const char *buf, const char *salt, char *ret);
98 char *DES_crypt(const char *buf, const char *salt);
99
100 int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
101 DES_cblock *iv);
102 int DES_enc_write(int fd, const void *buf, int len,
103 DES_key_schedule *sched, DES_cblock *iv);
104
105=head1 DESCRIPTION
106
107This library contains a fast implementation of the DES encryption
108algorithm.
109
110There are two phases to the use of DES encryption. The first is the
111generation of a I<DES_key_schedule> from a key, the second is the
112actual encryption. A DES key is of type I<DES_cblock>. This type is
113consists of 8 bytes with odd parity. The least significant bit in
114each byte is the parity bit. The key schedule is an expanded form of
115the key; it is used to speed the encryption process.
116
117DES_random_key() generates a random key in odd parity.
118
119Before a DES key can be used, it must be converted into the
120architecture dependent I<DES_key_schedule> via the
121DES_set_key_checked() or DES_set_key_unchecked() function.
122
123DES_set_key_checked() will check that the key passed is of odd parity
124and is not a week or semi-weak key. If the parity is wrong, then -1
125is returned. If the key is a weak key, then -2 is returned. If an
126error is returned, the key schedule is not generated.
127
128DES_set_key() works like
129DES_set_key_checked() if the I<DES_check_key> flag is non-zero,
130otherwise like DES_set_key_unchecked(). These functions are available
131for compatibility; it is recommended to use a function that does not
132depend on a global variable.
133
134DES_set_odd_parity() sets the parity of the passed I<key> to odd.
135
136DES_is_weak_key() returns 1 is the passed key is a weak key, 0 if it
137is ok.
138
139The following routines mostly operate on an input and output stream of
140I<DES_cblock>s.
141
142DES_ecb_encrypt() is the basic DES encryption routine that encrypts or
143decrypts a single 8-byte I<DES_cblock> in I<electronic code book>
144(ECB) mode. It always transforms the input data, pointed to by
145I<input>, into the output data, pointed to by the I<output> argument.
146If the I<encrypt> argument is non-zero (DES_ENCRYPT), the I<input>
147(cleartext) is encrypted in to the I<output> (ciphertext) using the
148key_schedule specified by the I<schedule> argument, previously set via
149I<DES_set_key>. If I<encrypt> is zero (DES_DECRYPT), the I<input> (now
150ciphertext) is decrypted into the I<output> (now cleartext). Input
151and output may overlap. DES_ecb_encrypt() does not return a value.
152
153DES_ecb3_encrypt() encrypts/decrypts the I<input> block by using
154three-key Triple-DES encryption in ECB mode. This involves encrypting
155the input with I<ks1>, decrypting with the key schedule I<ks2>, and
156then encrypting with I<ks3>. This routine greatly reduces the chances
157of brute force breaking of DES and has the advantage of if I<ks1>,
158I<ks2> and I<ks3> are the same, it is equivalent to just encryption
159using ECB mode and I<ks1> as the key.
160
161The macro DES_ecb2_encrypt() is provided to perform two-key Triple-DES
162encryption by using I<ks1> for the final encryption.
163
164DES_ncbc_encrypt() encrypts/decrypts using the I<cipher-block-chaining>
165(CBC) mode of DES. If the I<encrypt> argument is non-zero, the
166routine cipher-block-chain encrypts the cleartext data pointed to by
167the I<input> argument into the ciphertext pointed to by the I<output>
168argument, using the key schedule provided by the I<schedule> argument,
169and initialization vector provided by the I<ivec> argument. If the
170I<length> argument is not an integral multiple of eight bytes, the
171last block is copied to a temporary area and zero filled. The output
172is always an integral multiple of eight bytes.
173
174DES_xcbc_encrypt() is RSA's DESX mode of DES. It uses I<inw> and
175I<outw> to 'whiten' the encryption. I<inw> and I<outw> are secret
176(unlike the iv) and are as such, part of the key. So the key is sort
177of 24 bytes. This is much better than CBC DES.
178
179DES_ede3_cbc_encrypt() implements outer triple CBC DES encryption with
180three keys. This means that each DES operation inside the CBC mode is
181really an C<C=E(ks3,D(ks2,E(ks1,M)))>. This mode is used by SSL.
182
183The DES_ede2_cbc_encrypt() macro implements two-key Triple-DES by
184reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>.
185This form of Triple-DES is used by the RSAREF library.
186
187DES_pcbc_encrypt() encrypt/decrypts using the propagating cipher block
188chaining mode used by Kerberos v4. Its parameters are the same as
189DES_ncbc_encrypt().
190
191DES_cfb_encrypt() encrypt/decrypts using cipher feedback mode. This
192method takes an array of characters as input and outputs and array of
193characters. It does not require any padding to 8 character groups.
194Note: the I<ivec> variable is changed and the new changed value needs to
195be passed to the next call to this function. Since this function runs
196a complete DES ECB encryption per I<numbits>, this function is only
197suggested for use when sending small numbers of characters.
198
199DES_cfb64_encrypt()
200implements CFB mode of DES with 64bit feedback. Why is this
201useful you ask? Because this routine will allow you to encrypt an
202arbitrary number of bytes, no 8 byte padding. Each call to this
203routine will encrypt the input bytes to output and then update ivec
204and num. num contains 'how far' we are though ivec. If this does
205not make much sense, read more about cfb mode of DES :-).
206
207DES_ede3_cfb64_encrypt() and DES_ede2_cfb64_encrypt() is the same as
208DES_cfb64_encrypt() except that Triple-DES is used.
209
210DES_ofb_encrypt() encrypts using output feedback mode. This method
211takes an array of characters as input and outputs and array of
212characters. It does not require any padding to 8 character groups.
213Note: the I<ivec> variable is changed and the new changed value needs to
214be passed to the next call to this function. Since this function runs
215a complete DES ECB encryption per numbits, this function is only
216suggested for use when sending small numbers of characters.
217
218DES_ofb64_encrypt() is the same as DES_cfb64_encrypt() using Output
219Feed Back mode.
220
221DES_ede3_ofb64_encrypt() and DES_ede2_ofb64_encrypt() is the same as
222DES_ofb64_encrypt(), using Triple-DES.
223
224The following functions are included in the DES library for
225compatibility with the MIT Kerberos library.
226
227DES_cbc_cksum() produces an 8 byte checksum based on the input stream
228(via CBC encryption). The last 4 bytes of the checksum are returned
229and the complete 8 bytes are placed in I<output>. This function is
230used by Kerberos v4. Other applications should use
231L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead.
232
233DES_quad_cksum() is a Kerberos v4 function. It returns a 4 byte
234checksum from the input bytes. The algorithm can be iterated over the
235input, depending on I<out_count>, 1, 2, 3 or 4 times. If I<output> is
236non-NULL, the 8 bytes generated by each pass are written into
237I<output>.
238
239The following are DES-based transformations:
240
241DES_fcrypt() is a fast version of the Unix crypt(3) function. This
242version takes only a small amount of space relative to other fast
243crypt() implementations. This is different to the normal crypt in
244that the third parameter is the buffer that the return value is
245written into. It needs to be at least 14 bytes long. This function
246is thread safe, unlike the normal crypt.
247
248DES_crypt() is a faster replacement for the normal system crypt().
249This function calls DES_fcrypt() with a static array passed as the
250third parameter. This emulates the normal non-thread safe semantics
251of crypt(3).
252
253DES_enc_write() writes I<len> bytes to file descriptor I<fd> from
254buffer I<buf>. The data is encrypted via I<pcbc_encrypt> (default)
255using I<sched> for the key and I<iv> as a starting vector. The actual
256data send down I<fd> consists of 4 bytes (in network byte order)
257containing the length of the following encrypted data. The encrypted
258data then follows, padded with random data out to a multiple of 8
259bytes.
260
261DES_enc_read() is used to read I<len> bytes from file descriptor
262I<fd> into buffer I<buf>. The data being read from I<fd> is assumed to
263have come from DES_enc_write() and is decrypted using I<sched> for
264the key schedule and I<iv> for the initial vector.
265
266B<Warning:> The data format used by DES_enc_write() and DES_enc_read()
267has a cryptographic weakness: When asked to write more than MAXWRITE
268bytes, DES_enc_write() will split the data into several chunks that
269are all encrypted using the same IV. So don't use these functions
270unless you are sure you know what you do (in which case you might not
271want to use them anyway). They cannot handle non-blocking sockets.
272DES_enc_read() uses an internal state and thus cannot be used on
273multiple files.
274
275I<DES_rw_mode> is used to specify the encryption mode to use with
276DES_enc_read() and DES_end_write(). If set to I<DES_PCBC_MODE> (the
277default), DES_pcbc_encrypt is used. If set to I<DES_CBC_MODE>
278DES_cbc_encrypt is used.
279
280=head1 NOTES
281
282Single-key DES is insecure due to its short key size. ECB mode is
283not suitable for most applications.
284
285The L<evp(3)|evp(3)> library provides higher-level encryption functions.
286
287=head1 BUGS
288
289DES_cbc_encrypt() does not modify B<ivec>; use DES_ncbc_encrypt()
290instead.
291
292DES_cfb_encrypt() and DES_ofb_encrypt() operates on input of 8 bits.
293What this means is that if you set numbits to 12, and length to 2, the
294first 12 bits will come from the 1st input byte and the low half of
295the second input byte. The second 12 bits will have the low 8 bits
296taken from the 3rd input byte and the top 4 bits taken from the 4th
297input byte. The same holds for output. This function has been
298implemented this way because most people will be using a multiple of 8
299and because once you get into pulling bytes input bytes apart things
300get ugly!
301
302DES_string_to_key() is available for backward compatibility with the
303MIT library. New applications should use a cryptographic hash function.
304The same applies for DES_string_to_2key().
305
306=head1 CONFORMING TO
307
308ANSI X3.106
309
310The B<des> library was initially written to be source code compatible with
311the MIT Kerberos library.
312
313=head1 SEE ALSO
314
315crypt(3), L<evp(3)|evp(3)>, L<rand(3)|rand(3)>
316
317=head1 HISTORY
318
319In OpenSSL 0.9.7, all des_ functions were renamed to DES_ to avoid
320clashes with older versions of libdes.
321
322DES_set_key_checked() and DES_set_key_unchecked() were added in
323OpenSSL 0.9.5.
324
325des_generate_random_block(), des_init_random_number_generator(),
326des_new_random_key(), des_set_random_generator_seed() and
327des_set_sequence_number() and des_rand_data() are used in newer
328versions of Kerberos but are not implemented here.
329
330DES_random_key() generated cryptographically weak random data in
331SSLeay and in OpenSSL prior version 0.9.5, as well as in the original
332MIT library.
333
334=head1 AUTHOR
335
336Eric Young (eay@cryptsoft.com). Modified for the OpenSSL project
337(http://www.openssl.org).
338
339=cut
diff --git a/src/lib/libcrypto/doc/DH_generate_key.pod b/src/lib/libcrypto/doc/DH_generate_key.pod
deleted file mode 100644
index 148e13762b..0000000000
--- a/src/lib/libcrypto/doc/DH_generate_key.pod
+++ /dev/null
@@ -1,51 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_generate_key, DH_compute_key - perform Diffie-Hellman key exchange
6
7=head1 SYNOPSIS
8
9 #include <openssl/dh.h>
10
11 int DH_generate_key(DH *dh);
12
13 int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
14
15=head1 DESCRIPTION
16
17DH_generate_key() performs the first step of a Diffie-Hellman key
18exchange by generating private and public DH values. By calling
19DH_compute_key(), these are combined with the other party's public
20value to compute the shared key.
21
22DH_generate_key() expects B<dh> to contain the shared parameters
23B<dh-E<gt>p> and B<dh-E<gt>g>. It generates a random private DH value
24unless B<dh-E<gt>priv_key> is already set, and computes the
25corresponding public value B<dh-E<gt>pub_key>, which can then be
26published.
27
28DH_compute_key() computes the shared secret from the private DH value
29in B<dh> and the other party's public value in B<pub_key> and stores
30it in B<key>. B<key> must point to B<DH_size(dh)> bytes of memory.
31
32=head1 RETURN VALUES
33
34DH_generate_key() returns 1 on success, 0 otherwise.
35
36DH_compute_key() returns the size of the shared secret on success, -1
37on error.
38
39The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
40
41=head1 SEE ALSO
42
43L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
44L<DH_size(3)|DH_size(3)>
45
46=head1 HISTORY
47
48DH_generate_key() and DH_compute_key() are available in all versions
49of SSLeay and OpenSSL.
50
51=cut
diff --git a/src/lib/libcrypto/doc/DH_generate_parameters.pod b/src/lib/libcrypto/doc/DH_generate_parameters.pod
deleted file mode 100644
index bd0782cb0c..0000000000
--- a/src/lib/libcrypto/doc/DH_generate_parameters.pod
+++ /dev/null
@@ -1,80 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_generate_parameters_ex, DH_generate_parameters,
6DH_check - generate and check Diffie-Hellman parameters
7
8=head1 SYNOPSIS
9
10 #include <openssl/dh.h>
11
12 int DH_generate_parameters_ex(DH *dh, int prime_len,int generator, BN_GENCB *cb);
13
14 int DH_check(DH *dh, int *codes);
15
16Deprecated:
17
18 DH *DH_generate_parameters(int prime_len, int generator,
19 void (*callback)(int, int, void *), void *cb_arg);
20
21=head1 DESCRIPTION
22
23DH_generate_parameters_ex() generates Diffie-Hellman parameters that can
24be shared among a group of users, and stores them in the provided B<DH>
25structure.
26
27B<prime_len> is the length in bits of the safe prime to be generated.
28B<generator> is a small number E<gt> 1, typically 2 or 5.
29
30A callback function may be used to provide feedback about the progress
31of the key generation. If B<cb> is not B<NULL>, it will be
32called as described in L<BN_generate_prime(3)|BN_generate_prime(3)> while a random prime number is
33generated, and when a prime has been found, B<BN_GENCB_call(cb, 3, 0)> is
34called. See L<BN_generate_prime(3)|BN_generate_prime(3)> for information on
35the BN_GENCB_call() function.
36
37DH_check() validates Diffie-Hellman parameters. It checks that B<p> is
38a safe prime, and that B<g> is a suitable generator. In the case of an
39error, the bit flags DH_CHECK_P_NOT_SAFE_PRIME or
40DH_NOT_SUITABLE_GENERATOR are set in B<*codes>.
41DH_UNABLE_TO_CHECK_GENERATOR is set if the generator cannot be
42checked, i.e. it does not equal 2 or 5.
43
44=head1 RETURN VALUES
45
46DH_generate_parameters_ex() and DH_check() return 1 if the check could be
47performed, 0 otherwise.
48
49DH_generate_parameters() (deprecated) returns a pointer to the DH structure, or
50NULL if the parameter generation fails.
51
52The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
53
54=head1 NOTES
55
56DH_generate_parameters_ex() and DH_generate_parameters() may run for several
57hours before finding a suitable prime.
58
59The parameters generated by DH_generate_parameters_ex() and DH_generate_parameters()
60are not to be used in signature schemes.
61
62=head1 BUGS
63
64If B<generator> is not 2 or 5, B<dh-E<gt>g>=B<generator> is not
65a usable generator.
66
67=head1 SEE ALSO
68
69L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
70L<DH_free(3)|DH_free(3)>
71
72=head1 HISTORY
73
74DH_check() is available in all versions of SSLeay and OpenSSL.
75The B<cb_arg> argument to DH_generate_parameters() was added in SSLeay 0.9.0.
76
77In versions before OpenSSL 0.9.5, DH_CHECK_P_NOT_STRONG_PRIME is used
78instead of DH_CHECK_P_NOT_SAFE_PRIME.
79
80=cut
diff --git a/src/lib/libcrypto/doc/DH_get_ex_new_index.pod b/src/lib/libcrypto/doc/DH_get_ex_new_index.pod
deleted file mode 100644
index 934ec094bb..0000000000
--- a/src/lib/libcrypto/doc/DH_get_ex_new_index.pod
+++ /dev/null
@@ -1,37 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data - add application specific
6data to DH structures
7
8=head1 SYNOPSIS
9
10 #include <openssl/dh.h>
11
12 int DH_get_ex_new_index(long argl, void *argp,
13 CRYPTO_EX_new *new_func,
14 CRYPTO_EX_dup *dup_func,
15 CRYPTO_EX_free *free_func);
16
17 int DH_set_ex_data(DH *d, int idx, void *arg);
18
19 char *DH_get_ex_data(DH *d, int idx);
20
21=head1 DESCRIPTION
22
23These functions handle application specific data in DH
24structures. Their usage is identical to that of
25RSA_get_ex_new_index(), RSA_set_ex_data() and RSA_get_ex_data()
26as described in L<RSA_get_ex_new_index(3)>.
27
28=head1 SEE ALSO
29
30L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>, L<dh(3)|dh(3)>
31
32=head1 HISTORY
33
34DH_get_ex_new_index(), DH_set_ex_data() and DH_get_ex_data() are
35available since OpenSSL 0.9.5.
36
37=cut
diff --git a/src/lib/libcrypto/doc/DH_new.pod b/src/lib/libcrypto/doc/DH_new.pod
deleted file mode 100644
index 0fdb7b9680..0000000000
--- a/src/lib/libcrypto/doc/DH_new.pod
+++ /dev/null
@@ -1,38 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_new, DH_free - allocate and free DH objects
6
7=head1 SYNOPSIS
8
9 #include <openssl/dh.h>
10
11 DH* DH_new(void);
12
13 void DH_free(DH *dh);
14
15=head1 DESCRIPTION
16
17DH_new() allocates and initializes a B<DH> structure.
18
19DH_free() frees the B<DH> structure and its components. The values are
20erased before the memory is returned to the system.
21
22=head1 RETURN VALUES
23
24If the allocation fails, DH_new() returns B<NULL> and sets an error code that
25can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. Otherwise it returns a
26pointer to the newly allocated structure.
27
28=head1 SEE ALSO
29
30L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
31L<DH_generate_parameters(3)|DH_generate_parameters(3)>,
32L<DH_generate_key(3)|DH_generate_key(3)>
33
34=head1 HISTORY
35
36DH_new() and DH_free() are available in all versions of SSLeay and OpenSSL.
37
38=cut
diff --git a/src/lib/libcrypto/doc/DH_set_method.pod b/src/lib/libcrypto/doc/DH_set_method.pod
deleted file mode 100644
index d82fe7377a..0000000000
--- a/src/lib/libcrypto/doc/DH_set_method.pod
+++ /dev/null
@@ -1,129 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_set_default_method, DH_get_default_method,
6DH_set_method, DH_new_method, DH_OpenSSL,
7DH_set_default_openssl_method, DH_get_default_openssl_method
8- select DH method
9
10=head1 SYNOPSIS
11
12 #include <openssl/dh.h>
13 #include <openssl/engine.h>
14
15 void DH_set_default_method(const DH_METHOD *meth);
16
17 const DH_METHOD *DH_get_default_method(void);
18
19 int DH_set_method(DH *dh, const DH_METHOD *meth);
20
21 DH *DH_new_method(ENGINE *engine);
22
23 const DH_METHOD *DH_OpenSSL(void);
24
25=head1 DESCRIPTION
26
27A B<DH_METHOD> specifies the functions that OpenSSL uses for Diffie-Hellman
28operations. By modifying the method, alternative implementations
29such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
30important information about how these DH API functions are affected by the use
31of B<ENGINE> API calls.
32
33Initially, the default DH_METHOD is the OpenSSL internal implementation, as
34returned by DH_OpenSSL().
35
36DH_set_default_method() makes B<meth> the default method for all DH
37structures created later. B<NB>: This is true only whilst no ENGINE has been set
38as a default for DH, so this function is no longer recommended.
39
40DH_get_default_method() returns a pointer to the current default DH_METHOD.
41However, the meaningfulness of this result is dependent on whether the ENGINE
42API is being used, so this function is no longer recommended.
43
44DH_set_method() selects B<meth> to perform all operations using the key B<dh>.
45This will replace the DH_METHOD used by the DH key and if the previous method
46was supplied by an ENGINE, the handle to that ENGINE will be released during the
47change. It is possible to have DH keys that only work with certain DH_METHOD
48implementations (eg. from an ENGINE module that supports embedded
49hardware-protected keys), and in such cases attempting to change the DH_METHOD
50for the key can have unexpected results.
51
52DH_new_method() allocates and initializes a DH structure so that B<engine> will
53be used for the DH operations. If B<engine> is NULL, the default ENGINE for DH
54operations is used, and if no default ENGINE is set, the DH_METHOD controlled by
55DH_set_default_method() is used.
56
57=head1 THE DH_METHOD STRUCTURE
58
59 typedef struct dh_meth_st
60 {
61 /* name of the implementation */
62 const char *name;
63
64 /* generate private and public DH values for key agreement */
65 int (*generate_key)(DH *dh);
66
67 /* compute shared secret */
68 int (*compute_key)(unsigned char *key, BIGNUM *pub_key, DH *dh);
69
70 /* compute r = a ^ p mod m (May be NULL for some implementations) */
71 int (*bn_mod_exp)(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
72 const BIGNUM *m, BN_CTX *ctx,
73 BN_MONT_CTX *m_ctx);
74
75 /* called at DH_new */
76 int (*init)(DH *dh);
77
78 /* called at DH_free */
79 int (*finish)(DH *dh);
80
81 int flags;
82
83 char *app_data; /* ?? */
84
85 } DH_METHOD;
86
87=head1 RETURN VALUES
88
89DH_OpenSSL() and DH_get_default_method() return pointers to the respective
90B<DH_METHOD>s.
91
92DH_set_method() returns non-zero if the provided B<meth> was successfully set as
93the method for B<dh> (including unloading the ENGINE handle if the previous
94method was supplied by an ENGINE).
95
96DH_new_method() returns NULL and sets an error code that can be obtained by
97L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it
98returns a pointer to the newly allocated structure.
99
100=head1 NOTES
101
102As of version 0.9.7, DH_METHOD implementations are grouped together with other
103algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a
104default ENGINE is specified for DH functionality using an ENGINE API function,
105that will override any DH defaults set using the DH API (ie.
106DH_set_default_method()). For this reason, the ENGINE API is the recommended way
107to control default implementations for use in DH and other cryptographic
108algorithms.
109
110=head1 SEE ALSO
111
112L<dh(3)|dh(3)>, L<DH_new(3)|DH_new(3)>
113
114=head1 HISTORY
115
116DH_set_default_method(), DH_get_default_method(), DH_set_method(),
117DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4.
118
119DH_set_default_openssl_method() and DH_get_default_openssl_method() replaced
120DH_set_default_method() and DH_get_default_method() respectively, and
121DH_set_method() and DH_new_method() were altered to use B<ENGINE>s rather than
122B<DH_METHOD>s during development of the engine version of OpenSSL 0.9.6. For
1230.9.7, the handling of defaults in the ENGINE API was restructured so that this
124change was reversed, and behaviour of the other functions resembled more closely
125the previous behaviour. The behaviour of defaults in the ENGINE API now
126transparently overrides the behaviour of defaults in the DH API without
127requiring changing these function prototypes.
128
129=cut
diff --git a/src/lib/libcrypto/doc/DH_size.pod b/src/lib/libcrypto/doc/DH_size.pod
deleted file mode 100644
index 97f26fda78..0000000000
--- a/src/lib/libcrypto/doc/DH_size.pod
+++ /dev/null
@@ -1,33 +0,0 @@
1=pod
2
3=head1 NAME
4
5DH_size - get Diffie-Hellman prime size
6
7=head1 SYNOPSIS
8
9 #include <openssl/dh.h>
10
11 int DH_size(DH *dh);
12
13=head1 DESCRIPTION
14
15This function returns the Diffie-Hellman size in bytes. It can be used
16to determine how much memory must be allocated for the shared secret
17computed by DH_compute_key().
18
19B<dh-E<gt>p> must not be B<NULL>.
20
21=head1 RETURN VALUE
22
23The size in bytes.
24
25=head1 SEE ALSO
26
27L<dh(3)|dh(3)>, L<DH_generate_key(3)|DH_generate_key(3)>
28
29=head1 HISTORY
30
31DH_size() is available in all versions of SSLeay and OpenSSL.
32
33=cut
diff --git a/src/lib/libcrypto/man/DES_set_key.3 b/src/lib/libcrypto/man/DES_set_key.3
new file mode 100644
index 0000000000..9c33bf29e6
--- /dev/null
+++ b/src/lib/libcrypto/man/DES_set_key.3
@@ -0,0 +1,697 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DES_SET_KEY 3
3.Os
4.Sh NAME
5.Nm DES_random_key ,
6.Nm DES_set_key ,
7.Nm DES_key_sched ,
8.Nm DES_set_key_checked ,
9.Nm DES_set_key_unchecked ,
10.Nm DES_set_odd_parity ,
11.Nm DES_is_weak_key ,
12.Nm DES_ecb_encrypt ,
13.Nm DES_ecb2_encrypt ,
14.Nm DES_ecb3_encrypt ,
15.Nm DES_ncbc_encrypt ,
16.Nm DES_cfb_encrypt ,
17.Nm DES_ofb_encrypt ,
18.Nm DES_pcbc_encrypt ,
19.Nm DES_cfb64_encrypt ,
20.Nm DES_ofb64_encrypt ,
21.Nm DES_xcbc_encrypt ,
22.Nm DES_ede2_cbc_encrypt ,
23.Nm DES_ede2_cfb64_encrypt ,
24.Nm DES_ede2_ofb64_encrypt ,
25.Nm DES_ede3_cbc_encrypt ,
26.Nm DES_ede3_cbcm_encrypt ,
27.Nm DES_ede3_cfb64_encrypt ,
28.Nm DES_ede3_ofb64_encrypt ,
29.Nm DES_cbc_cksum ,
30.Nm DES_quad_cksum ,
31.Nm DES_string_to_key ,
32.Nm DES_string_to_2keys ,
33.Nm DES_fcrypt ,
34.Nm DES_crypt ,
35.Nm DES_enc_read ,
36.Nm DES_enc_write
37.Nd DES encryption
38.Sh SYNOPSIS
39.In openssl/des.h
40.Ft void
41.Fo DES_random_key
42.Fa "DES_cblock *ret"
43.Fc
44.Ft int
45.Fo DES_set_key
46.Fa "const_DES_cblock *key"
47.Fa "DES_key_schedule *schedule"
48.Fc
49.Ft int
50.Fo DES_key_sched
51.Fa "const_DES_cblock *key"
52.Fa "DES_key_schedule *schedule"
53.Fc
54.Ft int
55.Fo DES_set_key_checked
56.Fa "const_DES_cblock *key"
57.Fa "DES_key_schedule *schedule"
58.Fc
59.Ft void
60.Fo DES_set_key_unchecked
61.Fa "const_DES_cblock *key"
62.Fa "DES_key_schedule *schedule"
63.Fc
64.Ft void
65.Fo DES_set_odd_parity
66.Fa "DES_cblock *key"
67.Fc
68.Ft int
69.Fo DES_is_weak_key
70.Fa "const_DES_cblock *key"
71.Fc
72.Ft void
73.Fo DES_ecb_encrypt
74.Fa "const_DES_cblock *input"
75.Fa "DES_cblock *output"
76.Fa "DES_key_schedule *ks"
77.Fa "int enc"
78.Fc
79.Ft void
80.Fo DES_ecb2_encrypt
81.Fa "const_DES_cblock *input"
82.Fa "DES_cblock *output"
83.Fa "DES_key_schedule *ks1"
84.Fa "DES_key_schedule *ks2"
85.Fa "int enc"
86.Fc
87.Ft void
88.Fo DES_ecb3_encrypt
89.Fa "const_DES_cblock *input"
90.Fa "DES_cblock *output"
91.Fa "DES_key_schedule *ks1"
92.Fa "DES_key_schedule *ks2"
93.Fa "DES_key_schedule *ks3"
94.Fa "int enc"
95.Fc
96.Ft void
97.Fo DES_ncbc_encrypt
98.Fa "const unsigned char *input"
99.Fa "unsigned char *output"
100.Fa "long length"
101.Fa "DES_key_schedule *schedule"
102.Fa "DES_cblock *ivec"
103.Fa "int enc"
104.Fc
105.Ft void
106.Fo DES_cfb_encrypt
107.Fa "const unsigned char *in"
108.Fa "unsigned char *out"
109.Fa "int numbits"
110.Fa "long length"
111.Fa "DES_key_schedule *schedule"
112.Fa "DES_cblock *ivec"
113.Fa "int enc"
114.Fc
115.Ft void
116.Fo DES_ofb_encrypt
117.Fa "const unsigned char *in"
118.Fa "unsigned char *out"
119.Fa "int numbits"
120.Fa "long length"
121.Fa "DES_key_schedule *schedule"
122.Fa "DES_cblock *ivec"
123.Fc
124.Ft void
125.Fo DES_pcbc_encrypt
126.Fa "const unsigned char *input"
127.Fa "unsigned char *output"
128.Fa "long length"
129.Fa "DES_key_schedule *schedule"
130.Fa "DES_cblock *ivec"
131.Fa "int enc"
132.Fc
133.Ft void
134.Fo DES_cfb64_encrypt
135.Fa "const unsigned char *in"
136.Fa "unsigned char *out"
137.Fa "long length"
138.Fa "DES_key_schedule *schedule"
139.Fa "DES_cblock *ivec"
140.Fa "int *num"
141.Fa "int enc"
142.Fc
143.Ft void
144.Fo DES_ofb64_encrypt
145.Fa "const unsigned char *in"
146.Fa "unsigned char *out"
147.Fa "long length"
148.Fa "DES_key_schedule *schedule"
149.Fa "DES_cblock *ivec"
150.Fa "int *num"
151.Fc
152.Ft void
153.Fo DES_xcbc_encrypt
154.Fa "const unsigned char *input"
155.Fa "unsigned char *output"
156.Fa "long length"
157.Fa "DES_key_schedule *schedule"
158.Fa "DES_cblock *ivec"
159.Fa "const_DES_cblock *inw"
160.Fa "const_DES_cblock *outw"
161.Fa "int enc"
162.Fc
163.Ft void
164.Fo DES_ede2_cbc_encrypt
165.Fa "const unsigned char *input"
166.Fa "unsigned char *output"
167.Fa "long length"
168.Fa "DES_key_schedule *ks1"
169.Fa "DES_key_schedule *ks2"
170.Fa "DES_cblock *ivec"
171.Fa "int enc"
172.Fc
173.Ft void
174.Fo DES_ede2_cfb64_encrypt
175.Fa "const unsigned char *in"
176.Fa "unsigned char *out"
177.Fa "long length"
178.Fa "DES_key_schedule *ks1"
179.Fa "DES_key_schedule *ks2"
180.Fa "DES_cblock *ivec"
181.Fa "int *num"
182.Fa "int enc"
183.Fc
184.Ft void
185.Fo DES_ede2_ofb64_encrypt
186.Fa "const unsigned char *in"
187.Fa "unsigned char *out"
188.Fa "long length"
189.Fa "DES_key_schedule *ks1"
190.Fa "DES_key_schedule *ks2"
191.Fa "DES_cblock *ivec"
192.Fa "int *num"
193.Fc
194.Ft void
195.Fo DES_ede3_cbc_encrypt
196.Fa "const unsigned char *input"
197.Fa "unsigned char *output"
198.Fa "long length"
199.Fa "DES_key_schedule *ks1"
200.Fa "DES_key_schedule *ks2"
201.Fa "DES_key_schedule *ks3"
202.Fa "DES_cblock *ivec"
203.Fa "int enc"
204.Fc
205.Ft void
206.Fo DES_ede3_cbcm_encrypt
207.Fa "const unsigned char *in"
208.Fa "unsigned char *out"
209.Fa "long length"
210.Fa "DES_key_schedule *ks1"
211.Fa "DES_key_schedule *ks2"
212.Fa "DES_key_schedule *ks3"
213.Fa "DES_cblock *ivec1"
214.Fa "DES_cblock *ivec2"
215.Fa "int enc"
216.Fc
217.Ft void
218.Fo DES_ede3_cfb64_encrypt
219.Fa "const unsigned char *in"
220.Fa "unsigned char *out"
221.Fa "long length"
222.Fa "DES_key_schedule *ks1"
223.Fa "DES_key_schedule *ks2"
224.Fa "DES_key_schedule *ks3"
225.Fa "DES_cblock *ivec"
226.Fa "int *num"
227.Fa "int enc"
228.Fc
229.Ft void
230.Fo DES_ede3_ofb64_encrypt
231.Fa "const unsigned char *in"
232.Fa "unsigned char *out"
233.Fa "long length"
234.Fa "DES_key_schedule *ks1"
235.Fa "DES_key_schedule *ks2"
236.Fa "DES_key_schedule *ks3"
237.Fa "DES_cblock *ivec"
238.Fa "int *num"
239.Fc
240.Ft DES_LONG
241.Fo DES_cbc_cksum
242.Fa "const unsigned char *input"
243.Fa "DES_cblock *output"
244.Fa "long length"
245.Fa "DES_key_schedule *schedule"
246.Fa "const_DES_cblock *ivec"
247.Fc
248.Ft DES_LONG
249.Fo DES_quad_cksum
250.Fa "const unsigned char *input"
251.Fa "DES_cblock output[]"
252.Fa "long length"
253.Fa "int out_count"
254.Fa "DES_cblock *seed"
255.Fc
256.Ft void
257.Fo DES_string_to_key
258.Fa "const char *str"
259.Fa "DES_cblock *key"
260.Fc
261.Ft void
262.Fo DES_string_to_2keys
263.Fa "const char *str"
264.Fa "DES_cblock *key1"
265.Fa "DES_cblock *key2"
266.Fc
267.Ft char *
268.Fo DES_fcrypt
269.Fa "const char *buf"
270.Fa "const char *salt"
271.Fa "char *ret"
272.Fc
273.Ft char *
274.Fo DES_crypt
275.Fa "const char *buf"
276.Fa "const char *salt"
277.Fc
278.Ft int
279.Fo DES_enc_read
280.Fa "int fd"
281.Fa "void *buf"
282.Fa "int len"
283.Fa "DES_key_schedule *sched"
284.Fa "DES_cblock *iv"
285.Fc
286.Ft int
287.Fo DES_enc_write
288.Fa "int fd"
289.Fa "const void *buf"
290.Fa "int len"
291.Fa "DES_key_schedule *sched"
292.Fa "DES_cblock *iv"
293.Fc
294.Sh DESCRIPTION
295This library contains a fast implementation of the DES encryption
296algorithm.
297.Pp
298There are two phases to the use of DES encryption.
299The first is the generation of a
300.Vt DES_key_schedule
301from a key, the second is the actual encryption.
302A DES key is of type
303.Vt DES_cblock .
304This type is consists of 8 bytes with odd parity.
305The least significant bit in each byte is the parity bit.
306The key schedule is an expanded form of the key; it is used to speed the
307encryption process.
308.Pp
309.Fn DES_random_key
310generates a random key in odd parity.
311.Pp
312Before a DES key can be used, it must be converted into the architecture
313dependent
314.Vt DES_key_schedule
315via the
316.Fn DES_set_key_checked
317or
318.Fn DES_set_key_unchecked
319function.
320.Pp
321.Fn DES_set_key_checked
322will check that the key passed is of odd parity and is not a week or
323semi-weak key.
324If the parity is wrong, then -1 is returned.
325If the key is a weak key, then -2 is returned.
326If an error is returned, the key schedule is not generated.
327.Pp
328.Fn DES_set_key
329works like
330.Fn DES_set_key_checked
331if the
332.Em DES_check_key
333flag is non-zero, otherwise like
334.Fn DES_set_key_unchecked .
335These functions are available for compatibility; it is recommended to
336use a function that does not depend on a global variable.
337.Pp
338.Fn DES_set_odd_parity
339sets the parity of the passed
340.Fa key
341to odd.
342.Pp
343.Fn DES_is_weak_key
344returns 1 is the passed key is a weak key, 0 if it is ok.
345.Pp
346The following routines mostly operate on an input and output stream of
347.Vt DES_cblock Ns s.
348.Pp
349.Fn DES_ecb_encrypt
350is the basic DES encryption routine that encrypts or decrypts a single
3518-byte
352.Vt DES_cblock
353in electronic code book (ECB) mode.
354It always transforms the input data, pointed to by
355.Fa input ,
356into the output data, pointed to by the
357.Fa output
358argument.
359If the
360.Fa enc
361argument is non-zero
362.Pq Dv DES_ENCRYPT ,
363the
364.Fa input
365(cleartext) is encrypted in to the
366.Fa output
367(ciphertext) using the key_schedule specified by the
368.Fa schedule
369argument, previously set via
370.Fn DES_set_key .
371If
372.Fa enc
373is zero
374.Pq Dv DES_DECRYPT ,
375the
376.Fa input
377(now ciphertext) is decrypted into the
378.Fa output
379(now cleartext).
380Input and output may overlap.
381.Fn DES_ecb_encrypt
382does not return a value.
383.Pp
384.Fn DES_ecb3_encrypt
385encrypts/decrypts the
386.Fa input
387block by using three-key Triple-DES encryption in ECB mode.
388This involves encrypting the input with
389.Fa ks1 ,
390decrypting with the key schedule
391.Fa ks2 ,
392and then encrypting with
393.Fa ks3 .
394This routine greatly reduces the chances of brute force breaking of DES
395and has the advantage of if
396.Fa ks1 ,
397.Fa ks2 ,
398and
399.Fa ks3
400are the same, it is equivalent to just encryption using ECB mode and
401.Fa ks1
402as the key.
403.Pp
404The macro
405.Fn DES_ecb2_encrypt
406is provided to perform two-key Triple-DES encryption by using
407.Fa ks1
408for the final encryption.
409.Pp
410.Fn DES_ncbc_encrypt
411encrypts/decrypts using the cipher-block-chaining (CBC) mode of DES.
412If the
413.Fa enc
414argument is non-zero, the routine cipher-block-chain encrypts the
415cleartext data pointed to by the
416.Fa input
417argument into the ciphertext pointed to by the
418.Fa output
419argument, using the key schedule provided by the
420.Fa schedule
421argument, and initialization vector provided by the
422.Fa ivec
423argument.
424If the
425.Fa length
426argument is not an integral multiple of eight bytes, the last block is
427copied to a temporary area and zero filled.
428The output is always an integral multiple of eight bytes.
429.Pp
430.Fn DES_xcbc_encrypt
431is RSA's DESX mode of DES.
432It uses
433.Fa inw
434and
435.Fa outw
436to 'whiten' the encryption.
437.Fa inw
438and
439.Fa outw
440are secret (unlike the iv) and are as such, part of the key.
441So the key is sort of 24 bytes.
442This is much better than CBC DES.
443.Pp
444.Fn DES_ede3_cbc_encrypt
445implements outer triple CBC DES encryption with three keys.
446This means that each DES operation inside the CBC mode is really an
447.Qq Li C=E(ks3,D(ks2,E(ks1,M))) .
448This mode is used by SSL.
449.Pp
450The
451.Fn DES_ede2_cbc_encrypt
452macro implements two-key Triple-DES by reusing
453.Fa ks1
454for the final encryption.
455.Qq Li C=E(ks1,D(ks2,E(ks1,M))) .
456This form of Triple-DES is used by the RSAREF library.
457.Pp
458.Fn DES_pcbc_encrypt
459encrypt/decrypts using the propagating cipher block chaining mode used
460by Kerberos v4.
461Its parameters are the same as
462.Fn DES_ncbc_encrypt .
463.Pp
464.Fn DES_cfb_encrypt
465encrypt/decrypts using cipher feedback mode.
466This method takes an array of characters as input and outputs and array
467of characters.
468It does not require any padding to 8 character groups.
469Note: the
470.Fa ivec
471variable is changed and the new changed value needs to be passed to the
472next call to this function.
473Since this function runs a complete DES ECB encryption per
474.Fa numbits ,
475this function is only suggested for use when sending small numbers of
476characters.
477.Pp
478.Fn DES_cfb64_encrypt
479implements CFB mode of DES with 64bit feedback.
480Why is this useful you ask?
481Because this routine will allow you to encrypt an arbitrary number of
482bytes, no 8 byte padding.
483Each call to this routine will encrypt the input bytes to output and
484then update ivec and num.
485num contains 'how far' we are though ivec.
486If this does not make much sense, read more about cfb mode of DES :-).
487.Pp
488.Fn DES_ede3_cfb64_encrypt
489and
490.Fn DES_ede2_cfb64_encrypt
491is the same as
492.Fn DES_cfb64_encrypt
493except that Triple-DES is used.
494.Pp
495.Fn DES_ofb_encrypt
496encrypts using output feedback mode.
497This method takes an array of characters as input and outputs and array
498of characters.
499It does not require any padding to 8 character groups.
500Note: the
501.Fa ivec
502variable is changed and the new changed value needs to be passed to the
503next call to this function.
504Since this function runs a complete DES ECB encryption per numbits, this
505function is only suggested for use when sending small numbers of
506characters.
507.Pp
508.Fn DES_ofb64_encrypt
509is the same as
510.Fn DES_cfb64_encrypt
511using Output Feed Back mode.
512.Pp
513.Fn DES_ede3_ofb64_encrypt
514and
515.Fn DES_ede2_ofb64_encrypt
516is the same as
517.Fn DES_ofb64_encrypt ,
518using Triple-DES.
519.Pp
520The following functions are included in the DES library for
521compatibility with the MIT Kerberos library.
522.Pp
523.Fn DES_cbc_cksum
524produces an 8 byte checksum based on the input stream (via CBC
525encryption).
526The last 4 bytes of the checksum are returned and the complete 8 bytes
527are placed in
528.Fa output .
529This function is used by Kerberos v4.
530Other applications should use
531.Xr EVP_DigestInit 3
532etc. instead.
533.Pp
534.Fn DES_quad_cksum
535is a Kerberos v4 function.
536It returns a 4 byte checksum from the input bytes.
537The algorithm can be iterated over the input, depending on
538.Fa out_count ,
5391, 2, 3 or 4 times.
540If
541.Fa output
542is
543.Pf non- Dv NULL ,
544the 8 bytes generated by each pass are written into
545.Fa output .
546.Pp
547The following are DES-based transformations:
548.Pp
549.Fn DES_fcrypt
550is a fast version of the Unix
551.Xr crypt 3
552function.
553This version takes only a small amount of space relative to other
554fast crypt implementations.
555This is different to the normal crypt in that the third parameter is the
556buffer that the return value is written into.
557It needs to be at least 14 bytes long.
558This function is thread safe, unlike the normal crypt.
559.Pp
560.Fn DES_crypt
561is a faster replacement for the normal system
562.Xr crypt 3 .
563This function calls
564.Fn DES_fcrypt
565with a static array passed as the third parameter.
566This emulates the normal non-thread safe semantics of
567.Xr crypt 3 .
568.Pp
569.Fn DES_enc_write
570writes
571.Fa len
572bytes to file descriptor
573.Fa fd
574from buffer
575.Fa buf .
576The data is encrypted via
577.Em pcbc_encrypt
578(default) using
579.Fa sched
580for the key and
581.Fa iv
582as a starting vector.
583The actual data send down
584.Fa fd
585consists of 4 bytes (in network byte order) containing the length of the
586following encrypted data.
587The encrypted data then follows, padded with random data out to a
588multiple of 8 bytes.
589.Pp
590.Fn DES_enc_read
591is used to read
592.Fa len
593bytes from file descriptor
594.Fa fd
595into buffer
596.Fa buf .
597The data being read from
598.Fa fd
599is assumed to have come from
600.Fn DES_enc_write
601and is decrypted using
602.Fa sched
603for the key schedule and
604.Fa iv
605for the initial vector.
606.Pp
607.Sy Warning:
608The data format used by
609.Fn DES_enc_write
610and
611.Fn DES_enc_read
612has a cryptographic weakness: When asked to write more than
613.Dv MAXWRITE
614bytes,
615.Fn DES_enc_write
616will split the data into several chunks that are all encrypted using the
617same IV.
618So don't use these functions unless you are sure you know what
619you do (in which case you might not want to use them anyway).
620They cannot handle non-blocking sockets.
621.Fn DES_enc_read
622uses an internal state and thus cannot be used on multiple files.
623.Pp
624.Em DES_rw_mode
625is used to specify the encryption mode to use with
626.Fn DES_enc_read .
627If set to
628.Dv DES_PCBC_MODE
629(the default), DES_pcbc_encrypt is used.
630If set to
631.Dv DES_CBC_MODE
632DES_cbc_encrypt is used.
633.Sh SEE ALSO
634.Xr crypt 3 ,
635.Xr rand 3
636.Pp
637The
638.Xr evp 3
639library provides higher-level encryption functions.
640.Sh STANDARDS
641ANSI X3.106
642.Pp
643The DES library was initially written to be source code compatible
644with the MIT Kerberos library.
645.Sh HISTORY
646In OpenSSL 0.9.7, all des_ functions were renamed to DES_ to avoid
647clashes with older versions of libdes.
648.Pp
649.Fn DES_set_key_checked
650and
651.Fn DES_set_key_unchecked
652were added in OpenSSL 0.9.5.
653.Pp
654.Fn des_generate_random_block ,
655.Fn des_init_random_number_generator ,
656.Fn des_new_random_key ,
657.Fn des_set_random_generator_seed ,
658.Xr des_set_sequence_number ,
659and
660.Fn des_rand_data 3
661are used in newer versions of Kerberos but are not implemented here.
662.Pp
663.Fn DES_random_key
664generated cryptographically weak random data in SSLeay and in OpenSSL
665prior version 0.9.5, as well as in the original MIT library.
666.Sh AUTHORS
667.An Eric Young Aq Mt eay@cryptsoft.com
668.Sh CAVEATS
669Single-key DES is insecure due to its short key size.
670ECB mode is not suitable for most applications.
671.Sh BUGS
672.Xr DES_cbc_encrypt 3
673does not modify
674.Fa ivec ;
675use
676.Fn DES_ncbc_encrypt
677instead.
678.Pp
679.Fn DES_cfb_encrypt
680and
681.Fn DES_ofb_encrypt
682operates on input of 8 bits.
683What this means is that if you set numbits to 12, and length to 2, the
684first 12 bits will come from the 1st input byte and the low half of the
685second input byte.
686The second 12 bits will have the low 8 bits taken from the 3rd input
687byte and the top 4 bits taken from the 4th input byte.
688The same holds for output.
689This function has been implemented this way because most people will be
690using a multiple of 8 and because once you get into pulling bytes input
691bytes apart things get ugly!
692.Pp
693.Fn DES_string_to_key
694is available for backward compatibility with the MIT library.
695New applications should use a cryptographic hash function.
696The same applies for
697.Fn DES_string_to_2key .
diff --git a/src/lib/libcrypto/man/DH_generate_key.3 b/src/lib/libcrypto/man/DH_generate_key.3
new file mode 100644
index 0000000000..6e2edbadb3
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_generate_key.3
@@ -0,0 +1,71 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_GENERATE_KEY 3
3.Os
4.Sh NAME
5.Nm DH_generate_key ,
6.Nm DH_compute_key
7.Nd perform Diffie-Hellman key exchange
8.Sh SYNOPSIS
9.In openssl/dh.h
10.Ft int
11.Fo DH_generate_key
12.Fa "DH *dh"
13.Fc
14.Ft int
15.Fo DH_compute_key
16.Fa "unsigned char *key"
17.Fa "BIGNUM *pub_key"
18.Fa "DH *dh"
19.Fc
20.Sh DESCRIPTION
21.Fn DH_generate_key
22performs the first step of a Diffie-Hellman key exchange by generating
23private and public DH values.
24By calling
25.Fn DH_compute_key ,
26these are combined with the other party's public value to compute the
27shared key.
28.Pp
29.Fn DH_generate_key
30expects
31.Fa dh
32to contain the shared parameters
33.Sy dh->p
34and
35.Sy dh->g .
36It generates a random private DH value unless
37.Sy dh->priv_key
38is already set, and computes the corresponding public value
39.Sy dh->pub_key ,
40which can then be published.
41.Pp
42.Fn DH_compute_key
43computes the shared secret from the private DH value in
44.Fa dh
45and the other party's public value in
46.Fa pub_key
47and stores it in
48.Fa key .
49.Fa key
50must point to
51.Fn DH_size dh
52bytes of memory.
53.Sh RETURN VALUES
54.Fn DH_generate_key
55returns 1 on success, 0 otherwise.
56.Pp
57.Fn DH_compute_key
58returns the size of the shared secret on success, -1 on error.
59.Pp
60The error codes can be obtained by
61.Xr ERR_get_error 3 .
62.Sh SEE ALSO
63.Xr dh 3 ,
64.Xr DH_size 3 ,
65.Xr ERR_get_error 3 ,
66.Xr rand 3
67.Sh HISTORY
68.Fn DH_generate_key
69and
70.Fn DH_compute_key
71are available in all versions of SSLeay and OpenSSL.
diff --git a/src/lib/libcrypto/man/DH_generate_parameters.3 b/src/lib/libcrypto/man/DH_generate_parameters.3
new file mode 100644
index 0000000000..431ffd634c
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_generate_parameters.3
@@ -0,0 +1,125 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_GENERATE_PARAMETERS 3
3.Os
4.Sh NAME
5.Nm DH_generate_parameters_ex ,
6.Nm DH_generate_parameters ,
7.Nm DH_check
8.Nd generate and check Diffie-Hellman parameters
9.Sh SYNOPSIS
10.In openssl/dh.h
11.Ft int
12.Fo DH_generate_parameters_ex
13.Fa "DH *dh"
14.Fa "int prime_len"
15.Fa "int generator"
16.Fa "BN_GENCB *cb"
17.Fc
18.Ft int
19.Fo DH_check
20.Fa "DH *dh"
21.Fa "int *codes"
22.Fc
23.Pp
24Deprecated:
25.Pp
26.Ft DH *
27.Fo DH_generate_parameters
28.Fa "int prime_len"
29.Fa "int generator"
30.Fa "void (*callback)(int"
31.Fa int
32.Fa "void *)"
33.Fa "void *cb_arg"
34.Fc
35.Sh DESCRIPTION
36.Fn DH_generate_parameters_ex
37generates Diffie-Hellman parameters that can be shared among a group of
38users, and stores them in the provided
39.Vt DH
40structure.
41.Pp
42.Fa prime_len
43is the length in bits of the safe prime to be generated.
44.Fa generator
45is a small number > 1, typically 2 or 5.
46.Pp
47A callback function may be used to provide feedback about the progress
48of the key generation.
49If
50.Fa cb
51is not
52.Dv NULL ,
53it will be called as described in
54.Xr BN_generate_prime 3
55while a random prime number is generated, and when a prime has been
56found,
57.Fn BN_GENCB_call cb 3 0
58is called; see
59.Xr BN_GENCB_call 3 .
60.Pp
61.Fn DH_check
62validates Diffie-Hellman parameters.
63It checks that
64.Fa dh->p
65is a safe prime, and that
66.Fa dh->g
67is a suitable generator.
68In the case of an error, the bit flags
69.Dv DH_CHECK_P_NOT_SAFE_PRIME
70or
71.Dv DH_NOT_SUITABLE_GENERATOR
72are set in
73.Pf * Fa codes .
74.Dv DH_UNABLE_TO_CHECK_GENERATOR
75is set if the generator cannot be checked, i.e. if it does not equal 2 or 5.
76.Sh RETURN VALUES
77.Fn DH_generate_parameters_ex
78and
79.Fn DH_check
80return 1 if the check could be performed, 0 otherwise.
81.Pp
82.Fn DH_generate_parameters
83(deprecated) returns a pointer to the
84.Vt DH
85structure, or
86.Dv NULL
87if the parameter generation fails.
88.Pp
89The error codes can be obtained by
90.Xr ERR_get_error 3 .
91.Sh SEE ALSO
92.Xr dh 3 ,
93.Xr DH_free 3 ,
94.Xr ERR_get_error 3 ,
95.Xr rand 3
96.Sh HISTORY
97.Fn DH_check
98is available in all versions of SSLeay and OpenSSL.
99The
100.Fa cb_arg
101argument to
102.Fn DH_generate_parameters
103was added in SSLeay 0.9.0.
104.Pp
105In versions before OpenSSL 0.9.5,
106.Dv DH_CHECK_P_NOT_STRONG_PRIME
107is used instead of
108.Dv DH_CHECK_P_NOT_SAFE_PRIME .
109.Sh CAVEATS
110.Fn DH_generate_parameters_ex
111and
112.Fn DH_generate_parameters
113may run for several hours before finding a suitable prime.
114.Pp
115The parameters generated by
116.Fn DH_generate_parameters_ex
117and
118.Fn DH_generate_parameters
119are not to be used in signature schemes.
120.Sh BUGS
121If
122.Fa generator
123is not 2 or 5,
124.Fa dh->g Ns = Ns Fa generator
125is not a usable generator.
diff --git a/src/lib/libcrypto/man/DH_get_ex_new_index.3 b/src/lib/libcrypto/man/DH_get_ex_new_index.3
new file mode 100644
index 0000000000..c93efa73d6
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_get_ex_new_index.3
@@ -0,0 +1,47 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_GET_EX_NEW_INDEX 3
3.Os
4.Sh NAME
5.Nm DH_get_ex_new_index ,
6.Nm DH_set_ex_data ,
7.Nm DH_get_ex_data
8.Nd add application specific data to DH structures
9.Sh SYNOPSIS
10.In openssl/dh.h
11.Ft int
12.Fo DH_get_ex_new_index
13.Fa "long argl"
14.Fa "void *argp"
15.Fa "CRYPTO_EX_new *new_func"
16.Fa "CRYPTO_EX_dup *dup_func"
17.Fa "CRYPTO_EX_free *free_func"
18.Fc
19.Ft int
20.Fo DH_set_ex_data
21.Fa "DH *d"
22.Fa "int idx"
23.Fa "void *arg"
24.Fc
25.Ft char *
26.Fo DH_get_ex_data
27.Fa "DH *d"
28.Fa "int idx"
29.Fc
30.Sh DESCRIPTION
31These functions handle application specific data in
32.Vt DH
33structures.
34Their usage is identical to that of
35.Xr RSA_get_ex_new_index 3 ,
36.Xr RSA_set_ex_data 3 ,
37and
38.Xr RSA_get_ex_data 3 .
39.Sh SEE ALSO
40.Xr dh 3 ,
41.Xr RSA_get_ex_new_index 3
42.Sh HISTORY
43.Fn DH_get_ex_new_index ,
44.Fn DH_set_ex_data ,
45and
46.Fn DH_get_ex_data
47are available since OpenSSL 0.9.5.
diff --git a/src/lib/libcrypto/man/DH_new.3 b/src/lib/libcrypto/man/DH_new.3
new file mode 100644
index 0000000000..46b1570765
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_new.3
@@ -0,0 +1,44 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_NEW 3
3.Os
4.Sh NAME
5.Nm DH_new ,
6.Nm DH_free
7.Nd allocate and free DH objects
8.Sh SYNOPSIS
9.In openssl/dh.h
10.Ft DH*
11.Fn DH_new void
12.Ft void
13.Fo DH_free
14.Fa "DH *dh"
15.Fc
16.Sh DESCRIPTION
17.Fn DH_new
18allocates and initializes a
19.Vt DH
20structure.
21.Pp
22.Fn DH_free
23frees the
24.Vt DH
25structure and its components.
26The values are erased before the memory is returned to the system.
27.Sh RETURN VALUES
28If the allocation fails,
29.Fn DH_new
30returns
31.Dv NULL
32and sets an error code that can be obtained by
33.Xr ERR_get_error 3 .
34Otherwise it returns a pointer to the newly allocated structure.
35.Sh SEE ALSO
36.Xr dh 3 ,
37.Xr DH_generate_key 3 ,
38.Xr DH_generate_parameters 3 ,
39.Xr ERR_get_error 3
40.Sh HISTORY
41.Fn DH_new
42and
43.Fn DH_free
44are available in all versions of SSLeay and OpenSSL.
diff --git a/src/lib/libcrypto/man/DH_set_method.3 b/src/lib/libcrypto/man/DH_set_method.3
new file mode 100644
index 0000000000..86dae1728c
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_set_method.3
@@ -0,0 +1,223 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_SET_METHOD 3
3.Os
4.Sh NAME
5.Nm DH_set_default_method ,
6.Nm DH_get_default_method ,
7.Nm DH_set_method ,
8.Nm DH_new_method ,
9.Nm DH_OpenSSL ,
10.Nm DH_set_default_openssl_method ,
11.Nm DH_get_default_openssl_method
12.Nd select DH method
13.Sh SYNOPSIS
14.In openssl/dh.h
15.In openssl/engine.h
16.Ft void
17.Fo DH_set_default_method
18.Fa "const DH_METHOD *meth"
19.Fc
20.Ft const DH_METHOD *
21.Fo DH_get_default_method
22.Fa void
23.Fc
24.Ft int
25.Fo DH_set_method
26.Fa "DH *dh"
27.Fa "const DH_METHOD *meth"
28.Fc
29.Ft DH *
30.Fo DH_new_method
31.Fa "ENGINE *engine"
32.Fc
33.Ft const DH_METHOD *
34.Fo DH_OpenSSL
35.Fa void
36.Fc
37.Sh DESCRIPTION
38A
39.Vt DH_METHOD
40specifies the functions that OpenSSL uses for Diffie-Hellman operations.
41By modifying the method, alternative implementations such as hardware
42accelerators may be used.
43See the
44.Sx CAVEATS
45section for how these DH API functions are affected by the use of
46.Xr engine 3
47API calls.
48.Pp
49Initially, the default
50.Vt DH_METHOD
51is the OpenSSL internal implementation as returned by
52.Fn DH_OpenSSL .
53.Pp
54.Fn DH_set_default_method
55makes
56.Fa meth
57the default method for all
58.Vt DH
59structures created later.
60.Sy NB :
61This is true only whilst no
62.Vt ENGINE
63has been set as a default for DH, so this function is no longer
64recommended.
65.Pp
66.Fn DH_get_default_method
67returns a pointer to the current default
68.Vt DH_METHOD .
69However, the meaningfulness of this result is dependent on whether the
70.Xr engine 3
71API is being used, so this function is no longer recommended.
72.Pp
73.Fn DH_set_method
74selects
75.Fa meth
76to perform all operations using the key
77.Fa dh .
78This will replace the
79.Vt DH_METHOD
80used by the
81.Fa dh
82key and if the previous method was supplied by an
83.Vt ENGINE ,
84the handle to that
85.Vt ENGINE
86will be released during the change.
87It is possible to have
88.Vt DH
89keys that only work with certain
90.Vt DH_METHOD
91implementations (eg. from an
92.Vt ENGINE
93module that supports embedded hardware-protected keys),
94and in such cases attempting to change the
95.Vt DH_METHOD
96for the key can have unexpected results.
97.Pp
98.Fn DH_new_method
99allocates and initializes a
100.Vt DH
101structure so that
102.Fa engine
103will be used for the DH operations.
104If
105.Fa engine
106is
107.Dv NULL ,
108the default
109.Vt ENGINE
110for DH operations is used, and if no default
111.Vt ENGINE
112is set, the
113.Vt DH_METHOD
114controlled by
115.Fn DH_set_default_method
116is used.
117.Sh THE DH_METHOD STRUCTURE
118.Bd -literal
119typedef struct dh_meth_st
120{
121 /* name of the implementation */
122 const char *name;
123
124 /* generate private and public DH values for key agreement */
125 int (*generate_key)(DH *dh);
126
127 /* compute shared secret */
128 int (*compute_key)(unsigned char *key, BIGNUM *pub_key, DH *dh);
129
130 /* compute r = a ^ p mod m (May be NULL for some implementations) */
131 int (*bn_mod_exp)(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
132 const BIGNUM *m, BN_CTX *ctx,
133 BN_MONT_CTX *m_ctx);
134
135 /* called at DH_new */
136 int (*init)(DH *dh);
137
138 /* called at DH_free */
139 int (*finish)(DH *dh);
140
141 int flags;
142
143 char *app_data; /* ?? */
144
145} DH_METHOD;
146.Ed
147.Sh RETURN VALUES
148.Fn DH_OpenSSL
149and
150.Fn DH_get_default_method
151return pointers to the respective
152.Sy DH_METHOD Ns s.
153.Pp
154.Fn DH_set_method
155returns non-zero if the provided
156.Fa meth
157was successfully set as the method for
158.Fa dh
159(including unloading the
160.Vt ENGINE
161handle if the previous method was supplied by an
162.Vt ENGINE ) .
163.Pp
164.Fn DH_new_method
165returns
166.Dv NULL
167and sets an error code that can be obtained by
168.Xr ERR_get_error 3
169if the allocation fails.
170Otherwise it returns a pointer to the newly allocated structure.
171.Sh SEE ALSO
172.Xr dh 3 ,
173.Xr DH_new 3
174.Sh HISTORY
175.Fn DH_set_default_method ,
176.Fn DH_get_default_method ,
177.Fn DH_set_method ,
178.Fn DH_new_method
179and
180.Fn DH_OpenSSL
181were added in OpenSSL 0.9.4.
182.Pp
183.Fn DH_set_default_openssl_method
184and
185.Fn DH_get_default_openssl_method
186replaced
187.Fn DH_set_default_method
188and
189.Fn DH_get_default_method
190respectively, and
191.Fn DH_set_method
192and
193.Fn DH_new_method
194were altered to use
195.Vt ENGINE Ns s
196rather than
197.Vt DH_METHOD Ns s
198during development of the engine version of OpenSSL 0.9.6.
199For 0.9.7, the handling of defaults in the
200.Xr engine 3
201API was restructured so that this change was reversed, and behaviour
202of the other functions resembled more closely the previous behaviour.
203The behaviour of defaults in the
204.Xr engine 3
205API now transparently overrides the behaviour of defaults in the
206DH API without requiring changing these function prototypes.
207.Sh CAVEATS
208As of version 0.9.7,
209.Vt DH_METHOD
210implementations are grouped together with other algorithmic APIs
211(eg. RSA_METHOD, EVP_CIPHER, etc) in
212.Vt ENGINE
213modules.
214If a default
215.Vt ENGINE
216is specified for DH functionality using an
217.Xr engine 3
218API function, that will override any DH defaults set using the DH API
219.Pq ie. Fn DH_set_default_method .
220For this reason, the
221.Xr engine 3
222API is the recommended way to control default implementations
223for use in DH and other cryptographic algorithms.
diff --git a/src/lib/libcrypto/man/DH_size.3 b/src/lib/libcrypto/man/DH_size.3
new file mode 100644
index 0000000000..3675f7b12b
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_size.3
@@ -0,0 +1,29 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt DH_SIZE 3
3.Os
4.Sh NAME
5.Nm DH_size
6.Nd get Diffie-Hellman prime size
7.Sh SYNOPSIS
8.In openssl/dh.h
9.Ft int
10.Fo DH_size
11.Fa "DH *dh"
12.Fc
13.Sh DESCRIPTION
14This function returns the Diffie-Hellman size in bytes.
15It can be used to determine how much memory must be allocated for the
16shared secret computed by
17.Xr DH_compute_key 3 .
18.Pp
19.Fa dh->p
20must not be
21.Dv NULL .
22.Sh RETURN VALUE
23The size in bytes.
24.Sh SEE ALSO
25.Xr dh 3 ,
26.Xr DH_generate_key 3
27.Sh HISTORY
28.Fn DH_size
29is available in all versions of SSLeay and OpenSSL.
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 1dfcf8700d..a40bb39167 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.34 2016/09/05 10:43:42 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.35 2016/11/02 09:11:53 schwarze Exp $
2 2
3.include <bsd.own.mk> # for NOMAN 3.include <bsd.own.mk> # for NOMAN
4 4
@@ -56,6 +56,13 @@ MAN= \
56 CONF_modules_load_file.3 \ 56 CONF_modules_load_file.3 \
57 CRYPTO_set_ex_data.3 \ 57 CRYPTO_set_ex_data.3 \
58 CRYPTO_set_locking_callback.3 \ 58 CRYPTO_set_locking_callback.3 \
59 DES_set_key.3 \
60 DH_generate_key.3 \
61 DH_generate_parameters.3 \
62 DH_get_ex_new_index.3 \
63 DH_new.3 \
64 DH_set_method.3 \
65 DH_size.3 \
59 ECDSA_SIG_new.3 \ 66 ECDSA_SIG_new.3 \
60 EVP_AEAD_CTX_init.3 \ 67 EVP_AEAD_CTX_init.3 \
61 UI_new.3 \ 68 UI_new.3 \
@@ -66,13 +73,6 @@ MAN= \
66 lh_new.3 \ 73 lh_new.3 \
67 74
68GENMAN= \ 75GENMAN= \
69 DES_set_key.3 \
70 DH_generate_key.3 \
71 DH_generate_parameters.3 \
72 DH_get_ex_new_index.3 \
73 DH_new.3 \
74 DH_set_method.3 \
75 DH_size.3 \
76 DSA_SIG_new.3 \ 76 DSA_SIG_new.3 \
77 DSA_do_sign.3 \ 77 DSA_do_sign.3 \
78 DSA_dup_DH.3 \ 78 DSA_dup_DH.3 \