Closed LocutusOfBorg closed 6 years ago
This does absolutely look like an endianess failure, though it's hard to track where it happens. Investigating..
OK, tracked down the issue. This had already been fixed in the reference code, but somehow remained here:
diff --git a/src/blake2bp.c b/src/blake2bp.c
index a861c6d..414f46e 100644
--- a/src/blake2bp.c
+++ b/src/blake2bp.c
@@ -33,7 +33,7 @@ static int blake2bp_init_leaf( blake2b_state *S, uint8_t outlen, uint8_t keylen,
P->fanout = PARALLELISM_DEGREE;
P->depth = 2;
P->leaf_length = 0;
- P->node_offset = offset;
+ store64(&P->node_offset, offset);
P->node_depth = 0;
P->inner_length = BLAKE2B_OUTBYTES;
memset( P->reserved, 0, sizeof( P->reserved ) );
thanks!
this is on mips
and s390x
can you please help? seems some endianess issue