diff --git a/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c b/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c index 4983a172..1eca36f7 100644 --- a/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +++ b/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c @@ -219,6 +219,7 @@ crypto_stream(unsigned char *out, unsigned long long outlen, const unsigned char *n, const unsigned char *k) { unsigned char d[crypto_stream_BEFORENMBYTES]; + crypto_stream_beforenm(d, k); crypto_stream_afternm(out, outlen, n, d); diff --git a/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h b/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h index 6dafedbe..23f2aeef 100644 --- a/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +++ b/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h @@ -12,7 +12,7 @@ typedef uint32_t u32; #define Nb 4 #pragma pack(push, 1) -__attribute__((aligned(64))) typedef struct ECRYPT_ctx +typedef struct ECRYPT_ctx { u32 round_key[Nr+1][4]; u32 counter[4];