1e1051a39Sopenharmony_ci# We make separate GOAL variables for each algorithm, to make it easy to
2e1051a39Sopenharmony_ci# switch each to the Legacy provider when needed.
3e1051a39Sopenharmony_ci#
4e1051a39Sopenharmony_ci# $TDES_1_GOAL and $TDES_2_GOAL separate FIPSable and non-FIPSable TDES.
5e1051a39Sopenharmony_ci# The latter may become legacy sooner, so it's comfortable to have two
6e1051a39Sopenharmony_ci# variables already now, to switch the non-FIPSable TDES to legacy if needed.
7e1051a39Sopenharmony_ci
8e1051a39Sopenharmony_ci$COMMON_GOAL=../../libcommon.a
9e1051a39Sopenharmony_ci
10e1051a39Sopenharmony_ci$NULL_GOAL=../../libdefault.a
11e1051a39Sopenharmony_ci$AES_GOAL=../../libdefault.a ../../libfips.a
12e1051a39Sopenharmony_ci$TDES_1_GOAL=../../libdefault.a ../../libfips.a
13e1051a39Sopenharmony_ci$TDES_2_GOAL=../../libdefault.a
14e1051a39Sopenharmony_ci$ARIA_GOAL=../../libdefault.a
15e1051a39Sopenharmony_ci$CAMELLIA_GOAL=../../libdefault.a
16e1051a39Sopenharmony_ci$DES_GOAL=../../liblegacy.a
17e1051a39Sopenharmony_ci$BLOWFISH_GOAL=../../liblegacy.a
18e1051a39Sopenharmony_ci$IDEA_GOAL=../../liblegacy.a
19e1051a39Sopenharmony_ci$CAST5_GOAL=../../liblegacy.a
20e1051a39Sopenharmony_ci$RC2_GOAL=../../liblegacy.a
21e1051a39Sopenharmony_ci$RC4_GOAL=../../liblegacy.a
22e1051a39Sopenharmony_ci$RC5_GOAL=../../liblegacy.a
23e1051a39Sopenharmony_ci$SEED_GOAL=../../liblegacy.a
24e1051a39Sopenharmony_ci$SM4_GOAL=../../libdefault.a
25e1051a39Sopenharmony_ci$CHACHA_GOAL=../../libdefault.a
26e1051a39Sopenharmony_ci$CHACHAPOLY_GOAL=../../libdefault.a
27e1051a39Sopenharmony_ci$SIV_GOAL=../../libdefault.a
28e1051a39Sopenharmony_ci
29e1051a39Sopenharmony_ci# This source is common building blocks for all ciphers in all our providers.
30e1051a39Sopenharmony_ciSOURCE[$COMMON_GOAL]=\
31e1051a39Sopenharmony_ci        ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \
32e1051a39Sopenharmony_ci        ciphercommon_gcm.c ciphercommon_gcm_hw.c \
33e1051a39Sopenharmony_ci        ciphercommon_ccm.c ciphercommon_ccm_hw.c
34e1051a39Sopenharmony_ci
35e1051a39Sopenharmony_ciIF[{- !$disabled{des} -}]
36e1051a39Sopenharmony_ci  SOURCE[$TDES_1_GOAL]=cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c
37e1051a39Sopenharmony_ciENDIF
38e1051a39Sopenharmony_ci
39e1051a39Sopenharmony_ciSOURCE[$NULL_GOAL]=\
40e1051a39Sopenharmony_ci        cipher_null.c
41e1051a39Sopenharmony_ci
42e1051a39Sopenharmony_ciSOURCE[$AES_GOAL]=\
43e1051a39Sopenharmony_ci        cipher_aes.c cipher_aes_hw.c \
44e1051a39Sopenharmony_ci        cipher_aes_xts.c cipher_aes_xts_hw.c \
45e1051a39Sopenharmony_ci        cipher_aes_gcm.c cipher_aes_gcm_hw.c \
46e1051a39Sopenharmony_ci        cipher_aes_ccm.c cipher_aes_ccm_hw.c \
47e1051a39Sopenharmony_ci        cipher_aes_wrp.c \
48e1051a39Sopenharmony_ci        cipher_aes_cbc_hmac_sha.c \
49e1051a39Sopenharmony_ci        cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \
50e1051a39Sopenharmony_ci        cipher_cts.c
51e1051a39Sopenharmony_ci
52e1051a39Sopenharmony_ci# Extra code to satisfy the FIPS and non-FIPS separation.
53e1051a39Sopenharmony_ci# When the AES-xxx-XTS moves to legacy, cipher_aes_xts_fips.c can be removed.
54e1051a39Sopenharmony_ciSOURCE[$AES_GOAL]=cipher_aes_xts_fips.c
55e1051a39Sopenharmony_ci
56e1051a39Sopenharmony_ciIF[{- !$disabled{siv} -}]
57e1051a39Sopenharmony_ci  SOURCE[$SIV_GOAL]=\
58e1051a39Sopenharmony_ci      cipher_aes_siv.c cipher_aes_siv_hw.c
59e1051a39Sopenharmony_ciENDIF
60e1051a39Sopenharmony_ci
61e1051a39Sopenharmony_ciIF[{- !$disabled{des} -}]
62e1051a39Sopenharmony_ci  SOURCE[$TDES_2_GOAL]=\
63e1051a39Sopenharmony_ci      cipher_tdes_default.c cipher_tdes_default_hw.c \
64e1051a39Sopenharmony_ci      cipher_tdes_wrap.c cipher_tdes_wrap_hw.c
65e1051a39Sopenharmony_ci  SOURCE[$DES_GOAL]=\
66e1051a39Sopenharmony_ci      cipher_desx.c cipher_desx_hw.c \
67e1051a39Sopenharmony_ci      cipher_des.c cipher_des_hw.c
68e1051a39Sopenharmony_ci IF[{- !$disabled{module} -}]
69e1051a39Sopenharmony_ci   SOURCE[$DES_GOAL]=\
70e1051a39Sopenharmony_ci       cipher_tdes_common.c
71e1051a39Sopenharmony_ci ENDIF
72e1051a39Sopenharmony_ciENDIF
73e1051a39Sopenharmony_ci
74e1051a39Sopenharmony_ciIF[{- !$disabled{aria} -}]
75e1051a39Sopenharmony_ci  SOURCE[$ARIA_GOAL]=\
76e1051a39Sopenharmony_ci      cipher_aria.c cipher_aria_hw.c \
77e1051a39Sopenharmony_ci      cipher_aria_gcm.c cipher_aria_gcm_hw.c \
78e1051a39Sopenharmony_ci      cipher_aria_ccm.c cipher_aria_ccm_hw.c
79e1051a39Sopenharmony_ciENDIF
80e1051a39Sopenharmony_ci
81e1051a39Sopenharmony_ciIF[{- !$disabled{camellia} -}]
82e1051a39Sopenharmony_ci  SOURCE[$CAMELLIA_GOAL]=\
83e1051a39Sopenharmony_ci      cipher_camellia.c cipher_camellia_hw.c
84e1051a39Sopenharmony_ciENDIF
85e1051a39Sopenharmony_ci
86e1051a39Sopenharmony_ciIF[{- !$disabled{bf} -}]
87e1051a39Sopenharmony_ci  SOURCE[$BLOWFISH_GOAL]=\
88e1051a39Sopenharmony_ci      cipher_blowfish.c cipher_blowfish_hw.c
89e1051a39Sopenharmony_ciENDIF
90e1051a39Sopenharmony_ci
91e1051a39Sopenharmony_ciIF[{- !$disabled{idea} -}]
92e1051a39Sopenharmony_ci  SOURCE[$IDEA_GOAL]=\
93e1051a39Sopenharmony_ci      cipher_idea.c cipher_idea_hw.c
94e1051a39Sopenharmony_ciENDIF
95e1051a39Sopenharmony_ci
96e1051a39Sopenharmony_ciIF[{- !$disabled{cast} -}]
97e1051a39Sopenharmony_ci  SOURCE[$CAST5_GOAL]=\
98e1051a39Sopenharmony_ci      cipher_cast5.c cipher_cast5_hw.c
99e1051a39Sopenharmony_ciENDIF
100e1051a39Sopenharmony_ci
101e1051a39Sopenharmony_ciIF[{- !$disabled{seed} -}]
102e1051a39Sopenharmony_ci  SOURCE[$SEED_GOAL]=\
103e1051a39Sopenharmony_ci      cipher_seed.c cipher_seed_hw.c
104e1051a39Sopenharmony_ciENDIF
105e1051a39Sopenharmony_ci
106e1051a39Sopenharmony_ciIF[{- !$disabled{sm4} -}]
107e1051a39Sopenharmony_ci  SOURCE[$SM4_GOAL]=\
108e1051a39Sopenharmony_ci      cipher_sm4.c cipher_sm4_hw.c \
109e1051a39Sopenharmony_ci      cipher_sm4_gcm.c cipher_sm4_gcm_hw.c \
110e1051a39Sopenharmony_ci      cipher_sm4_ccm.c cipher_sm4_ccm_hw.c
111e1051a39Sopenharmony_ciENDIF
112e1051a39Sopenharmony_ci
113e1051a39Sopenharmony_ciIF[{- !$disabled{ocb} -}]
114e1051a39Sopenharmony_ci  SOURCE[$AES_GOAL]=\
115e1051a39Sopenharmony_ci       cipher_aes_ocb.c cipher_aes_ocb_hw.c
116e1051a39Sopenharmony_ciENDIF
117e1051a39Sopenharmony_ci
118e1051a39Sopenharmony_ciIF[{- !$disabled{rc4} -}]
119e1051a39Sopenharmony_ci  SOURCE[$RC4_GOAL]=\
120e1051a39Sopenharmony_ci      cipher_rc4.c cipher_rc4_hw.c
121e1051a39Sopenharmony_ci IF[{- !$disabled{md5} -}]
122e1051a39Sopenharmony_ci   SOURCE[$RC4_GOAL]=\
123e1051a39Sopenharmony_ci       cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c
124e1051a39Sopenharmony_ci ENDIF
125e1051a39Sopenharmony_ciENDIF
126e1051a39Sopenharmony_ci
127e1051a39Sopenharmony_ciIF[{- !$disabled{rc5} -}]
128e1051a39Sopenharmony_ci  SOURCE[$RC5_GOAL]=\
129e1051a39Sopenharmony_ci      cipher_rc5.c cipher_rc5_hw.c
130e1051a39Sopenharmony_ciENDIF
131e1051a39Sopenharmony_ci
132e1051a39Sopenharmony_ciIF[{- !$disabled{rc2} -}]
133e1051a39Sopenharmony_ci  SOURCE[$RC2_GOAL]=\
134e1051a39Sopenharmony_ci      cipher_rc2.c cipher_rc2_hw.c
135e1051a39Sopenharmony_ciENDIF
136e1051a39Sopenharmony_ci
137e1051a39Sopenharmony_ciIF[{- !$disabled{chacha} -}]
138e1051a39Sopenharmony_ci  SOURCE[$CHACHA_GOAL]=\
139e1051a39Sopenharmony_ci      cipher_chacha20.c cipher_chacha20_hw.c
140e1051a39Sopenharmony_ci IF[{- !$disabled{poly1305} -}]
141e1051a39Sopenharmony_ci  SOURCE[$CHACHAPOLY_GOAL]=\
142e1051a39Sopenharmony_ci      cipher_chacha20_poly1305.c cipher_chacha20_poly1305_hw.c
143e1051a39Sopenharmony_ci ENDIF
144e1051a39Sopenharmony_ciENDIF
145