a672a02a64
The code has been modularized so that it can be shared by algorithms. A fixed size IV is now used instead of being allocated. The IV is not set into the low level struct now until the update (it uses an iv_state for this purpose). Hardware specific methods have been added to a PROV_GCM_HW object. The S390 code has been changed to just contain methods that can be accessed in a modular way. There are equivalent generic methods also for the other platforms. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com> (Merged from https://github.com/openssl/openssl/pull/9231)
76 lines
2.4 KiB
Text
76 lines
2.4 KiB
Text
LIBS=../../libcrypto
|
|
|
|
$MODESASM=
|
|
IF[{- !$disabled{asm} -}]
|
|
$MODESASM_x86=ghash-x86.s
|
|
$MODESDEF_x86=GHASH_ASM
|
|
$MODESASM_x86_64=ghash-x86_64.s aesni-gcm-x86_64.s
|
|
$MODESDEF_x86_64=GHASH_ASM
|
|
|
|
# ghash-ia64.s doesn't work on VMS
|
|
IF[{- $config{target} !~ /^vms-/ -}]
|
|
$MODESASM_ia64=ghash-ia64.s
|
|
$MODESDEF_ia64=GHASH_ASM
|
|
ENDIF
|
|
|
|
$MODESASM_sparcv9=ghash-sparcv9.S
|
|
$MODESDEF_sparcv9=GHASH_ASM
|
|
|
|
$MODESASM_alpha=ghash-alpha.S
|
|
$MODESDEF_alpha=GHASH_ASM
|
|
|
|
$MODESASM_s390x=ghash-s390x.S
|
|
$MODESDEF_s390x=GHASH_ASM
|
|
|
|
$MODESASM_armv4=ghash-armv4.S ghashv8-armx.S
|
|
$MODESDEF_armv4=GHASH_ASM
|
|
$MODESASM_aarch64=ghashv8-armx.S
|
|
$MODESDEF_aarch64=
|
|
|
|
$MODESASM_parisc11=ghash-parisc.s
|
|
$MODESDEF_parisc11=GHASH_ASM
|
|
$MODESASM_parisc20_64=$MODESASM_parisc11
|
|
$MODESDEF_parisc20_64=$MODESDEF_parisc11
|
|
|
|
$MODESASM_ppc32=ghashp8-ppc.s
|
|
$MODESDEF_ppc32=
|
|
$MODESASM_ppc64=$MODESASM_ppc32
|
|
$MODESDEF_ppc64=$MODESDEF_ppc32
|
|
|
|
$MODESASM_c64xplus=ghash-c64xplus.s
|
|
$MODESDEF_c64xplus=GHASH_ASM
|
|
|
|
# Now that we have defined all the arch specific variables, use the
|
|
# appropriate one, and define the appropriate macros
|
|
IF[$MODESASM_{- $target{asm_arch} -}]
|
|
$MODESASM=$MODESASM_{- $target{asm_arch} -}
|
|
$MODESDEF=$MODESDEF_{- $target{asm_arch} -}
|
|
ENDIF
|
|
ENDIF
|
|
|
|
$COMMON=cbc128.c ctr128.c cfb128.c ofb128.c gcm128.c $MODESASM
|
|
SOURCE[../../libcrypto]=$COMMON \
|
|
cts128.c ccm128.c xts128.c wrap128.c ocb128.c siv128.c
|
|
DEFINE[../../libcrypto]=$MODESDEF
|
|
SOURCE[../../providers/fips]=$COMMON
|
|
DEFINE[../../providers/fips]=$MODESDEF
|
|
|
|
INCLUDE[gcm128.o]=..
|
|
|
|
GENERATE[ghash-ia64.s]=asm/ghash-ia64.pl $(LIB_CFLAGS) $(LIB_CPPFLAGS)
|
|
GENERATE[ghash-x86.s]=asm/ghash-x86.pl \
|
|
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)
|
|
GENERATE[ghash-x86_64.s]=asm/ghash-x86_64.pl $(PERLASM_SCHEME)
|
|
GENERATE[aesni-gcm-x86_64.s]=asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME)
|
|
GENERATE[ghash-sparcv9.S]=asm/ghash-sparcv9.pl $(PERLASM_SCHEME)
|
|
INCLUDE[ghash-sparcv9.o]=..
|
|
GENERATE[ghash-alpha.S]=asm/ghash-alpha.pl $(PERLASM_SCHEME)
|
|
GENERATE[ghash-parisc.s]=asm/ghash-parisc.pl $(PERLASM_SCHEME)
|
|
GENERATE[ghashp8-ppc.s]=asm/ghashp8-ppc.pl $(PERLASM_SCHEME)
|
|
GENERATE[ghash-armv4.S]=asm/ghash-armv4.pl $(PERLASM_SCHEME)
|
|
INCLUDE[ghash-armv4.o]=..
|
|
GENERATE[ghashv8-armx.S]=asm/ghashv8-armx.pl $(PERLASM_SCHEME)
|
|
INCLUDE[ghashv8-armx.o]=..
|
|
GENERATE[ghash-s390x.S]=asm/ghash-s390x.pl $(PERLASM_SCHEME)
|
|
INCLUDE[ghash-s390x.o]=..
|
|
GENERATE[ghash-c64xplus.S]=asm/ghash-c64xplus.pl $(PERLASM_SCHEME)
|