This commit was manufactured by cvs2svn to create tag
[krb5.git] / src / lib / crypto / cksumtypes.c
1 /*
2  * Copyright (C) 1998 by the FundsXpress, INC.
3  * 
4  * All rights reserved.
5  * 
6  * Export of this software from the United States of America may require
7  * a specific license from the United States Government.  It is the
8  * responsibility of any person or organization contemplating export to
9  * obtain such a license before exporting.
10  * 
11  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
12  * distribute this software and its documentation for any purpose and
13  * without fee is hereby granted, provided that the above copyright
14  * notice appear in all copies and that both that copyright notice and
15  * this permission notice appear in supporting documentation, and that
16  * the name of FundsXpress. not be used in advertising or publicity pertaining
17  * to distribution of the software without specific, written prior
18  * permission.  FundsXpress makes no representations about the suitability of
19  * this software for any purpose.  It is provided "as is" without express
20  * or implied warranty.
21  * 
22  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
24  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25  */
26
27 #include "k5-int.h"
28 #include "hash_provider.h"
29 #include "keyhash_provider.h"
30 #include "cksumtypes.h"
31
32 const struct krb5_cksumtypes krb5_cksumtypes_list[] = {
33     { CKSUMTYPE_CRC32, KRB5_CKSUMFLAG_NOT_COLL_PROOF,
34       "crc32", "CRC-32",
35       0, NULL,
36       &krb5int_hash_crc32 },
37
38     { CKSUMTYPE_RSA_MD4, 0,
39       "md4", "RSA-MD4",
40       0, NULL,
41       &krb5int_hash_md4 },
42     { CKSUMTYPE_RSA_MD4_DES, 0,
43       "md4-des", "RSA-MD4 with DES cbc mode",
44       ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_md4des,
45       NULL },
46
47     { CKSUMTYPE_DESCBC, 0,
48       "des-cbc", "DES cbc mode",
49       ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_descbc,
50       NULL },
51
52     { CKSUMTYPE_RSA_MD5, 0,
53       "md5", "RSA-MD5",
54       0, NULL,
55       &krb5int_hash_md5 },
56     { CKSUMTYPE_RSA_MD5_DES, 0,
57       "md5-des", "RSA-MD5 with DES cbc mode",
58       ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_md5des,
59       NULL },
60
61     { CKSUMTYPE_NIST_SHA, 0,
62       "sha", "NIST-SHA",
63       0, NULL,
64       &krb5int_hash_sha1 },
65
66     { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE,
67       "hmac-sha1-des3", "HMAC-SHA1 DES3 key",
68       0, NULL,
69       &krb5int_hash_sha1 },
70     { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE,
71       "hmac-sha1-des3-kd", "HMAC-SHA1 DES3 key", /* alias */
72       0, NULL,
73       &krb5int_hash_sha1 },
74     { CKSUMTYPE_HMAC_MD5_ARCFOUR, 0,
75       "hmac-md5-rc4", "Microsoft HMAC MD5 (RC4 key)", 
76       ENCTYPE_ARCFOUR_HMAC, &krb5int_keyhash_hmac_md5,
77       NULL },
78     { CKSUMTYPE_HMAC_MD5_ARCFOUR, 0,
79       "hmac-md5-enc", "Microsoft HMAC MD5 (RC4 key)",  /*Heimdal alias*/
80       ENCTYPE_ARCFOUR_HMAC, &krb5int_keyhash_hmac_md5,
81       NULL },
82     { CKSUMTYPE_HMAC_MD5_ARCFOUR, 0,
83       "hmac-md5-earcfour", "Microsoft HMAC MD5 (RC4 key)",  /* alias*/
84       ENCTYPE_ARCFOUR_HMAC, &krb5int_keyhash_hmac_md5,
85       NULL },
86
87     { CKSUMTYPE_HMAC_SHA1_96_AES128, KRB5_CKSUMFLAG_DERIVE,
88       "hmac-sha1-96-aes128", "HMAC-SHA1 AES128 key",
89       0, NULL, 
90       &krb5int_hash_sha1, 12 },
91     { CKSUMTYPE_HMAC_SHA1_96_AES256, KRB5_CKSUMFLAG_DERIVE,
92       "hmac-sha1-96-aes256", "HMAC-SHA1 AES256 key",
93       0, NULL, 
94       &krb5int_hash_sha1, 12 },
95 };
96
97 const int krb5_cksumtypes_length =
98 sizeof(krb5_cksumtypes_list)/sizeof(struct krb5_cksumtypes);