+define KernelPackage/crypto-hash
+ TITLE:=CryptoAPI hash support
+ KCONFIG:=CONFIG_CRYPTO_HASH
+ FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
+ AUTOLOAD:=$(call AutoLoad,02,crypto_hash)
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-hash))
+
+define KernelPackage/crypto-manager
+ TITLE:=CryptoAPI algorithm manager
+ DEPENDS:=+kmod-crypto-hash
+ KCONFIG:= \
+ CONFIG_CRYPTO_AEAD \
+ CONFIG_CRYPTO_BLKCIPHER \
+ CONFIG_CRYPTO_MANAGER \
+ $(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
+ FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
+ AUTOLOAD:=$(call AutoLoad,03,$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_name,$(mod))))
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-manager))
+
+define KernelPackage/crypto-wq
+ TITLE:=CryptoAPI work queue handling
+ KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
+ FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
+ AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-wq))
+
+define KernelPackage/crypto-rng
+ TITLE:=CryptoAPI random number generation
+ KCONFIG:=CONFIG_CRYPTO_RNG2
+ FILES:= \
+ $(LINUX_DIR)/crypto/rng.ko \
+ $(LINUX_DIR)/crypto/krng.ko
+ AUTOLOAD:=$(call AutoLoad,09,rng krng)
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-rng))
+
+define KernelPackage/crypto-iv
+ TITLE:=CryptoAPI initialization vectors
+ DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
+ KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
+ FILES:= \
+ $(LINUX_DIR)/crypto/eseqiv.ko \
+ $(LINUX_DIR)/crypto/chainiv.ko
+ AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-iv))