diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-20 11:24:18 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-20 11:24:18 +0100 |
commit | 36beac7f7077ed94d3c1c0f46733b4f54a3b05b1 (patch) | |
tree | 308c1a98b1060e23f8db657bec3f18dcdb3f9333 /libblake_blake2b_init.c | |
parent | Documentation (diff) | |
download | libblake-36beac7f7077ed94d3c1c0f46733b4f54a3b05b1.tar.gz libblake-36beac7f7077ed94d3c1c0f46733b4f54a3b05b1.tar.bz2 libblake-36beac7f7077ed94d3c1c0f46733b4f54a3b05b1.tar.xz |
Add more tests for BLAKE2b and BLAKE2s and update init functions (breaks API; were broken for keyed mode with zero-length message)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libblake_blake2b_init.c | 7 |
1 files changed, 1 insertions, 6 deletions
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); - } } |