summaryrefslogtreecommitdiff
path: root/cipher/cipher-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/cipher-internal.h')
-rw-r--r--cipher/cipher-internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cipher/cipher-internal.h b/cipher/cipher-internal.h
index 7da9c680..b4d0ff9d 100644
--- a/cipher/cipher-internal.h
+++ b/cipher/cipher-internal.h
@@ -129,7 +129,14 @@ struct gcry_cipher_handle
int unused; /* Number of unused bytes in LASTIV. */
unsigned char length[MAX_BLOCKSIZE]; /* bit counters for GCM */
#ifdef GCM_USE_TABLES
- unsigned char gcm_table[16 * 16]; /* pre-calculated table for GCM */
+ #if defined(HAVE_U64_TYPEDEF) && \
+ (SIZEOF_UNSIGNED_LONG == 8 || defined(__x86_64__))
+ #define GCM_TABLES_USE_U64 1
+ u64 gcm_table[2 * 16]; /* pre-calculated table for GCM */
+ #else
+ #undef GCM_TABLES_USE_U64
+ u32 gcm_table[4 * 16]; /* pre-calculated table for GCM */
+ #endif
#endif
union {