1 /* crypto/des/des_old.h -*- mode:C; c-file-style: "eay" -*- */
3 /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
5 * The function names in here are deprecated and are only present to
6 * provide an interface compatible with openssl 0.9.6 and older as
7 * well as libdes. OpenSSL now provides functions where "des_" has
8 * been replaced with "DES_" in the names, to make it possible to
9 * make incompatible changes that are needed for C type security and
12 * This include files has two compatibility modes:
14 * - If OPENSSL_DES_LIBDES_COMPATIBILITY is defined, you get an API
15 * that is compatible with libdes and SSLeay.
16 * - If OPENSSL_DES_LIBDES_COMPATIBILITY isn't defined, you get an
17 * API that is compatible with OpenSSL 0.9.5x to 0.9.6x.
19 * Note that these modes break earlier snapshots of OpenSSL, where
20 * libdes compatibility was the only available mode or (later on) the
21 * prefered compatibility mode. However, after much consideration
22 * (and more or less violent discussions with external parties), it
23 * was concluded that OpenSSL should be compatible with earlier versions
24 * of itself before anything else. Also, in all honesty, libdes is
25 * an old beast that shouldn't really be used any more.
27 * Please consider starting to use the DES_ functions rather than the
28 * des_ ones. The des_ functions will disappear completely before
31 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
34 /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
37 /* ====================================================================
38 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
44 * 1. Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
47 * 2. Redistributions in binary form must reproduce the above copyright
48 * notice, this list of conditions and the following disclaimer in
49 * the documentation and/or other materials provided with the
52 * 3. All advertising materials mentioning features or use of this
53 * software must display the following acknowledgment:
54 * "This product includes software developed by the OpenSSL Project
55 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
57 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
58 * endorse or promote products derived from this software without
59 * prior written permission. For written permission, please contact
60 * openssl-core@openssl.org.
62 * 5. Products derived from this software may not be called "OpenSSL"
63 * nor may "OpenSSL" appear in their names without prior written
64 * permission of the OpenSSL Project.
66 * 6. Redistributions of any form whatsoever must retain the following
68 * "This product includes software developed by the OpenSSL Project
69 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
71 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
72 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
73 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
74 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
75 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
76 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
77 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
78 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
79 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
80 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
81 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
82 * OF THE POSSIBILITY OF SUCH DAMAGE.
83 * ====================================================================
85 * This product includes cryptographic software written by Eric Young
86 * (eay@cryptsoft.com). This product includes software written by Tim
87 * Hudson (tjh@cryptsoft.com).
91 © Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
97 #if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
104 #include <openssl/e_os2.h> /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG */
106 #ifdef OPENSSL_NO_DES
107 #error DES is disabled.
110 #ifndef HEADER_NEW_DES_H
111 #error You must include des.h, not des_old.h directly.
114 #ifdef _KERBEROS_DES_H
115 #error <openssl/des_old.h> replaces <kerberos/des.h>.
118 #include <openssl/symhacks.h>
120 #ifdef OPENSSL_BUILD_SHLIBCRYPTO
121 # undef OPENSSL_EXTERN
122 # define OPENSSL_EXTERN OPENSSL_EXPORT
133 typedef unsigned char _ossl_old_des_cblock[8];
134 typedef struct _ossl_old_des_ks_struct
137 _ossl_old_des_cblock _;
138 /* make sure things are correct size on machines with
142 } _ossl_old_des_key_schedule[16];
144 #ifndef OPENSSL_DES_LIBDES_COMPATIBILITY
145 #define des_cblock DES_cblock
146 #define const_des_cblock const_DES_cblock
147 #define des_key_schedule DES_key_schedule
148 #define des_ecb3_encrypt(i,o,k1,k2,k3,e)\
149 DES_ecb3_encrypt((i),(o),&(k1),&(k2),&(k3),(e))
150 #define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\
151 DES_ede3_cbc_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(e))
152 #define des_ede3_cbcm_encrypt(i,o,l,k1,k2,k3,iv1,iv2,e)\
153 DES_ede3_cbcm_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv1),(iv2),(e))
154 #define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\
155 DES_ede3_cfb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n),(e))
156 #define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\
157 DES_ede3_ofb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n))
158 #define des_options()\
160 #define des_cbc_cksum(i,o,l,k,iv)\
161 DES_cbc_cksum((i),(o),(l),&(k),(iv))
162 #define des_cbc_encrypt(i,o,l,k,iv,e)\
163 DES_cbc_encrypt((i),(o),(l),&(k),(iv),(e))
164 #define des_ncbc_encrypt(i,o,l,k,iv,e)\
165 DES_ncbc_encrypt((i),(o),(l),&(k),(iv),(e))
166 #define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\
167 DES_xcbc_encrypt((i),(o),(l),&(k),(iv),(inw),(outw),(e))
168 #define des_cfb_encrypt(i,o,n,l,k,iv,e)\
169 DES_cfb_encrypt((i),(o),(n),(l),&(k),(iv),(e))
170 #define des_ecb_encrypt(i,o,k,e)\
171 DES_ecb_encrypt((i),(o),&(k),(e))
172 #define des_encrypt1(d,k,e)\
173 DES_encrypt1((d),&(k),(e))
174 #define des_encrypt2(d,k,e)\
175 DES_encrypt2((d),&(k),(e))
176 #define des_encrypt3(d,k1,k2,k3)\
177 DES_encrypt3((d),&(k1),&(k2),&(k3))
178 #define des_decrypt3(d,k1,k2,k3)\
179 DES_decrypt3((d),&(k1),&(k2),&(k3))
180 #define des_xwhite_in2out(k,i,o)\
181 DES_xwhite_in2out((k),(i),(o))
182 #define des_enc_read(f,b,l,k,iv)\
183 DES_enc_read((f),(b),(l),&(k),(iv))
184 #define des_enc_write(f,b,l,k,iv)\
185 DES_enc_write((f),(b),(l),&(k),(iv))
186 #define des_fcrypt(b,s,r)\
187 DES_fcrypt((b),(s),(r))
189 #define des_crypt(b,s)\
191 #if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__)
196 #define des_ofb_encrypt(i,o,n,l,k,iv)\
197 DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv))
198 #define des_pcbc_encrypt(i,o,l,k,iv,e)\
199 DES_pcbc_encrypt((i),(o),(l),&(k),(iv),(e))
200 #define des_quad_cksum(i,o,l,c,s)\
201 DES_quad_cksum((i),(o),(l),(c),(s))
202 #define des_random_seed(k)\
203 _ossl_096_des_random_seed((k))
204 #define des_random_key(r)\
206 #define des_read_password(k,p,v) \
207 DES_read_password((k),(p),(v))
208 #define des_read_2passwords(k1,k2,p,v) \
209 DES_read_2passwords((k1),(k2),(p),(v))
210 #define des_set_odd_parity(k)\
211 DES_set_odd_parity((k))
212 #define des_check_key_parity(k)\
213 DES_check_key_parity((k))
214 #define des_is_weak_key(k)\
216 #define des_set_key(k,ks)\
217 DES_set_key((k),&(ks))
218 #define des_key_sched(k,ks)\
219 DES_key_sched((k),&(ks))
220 #define des_set_key_checked(k,ks)\
221 DES_set_key_checked((k),&(ks))
222 #define des_set_key_unchecked(k,ks)\
223 DES_set_key_unchecked((k),&(ks))
224 #define des_string_to_key(s,k)\
225 DES_string_to_key((s),(k))
226 #define des_string_to_2keys(s,k1,k2)\
227 DES_string_to_2keys((s),(k1),(k2))
228 #define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\
229 DES_cfb64_encrypt((i),(o),(l),&(ks),(iv),(n),(e))
230 #define des_ofb64_encrypt(i,o,l,ks,iv,n)\
231 DES_ofb64_encrypt((i),(o),(l),&(ks),(iv),(n))
234 #define des_ecb2_encrypt(i,o,k1,k2,e) \
235 des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
237 #define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
238 des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
240 #define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
241 des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
243 #define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
244 des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
246 #define des_check_key DES_check_key
247 #define des_rw_mode DES_rw_mode
248 #else /* libdes compatibility */
249 /* Map all symbol names to _ossl_old_des_* form, so we avoid all
250 clashes with libdes */
251 #define des_cblock _ossl_old_des_cblock
252 #define des_key_schedule _ossl_old_des_key_schedule
253 #define des_ecb3_encrypt(i,o,k1,k2,k3,e)\
254 _ossl_old_des_ecb3_encrypt((i),(o),(k1),(k2),(k3),(e))
255 #define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\
256 _ossl_old_des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(e))
257 #define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\
258 _ossl_old_des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n),(e))
259 #define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\
260 _ossl_old_des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n))
261 #define des_options()\
262 _ossl_old_des_options()
263 #define des_cbc_cksum(i,o,l,k,iv)\
264 _ossl_old_des_cbc_cksum((i),(o),(l),(k),(iv))
265 #define des_cbc_encrypt(i,o,l,k,iv,e)\
266 _ossl_old_des_cbc_encrypt((i),(o),(l),(k),(iv),(e))
267 #define des_ncbc_encrypt(i,o,l,k,iv,e)\
268 _ossl_old_des_ncbc_encrypt((i),(o),(l),(k),(iv),(e))
269 #define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\
270 _ossl_old_des_xcbc_encrypt((i),(o),(l),(k),(iv),(inw),(outw),(e))
271 #define des_cfb_encrypt(i,o,n,l,k,iv,e)\
272 _ossl_old_des_cfb_encrypt((i),(o),(n),(l),(k),(iv),(e))
273 #define des_ecb_encrypt(i,o,k,e)\
274 _ossl_old_des_ecb_encrypt((i),(o),(k),(e))
275 #define des_encrypt(d,k,e)\
276 _ossl_old_des_encrypt((d),(k),(e))
277 #define des_encrypt2(d,k,e)\
278 _ossl_old_des_encrypt2((d),(k),(e))
279 #define des_encrypt3(d,k1,k2,k3)\
280 _ossl_old_des_encrypt3((d),(k1),(k2),(k3))
281 #define des_decrypt3(d,k1,k2,k3)\
282 _ossl_old_des_decrypt3((d),(k1),(k2),(k3))
283 #define des_xwhite_in2out(k,i,o)\
284 _ossl_old_des_xwhite_in2out((k),(i),(o))
285 #define des_enc_read(f,b,l,k,iv)\
286 _ossl_old_des_enc_read((f),(b),(l),(k),(iv))
287 #define des_enc_write(f,b,l,k,iv)\
288 _ossl_old_des_enc_write((f),(b),(l),(k),(iv))
289 #define des_fcrypt(b,s,r)\
290 _ossl_old_des_fcrypt((b),(s),(r))
291 #define des_crypt(b,s)\
292 _ossl_old_des_crypt((b),(s))
295 _ossl_old_crypt((b),(s))
297 #define des_ofb_encrypt(i,o,n,l,k,iv)\
298 _ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv))
299 #define des_pcbc_encrypt(i,o,l,k,iv,e)\
300 _ossl_old_des_pcbc_encrypt((i),(o),(l),(k),(iv),(e))
301 #define des_quad_cksum(i,o,l,c,s)\
302 _ossl_old_des_quad_cksum((i),(o),(l),(c),(s))
303 #define des_random_seed(k)\
304 _ossl_old_des_random_seed((k))
305 #define des_random_key(r)\
306 _ossl_old_des_random_key((r))
307 #define des_read_password(k,p,v) \
308 _ossl_old_des_read_password((k),(p),(v))
309 #define des_read_2passwords(k1,k2,p,v) \
310 _ossl_old_des_read_2passwords((k1),(k2),(p),(v))
311 #define des_set_odd_parity(k)\
312 _ossl_old_des_set_odd_parity((k))
313 #define des_is_weak_key(k)\
314 _ossl_old_des_is_weak_key((k))
315 #define des_set_key(k,ks)\
316 _ossl_old_des_set_key((k),(ks))
317 #define des_key_sched(k,ks)\
318 _ossl_old_des_key_sched((k),(ks))
319 #define des_string_to_key(s,k)\
320 _ossl_old_des_string_to_key((s),(k))
321 #define des_string_to_2keys(s,k1,k2)\
322 _ossl_old_des_string_to_2keys((s),(k1),(k2))
323 #define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\
324 _ossl_old_des_cfb64_encrypt((i),(o),(l),(ks),(iv),(n),(e))
325 #define des_ofb64_encrypt(i,o,l,ks,iv,n)\
326 _ossl_old_des_ofb64_encrypt((i),(o),(l),(ks),(iv),(n))
329 #define des_ecb2_encrypt(i,o,k1,k2,e) \
330 des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
332 #define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
333 des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
335 #define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
336 des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
338 #define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
339 des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
341 #define des_check_key DES_check_key
342 #define des_rw_mode DES_rw_mode
345 IMPORT_C const char *_ossl_old_des_options(void);
346 IMPORT_C void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,
347 _ossl_old_des_key_schedule ks1,_ossl_old_des_key_schedule ks2,
348 _ossl_old_des_key_schedule ks3, int enc);
349 IMPORT_C DES_LONG _ossl_old_des_cbc_cksum(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,
350 long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec);
351 IMPORT_C void _ossl_old_des_cbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length,
352 _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc);
353 IMPORT_C void _ossl_old_des_ncbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length,
354 _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc);
355 IMPORT_C void _ossl_old_des_xcbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length,
356 _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,
357 _ossl_old_des_cblock *inw,_ossl_old_des_cblock *outw,int enc);
358 IMPORT_C void _ossl_old_des_cfb_encrypt(unsigned char *in,unsigned char *out,int numbits,
359 long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc);
360 IMPORT_C void _ossl_old_des_ecb_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,
361 _ossl_old_des_key_schedule ks,int enc);
362 IMPORT_C void _ossl_old_des_encrypt(DES_LONG *data,_ossl_old_des_key_schedule ks, int enc);
363 IMPORT_C void _ossl_old_des_encrypt2(DES_LONG *data,_ossl_old_des_key_schedule ks, int enc);
364 IMPORT_C void _ossl_old_des_encrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,
365 _ossl_old_des_key_schedule ks2, _ossl_old_des_key_schedule ks3);
366 IMPORT_C void _ossl_old_des_decrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,
367 _ossl_old_des_key_schedule ks2, _ossl_old_des_key_schedule ks3);
368 IMPORT_C void _ossl_old_des_ede3_cbc_encrypt(_ossl_old_des_cblock *input, _ossl_old_des_cblock *output,
369 long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2,
370 _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int enc);
371 IMPORT_C void _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out,
372 long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2,
373 _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int *num, int enc);
374 IMPORT_C void _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out,
375 long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2,
376 _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int *num);
378 IMPORT_C void _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key), _ossl_old_des_cblock (*in_white),
379 _ossl_old_des_cblock (*out_white));
381 IMPORT_C int _ossl_old_des_enc_read(int fd,char *buf,int len,_ossl_old_des_key_schedule sched,
382 _ossl_old_des_cblock *iv);
383 IMPORT_C int _ossl_old_des_enc_write(int fd,char *buf,int len,_ossl_old_des_key_schedule sched,
384 _ossl_old_des_cblock *iv);
385 IMPORT_C char *_ossl_old_des_fcrypt(const char *buf,const char *salt, char *ret);
386 IMPORT_C char *_ossl_old_des_crypt(const char *buf,const char *salt);
387 #if !defined(PERL5) && !defined(NeXT)
388 IMPORT_C char *_ossl_old_crypt(const char *buf,const char *salt);
390 IMPORT_C void _ossl_old_des_ofb_encrypt(unsigned char *in,unsigned char *out,
391 int numbits,long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec);
392 IMPORT_C void _ossl_old_des_pcbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length,
393 _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc);
394 IMPORT_C DES_LONG _ossl_old_des_quad_cksum(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,
395 long length,int out_count,_ossl_old_des_cblock *seed);
396 IMPORT_C void _ossl_old_des_random_seed(_ossl_old_des_cblock key);
397 IMPORT_C void _ossl_old_des_random_key(_ossl_old_des_cblock ret);
398 IMPORT_C int _ossl_old_des_read_password(_ossl_old_des_cblock *key,const char *prompt,int verify);
399 IMPORT_C int _ossl_old_des_read_2passwords(_ossl_old_des_cblock *key1,_ossl_old_des_cblock *key2,
400 const char *prompt,int verify);
401 IMPORT_C void _ossl_old_des_set_odd_parity(_ossl_old_des_cblock *key);
402 IMPORT_C int _ossl_old_des_is_weak_key(_ossl_old_des_cblock *key);
403 IMPORT_C int _ossl_old_des_set_key(_ossl_old_des_cblock *key,_ossl_old_des_key_schedule schedule);
404 IMPORT_C int _ossl_old_des_key_sched(_ossl_old_des_cblock *key,_ossl_old_des_key_schedule schedule);
405 IMPORT_C void _ossl_old_des_string_to_key(char *str,_ossl_old_des_cblock *key);
406 IMPORT_C void _ossl_old_des_string_to_2keys(char *str,_ossl_old_des_cblock *key1,_ossl_old_des_cblock *key2);
407 IMPORT_C void _ossl_old_des_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
408 _ossl_old_des_key_schedule schedule, _ossl_old_des_cblock *ivec, int *num, int enc);
409 IMPORT_C void _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
410 _ossl_old_des_key_schedule schedule, _ossl_old_des_cblock *ivec, int *num);
412 IMPORT_C void _ossl_096_des_random_seed(des_cblock *key);
414 /* The following definitions provide compatibility with the MIT Kerberos
415 * library. The _ossl_old_des_key_schedule structure is not binary compatible. */
417 #define _KERBEROS_DES_H
419 #define KRBDES_ENCRYPT DES_ENCRYPT
420 #define KRBDES_DECRYPT DES_DECRYPT
423 # define ENCRYPT DES_ENCRYPT
424 # define DECRYPT DES_DECRYPT
428 # define C_Block des_cblock
429 # define Key_schedule des_key_schedule
430 # define KEY_SZ DES_KEY_SZ
431 # define string_to_key des_string_to_key
432 # define read_pw_string des_read_pw_string
433 # define random_key des_random_key
434 # define pcbc_encrypt des_pcbc_encrypt
435 # define set_key des_set_key
436 # define key_sched des_key_sched
437 # define ecb_encrypt des_ecb_encrypt
438 # define cbc_encrypt des_cbc_encrypt
439 # define ncbc_encrypt des_ncbc_encrypt
440 # define xcbc_encrypt des_xcbc_encrypt
441 # define cbc_cksum des_cbc_cksum
442 # define quad_cksum des_quad_cksum
443 # define check_parity des_check_key_parity
446 #define des_fixup_key_parity DES_fixup_key_parity
452 /* for DES_read_pw_string et al */
453 #include <openssl/ui_compat.h>