From cb19577245324bbcda774adaec9c5307e2d9280a Mon Sep 17 00:00:00 2001 From: Samuel Neves Date: Tue, 11 Oct 2016 22:03:29 +0100 Subject: [PATCH] missing adjustments --- sse/blake2bp.c | 2 ++ sse/blake2sp.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sse/blake2bp.c b/sse/blake2bp.c index d73b603..489af81 100644 --- a/sse/blake2bp.c +++ b/sse/blake2bp.c @@ -36,6 +36,7 @@ static int blake2bp_init_leaf( blake2b_state *S, size_t outlen, size_t keylen, u P->depth = 2; P->leaf_length = 0; P->node_offset = offset; + P->xof_length = 0; P->node_depth = 0; P->inner_length = BLAKE2B_OUTBYTES; memset( P->reserved, 0, sizeof( P->reserved ) ); @@ -53,6 +54,7 @@ static int blake2bp_init_root( blake2b_state *S, size_t outlen, size_t keylen ) P->depth = 2; P->leaf_length = 0; P->node_offset = 0; + P->xof_length = 0; P->node_depth = 1; P->inner_length = BLAKE2B_OUTBYTES; memset( P->reserved, 0, sizeof( P->reserved ) ); diff --git a/sse/blake2sp.c b/sse/blake2sp.c index ed4a40f..00330d7 100644 --- a/sse/blake2sp.c +++ b/sse/blake2sp.c @@ -34,7 +34,8 @@ static int blake2sp_init_leaf( blake2s_state *S, size_t outlen, size_t keylen, u P->fanout = PARALLELISM_DEGREE; P->depth = 2; P->leaf_length = 0; - store48( P->node_offset, offset ); + P->node_offset = offset; + P->xof_length = 0; P->node_depth = 0; P->inner_length = BLAKE2S_OUTBYTES; memset( P->salt, 0, sizeof( P->salt ) ); @@ -50,7 +51,8 @@ static int blake2sp_init_root( blake2s_state *S, size_t outlen, size_t keylen ) P->fanout = PARALLELISM_DEGREE; P->depth = 2; P->leaf_length = 0; - store48( P->node_offset, 0ULL ); + P->node_offset = 0; + P->xof_length = 0; P->node_depth = 1; P->inner_length = BLAKE2S_OUTBYTES; memset( P->salt, 0, sizeof( P->salt ) );