From 63b9c02f0c093d496edd2ebeb40e04b87813fea7 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 20 Oct 2015 17:48:35 +0200 Subject: [PATCH] Alignment --- src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 31f12da..9177252 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -507,7 +507,6 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen const unsigned char *npub, const crypto_aead_aes256gcm_state *ctx_) { - unsigned char H[16]; const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); const context *ctx = (const context *) ctx_; const __m128i *rkeys = ctx->rkeys; @@ -515,6 +514,7 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen unsigned long long i, j; unsigned long long adlen_rnd64 = adlen & ~63ULL; unsigned long long mlen_rnd128 = mlen & ~127ULL; + CRYPTO_ALIGN(16) unsigned char H[16]; CRYPTO_ALIGN(16) unsigned char n2[16]; CRYPTO_ALIGN(16) unsigned char T[16]; CRYPTO_ALIGN(16) unsigned char accum[16]; @@ -623,7 +623,6 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen const unsigned char *npub, const crypto_aead_aes256gcm_state *ctx_) { - unsigned char H[16]; const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); const context *ctx = (const context *) ctx_; const __m128i *rkeys = ctx->rkeys; @@ -632,6 +631,7 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen unsigned long long adlen_rnd64 = adlen & ~63ULL; unsigned long long mlen; unsigned long long mlen_rnd128; + CRYPTO_ALIGN(16) unsigned char H[16]; CRYPTO_ALIGN(16) unsigned char n2[16]; CRYPTO_ALIGN(16) unsigned char T[16]; CRYPTO_ALIGN(16) unsigned char accum[16];