From 04919d35d05f119fb573da9c2d6869188edba15c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 30 Dec 2025 00:56:50 +0100 Subject: [PATCH] ipcrypt-nd: correct soft implementation of tweak_expand --- src/libsodium/crypto_ipcrypt/ipcrypt_soft.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsodium/crypto_ipcrypt/ipcrypt_soft.c b/src/libsodium/crypto_ipcrypt/ipcrypt_soft.c index 6f12a792..d243434f 100644 --- a/src/libsodium/crypto_ipcrypt/ipcrypt_soft.c +++ b/src/libsodium/crypto_ipcrypt/ipcrypt_soft.c @@ -69,10 +69,10 @@ tweak_expand(const uint8_t tweak[8]) { aes_block_t out; - out.w0 = ((uint32_t) tweak[0]) | ((uint32_t) tweak[1] << 16); - out.w1 = ((uint32_t) tweak[2]) | ((uint32_t) tweak[3] << 16); - out.w2 = ((uint32_t) tweak[4]) | ((uint32_t) tweak[5] << 16); - out.w3 = ((uint32_t) tweak[6]) | ((uint32_t) tweak[7] << 16); + out.w0 = ((uint32_t) tweak[0]) | ((uint32_t) tweak[1] << 8); + out.w1 = ((uint32_t) tweak[2]) | ((uint32_t) tweak[3] << 8); + out.w2 = ((uint32_t) tweak[4]) | ((uint32_t) tweak[5] << 8); + out.w3 = ((uint32_t) tweak[6]) | ((uint32_t) tweak[7] << 8); return out; }