summaryrefslogtreecommitdiffstats
path: root/src/crypto/isa-l/isa-l_crypto/aes/Makefile.am
blob: d1f4e57814e00a84c30b739b7a00560c06fac463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
########################################################################
#  Copyright(c) 2011-2016 Intel Corporation All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#    * Redistributions of source code must retain the above copyright
#      notice, this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright
#      notice, this list of conditions and the following disclaimer in
#      the documentation and/or other materials provided with the
#      distribution.
#    * Neither the name of Intel Corporation nor the names of its
#      contributors may be used to endorse or promote products derived
#      from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
########################################################################

# Assembling AES requires including cbc_common.asm, gcm_defines.asm
src_include += -I $(srcdir)/aes

extern_hdrs += include/aes_gcm.h include/aes_cbc.h include/aes_xts.h include/aes_keyexp.h

lsrc_x86_64     += aes/gcm_multibinary.asm aes/gcm_pre.c
lsrc_x86_64     += aes/gcm128_avx_gen2.asm aes/gcm128_avx_gen4.asm aes/gcm128_sse.asm
lsrc_x86_64     += aes/gcm256_avx_gen2.asm aes/gcm256_avx_gen4.asm aes/gcm256_sse.asm
lsrc_x86_64     += aes/gcm128_vaes_avx512.asm aes/gcm256_vaes_avx512.asm
lsrc_x86_64     += aes/gcm128_avx_gen2_nt.asm aes/gcm128_avx_gen4_nt.asm aes/gcm128_sse_nt.asm
lsrc_x86_64     += aes/gcm256_avx_gen2_nt.asm aes/gcm256_avx_gen4_nt.asm aes/gcm256_sse_nt.asm
lsrc_x86_64     += aes/gcm128_vaes_avx512_nt.asm aes/gcm256_vaes_avx512_nt.asm

lsrc_x86_64     += aes/gcm_multibinary_nt.asm

lsrc_x86_64     += aes/keyexp_multibinary.asm
lsrc_x86_64     += aes/keyexp_128.asm aes/keyexp_192.asm aes/keyexp_256.asm
lsrc_x86_64     += aes/cbc_multibinary.asm
lsrc_x86_64     += aes/cbc_dec_128_x4_sse.asm aes/cbc_dec_128_x8_avx.asm
lsrc_x86_64     += aes/cbc_dec_192_x4_sse.asm aes/cbc_dec_192_x8_avx.asm
lsrc_x86_64     += aes/cbc_dec_256_x4_sse.asm aes/cbc_dec_256_x8_avx.asm
lsrc_x86_64     += aes/cbc_enc_128_x4_sb.asm aes/cbc_enc_128_x8_sb.asm
lsrc_x86_64     += aes/cbc_enc_192_x4_sb.asm aes/cbc_enc_192_x8_sb.asm
lsrc_x86_64     += aes/cbc_enc_256_x4_sb.asm aes/cbc_enc_256_x8_sb.asm
lsrc_x86_64     += aes/cbc_dec_vaes_avx512.asm
lsrc_x86_64     += aes/cbc_pre.c
lsrc_x86_64     += aes/xts_aes_128_multibinary.asm
lsrc_x86_64     += aes/XTS_AES_128_dec_sse.asm aes/XTS_AES_128_dec_expanded_key_sse.asm
lsrc_x86_64     += aes/XTS_AES_128_enc_sse.asm aes/XTS_AES_128_enc_expanded_key_sse.asm
lsrc_x86_64     += aes/XTS_AES_128_dec_avx.asm aes/XTS_AES_128_dec_expanded_key_avx.asm
lsrc_x86_64     += aes/XTS_AES_128_enc_avx.asm aes/XTS_AES_128_enc_expanded_key_avx.asm
lsrc_x86_64     += aes/xts_aes_256_multibinary.asm
lsrc_x86_64     += aes/XTS_AES_256_dec_avx.asm aes/XTS_AES_256_dec_expanded_key_avx.asm
lsrc_x86_64     += aes/XTS_AES_256_enc_avx.asm aes/XTS_AES_256_enc_expanded_key_avx.asm
lsrc_x86_64     += aes/XTS_AES_256_dec_sse.asm aes/XTS_AES_256_dec_expanded_key_sse.asm
lsrc_x86_64     += aes/XTS_AES_256_enc_sse.asm aes/XTS_AES_256_enc_expanded_key_sse.asm
lsrc_x86_64     += aes/XTS_AES_256_enc_vaes.asm
lsrc_x86_64     += aes/XTS_AES_128_enc_vaes.asm
lsrc_x86_64     += aes/XTS_AES_256_enc_expanded_key_vaes.asm
lsrc_x86_64     += aes/XTS_AES_128_enc_expanded_key_vaes.asm
lsrc_x86_64     += aes/XTS_AES_256_dec_vaes.asm
lsrc_x86_64     += aes/XTS_AES_128_dec_vaes.asm
lsrc_x86_64     += aes/XTS_AES_256_dec_expanded_key_vaes.asm
lsrc_x86_64     += aes/XTS_AES_128_dec_expanded_key_vaes.asm

lsrc_x86_32 	+= $(lsrc_x86_64)

