From: John Gilmore Date: Thu, 26 Jan 1995 04:11:47 +0000 (+0000) Subject: * Makefile.in (CFLAGS): Add -I../des to pull in DES header file. X-Git-Tag: krb5-1.0-beta5~806 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84c0ad2a511865c669768c5734be850d82d56354;p=krb5.git * 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 --- diff --git a/src/lib/crypto/md4/ChangeLog b/src/lib/crypto/md4/ChangeLog index 1b71d8d86..c07b296d4 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 625fab524..40c0c8bd6 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 50eb1618a..4c46afd63 100644 --- a/src/lib/crypto/md4/md4.c +++ b/src/lib/crypto/md4/md4.c @@ -35,8 +35,8 @@ ********************************************************************** */ -#include -#include +#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 ccbaf2729..e6ced5fe8 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 -#include -#include - -#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 7fded0b23..1d80eca48 100644 --- a/src/lib/crypto/md4/md4driver.c +++ b/src/lib/crypto/md4/md4driver.c @@ -25,12 +25,8 @@ ********************************************************************** */ -#include -#include -#include -#include -#include -#include +#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 d9449f9de..03784351f 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 -#include -#include +#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 000000000..a8880b4f9 --- /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 +#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 +#include + +/* 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__ */