Do not build P10-specific AES-GCM assembler on AIX

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19865)

(cherry picked from commit 5c92ac52c2)
This commit is contained in:
Tomas Mraz 2022-12-09 08:45:48 +01:00
parent abfc152126
commit 50d9b2b5f1
2 changed files with 11 additions and 6 deletions

View File

@ -32,7 +32,10 @@ IF[{- !$disabled{asm} -}]
$MODESASM_parisc20_64=$MODESASM_parisc11
$MODESDEF_parisc20_64=$MODESDEF_parisc11
$MODESASM_ppc32=ghashp8-ppc.s aes-gcm-ppc.s
$MODESASM_ppc32=ghashp8-ppc.s
IF[{- $target{sys_id} ne "AIX" -}]
$MODESASM_ppc32=ghashp8-ppc.s aes-gcm-ppc.s
ENDIF
$MODESDEF_ppc32=
$MODESASM_ppc64=$MODESASM_ppc32
$MODESDEF_ppc64=$MODESDEF_ppc32

View File

@ -74,18 +74,20 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len,
# define HWAES_ctr32_encrypt_blocks aes_p8_ctr32_encrypt_blocks
# define HWAES_xts_encrypt aes_p8_xts_encrypt
# define HWAES_xts_decrypt aes_p8_xts_decrypt
# define PPC_AES_GCM_CAPABLE (OPENSSL_ppccap_P & PPC_MADD300)
# define AES_GCM_ENC_BYTES 128
# define AES_GCM_DEC_BYTES 128
# ifndef OPENSSL_SYS_AIX
# define PPC_AES_GCM_CAPABLE (OPENSSL_ppccap_P & PPC_MADD300)
# define AES_GCM_ENC_BYTES 128
# define AES_GCM_DEC_BYTES 128
size_t ppc_aes_gcm_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key, unsigned char ivec[16],
u64 *Xi);
size_t ppc_aes_gcm_decrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key, unsigned char ivec[16],
u64 *Xi);
# define AES_GCM_ASM_PPC(gctx) ((gctx)->ctr==aes_p8_ctr32_encrypt_blocks && \
(gctx)->gcm.funcs.ghash==gcm_ghash_p8)
# define AES_GCM_ASM_PPC(gctx) ((gctx)->ctr==aes_p8_ctr32_encrypt_blocks && \
(gctx)->gcm.funcs.ghash==gcm_ghash_p8)
void gcm_ghash_p8(u64 Xi[2],const u128 Htable[16],const u8 *inp, size_t len);
# endif /* OPENSSL_SYS_AIX */
# endif /* PPC */
# if (defined(__arm__) || defined(__arm) || defined(__aarch64__))