xref: /openbmc/linux/crypto/Makefile (revision 67882e76)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Cryptographic API
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds
6c3715cb9SSebastian Siewiorobj-$(CONFIG_CRYPTO) += crypto.o
76bf37e5aSJames Yonancrypto-y := api.o cipher.o compress.o memneq.o
81da177e4SLinus Torvalds
9735d37b5SBaolin Wangobj-$(CONFIG_CRYPTO_ENGINE) += crypto_engine.o
10ccb778e1SNeil Hormanobj-$(CONFIG_CRYPTO_FIPS) += fips.o
11ccb778e1SNeil Horman
12cce9e06dSHerbert Xucrypto_algapi-$(CONFIG_PROC_FS) += proc.o
1321ea28abSTracey Dentcrypto_algapi-y := algapi.o scatterwalk.o $(crypto_algapi-y)
146a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o
151da177e4SLinus Torvalds
166a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_AEAD2) += aead.o
17653ebd9cSHerbert Xu
1821ea28abSTracey Dentcrypto_blkcipher-y := ablkcipher.o
1921ea28abSTracey Dentcrypto_blkcipher-y += blkcipher.o
207a7ffe65SHerbert Xucrypto_blkcipher-y += skcipher.o
216a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_BLKCIPHER2) += crypto_blkcipher.o
220a270321SHerbert Xuobj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o
23a10f554fSHerbert Xuobj-$(CONFIG_CRYPTO_ECHAINIV) += echainiv.o
245cde0af2SHerbert Xu
2521ea28abSTracey Dentcrypto_hash-y += ahash.o
2621ea28abSTracey Dentcrypto_hash-y += shash.o
276a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_HASH2) += crypto_hash.o
28055bcee3SHerbert Xu
293c339ab8STadeusz Strukobj-$(CONFIG_CRYPTO_AKCIPHER2) += akcipher.o
304e5f2c40SSalvatore Benedettoobj-$(CONFIG_CRYPTO_KPP2) += kpp.o
31a1d2f095SGeert Uytterhoeven
32802c7f1cSSalvatore Benedettodh_generic-y := dh.o
33802c7f1cSSalvatore Benedettodh_generic-y += dh_helper.o
34802c7f1cSSalvatore Benedettoobj-$(CONFIG_CRYPTO_DH) += dh_generic.o
35802c7f1cSSalvatore Benedetto
364fa8bc94SMasahiro Yamada$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
374fa8bc94SMasahiro Yamada$(obj)/rsaprivkey.asn1.o: $(obj)/rsaprivkey.asn1.c $(obj)/rsaprivkey.asn1.h
384fa8bc94SMasahiro Yamada$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h $(obj)/rsaprivkey.asn1.h
39cfc2bb32STadeusz Struk
404fa8bc94SMasahiro Yamadarsa_generic-y := rsapubkey.asn1.o
414fa8bc94SMasahiro Yamadarsa_generic-y += rsaprivkey.asn1.o
42cfc2bb32STadeusz Strukrsa_generic-y += rsa.o
43cfc2bb32STadeusz Strukrsa_generic-y += rsa_helper.o
443d5b1ecdSAndrzej Zaborowskirsa_generic-y += rsa-pkcs1pad.o
45cfc2bb32STadeusz Strukobj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o
46cfc2bb32STadeusz Struk
476c0f4000SGiovanni Cabidducrypto_acompress-y := acompress.o
486c0f4000SGiovanni Cabidducrypto_acompress-y += scompress.o
496c0f4000SGiovanni Cabidduobj-$(CONFIG_CRYPTO_ACOMP2) += crypto_acompress.o
502ebda74fSGiovanni Cabiddu
5121ea28abSTracey Dentcryptomgr-y := algboss.o testmgr.o
52da7f033dSHerbert Xu
536a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o
54a38f7907SSteffen Klassertobj-$(CONFIG_CRYPTO_USER) += crypto_user.o
552ced2607SCorentin Labbecrypto_user-y := crypto_user_base.o
562ced2607SCorentin Labbecrypto_user-$(CONFIG_CRYPTO_STATS) += crypto_user_stat.o
5793b5e86aSJussi Kivilinnaobj-$(CONFIG_CRYPTO_CMAC) += cmac.o
581da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_HMAC) += hmac.o
59f1939f7cSShane Wangobj-$(CONFIG_CRYPTO_VMAC) += vmac.o
60333b0d7eSKazunori MIYAZAWAobj-$(CONFIG_CRYPTO_XCBC) += xcbc.o
61a26bcb04SHerbert Xuobj-$(CONFIG_CRYPTO_NULL2) += crypto_null.o
621da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_MD4) += md4.o
631da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_MD5) += md5.o
64c6580eb8SAdrian-Ken Rueegseggerobj-$(CONFIG_CRYPTO_RMD128) += rmd128.o
65c6580eb8SAdrian-Ken Rueegseggerobj-$(CONFIG_CRYPTO_RMD160) += rmd160.o
66c555c28dSAdrian-Ken Rueegseggerobj-$(CONFIG_CRYPTO_RMD256) += rmd256.o
67c555c28dSAdrian-Ken Rueegseggerobj-$(CONFIG_CRYPTO_RMD320) += rmd320.o
68ad5d2789SSebastian Siewiorobj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o
69ad5d2789SSebastian Siewiorobj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
7078f8b3a2SJan Glauberobj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o
7153964b9eSJeff Garzikobj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o
724f0fc160SGilad Ben-Yossefobj-$(CONFIG_CRYPTO_SM3) += sm3_generic.o
73fe18957eSVitaly Chikunovobj-$(CONFIG_CRYPTO_STREEBOG) += streebog_generic.o
741da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_WP512) += wp512.o
757d6e9105SArnd BergmannCFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns)  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
761da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
77c494e070SRik Snelobj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o
78db131ef9SHerbert Xuobj-$(CONFIG_CRYPTO_ECB) += ecb.o
79db131ef9SHerbert Xuobj-$(CONFIG_CRYPTO_CBC) += cbc.o
80a7d85e06SJames Bottomleyobj-$(CONFIG_CRYPTO_CFB) += cfb.o
8191652be5SDavid Howellsobj-$(CONFIG_CRYPTO_PCBC) += pcbc.o
8276cb9521SKevin Coffmanobj-$(CONFIG_CRYPTO_CTS) += cts.o
8364470f1bSRik Snelobj-$(CONFIG_CRYPTO_LRW) += lrw.o
84f19f5111SRik Snelobj-$(CONFIG_CRYPTO_XTS) += xts.o
8523e353c8SJoy Lattenobj-$(CONFIG_CRYPTO_CTR) += ctr.o
861c49678eSStephan Muellerobj-$(CONFIG_CRYPTO_KEYWRAP) += keywrap.o
87059c2a4dSEric Biggersobj-$(CONFIG_CRYPTO_ADIANTUM) += adiantum.o
8826609a21SEric Biggersobj-$(CONFIG_CRYPTO_NHPOLY1305) += nhpoly1305.o
8928db8e3eSMikko Herranenobj-$(CONFIG_CRYPTO_GCM) += gcm.o
904a49b499SJoy Lattenobj-$(CONFIG_CRYPTO_CCM) += ccm.o
9171ebc4d1SMartin Williobj-$(CONFIG_CRYPTO_CHACHA20POLY1305) += chacha20poly1305.o
92f606a88eSOndrej Mosnacekobj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o
93f606a88eSOndrej Mosnacekobj-$(CONFIG_CRYPTO_AEGIS128L) += aegis128l.o
94f606a88eSOndrej Mosnacekobj-$(CONFIG_CRYPTO_AEGIS256) += aegis256.o
95396be41fSOndrej Mosnacekobj-$(CONFIG_CRYPTO_MORUS640) += morus640.o
96396be41fSOndrej Mosnacekobj-$(CONFIG_CRYPTO_MORUS1280) += morus1280.o
975068c7a8SSteffen Klassertobj-$(CONFIG_CRYPTO_PCRYPT) += pcrypt.o
98124b53d0SHerbert Xuobj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
99c5a511f1SSebastian Siewiorobj-$(CONFIG_CRYPTO_DES) += des_generic.o
10090831639SDavid Howellsobj-$(CONFIG_CRYPTO_FCRYPT) += fcrypt.o
1013f2a5d2dSJussi Kivilinnaobj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish_generic.o
10252ba867cSJussi Kivilinnaobj-$(CONFIG_CRYPTO_BLOWFISH_COMMON) += blowfish_common.o
1035b04fc17SJoachim Fritschiobj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o
1042729bb42SJoachim Fritschiobj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
105dd6eec24SJussi Kivilinnaobj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o
1067d6e9105SArnd BergmannCFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure)  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
107f8246af0SSebastian Siewiorobj-$(CONFIG_CRYPTO_AES) += aes_generic.o
1086e36719fSArnd BergmannCFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356
109747c8ce4SGilad Ben-Yossefobj-$(CONFIG_CRYPTO_SM4) += sm4_generic.o
110b5e0b032SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_TI) += aes_ti.o
111075e39dfSJussi Kivilinnaobj-$(CONFIG_CRYPTO_CAMELLIA) += camellia_generic.o
112044ab525SJussi Kivilinnaobj-$(CONFIG_CRYPTO_CAST_COMMON) += cast_common.o
113270b0c6bSJohannes Goetzfriedobj-$(CONFIG_CRYPTO_CAST5) += cast5_generic.o
1142b49b906SJohannes Goetzfriedobj-$(CONFIG_CRYPTO_CAST6) += cast6_generic.o
1151da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_ARC4) += arc4.o
1161da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_TEA) += tea.o
1171da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o
1181da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
119e2ee95b8SHye-Shik Changobj-$(CONFIG_CRYPTO_SEED) += seed.o
1202407d608STan Swee Hengobj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o
1211ca1b917SEric Biggersobj-$(CONFIG_CRYPTO_CHACHA20) += chacha_generic.o
122f979e014SMartin Williobj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
1231da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
1241da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
12506e5a1f2STim Chenobj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o
126a7c58ac0SHerbert Xuobj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o
12726052f9bSHerbert Xuobj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o
128a5079d08SSteffen Klassertobj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
12945ec975eSDave Rodgmanobj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o
1300ea8530dSChanho Minobj-$(CONFIG_CRYPTO_LZ4) += lz4.o
1310ea8530dSChanho Minobj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o
13267882e76SNikolay Borisovobj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o
13335a1fc18SSeth Jenningsobj-$(CONFIG_CRYPTO_842) += 842.o
1346a0fcbb4SHerbert Xuobj-$(CONFIG_CRYPTO_RNG2) += rng.o
13517f0f4a4SNeil Hormanobj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
136f2c89a10SHerbert Xuobj-$(CONFIG_CRYPTO_DRBG) += drbg.o
137dfc9fa91SStephan Muellerobj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
138dfc9fa91SStephan MuellerCFLAGS_jitterentropy.o = -O0
139dfc9fa91SStephan Muellerjitterentropy_rng-y := jitterentropy.o jitterentropy-kcapi.o
1401da177e4SLinus Torvaldsobj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
1412cdc6899SHuang Yingobj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o
14203c8efc1SHerbert Xuobj-$(CONFIG_CRYPTO_USER_API) += af_alg.o
143fe869cdbSHerbert Xuobj-$(CONFIG_CRYPTO_USER_API_HASH) += algif_hash.o
1448ff59090SHerbert Xuobj-$(CONFIG_CRYPTO_USER_API_SKCIPHER) += algif_skcipher.o
1452f375538SStephan Muellerobj-$(CONFIG_CRYPTO_USER_API_RNG) += algif_rng.o
14644cac4fcSStephan Muellerobj-$(CONFIG_CRYPTO_USER_API_AEAD) += algif_aead.o
147d28fc3dbSNick Terrellobj-$(CONFIG_CRYPTO_ZSTD) += zstd.o
148e497c518SGilad Ben-Yossefobj-$(CONFIG_CRYPTO_OFB) += ofb.o
1494a2289daSVitaly Chikunovobj-$(CONFIG_CRYPTO_ECC) += ecc.o
150685784aaSDan Williams
1516755fd26STudor-Dan Ambarusecdh_generic-y += ecdh.o
1526755fd26STudor-Dan Ambarusecdh_generic-y += ecdh_helper.o
1536755fd26STudor-Dan Ambarusobj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o
1546755fd26STudor-Dan Ambarus
1550d7a7864SVitaly Chikunov$(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h
1560d7a7864SVitaly Chikunov$(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h
1570d7a7864SVitaly Chikunov$(obj)/ecrdsa.o: $(obj)/ecrdsa_params.asn1.h $(obj)/ecrdsa_pub_key.asn1.h
1580d7a7864SVitaly Chikunovecrdsa_generic-y += ecrdsa.o
1590d7a7864SVitaly Chikunovecrdsa_generic-y += ecrdsa_params.asn1.o
1600d7a7864SVitaly Chikunovecrdsa_generic-y += ecrdsa_pub_key.asn1.o
1610d7a7864SVitaly Chikunovobj-$(CONFIG_CRYPTO_ECRDSA) += ecrdsa_generic.o
1620d7a7864SVitaly Chikunov
163685784aaSDan Williams#
164685784aaSDan Williams# generic algorithms and the async_tx api
165685784aaSDan Williams#
166685784aaSDan Williamsobj-$(CONFIG_XOR_BLOCKS) += xor.o
1679bc89cd8SDan Williamsobj-$(CONFIG_ASYNC_CORE) += async_tx/
168964f3b3bSDavid Howellsobj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys/
169ee08997fSDmitry Kasatkinobj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o
170266d0516SHerbert Xucrypto_simd-y := simd.o
171266d0516SHerbert Xuobj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o
172