1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* 3 * Copyright (C) 1998 by the FundsXpress, INC. 4 * 5 * All rights reserved. 6 * 7 * Export of this software from the United States of America may require 8 * a specific license from the United States Government. It is the 9 * responsibility of any person or organization contemplating export to 10 * obtain such a license before exporting. 11 * 12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 13 * distribute this software and its documentation for any purpose and 14 * without fee is hereby granted, provided that the above copyright 15 * notice appear in all copies and that both that copyright notice and 16 * this permission notice appear in supporting documentation, and that 17 * the name of FundsXpress. not be used in advertising or publicity pertaining 18 * to distribution of the software without specific, written prior 19 * permission. FundsXpress makes no representations about the suitability of 20 * this software for any purpose. It is provided "as is" without express 21 * or implied warranty. 22 * 23 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 25 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26 */ 27 28 #include "crypto_int.h" 29 30 const struct krb5_cksumtypes krb5int_cksumtypes_list[] = { 31 { CKSUMTYPE_RSA_MD4, 32 "md4", { 0 }, "RSA-MD4", 33 NULL, &krb5int_hash_md4, 34 krb5int_unkeyed_checksum, NULL, 35 16, 16, CKSUM_UNKEYED }, 36 37 { CKSUMTYPE_RSA_MD5, 38 "md5", { 0 }, "RSA-MD5", 39 NULL, &krb5int_hash_md5, 40 krb5int_unkeyed_checksum, NULL, 41 16, 16, CKSUM_UNKEYED }, 42 43 { CKSUMTYPE_NIST_SHA, 44 "sha", { 0 }, "NIST-SHA", 45 NULL, &krb5int_hash_sha1, 46 krb5int_unkeyed_checksum, NULL, 47 20, 20, CKSUM_UNKEYED }, 48 49 { CKSUMTYPE_SHA1, 50 "sha", { 0 }, "SHA-1", 51 NULL, &krb5int_hash_sha1, 52 krb5int_unkeyed_checksum, NULL, 53 20, 20, CKSUM_UNKEYED }, 54 55 { CKSUMTYPE_HMAC_SHA1_DES3, 56 "hmac-sha1-des3", { "hmac-sha1-des3-kd" }, "HMAC-SHA1 DES3 key", 57 &krb5int_enc_des3, &krb5int_hash_sha1, 58 krb5int_dk_checksum, NULL, 59 20, 20, 0 }, 60 61 { CKSUMTYPE_HMAC_MD5_ARCFOUR, 62 "hmac-md5-rc4", { "hmac-md5-enc", "hmac-md5-earcfour" }, 63 "Microsoft HMAC MD5", 64 NULL, &krb5int_hash_md5, 65 krb5int_hmacmd5_checksum, NULL, 66 16, 16, 0 }, 67 68 { CKSUMTYPE_HMAC_SHA1_96_AES128, 69 "hmac-sha1-96-aes128", { 0 }, "HMAC-SHA1 AES128 key", 70 &krb5int_enc_aes128, &krb5int_hash_sha1, 71 krb5int_dk_checksum, NULL, 72 20, 12, 0 }, 73 74 { CKSUMTYPE_HMAC_SHA1_96_AES256, 75 "hmac-sha1-96-aes256", { 0 }, "HMAC-SHA1 AES256 key", 76 &krb5int_enc_aes256, &krb5int_hash_sha1, 77 krb5int_dk_checksum, NULL, 78 20, 12, 0 }, 79 80 { CKSUMTYPE_MD5_HMAC_ARCFOUR, 81 "md5-hmac-rc4", { 0 }, "Microsoft MD5 HMAC", 82 &krb5int_enc_arcfour, &krb5int_hash_md5, 83 krb5int_hmacmd5_checksum, NULL, 84 16, 16, 0 }, 85 86 { CKSUMTYPE_CMAC_CAMELLIA128, 87 "cmac-camellia128", { 0 }, "CMAC Camellia128 key", 88 &krb5int_enc_camellia128, NULL, 89 krb5int_dk_cmac_checksum, NULL, 90 16, 16, 0 }, 91 92 { CKSUMTYPE_CMAC_CAMELLIA256, 93 "cmac-camellia256", { 0 }, "CMAC Camellia256 key", 94 &krb5int_enc_camellia256, NULL, 95 krb5int_dk_cmac_checksum, NULL, 96 16, 16, 0 }, 97 98 { CKSUMTYPE_HMAC_SHA256_128_AES128, 99 "hmac-sha256-128-aes128", { 0 }, "HMAC-SHA256 AES128 key", 100 &krb5int_enc_aes128, &krb5int_hash_sha256, 101 krb5int_etm_checksum, NULL, 102 32, 16, 0 }, 103 104 { CKSUMTYPE_HMAC_SHA384_192_AES256, 105 "hmac-sha384-192-aes256", { 0 }, "HMAC-SHA384 AES256 key", 106 &krb5int_enc_aes256, &krb5int_hash_sha384, 107 krb5int_etm_checksum, NULL, 108 48, 24, 0 }, 109 }; 110 111 const size_t krb5int_cksumtypes_length = 112 sizeof(krb5int_cksumtypes_list) / sizeof(struct krb5_cksumtypes); 113