crypto.mk 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  1. #
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. CRYPTO_MENU:=Cryptographic API modules
  8. CRYPTO_MODULES = \
  9. ALGAPI2=crypto_algapi \
  10. BLKCIPHER2=crypto_blkcipher
  11. crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
  12. crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
  13. crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
  14. define AddDepends/crypto
  15. SUBMENU:=$(CRYPTO_MENU)
  16. DEPENDS+= $(1)
  17. endef
  18. define KernelPackage/crypto-acompress
  19. TITLE:=Asynchronous Compression operations
  20. HIDDEN:=1
  21. KCONFIG:=CONFIG_CRYPTO_ACOMP2
  22. FILES:=$(LINUX_DIR)/crypto/crypto_acompress.ko
  23. AUTOLOAD:=$(call AutoLoad,09,crypto_acompress)
  24. $(call AddDepends/crypto)
  25. endef
  26. $(eval $(call KernelPackage,crypto-acompress))
  27. define KernelPackage/crypto-aead
  28. TITLE:=CryptoAPI AEAD support
  29. KCONFIG:= \
  30. CONFIG_CRYPTO_AEAD \
  31. CONFIG_CRYPTO_AEAD2
  32. FILES:=$(LINUX_DIR)/crypto/aead.ko
  33. AUTOLOAD:=$(call AutoLoad,09,aead,1)
  34. $(call AddDepends/crypto, +!LINUX_3_18:kmod-crypto-null)
  35. endef
  36. $(eval $(call KernelPackage,crypto-aead))
  37. define KernelPackage/crypto-authenc
  38. TITLE:=Combined mode wrapper for IPsec
  39. DEPENDS:=+kmod-crypto-manager +!LINUX_3_18:kmod-crypto-null
  40. KCONFIG:=CONFIG_CRYPTO_AUTHENC
  41. FILES:=$(LINUX_DIR)/crypto/authenc.ko
  42. AUTOLOAD:=$(call AutoLoad,09,authenc)
  43. $(call AddDepends/crypto)
  44. endef
  45. $(eval $(call KernelPackage,crypto-authenc))
  46. define KernelPackage/crypto-cbc
  47. TITLE:=Cipher Block Chaining CryptoAPI module
  48. DEPENDS:=+kmod-crypto-manager
  49. KCONFIG:=CONFIG_CRYPTO_CBC
  50. FILES:=$(LINUX_DIR)/crypto/cbc.ko
  51. AUTOLOAD:=$(call AutoLoad,09,cbc)
  52. $(call AddDepends/crypto)
  53. endef
  54. $(eval $(call KernelPackage,crypto-cbc))
  55. define KernelPackage/crypto-ccm
  56. TITLE:=Support for Counter with CBC MAC (CCM)
  57. DEPENDS:=+kmod-crypto-ctr +kmod-crypto-aead
  58. KCONFIG:=CONFIG_CRYPTO_CCM
  59. FILES:=$(LINUX_DIR)/crypto/ccm.ko
  60. AUTOLOAD:=$(call AutoLoad,09,ccm)
  61. $(call AddDepends/crypto)
  62. endef
  63. $(eval $(call KernelPackage,crypto-ccm))
  64. define KernelPackage/crypto-cmac
  65. TITLE:=Support for Cipher-based Message Authentication Code (CMAC)
  66. DEPENDS:=+kmod-crypto-hash
  67. KCONFIG:=CONFIG_CRYPTO_CMAC
  68. FILES:=$(LINUX_DIR)/crypto/cmac.ko
  69. AUTOLOAD:=$(call AutoLoad,09,cmac)
  70. $(call AddDepends/crypto)
  71. endef
  72. $(eval $(call KernelPackage,crypto-cmac))
  73. define KernelPackage/crypto-crc32
  74. TITLE:=CRC32 CRC module
  75. DEPENDS:=+kmod-crypto-hash
  76. KCONFIG:=CONFIG_CRYPTO_CRC32
  77. HIDDEN:=1
  78. FILES:=$(LINUX_DIR)/crypto/crc32_generic.ko@ge4.9
  79. AUTOLOAD:=$(call AutoLoad,04,crc32_generic@ge4.9,1)
  80. $(call AddDepends/crypto)
  81. endef
  82. $(eval $(call KernelPackage,crypto-crc32))
  83. define KernelPackage/crypto-crc32c
  84. TITLE:=CRC32c CRC module
  85. DEPENDS:=+kmod-crypto-hash
  86. KCONFIG:=CONFIG_CRYPTO_CRC32C
  87. FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
  88. AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
  89. $(call AddDepends/crypto)
  90. endef
  91. $(eval $(call KernelPackage,crypto-crc32c))
  92. define KernelPackage/crypto-ctr
  93. TITLE:=Counter Mode CryptoAPI module
  94. DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv +kmod-crypto-iv
  95. KCONFIG:=CONFIG_CRYPTO_CTR
  96. FILES:=$(LINUX_DIR)/crypto/ctr.ko
  97. AUTOLOAD:=$(call AutoLoad,09,ctr)
  98. $(call AddDepends/crypto)
  99. endef
  100. $(eval $(call KernelPackage,crypto-ctr))
  101. define KernelPackage/crypto-cts
  102. TITLE:=Cipher Text Stealing CryptoAPI module
  103. DEPENDS:=+kmod-crypto-manager
  104. KCONFIG:=CONFIG_CRYPTO_CTS
  105. FILES:=$(LINUX_DIR)/crypto/cts.ko
  106. AUTOLOAD:=$(call AutoLoad,09,cts)
  107. $(call AddDepends/crypto)
  108. endef
  109. $(eval $(call KernelPackage,crypto-cts))
  110. define KernelPackage/crypto-deflate
  111. TITLE:=Deflate compression CryptoAPI module
  112. DEPENDS:=+kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +!(LINUX_3_18||LINUX_4_9):kmod-crypto-acompress
  113. KCONFIG:=CONFIG_CRYPTO_DEFLATE
  114. FILES:=$(LINUX_DIR)/crypto/deflate.ko
  115. AUTOLOAD:=$(call AutoLoad,09,deflate)
  116. $(call AddDepends/crypto)
  117. endef
  118. $(eval $(call KernelPackage,crypto-deflate))
  119. define KernelPackage/crypto-des
  120. TITLE:=DES/3DES cipher CryptoAPI module
  121. KCONFIG:=CONFIG_CRYPTO_DES
  122. FILES:=$(LINUX_DIR)/crypto/des_generic.ko
  123. AUTOLOAD:=$(call AutoLoad,09,des_generic)
  124. $(call AddDepends/crypto)
  125. endef
  126. $(eval $(call KernelPackage,crypto-des))
  127. define KernelPackage/crypto-ecb
  128. TITLE:=Electronic CodeBook CryptoAPI module
  129. DEPENDS:=+kmod-crypto-manager
  130. KCONFIG:=CONFIG_CRYPTO_ECB
  131. FILES:=$(LINUX_DIR)/crypto/ecb.ko
  132. AUTOLOAD:=$(call AutoLoad,09,ecb)
  133. $(call AddDepends/crypto)
  134. endef
  135. $(eval $(call KernelPackage,crypto-ecb))
  136. define KernelPackage/crypto-ecdh
  137. TITLE:=ECDH algorithm
  138. DEPENDS:=@!LINUX_3_18 +kmod-crypto-kpp
  139. KCONFIG:= CONFIG_CRYPTO_ECDH
  140. FILES:= \
  141. $(LINUX_DIR)/crypto/ecdh_generic.ko
  142. AUTOLOAD:=$(call AutoLoad,10,ecdh_generic)
  143. $(call AddDepends/crypto)
  144. endef
  145. $(eval $(call KernelPackage,crypto-ecdh))
  146. define KernelPackage/crypto-echainiv
  147. TITLE:=Encrypted Chain IV Generator
  148. DEPENDS:=+kmod-crypto-aead
  149. KCONFIG:=CONFIG_CRYPTO_ECHAINIV
  150. FILES:=$(LINUX_DIR)/crypto/echainiv.ko
  151. AUTOLOAD:=$(call AutoLoad,09,echainiv)
  152. $(call AddDepends/crypto)
  153. endef
  154. $(eval $(call KernelPackage,crypto-echainiv))
  155. define KernelPackage/crypto-fcrypt
  156. TITLE:=FCRYPT cipher CryptoAPI module
  157. KCONFIG:=CONFIG_CRYPTO_FCRYPT
  158. FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
  159. AUTOLOAD:=$(call AutoLoad,09,fcrypt)
  160. $(call AddDepends/crypto)
  161. endef
  162. $(eval $(call KernelPackage,crypto-fcrypt))
  163. define KernelPackage/crypto-gcm
  164. TITLE:=GCM/GMAC CryptoAPI module
  165. DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
  166. KCONFIG:=CONFIG_CRYPTO_GCM
  167. FILES:=$(LINUX_DIR)/crypto/gcm.ko
  168. AUTOLOAD:=$(call AutoLoad,09,gcm)
  169. $(call AddDepends/crypto)
  170. endef
  171. $(eval $(call KernelPackage,crypto-gcm))
  172. define KernelPackage/crypto-gf128
  173. TITLE:=GF(2^128) multiplication functions CryptoAPI module
  174. KCONFIG:=CONFIG_CRYPTO_GF128MUL
  175. FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
  176. AUTOLOAD:=$(call AutoLoad,09,gf128mul)
  177. $(call AddDepends/crypto)
  178. endef
  179. $(eval $(call KernelPackage,crypto-gf128))
  180. define KernelPackage/crypto-ghash
  181. TITLE:=GHASH digest CryptoAPI module
  182. DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
  183. KCONFIG:=CONFIG_CRYPTO_GHASH
  184. FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
  185. AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
  186. $(call AddDepends/crypto)
  187. endef
  188. $(eval $(call KernelPackage,crypto-ghash))
  189. define KernelPackage/crypto-hash
  190. TITLE:=CryptoAPI hash support
  191. KCONFIG:=CONFIG_CRYPTO_HASH
  192. FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
  193. AUTOLOAD:=$(call AutoLoad,02,crypto_hash,1)
  194. $(call AddDepends/crypto)
  195. endef
  196. $(eval $(call KernelPackage,crypto-hash))
  197. define KernelPackage/crypto-hmac
  198. TITLE:=HMAC digest CryptoAPI module
  199. DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
  200. KCONFIG:=CONFIG_CRYPTO_HMAC
  201. FILES:=$(LINUX_DIR)/crypto/hmac.ko
  202. AUTOLOAD:=$(call AutoLoad,09,hmac)
  203. $(call AddDepends/crypto)
  204. endef
  205. $(eval $(call KernelPackage,crypto-hmac))
  206. define KernelPackage/crypto-hw-ccp
  207. TITLE:=AMD Cryptographic Coprocessor
  208. DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 +!(LINUX_3_18||LINUX_4_9):kmod-crypto-rsa
  209. KCONFIG:= \
  210. CONFIG_CRYPTO_HW=y \
  211. CONFIG_CRYPTO_DEV_CCP=y \
  212. CONFIG_CRYPTO_DEV_CCP_CRYPTO \
  213. CONFIG_CRYPTO_DEV_CCP_DD \
  214. CONFIG_CRYPTO_DEV_SP_CCP=y
  215. FILES:= \
  216. $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \
  217. $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko
  218. AUTOLOAD:=$(call AutoLoad,09,ccp ccp-crypto)
  219. $(call AddDepends/crypto)
  220. endef
  221. $(eval $(call KernelPackage,crypto-hw-ccp))
  222. define KernelPackage/crypto-hw-geode
  223. TITLE:=AMD Geode hardware crypto module
  224. DEPENDS:=+kmod-crypto-manager
  225. KCONFIG:= \
  226. CONFIG_CRYPTO_HW=y \
  227. CONFIG_CRYPTO_DEV_GEODE
  228. FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
  229. AUTOLOAD:=$(call AutoLoad,09,geode-aes)
  230. $(call AddDepends/crypto)
  231. endef
  232. $(eval $(call KernelPackage,crypto-hw-geode))
  233. define KernelPackage/crypto-hw-hifn-795x
  234. TITLE:=HIFN 795x crypto accelerator
  235. DEPENDS:=+kmod-random-core +kmod-crypto-manager
  236. KCONFIG:= \
  237. CONFIG_CRYPTO_HW=y \
  238. CONFIG_CRYPTO_DEV_HIFN_795X \
  239. CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
  240. FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
  241. AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
  242. $(call AddDepends/crypto,+kmod-crypto-des)
  243. endef
  244. $(eval $(call KernelPackage,crypto-hw-hifn-795x))
  245. define KernelPackage/crypto-hw-padlock
  246. TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
  247. DEPENDS:=+kmod-crypto-manager
  248. KCONFIG:= \
  249. CONFIG_CRYPTO_HW=y \
  250. CONFIG_CRYPTO_DEV_PADLOCK \
  251. CONFIG_CRYPTO_DEV_PADLOCK_AES \
  252. CONFIG_CRYPTO_DEV_PADLOCK_SHA
  253. FILES:= \
  254. $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
  255. $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
  256. AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
  257. $(call AddDepends/crypto)
  258. endef
  259. $(eval $(call KernelPackage,crypto-hw-padlock))
  260. define KernelPackage/crypto-hw-talitos
  261. TITLE:=Freescale integrated security engine (SEC) driver
  262. DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
  263. KCONFIG:= \
  264. CONFIG_CRYPTO_HW=y \
  265. CONFIG_CRYPTO_DEV_TALITOS \
  266. CONFIG_CRYPTO_DEV_TALITOS1=y \
  267. CONFIG_CRYPTO_DEV_TALITOS2=y
  268. FILES:= \
  269. $(LINUX_DIR)/drivers/crypto/talitos.ko
  270. AUTOLOAD:=$(call AutoLoad,09,talitos)
  271. $(call AddDepends/crypto)
  272. endef
  273. $(eval $(call KernelPackage,crypto-hw-talitos))
  274. define KernelPackage/crypto-iv
  275. TITLE:=CryptoAPI initialization vectors
  276. DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
  277. KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
  278. HIDDEN:=1
  279. FILES:= \
  280. $(LINUX_DIR)/crypto/eseqiv.ko@lt4.9 \
  281. $(LINUX_DIR)/crypto/chainiv.ko@lt4.9
  282. AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
  283. $(call AddDepends/crypto)
  284. endef
  285. $(eval $(call KernelPackage,crypto-iv))
  286. define KernelPackage/crypto-kpp
  287. TITLE:=Key-agreement Protocol Primitives
  288. KCONFIG:=CONFIG_CRYPTO_KPP
  289. HIDDEN:=1
  290. FILES:=$(LINUX_DIR)/crypto/kpp.ko
  291. AUTOLOAD:=$(call AutoLoad,09,kpp)
  292. $(call AddDepends/crypto)
  293. endef
  294. $(eval $(call KernelPackage,crypto-kpp))
  295. define KernelPackage/crypto-manager
  296. TITLE:=CryptoAPI algorithm manager
  297. DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
  298. KCONFIG:= \
  299. CONFIG_CRYPTO_MANAGER \
  300. CONFIG_CRYPTO_MANAGER2
  301. FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
  302. AUTOLOAD:=$(call AutoLoad,09,cryptomgr,1)
  303. $(call AddDepends/crypto)
  304. endef
  305. $(eval $(call KernelPackage,crypto-manager))
  306. define KernelPackage/crypto-md4
  307. TITLE:=MD4 digest CryptoAPI module
  308. DEPENDS:=+kmod-crypto-hash
  309. KCONFIG:=CONFIG_CRYPTO_MD4
  310. FILES:=$(LINUX_DIR)/crypto/md4.ko
  311. AUTOLOAD:=$(call AutoLoad,09,md4)
  312. $(call AddDepends/crypto)
  313. endef
  314. $(eval $(call KernelPackage,crypto-md4))
  315. define KernelPackage/crypto-md5
  316. TITLE:=MD5 digest CryptoAPI module
  317. DEPENDS:=+kmod-crypto-hash
  318. KCONFIG:= \
  319. CONFIG_CRYPTO_MD5 \
  320. CONFIG_CRYPTO_MD5_OCTEON
  321. FILES:=$(LINUX_DIR)/crypto/md5.ko
  322. AUTOLOAD:=$(call AutoLoad,09,md5)
  323. $(call AddDepends/crypto)
  324. endef
  325. define KernelPackage/crypto-md5/octeon
  326. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
  327. AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
  328. endef
  329. $(eval $(call KernelPackage,crypto-md5))
  330. define KernelPackage/crypto-michael-mic
  331. TITLE:=Michael MIC keyed digest CryptoAPI module
  332. DEPENDS:=+kmod-crypto-hash
  333. KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
  334. FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
  335. AUTOLOAD:=$(call AutoLoad,09,michael_mic)
  336. $(call AddDepends/crypto)
  337. endef
  338. $(eval $(call KernelPackage,crypto-michael-mic))
  339. define KernelPackage/crypto-misc
  340. TITLE:=Other CryptoAPI modules
  341. DEPENDS:=+kmod-crypto-xts
  342. KCONFIG:= \
  343. CONFIG_CRYPTO_CAMELLIA_X86_64 \
  344. CONFIG_CRYPTO_BLOWFISH_X86_64 \
  345. CONFIG_CRYPTO_TWOFISH_X86_64 \
  346. CONFIG_CRYPTO_TWOFISH_X86_64_3WAY \
  347. CONFIG_CRYPTO_SERPENT_SSE2_X86_64 \
  348. CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 \
  349. CONFIG_CRYPTO_CAST5_AVX_X86_64 \
  350. CONFIG_CRYPTO_CAST6_AVX_X86_64 \
  351. CONFIG_CRYPTO_TWOFISH_AVX_X86_64 \
  352. CONFIG_CRYPTO_SERPENT_AVX_X86_64 \
  353. CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 \
  354. CONFIG_CRYPTO_SERPENT_AVX2_X86_64 \
  355. CONFIG_CRYPTO_SERPENT_SSE2_586 \
  356. CONFIG_CRYPTO_ANUBIS \
  357. CONFIG_CRYPTO_BLOWFISH \
  358. CONFIG_CRYPTO_CAMELLIA \
  359. CONFIG_CRYPTO_CAST5 \
  360. CONFIG_CRYPTO_CAST6 \
  361. CONFIG_CRYPTO_FCRYPT \
  362. CONFIG_CRYPTO_KHAZAD \
  363. CONFIG_CRYPTO_SERPENT \
  364. CONFIG_CRYPTO_TEA \
  365. CONFIG_CRYPTO_TGR192 \
  366. CONFIG_CRYPTO_TWOFISH \
  367. CONFIG_CRYPTO_TWOFISH_COMMON \
  368. CONFIG_CRYPTO_TWOFISH_586 \
  369. CONFIG_CRYPTO_WP512
  370. FILES:= \
  371. $(LINUX_DIR)/crypto/anubis.ko \
  372. $(LINUX_DIR)/crypto/camellia_generic.ko \
  373. $(LINUX_DIR)/crypto/cast_common.ko \
  374. $(LINUX_DIR)/crypto/cast5_generic.ko \
  375. $(LINUX_DIR)/crypto/cast6_generic.ko \
  376. $(LINUX_DIR)/crypto/khazad.ko \
  377. $(LINUX_DIR)/crypto/tea.ko \
  378. $(LINUX_DIR)/crypto/tgr192.ko \
  379. $(LINUX_DIR)/crypto/twofish_common.ko \
  380. $(LINUX_DIR)/crypto/wp512.ko \
  381. $(LINUX_DIR)/crypto/twofish_generic.ko \
  382. $(LINUX_DIR)/crypto/blowfish_common.ko \
  383. $(LINUX_DIR)/crypto/blowfish_generic.ko \
  384. $(LINUX_DIR)/crypto/serpent_generic.ko
  385. AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
  386. cast5_generic cast6_generic khazad tea tgr192 twofish_common \
  387. wp512 blowfish_common serpent_generic)
  388. ifndef CONFIG_TARGET_x86
  389. AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
  390. endif
  391. $(call AddDepends/crypto)
  392. endef
  393. ifndef CONFIG_TARGET_x86_64
  394. define KernelPackage/crypto-misc/x86
  395. FILES+= \
  396. $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
  397. $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
  398. $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
  399. $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17 \
  400. $(LINUX_DIR)/crypto/cryptd.ko \
  401. $(LINUX_DIR)/crypto/lrw.ko@lt4.17 \
  402. $(LINUX_DIR)/crypto/crypto_simd.ko@ge4.17
  403. AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
  404. serpent-sse2-i586 twofish-i586 blowfish_generic)
  405. endef
  406. endif
  407. define KernelPackage/crypto-misc/x86/64
  408. FILES+= \
  409. $(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \
  410. $(LINUX_DIR)/arch/x86/crypto/blowfish-x86_64.ko \
  411. $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64.ko \
  412. $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64-3way.ko \
  413. $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-x86_64.ko \
  414. $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx-x86_64.ko \
  415. $(LINUX_DIR)/arch/x86/crypto/cast5-avx-x86_64.ko \
  416. $(LINUX_DIR)/arch/x86/crypto/cast6-avx-x86_64.ko \
  417. $(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \
  418. $(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \
  419. $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \
  420. $(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \
  421. $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17
  422. AUTOLOAD+= $(call AutoLoad,10,camellia-x86_64 \
  423. camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \
  424. cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
  425. twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2)
  426. endef
  427. $(eval $(call KernelPackage,crypto-misc))
  428. define KernelPackage/crypto-null
  429. TITLE:=Null CryptoAPI module
  430. KCONFIG:=CONFIG_CRYPTO_NULL
  431. FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
  432. AUTOLOAD:=$(call AutoLoad,09,crypto_null)
  433. $(call AddDepends/crypto, +kmod-crypto-hash)
  434. endef
  435. $(eval $(call KernelPackage,crypto-null))
  436. define KernelPackage/crypto-pcbc
  437. TITLE:=Propagating Cipher Block Chaining CryptoAPI module
  438. DEPENDS:=+kmod-crypto-manager
  439. KCONFIG:=CONFIG_CRYPTO_PCBC
  440. FILES:=$(LINUX_DIR)/crypto/pcbc.ko
  441. AUTOLOAD:=$(call AutoLoad,09,pcbc)
  442. $(call AddDepends/crypto)
  443. endef
  444. $(eval $(call KernelPackage,crypto-pcbc))
  445. define KernelPackage/crypto-pcompress
  446. TITLE:=CryptoAPI Partial (de)compression operations
  447. KCONFIG:= \
  448. CONFIG_CRYPTO_PCOMP=y \
  449. CONFIG_CRYPTO_PCOMP2
  450. FILES:=$(LINUX_DIR)/crypto/pcompress.ko
  451. AUTOLOAD:=$(call AutoLoad,09,pcompress)
  452. $(call AddDepends/crypto)
  453. endef
  454. $(eval $(call KernelPackage,crypto-pcompress))
  455. define KernelPackage/crypto-rsa
  456. TITLE:=RSA algorithm
  457. DEPENDS:=@!LINUX_3_18 +kmod-crypto-manager +kmod-asn1-decoder
  458. KCONFIG:= CONFIG_CRYPTO_RSA
  459. HIDDEN:=1
  460. FILES:= \
  461. $(LINUX_DIR)/lib/mpi/mpi.ko \
  462. $(LINUX_DIR)/crypto/akcipher.ko \
  463. $(LINUX_DIR)/crypto/rsa_generic.ko
  464. AUTOLOAD:=$(call AutoLoad,10,rsa_generic)
  465. $(call AddDepends/crypto)
  466. endef
  467. $(eval $(call KernelPackage,crypto-rsa))
  468. define KernelPackage/crypto-rng
  469. TITLE:=CryptoAPI random number generation
  470. DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
  471. KCONFIG:= \
  472. CONFIG_CRYPTO_DRBG \
  473. CONFIG_CRYPTO_DRBG_HMAC=y \
  474. CONFIG_CRYPTO_DRBG_HASH=n \
  475. CONFIG_CRYPTO_DRBG_MENU \
  476. CONFIG_CRYPTO_JITTERENTROPY \
  477. CONFIG_CRYPTO_RNG2
  478. FILES:= \
  479. $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \
  480. $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \
  481. $(LINUX_DIR)/crypto/krng.ko@lt4.2 \
  482. $(LINUX_DIR)/crypto/rng.ko
  483. AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng)
  484. $(call AddDepends/crypto)
  485. endef
  486. $(eval $(call KernelPackage,crypto-rng))
  487. define KernelPackage/crypto-seqiv
  488. TITLE:=CryptoAPI Sequence Number IV Generator
  489. DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
  490. KCONFIG:=CONFIG_CRYPTO_SEQIV
  491. FILES:=$(LINUX_DIR)/crypto/seqiv.ko
  492. AUTOLOAD:=$(call AutoLoad,09,seqiv)
  493. $(call AddDepends/crypto)
  494. endef
  495. $(eval $(call KernelPackage,crypto-seqiv))
  496. define KernelPackage/crypto-sha1
  497. TITLE:=SHA1 digest CryptoAPI module
  498. DEPENDS:=+kmod-crypto-hash
  499. KCONFIG:= \
  500. CONFIG_CRYPTO_SHA1 \
  501. CONFIG_CRYPTO_SHA1_OCTEON \
  502. CONFIG_CRYPTO_SHA1_SSSE3
  503. FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
  504. AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
  505. $(call AddDepends/crypto)
  506. endef
  507. define KernelPackage/crypto-sha1/octeon
  508. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
  509. AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
  510. endef
  511. define KernelPackage/crypto-sha1/x86/64
  512. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
  513. AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3)
  514. endef
  515. $(eval $(call KernelPackage,crypto-sha1))
  516. define KernelPackage/crypto-sha256
  517. TITLE:=SHA224 SHA256 digest CryptoAPI module
  518. DEPENDS:=+kmod-crypto-hash
  519. KCONFIG:= \
  520. CONFIG_CRYPTO_SHA256 \
  521. CONFIG_CRYPTO_SHA256_OCTEON \
  522. CONFIG_CRYPTO_SHA256_SSSE3
  523. FILES:=$(LINUX_DIR)/crypto/sha256_generic.ko
  524. AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
  525. $(call AddDepends/crypto)
  526. endef
  527. define KernelPackage/crypto-sha256/octeon
  528. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko
  529. AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
  530. endef
  531. define KernelPackage/crypto-sha256/x86/64
  532. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
  533. AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
  534. endef
  535. $(eval $(call KernelPackage,crypto-sha256))
  536. define KernelPackage/crypto-sha512
  537. TITLE:=SHA512 digest CryptoAPI module
  538. DEPENDS:=+kmod-crypto-hash
  539. KCONFIG:= \
  540. CONFIG_CRYPTO_SHA512 \
  541. CONFIG_CRYPTO_SHA512_OCTEON \
  542. CONFIG_CRYPTO_SHA512_SSSE3
  543. FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
  544. AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
  545. $(call AddDepends/crypto)
  546. endef
  547. define KernelPackage/crypto-sha512/octeon
  548. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko
  549. AUTOLOAD+=$(call AutoLoad,09,octeon-sha512)
  550. endef
  551. define KernelPackage/crypto-sha512/x86/64
  552. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko
  553. AUTOLOAD+=$(call AutoLoad,09,sha512-ssse3)
  554. endef
  555. $(eval $(call KernelPackage,crypto-sha512))
  556. define KernelPackage/crypto-test
  557. TITLE:=Test CryptoAPI module
  558. KCONFIG:=CONFIG_CRYPTO_TEST
  559. FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
  560. $(call AddDepends/crypto,+kmod-crypto-manager)
  561. endef
  562. $(eval $(call KernelPackage,crypto-test))
  563. define KernelPackage/crypto-user
  564. TITLE:=CryptoAPI userspace interface
  565. DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
  566. KCONFIG:= \
  567. CONFIG_CRYPTO_USER_API \
  568. CONFIG_CRYPTO_USER_API_HASH \
  569. CONFIG_CRYPTO_USER_API_SKCIPHER
  570. FILES:= \
  571. $(LINUX_DIR)/crypto/af_alg.ko \
  572. $(LINUX_DIR)/crypto/algif_hash.ko \
  573. $(LINUX_DIR)/crypto/algif_skcipher.ko
  574. AUTOLOAD:=$(call AutoLoad,09,af_alg algif_hash algif_skcipher)
  575. $(call AddDepends/crypto)
  576. endef
  577. $(eval $(call KernelPackage,crypto-user))
  578. define KernelPackage/crypto-wq
  579. TITLE:=CryptoAPI work queue handling
  580. KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
  581. FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
  582. AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
  583. $(call AddDepends/crypto)
  584. endef
  585. $(eval $(call KernelPackage,crypto-wq))
  586. define KernelPackage/crypto-xts
  587. TITLE:=XTS cipher CryptoAPI module
  588. DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager
  589. KCONFIG:=CONFIG_CRYPTO_XTS
  590. FILES:=$(LINUX_DIR)/crypto/xts.ko
  591. AUTOLOAD:=$(call AutoLoad,09,xts)
  592. $(call AddDepends/crypto)
  593. endef
  594. $(eval $(call KernelPackage,crypto-xts))