lsrc_aarch64 +=  aes/gcm_pre.c \
                aes/aarch64/gcm_multibinary_aarch64.S       \
                aes/aarch64/keyexp_multibinary_aarch64.S    \
                aes/aarch64/gcm_aarch64_dispatcher.c        \
                aes/aarch64/keyexp_aarch64_dispatcher.c     \
                aes/aarch64/keyexp_128_aarch64_aes.S        \
                aes/aarch64/keyexp_192_aarch64_aes.S        \
                aes/aarch64/keyexp_256_aarch64_aes.S        \
                aes/aarch64/aes_gcm_aes_finalize_128.S      \
                aes/aarch64/aes_gcm_aes_init.S              \
                aes/aarch64/aes_gcm_enc_dec_128.S           \
                aes/aarch64/aes_gcm_precomp_128.S           \
                aes/aarch64/aes_gcm_update_128.S            \
                aes/aarch64/aes_gcm_aes_finalize_256.S      \
                aes/aarch64/aes_gcm_consts.S                \
                aes/aarch64/aes_gcm_enc_dec_256.S           \
                aes/aarch64/aes_gcm_precomp_256.S           \
                aes/aarch64/aes_gcm_update_256.S            \
                aes/aarch64/xts_aarch64_dispatcher.c        \
                aes/aarch64/xts_aes_128_dec.S               \
                aes/aarch64/xts_aes_128_enc.S               \
                aes/aarch64/xts_keyexp_aes_128_dec.S        \
                aes/aarch64/xts_keyexp_aes_128_enc.S        \
                aes/aarch64/xts_aes_256_dec.S               \
                aes/aarch64/xts_aes_256_enc.S               \
                aes/aarch64/xts_keyexp_aes_256_dec.S        \
                aes/aarch64/xts_keyexp_aes_256_enc.S        \
                aes/aarch64/xts_multibinary_aarch64.S       \
                aes/cbc_pre.c                               \
                aes/aarch64/cbc_multibinary_aarch64.S       \
                aes/aarch64/cbc_aarch64_dispatcher.c        \
                aes/aarch64/cbc_enc_aes.S                   \
                aes/aarch64/cbc_dec_aes.S

other_src   += include/multibinary.asm
other_src   += include/test.h include/types.h include/reg_sizes.asm
other_src   += aes/gcm_defines.asm
other_src   += aes/aes_common.asm
other_src   += aes/clear_regs.asm
other_src   += aes/cbc_common.asm aes/cbc_std_vectors.h
other_src   += aes/gcm_vectors.h aes/ossl_helper.h
other_src   += aes/xts_128_vect.h
other_src   += aes/xts_256_vect.h
other_src   += aes/gcm_sse.asm
other_src   += aes/gcm_avx_gen2.asm
other_src   += aes/gcm_avx_gen4.asm
other_src   += aes/gcm_keys_vaes_avx512.asm
other_src   += aes/gcm_vaes_avx512.asm

check_tests += aes/cbc_std_vectors_test
check_tests += aes/gcm_std_vectors_test
check_tests += aes/gcm_nt_std_vectors_test
check_tests += aes/xts_128_test
check_tests += aes/xts_256_test
check_tests += aes/xts_128_expanded_key_test
check_tests += aes/xts_256_expanded_key_test

unit_tests  += aes/cbc_std_vectors_random_test
unit_tests  += aes/gcm_std_vectors_random_test
unit_tests  += aes/gcm_nt_rand_test
unit_tests  += aes/xts_128_rand aes/xts_128_rand_ossl_test
unit_tests  += aes/xts_256_rand aes/xts_256_rand_ossl_test

perf_tests  += aes/cbc_ossl_perf
perf_tests  += aes/gcm_ossl_perf
perf_tests  += aes/xts_128_enc_ossl_perf
perf_tests  += aes/xts_256_enc_ossl_perf
perf_tests  += aes/xts_128_enc_perf aes/xts_128_dec_perf aes/xts_128_dec_ossl_perf
perf_tests  += aes/xts_256_enc_perf aes/xts_256_dec_perf aes/xts_256_dec_ossl_perf

examples += aes/gcm_simple_example

cbc_ossl_perf: LDLIBS += -lcrypto
aes_cbc_ossl_perf_LDFLAGS = -lcrypto
cbc_std_vectors_random_test: LDLIBS += -lcrypto
aes_cbc_std_vectors_random_test_LDFLAGS = -lcrypto
gcm_ossl_perf: LDLIBS += -lcrypto
aes_gcm_ossl_perf_LDFLAGS = -lcrypto
gcm_std_vectors_random_test: LDLIBS += -lcrypto
aes_gcm_std_vectors_random_test_LDFLAGS = -lcrypto
gcm_nt_rand_test: LDLIBS += -lcrypto
aes_gcm_nt_rand_test_LDFLAGS = -lcrypto
xts_128_enc_ossl_perf: LDLIBS += -lcrypto
aes_xts_128_enc_ossl_perf_LDFLAGS = -lcrypto
xts_128_dec_ossl_perf: LDLIBS +=  -lcrypto
aes_xts_128_dec_ossl_perf_LDFLAGS = -lcrypto
xts_128_rand_ossl_test: LDLIBS +=  -lcrypto
aes_xts_128_rand_ossl_test_LDFLAGS = -lcrypto
xts_256_enc_ossl_perf : LDLIBS += -lcrypto
aes_xts_256_enc_ossl_perf_LDFLAGS = -lcrypto
xts_256_dec_ossl_perf : LDLIBS += -lcrypto
aes_xts_256_dec_ossl_perf_LDFLAGS = -lcrypto
xts_256_rand_ossl_test: LDLIBS += -lcrypto
aes_xts_256_rand_ossl_test_LDFLAGS = -lcrypto