xref: /openbmc/linux/crypto/Makefile (revision 6a767685)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Cryptographic API
4#
5
6obj-$(CONFIG_CRYPTO) += crypto.o
7crypto-y := api.o cipher.o compress.o memneq.o
8
9obj-$(CONFIG_CRYPTO_WORKQUEUE) += crypto_wq.o
10
11obj-$(CONFIG_CRYPTO_ENGINE) += crypto_engine.o
12obj-$(CONFIG_CRYPTO_FIPS) += fips.o
13
14crypto_algapi-$(CONFIG_PROC_FS) += proc.o
15crypto_algapi-y := algapi.o scatterwalk.o $(crypto_algapi-y)
16obj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o
17
18obj-$(CONFIG_CRYPTO_AEAD2) += aead.o
19
20crypto_blkcipher-y := ablkcipher.o
21crypto_blkcipher-y += blkcipher.o
22crypto_blkcipher-y += skcipher.o
23obj-$(CONFIG_CRYPTO_BLKCIPHER2) += crypto_blkcipher.o
24obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o
25obj-$(CONFIG_CRYPTO_ECHAINIV) += echainiv.o
26
27crypto_hash-y += ahash.o
28crypto_hash-y += shash.o
29obj-$(CONFIG_CRYPTO_HASH2) += crypto_hash.o
30
31obj-$(CONFIG_CRYPTO_AKCIPHER2) += akcipher.o
32obj-$(CONFIG_CRYPTO_KPP2) += kpp.o
33
34dh_generic-y := dh.o
35dh_generic-y += dh_helper.o
36obj-$(CONFIG_CRYPTO_DH) += dh_generic.o
37
38$(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
39$(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
40$(obj)/rsa_helper.o: $(obj)/rsapubkey-asn1.h $(obj)/rsaprivkey-asn1.h
41clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
42clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
43
44rsa_generic-y := rsapubkey-asn1.o
45rsa_generic-y += rsaprivkey-asn1.o
46rsa_generic-y += rsa.o
47rsa_generic-y += rsa_helper.o
48rsa_generic-y += rsa-pkcs1pad.o
49obj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o
50
51crypto_acompress-y := acompress.o
52crypto_acompress-y += scompress.o
53obj-$(CONFIG_CRYPTO_ACOMP2) += crypto_acompress.o
54
55cryptomgr-y := algboss.o testmgr.o
56
57obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o
58obj-$(CONFIG_CRYPTO_USER) += crypto_user.o
59obj-$(CONFIG_CRYPTO_CMAC) += cmac.o
60obj-$(CONFIG_CRYPTO_HMAC) += hmac.o
61obj-$(CONFIG_CRYPTO_VMAC) += vmac.o
62obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o
63obj-$(CONFIG_CRYPTO_NULL2) += crypto_null.o
64obj-$(CONFIG_CRYPTO_MD4) += md4.o
65obj-$(CONFIG_CRYPTO_MD5) += md5.o
66obj-$(CONFIG_CRYPTO_RMD128) += rmd128.o
67obj-$(CONFIG_CRYPTO_RMD160) += rmd160.o
68obj-$(CONFIG_CRYPTO_RMD256) += rmd256.o
69obj-$(CONFIG_CRYPTO_RMD320) += rmd320.o
70obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o
71obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
72obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o
73obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o
74obj-$(CONFIG_CRYPTO_SM3) += sm3_generic.o
75obj-$(CONFIG_CRYPTO_WP512) += wp512.o
76CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns)  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
77obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
78obj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o
79obj-$(CONFIG_CRYPTO_ECB) += ecb.o
80obj-$(CONFIG_CRYPTO_CBC) += cbc.o
81obj-$(CONFIG_CRYPTO_PCBC) += pcbc.o
82obj-$(CONFIG_CRYPTO_CTS) += cts.o
83obj-$(CONFIG_CRYPTO_LRW) += lrw.o
84obj-$(CONFIG_CRYPTO_XTS) += xts.o
85obj-$(CONFIG_CRYPTO_CTR) += ctr.o
86obj-$(CONFIG_CRYPTO_KEYWRAP) += keywrap.o
87obj-$(CONFIG_CRYPTO_GCM) += gcm.o
88obj-$(CONFIG_CRYPTO_CCM) += ccm.o
89obj-$(CONFIG_CRYPTO_CHACHA20POLY1305) += chacha20poly1305.o
90obj-$(CONFIG_CRYPTO_PCRYPT) += pcrypt.o
91obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
92obj-$(CONFIG_CRYPTO_MCRYPTD) += mcryptd.o
93obj-$(CONFIG_CRYPTO_DES) += des_generic.o
94obj-$(CONFIG_CRYPTO_FCRYPT) += fcrypt.o
95obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish_generic.o
96obj-$(CONFIG_CRYPTO_BLOWFISH_COMMON) += blowfish_common.o
97obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o
98obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
99obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o
100CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure)  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
101obj-$(CONFIG_CRYPTO_AES) += aes_generic.o
102CFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356
103obj-$(CONFIG_CRYPTO_AES_TI) += aes_ti.o
104obj-$(CONFIG_CRYPTO_CAMELLIA) += camellia_generic.o
105obj-$(CONFIG_CRYPTO_CAST_COMMON) += cast_common.o
106obj-$(CONFIG_CRYPTO_CAST5) += cast5_generic.o
107obj-$(CONFIG_CRYPTO_CAST6) += cast6_generic.o
108obj-$(CONFIG_CRYPTO_ARC4) += arc4.o
109obj-$(CONFIG_CRYPTO_TEA) += tea.o
110obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o
111obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
112obj-$(CONFIG_CRYPTO_SEED) += seed.o
113obj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o
114obj-$(CONFIG_CRYPTO_CHACHA20) += chacha20_generic.o
115obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
116obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
117obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
118obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o
119obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o
120obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o
121obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
122obj-$(CONFIG_CRYPTO_LZO) += lzo.o
123obj-$(CONFIG_CRYPTO_LZ4) += lz4.o
124obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o
125obj-$(CONFIG_CRYPTO_842) += 842.o
126obj-$(CONFIG_CRYPTO_RNG2) += rng.o
127obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
128obj-$(CONFIG_CRYPTO_DRBG) += drbg.o
129obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
130CFLAGS_jitterentropy.o = -O0
131jitterentropy_rng-y := jitterentropy.o jitterentropy-kcapi.o
132obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
133obj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o
134obj-$(CONFIG_CRYPTO_USER_API) += af_alg.o
135obj-$(CONFIG_CRYPTO_USER_API_HASH) += algif_hash.o
136obj-$(CONFIG_CRYPTO_USER_API_SKCIPHER) += algif_skcipher.o
137obj-$(CONFIG_CRYPTO_USER_API_RNG) += algif_rng.o
138obj-$(CONFIG_CRYPTO_USER_API_AEAD) += algif_aead.o
139
140ecdh_generic-y := ecc.o
141ecdh_generic-y += ecdh.o
142ecdh_generic-y += ecdh_helper.o
143obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o
144
145#
146# generic algorithms and the async_tx api
147#
148obj-$(CONFIG_XOR_BLOCKS) += xor.o
149obj-$(CONFIG_ASYNC_CORE) += async_tx/
150obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys/
151obj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o
152obj-$(CONFIG_CRYPTO_ABLK_HELPER) += ablk_helper.o
153crypto_simd-y := simd.o
154obj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o
155