162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_UTILS)			+= libcryptoutils.o
462306a36Sopenharmony_cilibcryptoutils-y				:= memneq.o utils.o
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci# chacha is used by the /dev/random driver which is always builtin
762306a36Sopenharmony_ciobj-y						+= chacha.o
862306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_CHACHA_GENERIC)		+= libchacha.o
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_AES)			+= libaes.o
1162306a36Sopenharmony_cilibaes-y					:= aes.o
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_AESGCM)			+= libaesgcm.o
1462306a36Sopenharmony_cilibaesgcm-y					:= aesgcm.o
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_ARC4)			+= libarc4.o
1762306a36Sopenharmony_cilibarc4-y					:= arc4.o
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_GF128MUL)		+= gf128mul.o
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci# blake2s is used by the /dev/random driver which is always builtin
2262306a36Sopenharmony_ciobj-y						+= libblake2s.o
2362306a36Sopenharmony_cilibblake2s-y					:= blake2s.o
2462306a36Sopenharmony_cilibblake2s-$(CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC)	+= blake2s-generic.o
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_CHACHA20POLY1305)	+= libchacha20poly1305.o
2762306a36Sopenharmony_cilibchacha20poly1305-y				+= chacha20poly1305.o
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_CURVE25519_GENERIC)	+= libcurve25519-generic.o
3062306a36Sopenharmony_cilibcurve25519-generic-y				:= curve25519-fiat32.o
3162306a36Sopenharmony_cilibcurve25519-generic-$(CONFIG_ARCH_SUPPORTS_INT128)	:= curve25519-hacl64.o
3262306a36Sopenharmony_cilibcurve25519-generic-y				+= curve25519-generic.o
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_CURVE25519)		+= libcurve25519.o
3562306a36Sopenharmony_cilibcurve25519-y					+= curve25519.o
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_DES)			+= libdes.o
3862306a36Sopenharmony_cilibdes-y					:= des.o
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_POLY1305_GENERIC)	+= libpoly1305.o
4162306a36Sopenharmony_cilibpoly1305-y					:= poly1305-donna32.o
4262306a36Sopenharmony_cilibpoly1305-$(CONFIG_ARCH_SUPPORTS_INT128)	:= poly1305-donna64.o
4362306a36Sopenharmony_cilibpoly1305-y					+= poly1305.o
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_SHA1)			+= libsha1.o
4662306a36Sopenharmony_cilibsha1-y					:= sha1.o
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciobj-$(CONFIG_CRYPTO_LIB_SHA256)			+= libsha256.o
4962306a36Sopenharmony_cilibsha256-y					:= sha256.o
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciifneq ($(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS),y)
5262306a36Sopenharmony_cilibblake2s-y					+= blake2s-selftest.o
5362306a36Sopenharmony_cilibchacha20poly1305-y				+= chacha20poly1305-selftest.o
5462306a36Sopenharmony_cilibcurve25519-y					+= curve25519-selftest.o
5562306a36Sopenharmony_ciendif
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciobj-$(CONFIG_MPILIB) += mpi/
58