2
0

crypto.mk 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  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, +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 +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_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:=+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-xcbc
  173. TITLE:=XCBC CryptoAPI module
  174. DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
  175. KCONFIG:=CONFIG_CRYPTO_XCBC
  176. FILES:=$(LINUX_DIR)/crypto/xcbc.ko
  177. AUTOLOAD:=$(call AutoLoad,09,xcbc)
  178. $(call AddDepends/crypto)
  179. endef
  180. $(eval $(call KernelPackage,crypto-xcbc))
  181. define KernelPackage/crypto-gf128
  182. TITLE:=GF(2^128) multiplication functions CryptoAPI module
  183. KCONFIG:=CONFIG_CRYPTO_GF128MUL
  184. FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
  185. AUTOLOAD:=$(call AutoLoad,09,gf128mul)
  186. $(call AddDepends/crypto)
  187. endef
  188. $(eval $(call KernelPackage,crypto-gf128))
  189. define KernelPackage/crypto-ghash
  190. TITLE:=GHASH digest CryptoAPI module
  191. DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
  192. KCONFIG:=CONFIG_CRYPTO_GHASH
  193. FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
  194. AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
  195. $(call AddDepends/crypto)
  196. endef
  197. $(eval $(call KernelPackage,crypto-ghash))
  198. define KernelPackage/crypto-hash
  199. TITLE:=CryptoAPI hash support
  200. KCONFIG:=CONFIG_CRYPTO_HASH
  201. FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
  202. AUTOLOAD:=$(call AutoLoad,02,crypto_hash,1)
  203. $(call AddDepends/crypto)
  204. endef
  205. $(eval $(call KernelPackage,crypto-hash))
  206. define KernelPackage/crypto-hmac
  207. TITLE:=HMAC digest CryptoAPI module
  208. DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
  209. KCONFIG:=CONFIG_CRYPTO_HMAC
  210. FILES:=$(LINUX_DIR)/crypto/hmac.ko
  211. AUTOLOAD:=$(call AutoLoad,09,hmac)
  212. $(call AddDepends/crypto)
  213. endef
  214. $(eval $(call KernelPackage,crypto-hmac))
  215. define KernelPackage/crypto-hw-ccp
  216. TITLE:=AMD Cryptographic Coprocessor
  217. DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 +!LINUX_4_9:kmod-crypto-rsa
  218. KCONFIG:= \
  219. CONFIG_CRYPTO_HW=y \
  220. CONFIG_CRYPTO_DEV_CCP=y \
  221. CONFIG_CRYPTO_DEV_CCP_CRYPTO \
  222. CONFIG_CRYPTO_DEV_CCP_DD \
  223. CONFIG_CRYPTO_DEV_SP_CCP=y
  224. FILES:= \
  225. $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \
  226. $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko
  227. AUTOLOAD:=$(call AutoLoad,09,ccp ccp-crypto)
  228. $(call AddDepends/crypto)
  229. endef
  230. $(eval $(call KernelPackage,crypto-hw-ccp))
  231. define KernelPackage/crypto-hw-geode
  232. TITLE:=AMD Geode hardware crypto module
  233. DEPENDS:=+kmod-crypto-manager
  234. KCONFIG:= \
  235. CONFIG_CRYPTO_HW=y \
  236. CONFIG_CRYPTO_DEV_GEODE
  237. FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
  238. AUTOLOAD:=$(call AutoLoad,09,geode-aes)
  239. $(call AddDepends/crypto)
  240. endef
  241. $(eval $(call KernelPackage,crypto-hw-geode))
  242. define KernelPackage/crypto-hw-hifn-795x
  243. TITLE:=HIFN 795x crypto accelerator
  244. DEPENDS:=+kmod-random-core +kmod-crypto-manager
  245. KCONFIG:= \
  246. CONFIG_CRYPTO_HW=y \
  247. CONFIG_CRYPTO_DEV_HIFN_795X \
  248. CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
  249. FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
  250. AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
  251. $(call AddDepends/crypto,+kmod-crypto-des)
  252. endef
  253. $(eval $(call KernelPackage,crypto-hw-hifn-795x))
  254. define KernelPackage/crypto-hw-padlock
  255. TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
  256. DEPENDS:=+kmod-crypto-manager
  257. KCONFIG:= \
  258. CONFIG_CRYPTO_HW=y \
  259. CONFIG_CRYPTO_DEV_PADLOCK \
  260. CONFIG_CRYPTO_DEV_PADLOCK_AES \
  261. CONFIG_CRYPTO_DEV_PADLOCK_SHA
  262. FILES:= \
  263. $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
  264. $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
  265. AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
  266. $(call AddDepends/crypto)
  267. endef
  268. $(eval $(call KernelPackage,crypto-hw-padlock))
  269. define KernelPackage/crypto-hw-talitos
  270. TITLE:=Freescale integrated security engine (SEC) driver
  271. DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
  272. KCONFIG:= \
  273. CONFIG_CRYPTO_HW=y \
  274. CONFIG_CRYPTO_DEV_TALITOS \
  275. CONFIG_CRYPTO_DEV_TALITOS1=y \
  276. CONFIG_CRYPTO_DEV_TALITOS2=y
  277. FILES:= \
  278. $(LINUX_DIR)/drivers/crypto/talitos.ko
  279. AUTOLOAD:=$(call AutoLoad,09,talitos)
  280. $(call AddDepends/crypto)
  281. endef
  282. $(eval $(call KernelPackage,crypto-hw-talitos))
  283. define KernelPackage/crypto-iv
  284. TITLE:=CryptoAPI initialization vectors
  285. DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
  286. KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
  287. HIDDEN:=1
  288. FILES:= \
  289. $(LINUX_DIR)/crypto/eseqiv.ko@lt4.9 \
  290. $(LINUX_DIR)/crypto/chainiv.ko@lt4.9
  291. AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
  292. $(call AddDepends/crypto)
  293. endef
  294. $(eval $(call KernelPackage,crypto-iv))
  295. define KernelPackage/crypto-kpp
  296. TITLE:=Key-agreement Protocol Primitives
  297. KCONFIG:=CONFIG_CRYPTO_KPP
  298. HIDDEN:=1
  299. FILES:=$(LINUX_DIR)/crypto/kpp.ko
  300. AUTOLOAD:=$(call AutoLoad,09,kpp)
  301. $(call AddDepends/crypto)
  302. endef
  303. $(eval $(call KernelPackage,crypto-kpp))
  304. define KernelPackage/crypto-manager
  305. TITLE:=CryptoAPI algorithm manager
  306. DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
  307. KCONFIG:= \
  308. CONFIG_CRYPTO_MANAGER \
  309. CONFIG_CRYPTO_MANAGER2
  310. FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
  311. AUTOLOAD:=$(call AutoLoad,09,cryptomgr,1)
  312. $(call AddDepends/crypto)
  313. endef
  314. $(eval $(call KernelPackage,crypto-manager))
  315. define KernelPackage/crypto-md4
  316. TITLE:=MD4 digest CryptoAPI module
  317. DEPENDS:=+kmod-crypto-hash
  318. KCONFIG:=CONFIG_CRYPTO_MD4
  319. FILES:=$(LINUX_DIR)/crypto/md4.ko
  320. AUTOLOAD:=$(call AutoLoad,09,md4)
  321. $(call AddDepends/crypto)
  322. endef
  323. $(eval $(call KernelPackage,crypto-md4))
  324. define KernelPackage/crypto-md5
  325. TITLE:=MD5 digest CryptoAPI module
  326. DEPENDS:=+kmod-crypto-hash
  327. KCONFIG:= \
  328. CONFIG_CRYPTO_MD5 \
  329. CONFIG_CRYPTO_MD5_OCTEON
  330. FILES:=$(LINUX_DIR)/crypto/md5.ko
  331. AUTOLOAD:=$(call AutoLoad,09,md5)
  332. $(call AddDepends/crypto)
  333. endef
  334. define KernelPackage/crypto-md5/octeon
  335. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
  336. AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
  337. endef
  338. $(eval $(call KernelPackage,crypto-md5))
  339. define KernelPackage/crypto-michael-mic
  340. TITLE:=Michael MIC keyed digest CryptoAPI module
  341. DEPENDS:=+kmod-crypto-hash
  342. KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
  343. FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
  344. AUTOLOAD:=$(call AutoLoad,09,michael_mic)
  345. $(call AddDepends/crypto)
  346. endef
  347. $(eval $(call KernelPackage,crypto-michael-mic))
  348. define KernelPackage/crypto-misc
  349. TITLE:=Other CryptoAPI modules
  350. DEPENDS:=+kmod-crypto-xts
  351. KCONFIG:= \
  352. CONFIG_CRYPTO_CAMELLIA_X86_64 \
  353. CONFIG_CRYPTO_BLOWFISH_X86_64 \
  354. CONFIG_CRYPTO_TWOFISH_X86_64 \
  355. CONFIG_CRYPTO_TWOFISH_X86_64_3WAY \
  356. CONFIG_CRYPTO_SERPENT_SSE2_X86_64 \
  357. CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 \
  358. CONFIG_CRYPTO_CAST5_AVX_X86_64 \
  359. CONFIG_CRYPTO_CAST6_AVX_X86_64 \
  360. CONFIG_CRYPTO_TWOFISH_AVX_X86_64 \
  361. CONFIG_CRYPTO_SERPENT_AVX_X86_64 \
  362. CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 \
  363. CONFIG_CRYPTO_SERPENT_AVX2_X86_64 \
  364. CONFIG_CRYPTO_SERPENT_SSE2_586 \
  365. CONFIG_CRYPTO_ANUBIS \
  366. CONFIG_CRYPTO_BLOWFISH \
  367. CONFIG_CRYPTO_CAMELLIA \
  368. CONFIG_CRYPTO_CAST5 \
  369. CONFIG_CRYPTO_CAST6 \
  370. CONFIG_CRYPTO_FCRYPT \
  371. CONFIG_CRYPTO_KHAZAD \
  372. CONFIG_CRYPTO_SERPENT \
  373. CONFIG_CRYPTO_TEA \
  374. CONFIG_CRYPTO_TGR192 \
  375. CONFIG_CRYPTO_TWOFISH \
  376. CONFIG_CRYPTO_TWOFISH_COMMON \
  377. CONFIG_CRYPTO_TWOFISH_586 \
  378. CONFIG_CRYPTO_WP512
  379. FILES:= \
  380. $(LINUX_DIR)/crypto/anubis.ko \
  381. $(LINUX_DIR)/crypto/camellia_generic.ko \
  382. $(LINUX_DIR)/crypto/cast_common.ko \
  383. $(LINUX_DIR)/crypto/cast5_generic.ko \
  384. $(LINUX_DIR)/crypto/cast6_generic.ko \
  385. $(LINUX_DIR)/crypto/khazad.ko \
  386. $(LINUX_DIR)/crypto/tea.ko \
  387. $(LINUX_DIR)/crypto/tgr192.ko \
  388. $(LINUX_DIR)/crypto/twofish_common.ko \
  389. $(LINUX_DIR)/crypto/wp512.ko \
  390. $(LINUX_DIR)/crypto/twofish_generic.ko \
  391. $(LINUX_DIR)/crypto/blowfish_common.ko \
  392. $(LINUX_DIR)/crypto/blowfish_generic.ko \
  393. $(LINUX_DIR)/crypto/serpent_generic.ko
  394. AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
  395. cast5_generic cast6_generic khazad tea tgr192 twofish_common \
  396. wp512 blowfish_common serpent_generic)
  397. ifndef CONFIG_TARGET_x86
  398. AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
  399. endif
  400. $(call AddDepends/crypto)
  401. endef
  402. ifndef CONFIG_TARGET_x86_64
  403. define KernelPackage/crypto-misc/x86
  404. FILES+= \
  405. $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
  406. $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
  407. $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
  408. $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17 \
  409. $(LINUX_DIR)/crypto/cryptd.ko \
  410. $(LINUX_DIR)/crypto/lrw.ko@lt4.17 \
  411. $(LINUX_DIR)/crypto/crypto_simd.ko@ge4.17
  412. AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
  413. serpent-sse2-i586 twofish-i586 blowfish_generic)
  414. endef
  415. endif
  416. define KernelPackage/crypto-misc/x86/64
  417. FILES+= \
  418. $(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \
  419. $(LINUX_DIR)/arch/x86/crypto/blowfish-x86_64.ko \
  420. $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64.ko \
  421. $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64-3way.ko \
  422. $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-x86_64.ko \
  423. $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx-x86_64.ko \
  424. $(LINUX_DIR)/arch/x86/crypto/cast5-avx-x86_64.ko \
  425. $(LINUX_DIR)/arch/x86/crypto/cast6-avx-x86_64.ko \
  426. $(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \
  427. $(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \
  428. $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \
  429. $(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \
  430. $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17
  431. AUTOLOAD+= $(call AutoLoad,10,camellia-x86_64 \
  432. camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \
  433. cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
  434. twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2)
  435. endef
  436. $(eval $(call KernelPackage,crypto-misc))
  437. define KernelPackage/crypto-null
  438. TITLE:=Null CryptoAPI module
  439. KCONFIG:=CONFIG_CRYPTO_NULL
  440. FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
  441. AUTOLOAD:=$(call AutoLoad,09,crypto_null)
  442. $(call AddDepends/crypto, +kmod-crypto-hash)
  443. endef
  444. $(eval $(call KernelPackage,crypto-null))
  445. define KernelPackage/crypto-pcbc
  446. TITLE:=Propagating Cipher Block Chaining CryptoAPI module
  447. DEPENDS:=+kmod-crypto-manager
  448. KCONFIG:=CONFIG_CRYPTO_PCBC
  449. FILES:=$(LINUX_DIR)/crypto/pcbc.ko
  450. AUTOLOAD:=$(call AutoLoad,09,pcbc)
  451. $(call AddDepends/crypto)
  452. endef
  453. $(eval $(call KernelPackage,crypto-pcbc))
  454. define KernelPackage/crypto-pcompress
  455. TITLE:=CryptoAPI Partial (de)compression operations
  456. KCONFIG:= \
  457. CONFIG_CRYPTO_PCOMP=y \
  458. CONFIG_CRYPTO_PCOMP2
  459. FILES:=$(LINUX_DIR)/crypto/pcompress.ko
  460. AUTOLOAD:=$(call AutoLoad,09,pcompress)
  461. $(call AddDepends/crypto)
  462. endef
  463. $(eval $(call KernelPackage,crypto-pcompress))
  464. define KernelPackage/crypto-rsa
  465. TITLE:=RSA algorithm
  466. DEPENDS:=+kmod-crypto-manager +kmod-asn1-decoder
  467. KCONFIG:= CONFIG_CRYPTO_RSA
  468. HIDDEN:=1
  469. FILES:= \
  470. $(LINUX_DIR)/lib/mpi/mpi.ko \
  471. $(LINUX_DIR)/crypto/akcipher.ko \
  472. $(LINUX_DIR)/crypto/rsa_generic.ko
  473. AUTOLOAD:=$(call AutoLoad,10,rsa_generic)
  474. $(call AddDepends/crypto)
  475. endef
  476. $(eval $(call KernelPackage,crypto-rsa))
  477. define KernelPackage/crypto-rmd160
  478. TITLE:=RIPEMD160 digest CryptoAPI module
  479. DEPENDS:=+kmod-crypto-hash
  480. KCONFIG:=CONFIG_CRYPTO_RMD160
  481. FILES:=$(LINUX_DIR)/crypto/rmd160.ko
  482. AUTOLOAD:=$(call AutoLoad,09,rmd160)
  483. $(call AddDepends/crypto)
  484. endef
  485. $(eval $(call KernelPackage,crypto-rmd160))
  486. define KernelPackage/crypto-rng
  487. TITLE:=CryptoAPI random number generation
  488. DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
  489. KCONFIG:= \
  490. CONFIG_CRYPTO_DRBG \
  491. CONFIG_CRYPTO_DRBG_HMAC=y \
  492. CONFIG_CRYPTO_DRBG_HASH=n \
  493. CONFIG_CRYPTO_DRBG_MENU \
  494. CONFIG_CRYPTO_JITTERENTROPY \
  495. CONFIG_CRYPTO_RNG2
  496. FILES:= \
  497. $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \
  498. $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \
  499. $(LINUX_DIR)/crypto/krng.ko@lt4.2 \
  500. $(LINUX_DIR)/crypto/rng.ko
  501. AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng)
  502. $(call AddDepends/crypto)
  503. endef
  504. $(eval $(call KernelPackage,crypto-rng))
  505. define KernelPackage/crypto-seqiv
  506. TITLE:=CryptoAPI Sequence Number IV Generator
  507. DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
  508. KCONFIG:=CONFIG_CRYPTO_SEQIV
  509. FILES:=$(LINUX_DIR)/crypto/seqiv.ko
  510. AUTOLOAD:=$(call AutoLoad,09,seqiv)
  511. $(call AddDepends/crypto)
  512. endef
  513. $(eval $(call KernelPackage,crypto-seqiv))
  514. define KernelPackage/crypto-sha1
  515. TITLE:=SHA1 digest CryptoAPI module
  516. DEPENDS:=+kmod-crypto-hash
  517. KCONFIG:= \
  518. CONFIG_CRYPTO_SHA1 \
  519. CONFIG_CRYPTO_SHA1_OCTEON \
  520. CONFIG_CRYPTO_SHA1_SSSE3
  521. FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
  522. AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
  523. $(call AddDepends/crypto)
  524. endef
  525. define KernelPackage/crypto-sha1/octeon
  526. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
  527. AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
  528. endef
  529. define KernelPackage/crypto-sha1/x86/64
  530. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
  531. AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3)
  532. endef
  533. $(eval $(call KernelPackage,crypto-sha1))
  534. define KernelPackage/crypto-sha256
  535. TITLE:=SHA224 SHA256 digest CryptoAPI module
  536. DEPENDS:=+kmod-crypto-hash
  537. KCONFIG:= \
  538. CONFIG_CRYPTO_SHA256 \
  539. CONFIG_CRYPTO_SHA256_OCTEON \
  540. CONFIG_CRYPTO_SHA256_SSSE3
  541. FILES:=$(LINUX_DIR)/crypto/sha256_generic.ko
  542. AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
  543. $(call AddDepends/crypto)
  544. endef
  545. define KernelPackage/crypto-sha256/octeon
  546. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko
  547. AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
  548. endef
  549. define KernelPackage/crypto-sha256/x86/64
  550. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
  551. AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
  552. endef
  553. $(eval $(call KernelPackage,crypto-sha256))
  554. define KernelPackage/crypto-sha512
  555. TITLE:=SHA512 digest CryptoAPI module
  556. DEPENDS:=+kmod-crypto-hash
  557. KCONFIG:= \
  558. CONFIG_CRYPTO_SHA512 \
  559. CONFIG_CRYPTO_SHA512_OCTEON \
  560. CONFIG_CRYPTO_SHA512_SSSE3
  561. FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
  562. AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
  563. $(call AddDepends/crypto)
  564. endef
  565. define KernelPackage/crypto-sha512/octeon
  566. FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko
  567. AUTOLOAD+=$(call AutoLoad,09,octeon-sha512)
  568. endef
  569. define KernelPackage/crypto-sha512/x86/64
  570. FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko
  571. AUTOLOAD+=$(call AutoLoad,09,sha512-ssse3)
  572. endef
  573. $(eval $(call KernelPackage,crypto-sha512))
  574. define KernelPackage/crypto-test
  575. TITLE:=Test CryptoAPI module
  576. KCONFIG:=CONFIG_CRYPTO_TEST
  577. FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
  578. $(call AddDepends/crypto,+kmod-crypto-manager)
  579. endef
  580. $(eval $(call KernelPackage,crypto-test))
  581. define KernelPackage/crypto-user
  582. TITLE:=CryptoAPI userspace interface
  583. DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
  584. KCONFIG:= \
  585. CONFIG_CRYPTO_USER_API \
  586. CONFIG_CRYPTO_USER_API_HASH \
  587. CONFIG_CRYPTO_USER_API_SKCIPHER
  588. FILES:= \
  589. $(LINUX_DIR)/crypto/af_alg.ko \
  590. $(LINUX_DIR)/crypto/algif_hash.ko \
  591. $(LINUX_DIR)/crypto/algif_skcipher.ko
  592. AUTOLOAD:=$(call AutoLoad,09,af_alg algif_hash algif_skcipher)
  593. $(call AddDepends/crypto)
  594. endef
  595. $(eval $(call KernelPackage,crypto-user))
  596. define KernelPackage/crypto-wq
  597. TITLE:=CryptoAPI work queue handling
  598. KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
  599. FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
  600. AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
  601. $(call AddDepends/crypto)
  602. endef
  603. $(eval $(call KernelPackage,crypto-wq))
  604. define KernelPackage/crypto-xts
  605. TITLE:=XTS cipher CryptoAPI module
  606. DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager
  607. KCONFIG:=CONFIG_CRYPTO_XTS
  608. FILES:=$(LINUX_DIR)/crypto/xts.ko
  609. AUTOLOAD:=$(call AutoLoad,09,xts)
  610. $(call AddDepends/crypto)
  611. endef
  612. $(eval $(call KernelPackage,crypto-xts))