crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
-define KernelPackage/crypto-core
- SUBMENU:=$(CRYPTO_MENU)
- TITLE:=Core CryptoAPI modules
- KCONFIG:= \
- CONFIG_CRYPTO=y \
- CONFIG_CRYPTO_HW=y \
- CONFIG_CRYPTO_BLKCIPHER \
- CONFIG_CRYPTO_ALGAPI \
- $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
- FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
-endef
-
-$(eval $(call KernelPackage,crypto-core))
-
-
define AddDepends/crypto
SUBMENU:=$(CRYPTO_MENU)
- DEPENDS+=+kmod-crypto-core $(1)
+ DEPENDS+= $(1)
endef
define KernelPackage/crypto-aead
CONFIG_CRYPTO_AEAD \
CONFIG_CRYPTO_AEAD2
FILES:=$(LINUX_DIR)/crypto/aead.ko
- AUTOLOAD:=$(call AutoLoad,09,crypto_aead,1)
- $(call AddDepends/crypto)
+ AUTOLOAD:=$(call AutoLoad,09,aead,1)
+ $(call AddDepends/crypto, +LINUX_4_3:kmod-crypto-null +LINUX_4_4:kmod-crypto-null)
endef
$(eval $(call KernelPackage,crypto-aead))
CONFIG_CRYPTO_MANAGER \
CONFIG_CRYPTO_MANAGER2
FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
+ AUTOLOAD:=$(call AutoLoad,09,cryptomgr,1)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-rng
TITLE:=CryptoAPI random number generation
- KCONFIG:=CONFIG_CRYPTO_RNG2
+ DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
+ KCONFIG:= \
+ CONFIG_CRYPTO_DRBG \
+ CONFIG_CRYPTO_DRBG_HMAC=y \
+ CONFIG_CRYPTO_DRBG_MENU \
+ CONFIG_CRYPTO_JITTERENTROPY \
+ CONFIG_CRYPTO_RNG2
FILES:= \
- $(LINUX_DIR)/crypto/rng.ko \
- $(LINUX_DIR)/crypto/krng.ko
- AUTOLOAD:=$(call AutoLoad,09,rng krng)
+ $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \
+ $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \
+ $(LINUX_DIR)/crypto/krng.ko@lt4.2 \
+ $(LINUX_DIR)/crypto/rng.ko
+ AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-hw-talitos
TITLE:=Freescale integrated security engine (SEC) driver
- DEPENDS:=+kmod-crypto-aes +kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc
+ DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_TALITOS
FILES:= \
$(LINUX_DIR)/drivers/crypto/talitos.ko
define KernelPackage/crypto-hw-padlock
TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
- DEPENDS:=+kmod-crypto-aes +kmod-crypto-manager
+ DEPENDS:=+kmod-crypto-manager
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_PADLOCK \
CONFIG_CRYPTO_DEV_PADLOCK_AES \
CONFIG_CRYPTO_DEV_PADLOCK_SHA
TITLE:=AMD Geode hardware crypto module
DEPENDS:=+kmod-crypto-manager
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_GEODE
FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
AUTOLOAD:=$(call AutoLoad,09,geode-aes)
TITLE:=HIFN 795x crypto accelerator
DEPENDS:=+kmod-random-core +kmod-crypto-manager
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_HIFN_795X \
CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
TITLE:=AMCC PPC4xx hardware crypto module
DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_PPC4XX
FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
TITLE:=TI OMAP hardware crypto modules
DEPENDS:=@TARGET_omap
KCONFIG:= \
+ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_OMAP_AES \
CONFIG_CRYPTO_DEV_OMAP_DES \
CONFIG_CRYPTO_DEV_OMAP_SHAM
$(eval $(call KernelPackage,crypto-hw-omap))
-define KernelPackage/crypto-aes
- TITLE:=AES cipher CryptoAPI module
- KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
- FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
- AUTOLOAD:=$(call AutoLoad,09,aes_generic)
- $(call AddDepends/crypto)
-endef
-
-define KernelPackage/crypto-aes/x86
- FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
- AUTOLOAD:=$(call AutoLoad,09,aes-i586)
-endef
-
-$(eval $(call KernelPackage,crypto-aes))
-
-
-define KernelPackage/crypto-arc4
- TITLE:=ARC4 (RC4) cipher CryptoAPI module
- KCONFIG:=CONFIG_CRYPTO_ARC4
- FILES:=$(LINUX_DIR)/crypto/arc4.ko
- AUTOLOAD:=$(call AutoLoad,09,arc4)
- $(call AddDepends/crypto)
-endef
-
-$(eval $(call KernelPackage,crypto-arc4))
-
-
define KernelPackage/crypto-authenc
TITLE:=Combined mode wrapper for IPsec
- DEPENDS:=+kmod-crypto-manager
+ DEPENDS:=+kmod-crypto-manager +LINUX_4_4:kmod-crypto-null
KCONFIG:=CONFIG_CRYPTO_AUTHENC
FILES:=$(LINUX_DIR)/crypto/authenc.ko
AUTOLOAD:=$(call AutoLoad,09,authenc)
define KernelPackage/crypto-ctr
TITLE:=Counter Mode CryptoAPI module
- DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv
+ DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv +kmod-crypto-iv
KCONFIG:=CONFIG_CRYPTO_CTR
FILES:=$(LINUX_DIR)/crypto/ctr.ko
AUTOLOAD:=$(call AutoLoad,09,ctr)
$(eval $(call KernelPackage,crypto-ctr))
+define KernelPackage/crypto-ccm
+ TITLE:=Support for Counter with CBC MAC (CCM)
+ DEPENDS:=+kmod-crypto-ctr +kmod-crypto-aead
+ KCONFIG:=CONFIG_CRYPTO_CCM
+ FILES:=$(LINUX_DIR)/crypto/ccm.ko
+ AUTOLOAD:=$(call AutoLoad,09,ccm)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ccm))
+
define KernelPackage/crypto-pcbc
TITLE:=Propagating Cipher Block Chaining CryptoAPI module
DEPENDS:=+kmod-crypto-manager
TITLE:=CRC32c CRC module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_CRC32C
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.15.0)),1)
FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
-else
- FILES:=$(LINUX_DIR)/crypto/crc32c.ko
- AUTOLOAD:=$(call AutoLoad,04,crc32c,1)
-endif
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-hmac
TITLE:=HMAC digest CryptoAPI module
- DEPENDS:=+kmod-crypto-hash
+ DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
KCONFIG:=CONFIG_CRYPTO_HMAC
FILES:=$(LINUX_DIR)/crypto/hmac.ko
- DEPENDS:=+kmod-crypto-manager
AUTOLOAD:=$(call AutoLoad,09,hmac)
$(call AddDepends/crypto)
endef
$(eval $(call KernelPackage,crypto-hmac))
+define KernelPackage/crypto-cmac
+ TITLE:=Support for Cipher-based Message Authentication Code (CMAC)
+ DEPENDS:=+kmod-crypto-hash
+ KCONFIG:=CONFIG_CRYPTO_CMAC
+ FILES:=$(LINUX_DIR)/crypto/cmac.ko
+ AUTOLOAD:=$(call AutoLoad,09,cmac)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-cmac))
+
+
+define KernelPackage/crypto-gcm
+ TITLE:=GCM/GMAC CryptoAPI module
+ DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
+ KCONFIG:=CONFIG_CRYPTO_GCM
+ FILES:=$(LINUX_DIR)/crypto/gcm.ko
+ AUTOLOAD:=$(call AutoLoad,09,gcm)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-gcm))
+
+
+define KernelPackage/crypto-gf128
+ TITLE:=GF(2^128) multiplication functions CryptoAPI module
+ KCONFIG:=CONFIG_CRYPTO_GF128MUL
+ FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
+ AUTOLOAD:=$(call AutoLoad,09,gf128mul)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-gf128))
+
+
+define KernelPackage/crypto-ghash
+ TITLE:=GHASH digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
+ KCONFIG:=CONFIG_CRYPTO_GHASH
+ FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
+ AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ghash))
+
+
define KernelPackage/crypto-md4
TITLE:=MD4 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
define KernelPackage/crypto-md5
TITLE:=MD5 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
- KCONFIG:=CONFIG_CRYPTO_MD5
+ KCONFIG:= \
+ CONFIG_CRYPTO_MD5 \
+ CONFIG_CRYPTO_MD5_OCTEON
FILES:=$(LINUX_DIR)/crypto/md5.ko
AUTOLOAD:=$(call AutoLoad,09,md5)
$(call AddDepends/crypto)
endef
+define KernelPackage/crypto-md5/octeon
+ FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
+ AUTOLOAD:=$(call AutoLoad,09,octeon-md5)
+endef
+
$(eval $(call KernelPackage,crypto-md5))
define KernelPackage/crypto-sha1
TITLE:=SHA1 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
- KCONFIG:=CONFIG_CRYPTO_SHA1
+ KCONFIG:= \
+ CONFIG_CRYPTO_SHA1 \
+ CONFIG_CRYPTO_SHA1_OCTEON
FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
$(call AddDepends/crypto)
endef
+define KernelPackage/crypto-sha1/octeon
+ FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
+ AUTOLOAD:=$(call AutoLoad,09,octeon-sha1)
+endef
+
$(eval $(call KernelPackage,crypto-sha1))
define KernelPackage/crypto-sha256
TITLE:=SHA224 SHA256 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
- KCONFIG:=CONFIG_CRYPTO_SHA256
+ KCONFIG:= \
+ CONFIG_CRYPTO_SHA256 \
+ CONFIG_CRYPTO_SHA256_OCTEON
FILES:=$(LINUX_DIR)/crypto/sha256_generic.ko
AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
$(call AddDepends/crypto)
endef
+define KernelPackage/crypto-sha256/octeon
+ FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko
+ AUTOLOAD:=$(call AutoLoad,09,octeon-sha256)
+endef
+
$(eval $(call KernelPackage,crypto-sha256))
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
-camellia_mod_suffix=_generic
-endif
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
-cast56_mod_suffix=_generic
-endif
+define KernelPackage/crypto-sha512
+ TITLE:=SHA512 digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-hash
+ KCONFIG:= \
+ CONFIG_CRYPTO_SHA512 \
+ CONFIG_CRYPTO_SHA512_OCTEON
+ FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
+ AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
+ $(call AddDepends/crypto)
+endef
+
+define KernelPackage/crypto-sha512/octeon
+ FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko
+ AUTOLOAD:=$(call AutoLoad,09,octeon-sha512)
+endef
+
+$(eval $(call KernelPackage,crypto-sha512))
+
define KernelPackage/crypto-misc
TITLE:=Other CryptoAPI modules
CONFIG_CRYPTO_FCRYPT \
CONFIG_CRYPTO_KHAZAD \
CONFIG_CRYPTO_SERPENT \
- CONFIG_CRYPTO_SHA512 \
CONFIG_CRYPTO_TEA \
CONFIG_CRYPTO_TGR192 \
CONFIG_CRYPTO_TWOFISH \
CONFIG_CRYPTO_WP512
FILES:= \
$(LINUX_DIR)/crypto/anubis.ko \
- $(LINUX_DIR)/crypto/camellia$(camellia_mod_suffix).ko \
- $(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) \
- $(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
- $(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
+ $(LINUX_DIR)/crypto/camellia_generic.ko \
+ $(LINUX_DIR)/crypto/cast_common.ko \
+ $(LINUX_DIR)/crypto/cast5_generic.ko \
+ $(LINUX_DIR)/crypto/cast6_generic.ko \
$(LINUX_DIR)/crypto/khazad.ko \
- $(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
$(LINUX_DIR)/crypto/tgr192.ko \
$(LINUX_DIR)/crypto/twofish_common.ko \
$(call AddDepends/crypto)
endef
-define KernelPackage/crypto-misc/x86
- FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
-endef
+ifndef CONFIG_TARGET_x86_64
+ define KernelPackage/crypto-misc/x86
+ FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
+ endef
+endif
$(eval $(call KernelPackage,crypto-misc))
KCONFIG:=CONFIG_CRYPTO_NULL
FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
AUTOLOAD:=$(call AutoLoad,09,crypto_null)
- $(call AddDepends/crypto,+kmod-crypto-manager)
+ $(call AddDepends/crypto, +kmod-crypto-hash)
endef
$(eval $(call KernelPackage,crypto-null))
define KernelPackage/crypto-xts
TITLE:=XTS cipher CryptoAPI module
- DEPENDS:=+kmod-crypto-manager
- KCONFIG:= \
- CONFIG_CRYPTO_GF128MUL \
- CONFIG_CRYPTO_XTS
- FILES:= \
- $(LINUX_DIR)/crypto/xts.ko \
- $(LINUX_DIR)/crypto/gf128mul.ko
- AUTOLOAD:=$(call AutoLoad,09, \
- gf128mul \
- xts \
- )
+ DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager
+ KCONFIG:=CONFIG_CRYPTO_XTS
+ FILES:=$(LINUX_DIR)/crypto/xts.ko
+ AUTOLOAD:=$(call AutoLoad,09,xts)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-mv-cesa
TITLE:=Marvell crypto engine
- DEPENDS:=+kmod-crypto-manager +kmod-crypto-aes @TARGET_kirkwood||TARGET_orion||TARGET_mvebu
+ DEPENDS:=+kmod-crypto-manager @TARGET_kirkwood||TARGET_orion||TARGET_mvebu
KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
AUTOLOAD:=$(call AutoLoad,09,mv_cesa)