comparison common-algo.c @ 679:03073a27abb3 sha2

- Add hmac-sha2-256 and hmac-sha2-512. Needs debugging, seems to be getting keyed incorrectly
author Matt Johnston <matt@ucc.asn.au>
date Thu, 10 May 2012 08:38:37 +0800
parents 2895626d864f
children a4b7627b3157
comparison
equal deleted inserted replaced
678:6e0899b56ac4 679:03073a27abb3
104 #endif 104 #endif
105 #ifdef DROPBEAR_SHA1_96_HMAC 105 #ifdef DROPBEAR_SHA1_96_HMAC
106 static const struct dropbear_hash dropbear_sha1_96 = 106 static const struct dropbear_hash dropbear_sha1_96 =
107 {&sha1_desc, 20, 12}; 107 {&sha1_desc, 20, 12};
108 #endif 108 #endif
109 #ifdef DROPBEAR_SHA2_256_HMAC
110 static const struct dropbear_hash dropbear_sha2_256 =
111 {&sha256_desc, 32, 32};
112 #endif
113 #ifdef DROPBEAR_SHA2_512_HMAC
114 static const struct dropbear_hash dropbear_sha2_512 =
115 {&sha512_desc, 64, 64};
116 #endif
109 #ifdef DROPBEAR_MD5_HMAC 117 #ifdef DROPBEAR_MD5_HMAC
110 static const struct dropbear_hash dropbear_md5 = 118 static const struct dropbear_hash dropbear_md5 =
111 {&md5_desc, 16, 16}; 119 {&md5_desc, 16, 16};
112 #endif 120 #endif
113 121
154 #endif 162 #endif
155 {NULL, 0, NULL, 0, NULL} 163 {NULL, 0, NULL, 0, NULL}
156 }; 164 };
157 165
158 algo_type sshhashes[] = { 166 algo_type sshhashes[] = {
167 #ifdef DROPBEAR_SHA2_256_HMAC
168 // {"hmac-sha2-256", 0, &dropbear_sha2_256, 1, NULL},
169 #endif
170 #ifdef DROPBEAR_SHA2_512_HMAC
171 // {"hmac-sha2-512", 0, &dropbear_sha2_512, 1, NULL},
172 #endif
159 #ifdef DROPBEAR_SHA1_96_HMAC 173 #ifdef DROPBEAR_SHA1_96_HMAC
160 {"hmac-sha1-96", 0, &dropbear_sha1_96, 1, NULL}, 174 {"hmac-sha1-96", 0, &dropbear_sha1_96, 1, NULL},
161 #endif 175 #endif
162 #ifdef DROPBEAR_SHA1_HMAC 176 #ifdef DROPBEAR_SHA1_HMAC
163 {"hmac-sha1", 0, &dropbear_sha1, 1, NULL}, 177 {"hmac-sha1", 0, &dropbear_sha1, 1, NULL},