diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-07 18:53:37 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-07 18:53:37 +0200 |
commit | a1c641175df81c3d75610e269921414efc1e2927 (patch) | |
tree | e42958993fc6e763d643775ec1e3af41669a2c20 | |
parent | 3eb56adf2a2307368489fa8bc48f325e224da4e8 (diff) | |
download | gnutls-a1c641175df81c3d75610e269921414efc1e2927.tar.gz |
corrected AES-NI code.
-rw-r--r-- | lib/accelerated/intel/aes-x86.c | 3 | ||||
-rw-r--r-- | lib/accelerated/intel/aes-x86.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/accelerated/intel/aes-x86.c b/lib/accelerated/intel/aes-x86.c index 7a5ed64551..a45adaf682 100644 --- a/lib/accelerated/intel/aes-x86.c +++ b/lib/accelerated/intel/aes-x86.c @@ -40,9 +40,6 @@ struct aes_ctx uint8_t iv[16]; }; -#define ALIGN16(x) \ - ((void *)(((unsigned long)(x)+0x0f)&~(0x0f))) - static int aes_cipher_init (gnutls_cipher_algorithm_t algorithm, void **_ctx) { diff --git a/lib/accelerated/intel/aes-x86.h b/lib/accelerated/intel/aes-x86.h index 1fab36404f..9764af59a6 100644 --- a/lib/accelerated/intel/aes-x86.h +++ b/lib/accelerated/intel/aes-x86.h @@ -5,6 +5,9 @@ void register_x86_crypto (void); +#define ALIGN16(x) \ + ((void *)(((unsigned long)(x)+0x0f)&~(0x0f))) + #define AES_KEY_ALIGN_SIZE 4 #define AES_MAXNR 14 typedef struct @@ -13,6 +16,7 @@ typedef struct * on a 16-byte boundary. */ uint32_t rd_key[4 * (AES_MAXNR + 1)+AES_KEY_ALIGN_SIZE]; + uint32_t rounds; } AES_KEY; void aesni_ecb_encrypt (const unsigned char *in, unsigned char *out, |