1 # We make separate GOAL variables for each algorithm, to make it easy to
2 # switch each to the Legacy provider when needed.
4 # $TDES_1_GOAL and $TDES_2_GOAL separate FIPSable and non-FIPSable TDES.
5 # The latter may become legacy sooner, so it's comfortable to have two
6 # variables already now, to switch the non-FIPSable TDES to legacy if needed.
8 $COMMON_GOAL=../../libcommon.a
10 $NULL_GOAL=../../libdefault.a
11 $AES_GOAL=../../libdefault.a ../../libfips.a
12 $TDES_1_GOAL=../../libdefault.a ../../libfips.a
13 $TDES_2_GOAL=../../libdefault.a
14 $ARIA_GOAL=../../libdefault.a
15 $CAMELLIA_GOAL=../../libdefault.a
16 $DES_GOAL=../../liblegacy.a
17 $BLOWFISH_GOAL=../../liblegacy.a
18 $IDEA_GOAL=../../liblegacy.a
19 $CAST5_GOAL=../../liblegacy.a
20 $RC2_GOAL=../../liblegacy.a
21 $RC4_GOAL=../../liblegacy.a
22 $RC5_GOAL=../../liblegacy.a
23 $SEED_GOAL=../../liblegacy.a
24 $SM4_GOAL=../../libdefault.a
25 $CHACHA_GOAL=../../libdefault.a
26 $CHACHAPOLY_GOAL=../../libdefault.a
27 $SIV_GOAL=../../libdefault.a
29 IF[{- !$disabled{asm} -}]
30 $GHASHDEF_x86=GHASH_ASM
31 $GHASHDEF_x86_sse2=OPENSSL_IA32_SSE2
33 $GHASHDEF_x86_64=GHASH_ASM
34 $GHASHDEF_x86_64_sse2=OPENSSL_IA32_SSE2
36 # ghash-ia64.s doesn't work on VMS
37 IF[{- $config{target} !~ /^vms-/ -}]
38 $GHASHDEF_ia64=GHASH_ASM
41 $GHASHDEF_sparcv9=GHASH_ASM
43 $GHASHDEF_alpha=GHASH_ASM
45 $GHASHDEF_s390x=GHASH_ASM
47 $GHASHDEF_armv4=GHASH_ASM
50 $GHASHDEF_parisc11=GHASH_ASM
51 $GHASHDEF_parisc20_64=$GHASHDEF_parisc11
54 $GHASHDEF_ppc64=$GHASHDEF_ppc32
56 $GHASHDEF_c64xplus=GHASH_ASM
58 $GHASHDEF_riscv64=GHASH_ASM
60 # Now that we have defined all the arch specific variables, use the
61 # appropriate one, and define the appropriate macros
63 IF[$GHASHDEF_{- $target{asm_arch} -}]
64 $GHASHDEF=$GHASHDEF_{- $target{asm_arch} -}
65 IF[{- !$disabled{sse2} -}]
66 IF[$GHASHDEF_{- $target{asm_arch} -}_sse2]
67 $GHASHDEF=$GHASHDEF_{- $target{asm_arch} -}_sse2
73 # This source is common building blocks for all ciphers in all our providers.
74 SOURCE[$COMMON_GOAL]=\
75 ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \
76 ciphercommon_gcm.c ciphercommon_gcm_hw.c \
77 ciphercommon_ccm.c ciphercommon_ccm_hw.c
79 IF[{- !$disabled{des} -}]
80 SOURCE[$TDES_1_GOAL]=cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c
87 cipher_aes.c cipher_aes_hw.c \
88 cipher_aes_xts.c cipher_aes_xts_hw.c \
89 cipher_aes_gcm.c cipher_aes_gcm_hw.c \
90 cipher_aes_ccm.c cipher_aes_ccm_hw.c \
92 cipher_aes_cbc_hmac_sha.c \
93 cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \
96 # Extra code to satisfy the FIPS and non-FIPS separation.
97 # When the AES-xxx-XTS moves to legacy, cipher_aes_xts_fips.c can be removed.
98 SOURCE[$AES_GOAL]=cipher_aes_xts_fips.c
100 IF[{- !$disabled{siv} -}]
101 DEFINE[$SIV_GOAL]=$GHASHDEF
103 cipher_aes_siv.c cipher_aes_siv_hw.c \
104 cipher_aes_gcm_siv.c cipher_aes_gcm_siv_hw.c cipher_aes_gcm_siv_polyval.c
107 IF[{- !$disabled{des} -}]
108 SOURCE[$TDES_2_GOAL]=\
109 cipher_tdes_default.c cipher_tdes_default_hw.c \
110 cipher_tdes_wrap.c cipher_tdes_wrap_hw.c
112 cipher_desx.c cipher_desx_hw.c \
113 cipher_des.c cipher_des_hw.c
114 IF[{- !$disabled{module} -}]
120 IF[{- !$disabled{aria} -}]
122 cipher_aria.c cipher_aria_hw.c \
123 cipher_aria_gcm.c cipher_aria_gcm_hw.c \
124 cipher_aria_ccm.c cipher_aria_ccm_hw.c
127 IF[{- !$disabled{camellia} -}]
128 SOURCE[$CAMELLIA_GOAL]=\
129 cipher_camellia.c cipher_camellia_hw.c
132 IF[{- !$disabled{bf} -}]
133 SOURCE[$BLOWFISH_GOAL]=\
134 cipher_blowfish.c cipher_blowfish_hw.c
137 IF[{- !$disabled{idea} -}]
139 cipher_idea.c cipher_idea_hw.c
142 IF[{- !$disabled{cast} -}]
143 SOURCE[$CAST5_GOAL]=\
144 cipher_cast5.c cipher_cast5_hw.c
147 IF[{- !$disabled{seed} -}]
149 cipher_seed.c cipher_seed_hw.c
152 IF[{- !$disabled{sm4} -}]
154 cipher_sm4.c cipher_sm4_hw.c \
155 cipher_sm4_gcm.c cipher_sm4_gcm_hw.c \
156 cipher_sm4_ccm.c cipher_sm4_ccm_hw.c
159 IF[{- !$disabled{ocb} -}]
161 cipher_aes_ocb.c cipher_aes_ocb_hw.c
164 IF[{- !$disabled{rc4} -}]
166 cipher_rc4.c cipher_rc4_hw.c
167 IF[{- !$disabled{md5} -}]
169 cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c
173 IF[{- !$disabled{rc5} -}]
175 cipher_rc5.c cipher_rc5_hw.c
178 IF[{- !$disabled{rc2} -}]
180 cipher_rc2.c cipher_rc2_hw.c
183 IF[{- !$disabled{chacha} -}]
184 SOURCE[$CHACHA_GOAL]=\
185 cipher_chacha20.c cipher_chacha20_hw.c
186 IF[{- !$disabled{poly1305} -}]
187 SOURCE[$CHACHAPOLY_GOAL]=\
188 cipher_chacha20_poly1305.c cipher_chacha20_poly1305_hw.c