Changeset View
Changeset View
Standalone View
Standalone View
cipher/rijndael-internal.h
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | |||||
# define USE_ARM_CE 1 | # define USE_ARM_CE 1 | ||||
# elif defined(__AARCH64EL__) \ | # elif defined(__AARCH64EL__) \ | ||||
&& defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) \ | && defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) \ | ||||
&& defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) | && defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) | ||||
# define USE_ARM_CE 1 | # define USE_ARM_CE 1 | ||||
# endif | # endif | ||||
#endif /* ENABLE_ARM_CRYPTO_SUPPORT */ | #endif /* ENABLE_ARM_CRYPTO_SUPPORT */ | ||||
#undef USE_PPC_ASM | |||||
#ifdef ENABLE_PPC_CRYPTO_SUPPORT | |||||
# if defined(__powerpc64__) || defined(__powerpc__) | |||||
# define USE_PPC_ASM 1 | |||||
# endif | |||||
#endif | |||||
struct RIJNDAEL_context_s; | struct RIJNDAEL_context_s; | ||||
typedef unsigned int (*rijndael_cryptfn_t)(const struct RIJNDAEL_context_s *ctx, | typedef unsigned int (*rijndael_cryptfn_t)(const struct RIJNDAEL_context_s *ctx, | ||||
unsigned char *bx, | unsigned char *bx, | ||||
const unsigned char *ax); | const unsigned char *ax); | ||||
typedef void (*rijndael_prefetchfn_t)(void); | typedef void (*rijndael_prefetchfn_t)(void); | ||||
/* Our context object. */ | /* Our context object. */ | ||||
Show All 34 Lines | #ifdef USE_AESNI | ||||
unsigned int use_avx2:1; /* AVX2 shall be used. */ | unsigned int use_avx2:1; /* AVX2 shall be used. */ | ||||
#endif /*USE_AESNI*/ | #endif /*USE_AESNI*/ | ||||
#ifdef USE_SSSE3 | #ifdef USE_SSSE3 | ||||
unsigned int use_ssse3:1; /* SSSE3 shall be used. */ | unsigned int use_ssse3:1; /* SSSE3 shall be used. */ | ||||
#endif /*USE_SSSE3*/ | #endif /*USE_SSSE3*/ | ||||
#ifdef USE_ARM_CE | #ifdef USE_ARM_CE | ||||
unsigned int use_arm_ce:1; /* ARMv8 CE shall be used. */ | unsigned int use_arm_ce:1; /* ARMv8 CE shall be used. */ | ||||
#endif /*USE_ARM_CE*/ | #endif /*USE_ARM_CE*/ | ||||
#ifdef USE_PPC_ASM | |||||
unsigned int use_ppc_asm:1; /* PowerISA 2.07 crypto shall be used. */ | |||||
#endif | |||||
rijndael_cryptfn_t encrypt_fn; | rijndael_cryptfn_t encrypt_fn; | ||||
rijndael_cryptfn_t decrypt_fn; | rijndael_cryptfn_t decrypt_fn; | ||||
rijndael_prefetchfn_t prefetch_enc_fn; | rijndael_prefetchfn_t prefetch_enc_fn; | ||||
rijndael_prefetchfn_t prefetch_dec_fn; | rijndael_prefetchfn_t prefetch_dec_fn; | ||||
} RIJNDAEL_context ATTR_ALIGNED_16; | } RIJNDAEL_context ATTR_ALIGNED_16; | ||||
/* Macros defining alias for the keyschedules. */ | /* Macros defining alias for the keyschedules. */ | ||||
#define keyschenc u1.keyschedule | #define keyschenc u1.keyschedule | ||||
#define keyschenc32 u1.keyschedule32 | #define keyschenc32 u1.keyschedule32 | ||||
#define keyschdec u2.keyschedule | #define keyschdec u2.keyschedule | ||||
#define keyschdec32 u2.keyschedule32 | #define keyschdec32 u2.keyschedule32 | ||||
#define padlockkey u1.padlock_key | #define padlockkey u1.padlock_key | ||||
#endif /* G10_RIJNDAEL_INTERNAL_H */ | #endif /* G10_RIJNDAEL_INTERNAL_H */ |