From 2c91f4b8b27c6f8e1a1a76559851317a37939a7c Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Wed, 7 Jun 2023 19:59:05 +0100 Subject: [PATCH] Fix for big-endian architectures Signed-off-by: Dave Rodgman --- library/sha3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/sha3.c b/library/sha3.c index 7151094452..4b97a85c5f 100644 --- a/library/sha3.c +++ b/library/sha3.c @@ -236,7 +236,7 @@ int mbedtls_sha3_update(mbedtls_sha3_context *ctx, // process input in 8-byte chunks while (ilen >= 8) { - ABSORB(ctx, ctx->index, mbedtls_get_unaligned_uint64(input)); + ABSORB(ctx, ctx->index, MBEDTLS_GET_UINT64_LE(input, 0)); input += 8; ilen -= 8; if ((ctx->index = (ctx->index + 8) % ctx->max_block_size) == 0) {