4 * Copyright 1991 by the Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. M.I.T. makes no representations about the suitability of
20 * this software for any purpose. It is provided "as is" without express
21 * or implied warranty.
27 * Include file for the Data Encryption Standard library.
30 /* only do the whole thing once */
37 typedef mit_des_cblock des_cblock; /* crypto-block size */
40 typedef mit_des_key_schedule des_key_schedule;
42 #define DES_KEY_SZ (sizeof(des_cblock))
47 #define C_Block des_cblock
48 #define Key_schedule des_key_schedule
49 #define ENCRYPT DES_ENCRYPT
50 #define DECRYPT DES_DECRYPT
51 #define KEY_SZ DES_KEY_SZ
52 #define string_to_key des_string_to_key
53 #define read_pw_string des_read_pw_string
54 #define random_key des_random_key
55 #define pcbc_encrypt des_pcbc_encrypt
56 #define key_sched des_key_sched
57 #define cbc_encrypt des_cbc_encrypt
58 #define cbc_cksum des_cbc_cksum
59 #define C_Block_print des_cblock_print
60 #define quad_cksum des_quad_cksum
61 typedef struct des_ks_struct bit_64;
64 #define des_cblock_print(x) des_cblock_print_file(x, stdout)
67 * Windows needs everything prototyped because we're exporting all the fuctions.
70 int des_ecb_encrypt();
71 int des_cbc_encrypt();
72 void des_fixup_key_parity();
73 int des_check_key_parity();
75 int des_new_random_key();
76 void des_init_random_number_generator();
77 void des_set_random_generator_seed();
78 void des_set_sequence_number();
79 void des_generate_random_block();
80 int des_pcbc_encrypt();
81 unsigned long des_quad_cksum();
83 krb5_error_code des_read_password();
84 int des_string_to_key();
85 int des_is_weak_key();