Add support for untruncated HMAC-SHA-512

This commit is contained in:
Tobias Brunner
2013-05-08 15:02:39 +02:00
parent d8be7d38bf
commit 1f2a34d6d8
5 changed files with 13 additions and 1 deletions
@@ -141,6 +141,9 @@ hash_algorithm_t hasher_algorithm_from_integrity(integrity_algorithm_t alg,
case AUTH_HMAC_SHA2_384_384:
*length = 48;
break;
case AUTH_HMAC_SHA2_512_512:
*length = 64;
break;
default:
break;
}
@@ -163,6 +166,7 @@ hash_algorithm_t hasher_algorithm_from_integrity(integrity_algorithm_t alg,
case AUTH_HMAC_SHA2_384_384:
return HASH_SHA384;
case AUTH_HMAC_SHA2_512_256:
case AUTH_HMAC_SHA2_512_512:
return HASH_SHA512;
case AUTH_AES_CMAC_96:
case AUTH_AES_128_GMAC:
@@ -232,6 +236,8 @@ integrity_algorithm_t hasher_algorithm_to_integrity(hash_algorithm_t alg,
{
case 32:
return AUTH_HMAC_SHA2_512_256;
case 64:
return AUTH_HMAC_SHA2_512_512;
}
break;
case HASH_MD2:
+3 -1
View File
@@ -70,8 +70,10 @@ enum integrity_algorithm_t {
AUTH_HMAC_SHA2_256_256 = 1027,
/** SHA384 full length truncation variant, as used in TLS */
AUTH_HMAC_SHA2_384_384 = 1028,
/** SHA512 full length truncation variant */
AUTH_HMAC_SHA2_512_512 = 1029,
/** draft-kanno-ipsecme-camellia-xcbc, not yet assigned by IANA */
AUTH_CAMELLIA_XCBC_96 = 1029,
AUTH_CAMELLIA_XCBC_96 = 1030,
};
/**