*** empty log message ***
authorJohn Kohl <jtkohl@mit.edu>
Tue, 21 Nov 1989 16:11:29 +0000 (16:11 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Tue, 21 Nov 1989 16:11:29 +0000 (16:11 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@26 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/base-defs.h [new file with mode: 0644]
src/include/krb5/crc-32.h [new file with mode: 0644]
src/include/krb5/encryption.h [new file with mode: 0644]
src/include/krb5/hostaddr.h [new file with mode: 0644]
src/include/krb5/krb5.h [new file with mode: 0644]
src/include/krb5/mit-des.h [new file with mode: 0644]

diff --git a/src/include/krb5/base-defs.h b/src/include/krb5/base-defs.h
new file mode 100644 (file)
index 0000000..1556452
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * <<< Description >>>
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __KRB5_TYPEDEFS__
+#define __KRB5_TYPEDEFS__
+
+#include <krb5/wordsize.h>
+
+typedef octet          krb5_ui_1;
+typedef int16          krb5_ui_2;
+typedef int32          krb5_ui_4;
+
+typedef int32          krb5_timestamp;
+typedef krb5_ui_2      confounder;
+typedef        octet           krb5_msgtype;
+typedef        octet           krb5_kvno;
+typedef        int32           krb5_flags;
+
+typedef        krb5_ui_2       krb5_addr_type;
+typedef krb5_ui_2      krb5_keytype;
+typedef krb5_ui_2      krb5_enctype;
+typedef krb5_ui_2      krb5_cksumtype;
+
+#endif /* __KRB5_TYPEDEFS__ */
diff --git a/src/include/krb5/crc-32.h b/src/include/krb5/crc-32.h
new file mode 100644 (file)
index 0000000..9b72b05
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * Definitions for the CRC-32 checksum
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __KRB5_CRC32__
+#define __KRB5_CRC32__
+
+#define CRC32_CKSUMTYPE        1
+
+#endif /* __KRB5_CRC32__ */
diff --git a/src/include/krb5/encryption.h b/src/include/krb5/encryption.h
new file mode 100644 (file)
index 0000000..b976926
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * Encryption interface-related declarations
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __KRB5_ENCRYPTION__
+#define __KRB5_ENCRYPTION__
+
+typedef struct _krb5_keyblock {
+    krb5_keytype keytype;
+    int length;
+    octet contents[1];                 /* actually can be more, depending
+                                          on length */
+} krb5_keyblock;
+
+/* could be used in a table to find an etype and initialize a block */
+typedef struct _krb5_cryptosystem_entry {
+    int (*encrypt_func)(/* void *in, void *out, krb5_keyblock *key,
+                          void *private */);
+    int (*decrypt_func)(/* void *in, void *out, krb5_keyblock *key,
+                          void *private */);
+    int (*process_key)(/* krb5_encrypt_block *block, krb5_keyblock *key */);
+    int block_length;
+    int pad_minimum;                   /* needed for cksum size computation */
+    int keysize;
+} krb5_cryptosystem_entry;
+
+typedef struct _krb5_encrypt_block {
+    krb5_cryptosystem_entry crypto_entry;
+    krb5_keyblock key;
+    void *private;                     /* for private use, e.g. DES
+                                          key schedules */
+} krb5_encrypt_block;
+
+#define efunc crypto_entry.encrypt_func
+#define dfunc crypto_entry.decrypt_func
+#define prkey crypto_entry.process_key
+#define blength crypto_entry.block_length
+#define padmin crypto_entry.pad_minimum
+#define ksize crypto_entry.keysize
+
+/* per Kerberos v5 protocol spec */
+#define        KEYTYPE_NULL            0x0000
+#define KEYTYPE_DES            0x0001  /* Data Encryption Standard,
+                                          FIPS 46,81 */
+#define KEYTYPE_LUCIFER                0x0002  /* Lucifer */
+
+#define        ETYPE_NULL              0x0000
+#define        ETYPE_DES_CBC_CRC       0x0001  /* DES cbc mode with CRC-32 */
+#define        ETYPE_LUCIFER_CRC       0x0002
+
+#define        CKSUMTYPE_CRC32         0x0001
+#define        CKSUMTYPE_XXX           0x0002
+#define        CKSUMTYPE_XEROX         0x0003
+#define        CKSUMTYPE_DESCBC        0x0004
+
+/* macros to determine if a type is a local type */
+#define KEYTYPE_IS_LOCAL(keytype) (keytype & 0x8000)
+#define ETYPE_IS_LOCAL(etype) (etype & 0x8000)
+#define CKSUMTYPE_IS_LOCAL(cksumtype) (cksumtype & 0x8000)
+
+#endif /* __KRB5_ENCRYPTION__ */
diff --git a/src/include/krb5/hostaddr.h b/src/include/krb5/hostaddr.h
new file mode 100644 (file)
index 0000000..4ea4cce
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * hostaddr definitions for Kerberos version 5.
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __KRB_HOSTADDR__
+#define __KRB_HOSTADDR__
+
+/* structure for address */
+typedef struct _krb5_address {
+    krb5_addrtype addrtype;
+    int length;
+    octet contents[1];                 /* actually can be more, depending
+                                          on length */
+} krb5_address;
+
+/* per Kerberos v5 protocol spec */
+#define        ADDRTYPE_INET   0x0002
+#define        ADDRTYPE_CHAOS  0x0005
+#define        ADDRTYPE_XNS    0x0006
+#define        ADDRTYPE_ISO    0x0007
+#define ADDRTYPE_DDP   0x0010
+
+/* macros to determine if a type is a local type */
+#define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000)
+
+#endif /* __KRB_HOSTADDR__ */
+
diff --git a/src/include/krb5/krb5.h b/src/include/krb5/krb5.h
new file mode 100644 (file)
index 0000000..aacf802
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * General definitions for Kerberos version 5.
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __KRB_GENERAL__
+#define __KRB_GENERAL__
+
+#include <krb5/base-defs.h>
+#include <krb5/hostaddr.h>
+#include <krb5/encryption.h>
+#include <krb5/fieldbits.h>
+
+#endif /* __KRB_GENERAL__ */
diff --git a/src/include/krb5/mit-des.h b/src/include/krb5/mit-des.h
new file mode 100644 (file)
index 0000000..9ead12f
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * $Source$
+ * $Author$
+ * $Id$
+ *
+ * Copyright 1989 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * MIT Data Encryption Standard software implementation declarations.
+ */
+
+#include <krb5/mit-copyright.h>
+
+#ifndef __MIT_DES__
+#define __MIT_DES__
+
+typedef octet des_cblock[8];   /* crypto-block size */
+
+/* Key schedule--used internally by DES routines to gain some speed */
+typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16];
+
+#define DES_KEY_SZ     (8*sizeof(octet))
+
+/* the first byte of the key is already in the keyblock */
+#define DES_KEYBLOCK_SZ        (sizeof(krb5_keyblock)+sizeof(des_cblock)-sizeof(octet))
+
+#define DES_ENCRYPT    1
+#define DES_DECRYPT    0
+
+#endif /* __MIT_DES__ */