| 1 |
# We make separate GOAL variables for each algorithm, to make it easy to |
| 2 |
# switch each to the Legacy provider when needed. |
| 3 |
# |
| 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. |
| 7 |
|
| 8 |
$COMMON_GOAL=../../libcommon.a |
| 9 |
|
| 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 |
| 28 |
$SIV_GCM_GOAL=../../libdefault.a |
| 29 |
|
| 30 |
IF[{- !$disabled{asm} -}] |
| 31 |
$GHASHDEF_x86=GHASH_ASM |
| 32 |
$GHASHDEF_x86_sse2=OPENSSL_IA32_SSE2 |
| 33 |
|
| 34 |
$GHASHDEF_x86_64=GHASH_ASM |
| 35 |
$GHASHDEF_x86_64_sse2=OPENSSL_IA32_SSE2 |
| 36 |
|
| 37 |
# ghash-ia64.s doesn't work on VMS |
| 38 |
IF[{- $config{target} !~ /^vms-/ -}] |
| 39 |
$GHASHDEF_ia64=GHASH_ASM |
| 40 |
ENDIF |
| 41 |
|
| 42 |
$GHASHDEF_sparcv9=GHASH_ASM |
| 43 |
|
| 44 |
$GHASHDEF_alpha=GHASH_ASM |
| 45 |
|
| 46 |
$GHASHDEF_s390x=GHASH_ASM |
| 47 |
|
| 48 |
$GHASHDEF_armv4=GHASH_ASM |
| 49 |
$GHASHDEF_aarch64= |
| 50 |
|
| 51 |
$GHASHDEF_parisc11=GHASH_ASM |
| 52 |
$GHASHDEF_parisc20_64=$GHASHDEF_parisc11 |
| 53 |
|
| 54 |
$GHASHDEF_ppc32= |
| 55 |
$GHASHDEF_ppc64=$GHASHDEF_ppc32 |
| 56 |
|
| 57 |
$GHASHDEF_c64xplus=GHASH_ASM |
| 58 |
|
| 59 |
$GHASHDEF_riscv64=GHASH_ASM |
| 60 |
|
| 61 |
# Now that we have defined all the arch specific variables, use the |
| 62 |
# appropriate one, and define the appropriate macros |
| 63 |
|
| 64 |
IF[$GHASHDEF_{- $target{asm_arch} -}] |
| 65 |
$GHASHDEF=$GHASHDEF_{- $target{asm_arch} -} |
| 66 |
IF[{- !$disabled{sse2} -}] |
| 67 |
IF[$GHASHDEF_{- $target{asm_arch} -}_sse2] |
| 68 |
$GHASHDEF=$GHASHDEF_{- $target{asm_arch} -}_sse2 |
| 69 |
ENDIF |
| 70 |
ENDIF |
| 71 |
ENDIF |
| 72 |
ENDIF |
| 73 |
|
| 74 |
IF[{- !$disabled{asm} -}] |
| 75 |
IF[{- ($target{perlasm_scheme} // '') ne '31' -}] |
| 76 |
$AESXTSDEF_s390x=AES_XTS_S390X |
| 77 |
ENDIF |
| 78 |
|
| 79 |
# Now that we have defined all the arch specific variables, use the |
| 80 |
# appropriate one, and define the appropriate macros |
| 81 |
|
| 82 |
IF[$AESXTSDEF_{- $target{asm_arch} -}] |
| 83 |
$AESXTSDEF=$AESXTSDEF_{- $target{asm_arch} -} |
| 84 |
ENDIF |
| 85 |
ENDIF |
| 86 |
|
| 87 |
# This source is common building blocks for all ciphers in all our providers. |
| 88 |
SOURCE[$COMMON_GOAL]=\ |
| 89 |
ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ |
| 90 |
ciphercommon_gcm.c ciphercommon_gcm_hw.c \ |
| 91 |
ciphercommon_ccm.c ciphercommon_ccm_hw.c |
| 92 |
|
| 93 |
INCLUDE[ciphercommon.o]=. |
| 94 |
INCLUDE[cipher_chacha20_poly1305.o]=. |
| 95 |
|
| 96 |
IF[{- !$disabled{des} -}] |
| 97 |
SOURCE[$TDES_1_GOAL]=cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c |
| 98 |
ENDIF |
| 99 |
|
| 100 |
SOURCE[$NULL_GOAL]=\ |
| 101 |
cipher_null.c |
| 102 |
|
| 103 |
SOURCE[$AES_GOAL]=\ |
| 104 |
cipher_aes.c cipher_aes_hw.c \ |
| 105 |
cipher_aes_xts.c cipher_aes_xts_hw.c \ |
| 106 |
cipher_aes_cfb_hw.c \ |
| 107 |
cipher_aes_gcm.c cipher_aes_gcm_hw.c \ |
| 108 |
cipher_aes_ccm.c cipher_aes_ccm_hw.c \ |
| 109 |
cipher_aes_wrp.c \ |
| 110 |
cipher_aes_cbc_hmac_sha.c \ |
| 111 |
cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \ |
| 112 |
cipher_aes_cbc_hmac_sha_etm.c \ |
| 113 |
cipher_aes_cbc_hmac_sha1_etm_hw.c \ |
| 114 |
cipher_aes_cbc_hmac_sha256_etm_hw.c \ |
| 115 |
cipher_aes_cbc_hmac_sha512_etm_hw.c \ |
| 116 |
cipher_cts.c |
| 117 |
DEFINE[$AES_GOAL]=$AESXTSDEF |
| 118 |
|
| 119 |
# Extra code to satisfy the FIPS and non-FIPS separation. |
| 120 |
# When the AES-xxx-XTS moves to legacy, cipher_aes_xts_fips.c can be removed. |
| 121 |
SOURCE[$AES_GOAL]=cipher_aes_xts_fips.c |
| 122 |
|
| 123 |
IF[{- !$disabled{siv} -}] |
| 124 |
DEFINE[$SIV_GCM_GOAL]=$GHASHDEF |
| 125 |
SOURCE[$SIV_GCM_GOAL]=\ |
| 126 |
cipher_aes_gcm_siv.c cipher_aes_gcm_siv_hw.c \ |
| 127 |
cipher_aes_gcm_siv_polyval.c |
| 128 |
SOURCE[$SIV_GOAL]=cipher_aes_siv.c cipher_aes_siv_hw.c |
| 129 |
ENDIF |
| 130 |
|
| 131 |
IF[{- !$disabled{des} -}] |
| 132 |
SOURCE[$TDES_2_GOAL]=\ |
| 133 |
cipher_tdes_default.c cipher_tdes_default_hw.c \ |
| 134 |
cipher_tdes_wrap.c cipher_tdes_wrap_hw.c |
| 135 |
SOURCE[$DES_GOAL]=\ |
| 136 |
cipher_desx.c cipher_desx_hw.c \ |
| 137 |
cipher_des.c cipher_des_hw.c |
| 138 |
IF[{- !$disabled{module} -}] |
| 139 |
SOURCE[$DES_GOAL]=\ |
| 140 |
cipher_tdes_common.c |
| 141 |
ENDIF |
| 142 |
ENDIF |
| 143 |
|
| 144 |
IF[{- !$disabled{aria} -}] |
| 145 |
SOURCE[$ARIA_GOAL]=\ |
| 146 |
cipher_aria.c cipher_aria_hw.c \ |
| 147 |
cipher_aria_gcm.c cipher_aria_gcm_hw.c \ |
| 148 |
cipher_aria_ccm.c cipher_aria_ccm_hw.c |
| 149 |
ENDIF |
| 150 |
|
| 151 |
IF[{- !$disabled{camellia} -}] |
| 152 |
SOURCE[$CAMELLIA_GOAL]=\ |
| 153 |
cipher_camellia.c cipher_camellia_hw.c |
| 154 |
ENDIF |
| 155 |
|
| 156 |
IF[{- !$disabled{bf} -}] |
| 157 |
SOURCE[$BLOWFISH_GOAL]=\ |
| 158 |
cipher_blowfish.c cipher_blowfish_hw.c |
| 159 |
ENDIF |
| 160 |
|
| 161 |
IF[{- !$disabled{idea} -}] |
| 162 |
SOURCE[$IDEA_GOAL]=\ |
| 163 |
cipher_idea.c cipher_idea_hw.c |
| 164 |
ENDIF |
| 165 |
|
| 166 |
IF[{- !$disabled{cast} -}] |
| 167 |
SOURCE[$CAST5_GOAL]=\ |
| 168 |
cipher_cast5.c cipher_cast5_hw.c |
| 169 |
ENDIF |
| 170 |
|
| 171 |
IF[{- !$disabled{seed} -}] |
| 172 |
SOURCE[$SEED_GOAL]=\ |
| 173 |
cipher_seed.c cipher_seed_hw.c |
| 174 |
ENDIF |
| 175 |
|
| 176 |
IF[{- !$disabled{sm4} -}] |
| 177 |
SOURCE[$SM4_GOAL]=\ |
| 178 |
cipher_sm4.c cipher_sm4_hw.c \ |
| 179 |
cipher_sm4_gcm.c cipher_sm4_gcm_hw.c \ |
| 180 |
cipher_sm4_ccm.c cipher_sm4_ccm_hw.c \ |
| 181 |
cipher_sm4_xts.c cipher_sm4_xts_hw.c |
| 182 |
|
| 183 |
ENDIF |
| 184 |
|
| 185 |
IF[{- !$disabled{ocb} -}] |
| 186 |
SOURCE[$AES_GOAL]=\ |
| 187 |
cipher_aes_ocb.c cipher_aes_ocb_hw.c |
| 188 |
ENDIF |
| 189 |
|
| 190 |
IF[{- !$disabled{rc4} -}] |
| 191 |
SOURCE[$RC4_GOAL]=\ |
| 192 |
cipher_rc4.c cipher_rc4_hw.c |
| 193 |
IF[{- !$disabled{md5} -}] |
| 194 |
SOURCE[$RC4_GOAL]=\ |
| 195 |
cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c |
| 196 |
ENDIF |
| 197 |
ENDIF |
| 198 |
|
| 199 |
IF[{- !$disabled{rc5} -}] |
| 200 |
SOURCE[$RC5_GOAL]=\ |
| 201 |
cipher_rc5.c cipher_rc5_hw.c |
| 202 |
ENDIF |
| 203 |
|
| 204 |
IF[{- !$disabled{rc2} -}] |
| 205 |
SOURCE[$RC2_GOAL]=\ |
| 206 |
cipher_rc2.c cipher_rc2_hw.c |
| 207 |
ENDIF |
| 208 |
|
| 209 |
IF[{- !$disabled{chacha} -}] |
| 210 |
SOURCE[$CHACHA_GOAL]=\ |
| 211 |
cipher_chacha20.c cipher_chacha20_hw.c |
| 212 |
IF[{- !$disabled{poly1305} -}] |
| 213 |
SOURCE[$CHACHAPOLY_GOAL]=\ |
| 214 |
cipher_chacha20_poly1305.c cipher_chacha20_poly1305_hw.c |
| 215 |
ENDIF |
| 216 |
ENDIF |