diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-12-09 08:45:48 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-12-14 12:53:05 +0100 |
commit | 50d9b2b5f1236f185b2e360b6f4d640e75ddb07f (patch) | |
tree | c212e1d74e905a0b927e25a58b0d02bdb3ad2b00 | |
parent | Do not build P10-specific Chacha20 assembler on AIX (diff) | |
download | openssl-50d9b2b5f1236f185b2e360b6f4d640e75ddb07f.tar.xz openssl-50d9b2b5f1236f185b2e360b6f4d640e75ddb07f.zip |
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 5c92ac52c282dbcb07e3880c2edd3a1bce452396)
-rw-r--r-- | crypto/modes/build.info | 5 | ||||
-rw-r--r-- | include/crypto/aes_platform.h | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/crypto/modes/build.info b/crypto/modes/build.info index d8faa29968..65853ba456 100644 --- a/crypto/modes/build.info +++ b/crypto/modes/build.info @@ -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 diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h index beb679fac7..8159f2a092 100644 --- a/include/crypto/aes_platform.h +++ b/include/crypto/aes_platform.h @@ -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__)) |