summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/md4
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@toad.com>1995-01-26 04:11:47 +0000
committerJohn Gilmore <gnu@toad.com>1995-01-26 04:11:47 +0000
commit84c0ad2a511865c669768c5734be850d82d56354 (patch)
treeb1b742fddb4bf7e1a769eb509d788bd043e7be42 /src/lib/crypto/md4
parent701143b90db1f1eb684b3a6c881a862c2aa12d1f (diff)
downloadkrb5-84c0ad2a511865c669768c5734be850d82d56354.tar.gz
krb5-84c0ad2a511865c669768c5734be850d82d56354.tar.xz
krb5-84c0ad2a511865c669768c5734be850d82d56354.zip
* Makefile.in (CFLAGS): Add -I../des to pull in DES header file.
* rsa-md4.h: New include file, moved from include/krb5, since it's only used locally. * md4.c, md4crypto.c, md4driver.c, md4glue.c: Replace <.../...> includes with "..."s. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4849 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/md4')
-rw-r--r--src/lib/crypto/md4/ChangeLog8
-rw-r--r--src/lib/crypto/md4/Makefile.in2
-rw-r--r--src/lib/crypto/md4/md4.c4
-rw-r--r--src/lib/crypto/md4/md4crypto.c9
-rw-r--r--src/lib/crypto/md4/md4driver.c8
-rw-r--r--src/lib/crypto/md4/md4glue.c7
-rw-r--r--src/lib/crypto/md4/rsa-md4.h102
7 files changed, 120 insertions, 20 deletions
diff --git a/src/lib/crypto/md4/ChangeLog b/src/lib/crypto/md4/ChangeLog
index 1b71d8d868..c07b296d45 100644
--- a/src/lib/crypto/md4/ChangeLog
+++ b/src/lib/crypto/md4/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jan 25 20:08:47 1995 John Gilmore (gnu at toad.com)
+
+ * Makefile.in (CFLAGS): Add -I../des to pull in DES header file.
+ * rsa-md4.h: New include file, moved from include/krb5, since
+ it's only used locally.
+ * md4.c, md4crypto.c, md4driver.c, md4glue.c: Replace <.../...>
+ includes with "..."s.
+
Thu Oct 13 17:48:21 1994 Theodore Y. Ts'o (tytso@dcl)
* Makefile.in: Add support for the MDx test driver t_mddriver.
diff --git a/src/lib/crypto/md4/Makefile.in b/src/lib/crypto/md4/Makefile.in
index 625fab5242..40c0c8bd6d 100644
--- a/src/lib/crypto/md4/Makefile.in
+++ b/src/lib/crypto/md4/Makefile.in
@@ -1,4 +1,4 @@
-CFLAGS = $(CCOPTS) $(DEFS)
+CFLAGS = $(CCOPTS) $(DEFS) -I../des
LDFLAGS = -g
all:: $(OBJS) t_mddriver
diff --git a/src/lib/crypto/md4/md4.c b/src/lib/crypto/md4/md4.c
index 50eb1618ad..4c46afd63c 100644
--- a/src/lib/crypto/md4/md4.c
+++ b/src/lib/crypto/md4/md4.c
@@ -35,8 +35,8 @@
**********************************************************************
*/
-#include <krb5/krb5.h>
-#include <krb5/rsa-md4.h>
+#include "k5-int.h"
+#include "rsa-md4.h"
#ifdef __STDC__
#define UL(x) x##UL
diff --git a/src/lib/crypto/md4/md4crypto.c b/src/lib/crypto/md4/md4crypto.c
index ccbaf27295..e6ced5fe87 100644
--- a/src/lib/crypto/md4/md4crypto.c
+++ b/src/lib/crypto/md4/md4crypto.c
@@ -24,12 +24,9 @@
* Kerberos glue for MD4 sample implementation.
*/
-
-#include <krb5/krb5.h>
-#include <krb5/ext-proto.h>
-#include <krb5/rsa-md4.h>
-
-#include "../des/des_int.h" /* we cheat a bit and call it directly... */
+#include "k5-int.h"
+#include "rsa-md4.h"
+#include "des_int.h" /* we cheat a bit and call it directly... */
static krb5_error_code
md4_crypto_sum_func(in, in_length, seed, seed_length, outcksum)
diff --git a/src/lib/crypto/md4/md4driver.c b/src/lib/crypto/md4/md4driver.c
index 7fded0b233..1d80eca48a 100644
--- a/src/lib/crypto/md4/md4driver.c
+++ b/src/lib/crypto/md4/md4driver.c
@@ -25,12 +25,8 @@
**********************************************************************
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <time.h>
-#include <string.h>
-#include <krb5/krb5.h>
-#include <krb5/rsa-md4.h>
+#include "k5-int.h"
+#include "rsa-md4.h"
/* Prints message digest buffer in mdContext as 32 hexadecimal digits.
Order is from low-order byte to high-order byte of digest.
diff --git a/src/lib/crypto/md4/md4glue.c b/src/lib/crypto/md4/md4glue.c
index d9449f9de1..03784351fe 100644
--- a/src/lib/crypto/md4/md4glue.c
+++ b/src/lib/crypto/md4/md4glue.c
@@ -20,14 +20,11 @@
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
- *
* Kerberos glue for MD4 sample implementation.
*/
-
-#include <krb5/krb5.h>
-#include <krb5/ext-proto.h>
-#include <krb5/rsa-md4.h>
+#include "k5-int.h"
+#include "rsa-md4.h"
static krb5_error_code
md4_sum_func(in, in_length, seed, seed_length, outcksum)
diff --git a/src/lib/crypto/md4/rsa-md4.h b/src/lib/crypto/md4/rsa-md4.h
new file mode 100644
index 0000000000..a8880b4f9f
--- /dev/null
+++ b/src/lib/crypto/md4/rsa-md4.h
@@ -0,0 +1,102 @@
+/*
+ * lib/crypto/md4/rsa-md4.h
+ *
+ * Copyright 1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ *
+ * RSA MD4 header file, with Kerberos/STDC additions.
+ */
+
+#ifndef __KRB5_RSA_MD4_H__
+#define __KRB5_RSA_MD4_H__
+
+#ifdef unicos61
+#include <sys/types.h>
+#endif /* unicos61 */
+
+/* 16 u_char's in the digest */
+#define RSA_MD4_CKSUM_LENGTH 16
+/* des blocksize is 8, so this works nicely... */
+#define RSA_MD4_DES_CKSUM_LENGTH 16
+
+extern krb5_checksum_entry
+ rsa_md4_cksumtable_entry,
+ rsa_md4_des_cksumtable_entry;
+
+/*
+ **********************************************************************
+ ** md4.h -- Header file for implementation of MD4 **
+ ** RSA Data Security, Inc. MD4 Message Digest Algorithm **
+ ** Created: 2/17/90 RLR **
+ ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
+ **********************************************************************
+ */
+
+/*
+ **********************************************************************
+ ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
+ ** **
+ ** License to copy and use this software is granted provided that **
+ ** it is identified as the "RSA Data Security, Inc. MD4 Message **
+ ** Digest Algorithm" in all material mentioning or referencing this **
+ ** software or this function. **
+ ** **
+ ** License is also granted to make and use derivative works **
+ ** provided that such works are identified as "derived from the RSA **
+ ** Data Security, Inc. MD4 Message Digest Algorithm" in all **
+ ** material mentioning or referencing the derived work. **
+ ** **
+ ** RSA Data Security, Inc. makes no representations concerning **
+ ** either the merchantability of this software or the suitability **
+ ** of this software for any particular purpose. It is provided "as **
+ ** is" without express or implied warranty of any kind. **
+ ** **
+ ** These notices must be retained in any copies of any part of this **
+ ** documentation and/or software. **
+ **********************************************************************
+ */
+
+#include <krb5/config.h>
+#include <krb5/wordsize.h>
+
+/* Data structure for MD4 (Message Digest) computation */
+typedef struct {
+ krb5_ui_4 i[2]; /* number of _bits_ handled mod 2^64 */
+ krb5_ui_4 buf[4]; /* scratch buffer */
+ unsigned char in[64]; /* input buffer */
+ unsigned char digest[16]; /* actual digest after MD4Final call */
+} MD4_CTX;
+
+#ifdef __STDC__
+extern void MD4Init(MD4_CTX *);
+extern void MD4Update(MD4_CTX *, unsigned char *, unsigned int);
+extern void MD4Final(MD4_CTX *);
+#else
+void MD4Init ();
+void MD4Update ();
+void MD4Final ();
+#endif
+
+/*
+ **********************************************************************
+ ** End of md4.h **
+ ******************************* (cut) ********************************
+ */
+#endif /* __KRB5_RSA_MD4_H__ */