From c62e53807f6e7cf49544cbd7103929282a628311 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 10 May 2012 08:38:37 +0800 Subject: - Add hmac-sha2-256 and hmac-sha2-512. Needs debugging, seems to be getting keyed incorrectly --HG-- branch : sha2 --- common-algo.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common-algo.c') diff --git a/common-algo.c b/common-algo.c index acc3964..e65bd18 100644 --- a/common-algo.c +++ b/common-algo.c @@ -106,6 +106,14 @@ static const struct dropbear_hash dropbear_sha1 = static const struct dropbear_hash dropbear_sha1_96 = {&sha1_desc, 20, 12}; #endif +#ifdef DROPBEAR_SHA2_256_HMAC +static const struct dropbear_hash dropbear_sha2_256 = + {&sha256_desc, 32, 32}; +#endif +#ifdef DROPBEAR_SHA2_512_HMAC +static const struct dropbear_hash dropbear_sha2_512 = + {&sha512_desc, 64, 64}; +#endif #ifdef DROPBEAR_MD5_HMAC static const struct dropbear_hash dropbear_md5 = {&md5_desc, 16, 16}; @@ -156,6 +164,12 @@ algo_type sshciphers[] = { }; algo_type sshhashes[] = { +#ifdef DROPBEAR_SHA2_256_HMAC +// {"hmac-sha2-256", 0, &dropbear_sha2_256, 1, NULL}, +#endif +#ifdef DROPBEAR_SHA2_512_HMAC +// {"hmac-sha2-512", 0, &dropbear_sha2_512, 1, NULL}, +#endif #ifdef DROPBEAR_SHA1_96_HMAC {"hmac-sha1-96", 0, &dropbear_sha1_96, 1, NULL}, #endif -- cgit v1.2.3