1dc51f257SArd Biesheuvel# SPDX-License-Identifier: GPL-2.0 2dc51f257SArd Biesheuvel 37033b937SEric Biggersobj-$(CONFIG_CRYPTO_LIB_UTILS) += libcryptoutils.o 46e78ad0bSEric Biggerslibcryptoutils-y := memneq.o utils.o 57033b937SEric Biggers 65fb8ef25SArd Biesheuvel# chacha is used by the /dev/random driver which is always builtin 75fb8ef25SArd Biesheuvelobj-y += chacha.o 85fb8ef25SArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_CHACHA_GENERIC) += libchacha.o 95fb8ef25SArd Biesheuvel 10e59c1c98SArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o 11e59c1c98SArd Biesheuvellibaes-y := aes.o 12e59c1c98SArd Biesheuvel 13f1354404SArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_AESCFB) += libaescfb.o 14f1354404SArd Biesheuvellibaescfb-y := aescfb.o 15f1354404SArd Biesheuvel 16520af5daSArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_AESGCM) += libaesgcm.o 17520af5daSArd Biesheuvellibaesgcm-y := aesgcm.o 18520af5daSArd Biesheuvel 19dc51f257SArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o 20dc51f257SArd Biesheuvellibarc4-y := arc4.o 2104007b0eSArd Biesheuvel 2261c581a4SArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_GF128MUL) += gf128mul.o 2361c581a4SArd Biesheuvel 246048fdccSJason A. Donenfeld# blake2s is used by the /dev/random driver which is always builtin 256048fdccSJason A. Donenfeldobj-y += libblake2s.o 266048fdccSJason A. Donenfeldlibblake2s-y := blake2s.o 276048fdccSJason A. Donenfeldlibblake2s-$(CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC) += blake2s-generic.o 2840b99697SEric Biggerslibblake2s-$(CONFIG_CRYPTO_SELFTESTS) += blake2s-selftest.o 2966d7fb94SJason A. Donenfeld 30ed20078bSArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_CHACHA20POLY1305) += libchacha20poly1305.o 31ed20078bSArd Biesheuvellibchacha20poly1305-y += chacha20poly1305.o 3240b99697SEric Biggerslibchacha20poly1305-$(CONFIG_CRYPTO_SELFTESTS) += chacha20poly1305-selftest.o 33ed20078bSArd Biesheuvel 34a8bdf2c4SHerbert Xuobj-$(CONFIG_CRYPTO_LIB_CURVE25519_GENERIC) += libcurve25519-generic.o 35a8bdf2c4SHerbert Xulibcurve25519-generic-y := curve25519-fiat32.o 36a8bdf2c4SHerbert Xulibcurve25519-generic-$(CONFIG_ARCH_SUPPORTS_INT128) := curve25519-hacl64.o 37a8bdf2c4SHerbert Xulibcurve25519-generic-y += curve25519-generic.o 38*2f13daeeSNathan Chancellor# clang versions prior to 18 may blow out the stack with KASAN 39*2f13daeeSNathan Chancellorifeq ($(call clang-min-version, 180000),) 40*2f13daeeSNathan ChancellorKASAN_SANITIZE_curve25519-hacl64.o := n 41*2f13daeeSNathan Chancellorendif 42a8bdf2c4SHerbert Xu 43a8bdf2c4SHerbert Xuobj-$(CONFIG_CRYPTO_LIB_CURVE25519) += libcurve25519.o 440ed42a6fSJason A. Donenfeldlibcurve25519-y += curve25519.o 4540b99697SEric Biggerslibcurve25519-$(CONFIG_CRYPTO_SELFTESTS) += curve25519-selftest.o 460ed42a6fSJason A. Donenfeld 4704007b0eSArd Biesheuvelobj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o 4804007b0eSArd Biesheuvellibdes-y := des.o 4901d3aee8SHans de Goede 509b9d4ef0SHerbert Xuobj-$(CONFIG_CRYPTO_LIB_POLY1305) += libpoly1305.o 511c08a104SJason A. Donenfeldlibpoly1305-y += poly1305.o 5248ea8c6eSArd Biesheuvel 539b9d4ef0SHerbert Xuobj-$(CONFIG_CRYPTO_LIB_POLY1305_GENERIC) += libpoly1305-generic.o 549b9d4ef0SHerbert Xulibpoly1305-generic-y := poly1305-donna32.o 559b9d4ef0SHerbert Xulibpoly1305-generic-$(CONFIG_ARCH_SUPPORTS_INT128) := poly1305-donna64.o 569b9d4ef0SHerbert Xulibpoly1305-generic-y += poly1305-generic.o 579b9d4ef0SHerbert Xu 58ec8f7f48SEric Biggersobj-$(CONFIG_CRYPTO_LIB_SHA1) += libsha1.o 59ec8f7f48SEric Biggerslibsha1-y := sha1.o 60463f7408SEric Biggers 6101d3aee8SHans de Goedeobj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o 6201d3aee8SHans de Goedelibsha256-y := sha256.o 6366d7fb94SJason A. Donenfeld 64950e5c84SEric Biggersobj-$(CONFIG_CRYPTO_LIB_SHA256_GENERIC) += libsha256-generic.o 65950e5c84SEric Biggerslibsha256-generic-y := sha256-generic.o 66950e5c84SEric Biggers 672a598d0bSHerbert Xuobj-$(CONFIG_MPILIB) += mpi/ 684964a1d9SEric Biggers 69698de822SEric Biggersobj-$(CONFIG_CRYPTO_SELFTESTS) += simd.o 70f4065b2fSHerbert Xu 71f4065b2fSHerbert Xuobj-$(CONFIG_CRYPTO_LIB_SM3) += libsm3.o 72f4065b2fSHerbert Xulibsm3-y := sm3.o 73