From ed1974ea83433eba7b2d95c5dcd9ac33cb847913 Mon Sep 17 00:00:00 2001 From: JP Aumasson Date: Sun, 12 Feb 2023 10:51:34 +0100 Subject: [PATCH] fix key length check --- neon/blake2xs.c | 2 +- power8/blake2xs.c | 2 +- sse/blake2xs.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neon/blake2xs.c b/neon/blake2xs.c index 625693e..4b208e2 100644 --- a/neon/blake2xs.c +++ b/neon/blake2xs.c @@ -33,7 +33,7 @@ int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, return -1; } - if (NULL != key && keylen > BLAKE2B_KEYBYTES) { + if (NULL != key && keylen > BLAKE2S_KEYBYTES) { return -1; } diff --git a/power8/blake2xs.c b/power8/blake2xs.c index 625693e..4b208e2 100644 --- a/power8/blake2xs.c +++ b/power8/blake2xs.c @@ -33,7 +33,7 @@ int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, return -1; } - if (NULL != key && keylen > BLAKE2B_KEYBYTES) { + if (NULL != key && keylen > BLAKE2S_KEYBYTES) { return -1; } diff --git a/sse/blake2xs.c b/sse/blake2xs.c index 625693e..4b208e2 100644 --- a/sse/blake2xs.c +++ b/sse/blake2xs.c @@ -33,7 +33,7 @@ int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, return -1; } - if (NULL != key && keylen > BLAKE2B_KEYBYTES) { + if (NULL != key && keylen > BLAKE2S_KEYBYTES) { return -1; }