aboutsummaryrefslogtreecommitdiffstats
path: root/libblake_blake2s_init.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-20 11:24:18 +0100
committerMattias Andrée <maandree@kth.se>2022-02-20 11:24:18 +0100
commit36beac7f7077ed94d3c1c0f46733b4f54a3b05b1 (patch)
tree308c1a98b1060e23f8db657bec3f18dcdb3f9333 /libblake_blake2s_init.c
parentDocumentation (diff)
downloadlibblake-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_blake2s_init.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libblake_blake2s_init.c b/libblake_blake2s_init.c
index bafe010..6c04332 100644
--- a/libblake_blake2s_init.c
+++ b/libblake_blake2s_init.c
@@ -17,7 +17,7 @@ le32(uint_least32_t h)
#endif
void
-libblake_blake2s_init(struct libblake_blake2s_state *state, const struct libblake_blake2s_params *params, const unsigned char *key)
+libblake_blake2s_init(struct libblake_blake2s_state *state, const struct libblake_blake2s_params *params)
{
state->h[0] = UINT_LEAST32_C(0x6A09E667);
state->h[1] = UINT_LEAST32_C(0xBB67AE85);
@@ -78,9 +78,4 @@ libblake_blake2s_init(struct libblake_blake2s_state *state, const struct libblak
state->h[7] ^= ((uint_least32_t)params->pepper[6] & 255) << 16;
state->h[7] ^= ((uint_least32_t)params->pepper[7] & 255) << 24;
}
-
- if (params->key_len) {
- state->t[0] = 64;
- libblake_internal_blake2s_compress(state, key);
- }
}