Changeset View
Changeset View
Standalone View
Standalone View
cipher/cipher-internal.h
Context not available. | |||||
#endif | #endif | ||||
#endif /* GCM_USE_ARM_NEON */ | #endif /* GCM_USE_ARM_NEON */ | ||||
/* GCM_USE_PPC_VPMSUM indicates whether to compile GCM with PPC Power 8 polynomial multiplication instruction */ | |||||
#undef GCM_USE_PPC_VPMSUM | |||||
#if defined(GCM_USE_TABLES) | |||||
#if defined(ENABLE_PPC_CRYPTO_SUPPORT) && defined(__powerpc__) && \ | |||||
defined(HAVE_COMPATIBLE_CC_PPC_ALTIVEC) && \ | |||||
defined(HAVE_GCC_INLINE_ASM_PPC_ALTIVEC) && \ | |||||
__GNUC__ >= 4 | |||||
# define GCM_USE_PPC_VPMSUM 1 | |||||
# define NEED_16BYTE_ALIGNED_CONTEXT 1 /* this also aligns gcm_table */ | |||||
#endif | |||||
#endif /* GCM_USE_PPC_VPMSUM */ | |||||
typedef unsigned int (*ghash_fn_t) (gcry_cipher_hd_t c, byte *result, | typedef unsigned int (*ghash_fn_t) (gcry_cipher_hd_t c, byte *result, | ||||
const byte *buf, size_t nblocks); | const byte *buf, size_t nblocks); | ||||
Context not available. | |||||
unsigned char key[MAX_BLOCKSIZE]; | unsigned char key[MAX_BLOCKSIZE]; | ||||
} u_ghash_key; | } u_ghash_key; | ||||
/* GHASH implementation in use. */ | |||||
ghash_fn_t ghash_fn; | |||||
/* Pre-calculated table for GCM. */ | /* Pre-calculated table for GCM. */ | ||||
#ifdef GCM_USE_TABLES | #ifdef GCM_USE_TABLES | ||||
#if (SIZEOF_UNSIGNED_LONG == 8 || defined(__x86_64__)) | #if (SIZEOF_UNSIGNED_LONG == 8 || defined(__x86_64__)) | ||||
Context not available. | |||||
u32 gcm_table[8 * 16]; | u32 gcm_table[8 * 16]; | ||||
#endif | #endif | ||||
#endif | #endif | ||||
/* GHASH implementation in use. */ | |||||
ghash_fn_t ghash_fn; | |||||
} gcm; | } gcm; | ||||
/* Mode specific storage for OCB mode. */ | /* Mode specific storage for OCB mode. */ | ||||
Context not available. |