diff options
| author | Mark Eichin <eichin@mit.edu> | 1994-06-09 23:40:17 +0000 |
|---|---|---|
| committer | Mark Eichin <eichin@mit.edu> | 1994-06-09 23:40:17 +0000 |
| commit | feb556375a2a1676a40b1dc1961a02577f4c1276 (patch) | |
| tree | fc2b4b2358aa423c37295f17d521bd404d9abc57 /src/include | |
| parent | a58ac1b844b03d10ab35725dfe8eb5aeb15f8c74 (diff) | |
| download | krb5-feb556375a2a1676a40b1dc1961a02577f4c1276.tar.gz krb5-feb556375a2a1676a40b1dc1961a02577f4c1276.tar.xz krb5-feb556375a2a1676a40b1dc1961a02577f4c1276.zip | |
des.h for ferguson des
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3692 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/des.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/include/des.h b/src/include/des.h new file mode 100644 index 0000000000..4f3ad28a2f --- /dev/null +++ b/src/include/des.h @@ -0,0 +1,56 @@ +/* + * $Source$ + * $Author$ + * $Header$ + * + * Copyright 1987, 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <mit-copyright.h>. + * + * Include file for the Data Encryption Standard library. + */ + +/* only do the whole thing once */ +#ifndef DES_DEFS +#define DES_DEFS + +#include <kerberosIV/mit-copyright.h> +#include <krb5/osconf.h> + +#ifndef KRB_INT32 +#define KRB_INT32 long +#endif +#ifndef KRB_UINT32 +#define KRB_UINT32 unsigned KRB_INT32 +#endif + +typedef unsigned char des_cblock[8]; /* crypto-block size */ +/* Key schedule */ +typedef struct des_ks_struct { union { KRB_INT32 pad; des_cblock _;} __; } des_key_schedule[16]; + +#define DES_KEY_SZ (sizeof(des_cblock)) +#define DES_ENCRYPT 1 +#define DES_DECRYPT 0 + +#ifndef NCOMPAT +#define C_Block des_cblock +#define Key_schedule des_key_schedule +#define ENCRYPT DES_ENCRYPT +#define DECRYPT DES_DECRYPT +#define KEY_SZ DES_KEY_SZ +#define string_to_key des_string_to_key +#define read_pw_string des_read_pw_string +#define random_key des_random_key +#define pcbc_encrypt des_pcbc_encrypt +#define key_sched des_key_sched +#define cbc_encrypt des_cbc_encrypt +#define cbc_cksum des_cbc_cksum +#define C_Block_print des_cblock_print +#define quad_cksum des_quad_cksum +typedef struct des_ks_struct bit_64; +#endif + +#define des_cblock_print(x) des_cblock_print_file(x, stdout) + +#endif /* DES_DEFS */ |
