3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 22:19:23 +01:00

crypto: add hmac_sha384

To support OWE group 20, which uses HMAC-SHA384 for hashing the PMK
This commit is contained in:
James Prestwood 2019-01-14 12:54:26 -08:00 committed by Denis Kenzior
parent 8e7da821f9
commit 37cfec01a2
2 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,13 @@ bool hmac_sha256(const void *key, size_t key_len,
output, size); output, size);
} }
bool hmac_sha384(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size)
{
return hmac_common(L_CHECKSUM_SHA384, key, key_len, data, data_len,
output, size);
}
bool cmac_aes(const void *key, size_t key_len, bool cmac_aes(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size) const void *data, size_t data_len, void *output, size_t size)
{ {

View File

@ -71,6 +71,8 @@ bool hmac_sha1(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size); const void *data, size_t data_len, void *output, size_t size);
bool hmac_sha256(const void *key, size_t key_len, bool hmac_sha256(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size); const void *data, size_t data_len, void *output, size_t size);
bool hmac_sha384(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size);
bool cmac_aes(const void *key, size_t key_len, bool cmac_aes(const void *key, size_t key_len,
const void *data, size_t data_len, void *output, size_t size); const void *data, size_t data_len, void *output, size_t size);