From 36beac7f7077ed94d3c1c0f46733b4f54a3b05b1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 20 Feb 2022 11:24:18 +0100 Subject: Add more tests for BLAKE2b and BLAKE2s and update init functions (breaks API; were broken for keyed mode with zero-length message) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libblake_blake2b_init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libblake_blake2b_init.c') diff --git a/libblake_blake2b_init.c b/libblake_blake2b_init.c index cf5f35f..9670bc3 100644 --- a/libblake_blake2b_init.c +++ b/libblake_blake2b_init.c @@ -21,7 +21,7 @@ le64(uint_least64_t h) #endif void -libblake_blake2b_init(struct libblake_blake2b_state *state, const struct libblake_blake2b_params *params, const unsigned char *key) +libblake_blake2b_init(struct libblake_blake2b_state *state, const struct libblake_blake2b_params *params) { state->h[0] = UINT_LEAST64_C(0x6A09E667F3BCC908); state->h[1] = UINT_LEAST64_C(0xBB67AE8584CAA73B); @@ -95,9 +95,4 @@ libblake_blake2b_init(struct libblake_blake2b_state *state, const struct libblak state->h[7] ^= ((uint_least64_t)params->pepper[E] & 255) << 48; state->h[7] ^= ((uint_least64_t)params->pepper[F] & 255) << 56; } - - if (params->key_len) { - state->t[0] = 128; - libblake_internal_blake2b_compress(state, key); - } } -- cgit v1.2.3-70-g09d2