1/*
2 * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3 * Use is subject to license terms.
4 */
5
6#pragma ident	"%Z%%M%	%I%	%E% SMI"
7
8/*
9 * lib/crypto/md4/rsa-md4.h
10 *
11 * Copyright 1991 by the Massachusetts Institute of Technology.
12 * All Rights Reserved.
13 *
14 * Export of this software from the United States of America may
15 *   require a specific license from the United States Government.
16 *   It is the responsibility of any person or organization contemplating
17 *   export to obtain such a license before exporting.
18 *
19 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
20 * distribute this software and its documentation for any purpose and
21 * without fee is hereby granted, provided that the above copyright
22 * notice appear in all copies and that both that copyright notice and
23 * this permission notice appear in supporting documentation, and that
24 * the name of M.I.T. not be used in advertising or publicity pertaining
25 * to distribution of the software without specific, written prior
26 * permission.  Furthermore if you modify this software you must label
27 * your software as modified software and not distribute it in such a
28 * fashion that it might be confused with the original M.I.T. software.
29 * M.I.T. makes no representations about the suitability of
30 * this software for any purpose.  It is provided "as is" without express
31 * or implied warranty.
32 *
33 *
34 * RSA MD4 header file, with Kerberos/STDC additions.
35 */
36
37#ifndef __KRB5_RSA_MD4_H__
38#define __KRB5_RSA_MD4_H__
39
40#ifdef unicos61
41#include <sys/types.h>
42#endif /* unicos61 */
43
44/* 16 u_char's in the digest */
45#define RSA_MD4_CKSUM_LENGTH	16
46/* des blocksize is 8, so this works nicely... */
47#define OLD_RSA_MD4_DES_CKSUM_LENGTH	16
48#define NEW_RSA_MD4_DES_CKSUM_LENGTH	24
49#define	RSA_MD4_DES_CONFOUND_LENGTH	8
50
51/*
52 **********************************************************************
53 ** md4.h -- Header file for implementation of MD4                   **
54 ** RSA Data Security, Inc. MD4 Message Digest Algorithm             **
55 ** Created: 2/17/90 RLR                                             **
56 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version              **
57 **********************************************************************
58 */
59
60/*
61 **********************************************************************
62 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
63 **                                                                  **
64 ** License to copy and use this software is granted provided that   **
65 ** it is identified as the "RSA Data Security, Inc. MD4 Message     **
66 ** Digest Algorithm" in all material mentioning or referencing this **
67 ** software or this function.                                       **
68 **                                                                  **
69 ** License is also granted to make and use derivative works         **
70 ** provided that such works are identified as "derived from the RSA **
71 ** Data Security, Inc. MD4 Message Digest Algorithm" in all         **
72 ** material mentioning or referencing the derived work.             **
73 **                                                                  **
74 ** RSA Data Security, Inc. makes no representations concerning      **
75 ** either the merchantability of this software or the suitability   **
76 ** of this software for any particular purpose.  It is provided "as **
77 ** is" without express or implied warranty of any kind.             **
78 **                                                                  **
79 ** These notices must be retained in any copies of any part of this **
80 ** documentation and/or software.                                   **
81 **********************************************************************
82 */
83
84/* Data structure for MD4 (Message Digest) computation */
85typedef struct {
86  krb5_ui_4 i[2];			/* number of _bits_ handled mod 2^64 */
87  krb5_ui_4 buf[4];			/* scratch buffer */
88  unsigned char in[64];			/* input buffer */
89  unsigned char digest[16];		/* actual digest after MD4Final call */
90} krb5_MD4_CTX;
91
92extern void krb5_MD4Init(krb5_MD4_CTX *);
93extern void krb5_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int);
94extern void krb5_MD4Final(krb5_MD4_CTX *);
95
96/*
97 **********************************************************************
98 ** End of md4.h                                                     **
99 ******************************* (cut) ********************************
100 */
101#endif /* __KRB5_RSA_MD4_H__ */
102