kernel: add crypto_user mod to crypto-user pkg
[openwrt/openwrt.git] / package / kernel / linux / modules / crypto.mk
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
8 CRYPTO_MENU:=Cryptographic API modules
9
10 CRYPTO_MODULES = \
11 ALGAPI2=crypto_algapi \
12 BLKCIPHER2=crypto_blkcipher
13
14 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
15 crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
16 crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
17
18 define AddDepends/crypto
19 SUBMENU:=$(CRYPTO_MENU)
20 DEPENDS+= $(1)
21 endef
22
23
24 define KernelPackage/crypto-acompress
25 TITLE:=Asynchronous Compression operations
26 HIDDEN:=1
27 KCONFIG:=CONFIG_CRYPTO_ACOMP2
28 FILES:=$(LINUX_DIR)/crypto/crypto_acompress.ko
29 AUTOLOAD:=$(call AutoLoad,09,crypto_acompress)
30 $(call AddDepends/crypto)
31 endef
32
33 $(eval $(call KernelPackage,crypto-acompress))
34
35
36 define KernelPackage/crypto-aead
37 TITLE:=CryptoAPI AEAD support
38 KCONFIG:= \
39 CONFIG_CRYPTO_AEAD \
40 CONFIG_CRYPTO_AEAD2
41 FILES:=$(LINUX_DIR)/crypto/aead.ko
42 AUTOLOAD:=$(call AutoLoad,09,aead,1)
43 $(call AddDepends/crypto, +kmod-crypto-null)
44 endef
45
46 $(eval $(call KernelPackage,crypto-aead))
47
48
49 define KernelPackage/crypto-arc4
50 TITLE:=ARC4 cipher CryptoAPI module
51 KCONFIG:=CONFIG_CRYPTO_ARC4
52 FILES:=$(LINUX_DIR)/crypto/arc4.ko
53 AUTOLOAD:=$(call AutoLoad,09,arc4)
54 $(call AddDepends/crypto)
55 endef
56
57 $(eval $(call KernelPackage,crypto-arc4))
58
59
60 define KernelPackage/crypto-authenc
61 TITLE:=Combined mode wrapper for IPsec
62 DEPENDS:=+kmod-crypto-manager +kmod-crypto-null
63 KCONFIG:=CONFIG_CRYPTO_AUTHENC
64 FILES:=$(LINUX_DIR)/crypto/authenc.ko
65 AUTOLOAD:=$(call AutoLoad,09,authenc)
66 $(call AddDepends/crypto)
67 endef
68
69 $(eval $(call KernelPackage,crypto-authenc))
70
71
72 define KernelPackage/crypto-cbc
73 TITLE:=Cipher Block Chaining CryptoAPI module
74 DEPENDS:=+kmod-crypto-manager
75 KCONFIG:=CONFIG_CRYPTO_CBC
76 FILES:=$(LINUX_DIR)/crypto/cbc.ko
77 AUTOLOAD:=$(call AutoLoad,09,cbc)
78 $(call AddDepends/crypto)
79 endef
80
81 $(eval $(call KernelPackage,crypto-cbc))
82
83
84 define KernelPackage/crypto-ccm
85 TITLE:=Support for Counter with CBC MAC (CCM)
86 DEPENDS:=+kmod-crypto-ctr +kmod-crypto-aead
87 KCONFIG:=CONFIG_CRYPTO_CCM
88 FILES:=$(LINUX_DIR)/crypto/ccm.ko
89 AUTOLOAD:=$(call AutoLoad,09,ccm)
90 $(call AddDepends/crypto)
91 endef
92
93 $(eval $(call KernelPackage,crypto-ccm))
94
95
96 define KernelPackage/crypto-cmac
97 TITLE:=Support for Cipher-based Message Authentication Code (CMAC)
98 DEPENDS:=+kmod-crypto-hash
99 KCONFIG:=CONFIG_CRYPTO_CMAC
100 FILES:=$(LINUX_DIR)/crypto/cmac.ko
101 AUTOLOAD:=$(call AutoLoad,09,cmac)
102 $(call AddDepends/crypto)
103 endef
104
105 $(eval $(call KernelPackage,crypto-cmac))
106
107
108 define KernelPackage/crypto-crc32
109 TITLE:=CRC32 CRC module
110 DEPENDS:=+kmod-crypto-hash
111 KCONFIG:=CONFIG_CRYPTO_CRC32
112 HIDDEN:=1
113 FILES:=$(LINUX_DIR)/crypto/crc32_generic.ko@ge4.9
114 AUTOLOAD:=$(call AutoLoad,04,crc32_generic@ge4.9,1)
115 $(call AddDepends/crypto)
116 endef
117
118 $(eval $(call KernelPackage,crypto-crc32))
119
120
121 define KernelPackage/crypto-crc32c
122 TITLE:=CRC32c CRC module
123 DEPENDS:=+kmod-crypto-hash
124 KCONFIG:=CONFIG_CRYPTO_CRC32C
125 FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
126 AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
127 $(call AddDepends/crypto)
128 endef
129
130 $(eval $(call KernelPackage,crypto-crc32c))
131
132
133 define KernelPackage/crypto-ctr
134 TITLE:=Counter Mode CryptoAPI module
135 DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv +kmod-crypto-iv
136 KCONFIG:=CONFIG_CRYPTO_CTR
137 FILES:=$(LINUX_DIR)/crypto/ctr.ko
138 AUTOLOAD:=$(call AutoLoad,09,ctr)
139 $(call AddDepends/crypto)
140 endef
141
142 $(eval $(call KernelPackage,crypto-ctr))
143
144
145 define KernelPackage/crypto-cts
146 TITLE:=Cipher Text Stealing CryptoAPI module
147 DEPENDS:=+kmod-crypto-manager
148 KCONFIG:=CONFIG_CRYPTO_CTS
149 FILES:=$(LINUX_DIR)/crypto/cts.ko
150 AUTOLOAD:=$(call AutoLoad,09,cts)
151 $(call AddDepends/crypto)
152 endef
153
154 $(eval $(call KernelPackage,crypto-cts))
155
156
157 define KernelPackage/crypto-deflate
158 TITLE:=Deflate compression CryptoAPI module
159 DEPENDS:=+kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +!LINUX_4_9:kmod-crypto-acompress
160 KCONFIG:=CONFIG_CRYPTO_DEFLATE
161 FILES:=$(LINUX_DIR)/crypto/deflate.ko
162 AUTOLOAD:=$(call AutoLoad,09,deflate)
163 $(call AddDepends/crypto)
164 endef
165
166 $(eval $(call KernelPackage,crypto-deflate))
167
168
169 define KernelPackage/crypto-des
170 TITLE:=DES/3DES cipher CryptoAPI module
171 KCONFIG:=CONFIG_CRYPTO_DES
172 FILES:=$(LINUX_DIR)/crypto/des_generic.ko
173 AUTOLOAD:=$(call AutoLoad,09,des_generic)
174 $(call AddDepends/crypto)
175 endef
176
177 $(eval $(call KernelPackage,crypto-des))
178
179
180 define KernelPackage/crypto-ecb
181 TITLE:=Electronic CodeBook CryptoAPI module
182 DEPENDS:=+kmod-crypto-manager
183 KCONFIG:=CONFIG_CRYPTO_ECB
184 FILES:=$(LINUX_DIR)/crypto/ecb.ko
185 AUTOLOAD:=$(call AutoLoad,09,ecb)
186 $(call AddDepends/crypto)
187 endef
188
189 $(eval $(call KernelPackage,crypto-ecb))
190
191
192 define KernelPackage/crypto-ecdh
193 TITLE:=ECDH algorithm
194 DEPENDS:=+kmod-crypto-kpp
195 KCONFIG:= CONFIG_CRYPTO_ECDH
196 FILES:= \
197 $(LINUX_DIR)/crypto/ecdh_generic.ko
198 AUTOLOAD:=$(call AutoLoad,10,ecdh_generic)
199 $(call AddDepends/crypto)
200 endef
201
202 $(eval $(call KernelPackage,crypto-ecdh))
203
204
205 define KernelPackage/crypto-echainiv
206 TITLE:=Encrypted Chain IV Generator
207 DEPENDS:=+kmod-crypto-aead
208 KCONFIG:=CONFIG_CRYPTO_ECHAINIV
209 FILES:=$(LINUX_DIR)/crypto/echainiv.ko
210 AUTOLOAD:=$(call AutoLoad,09,echainiv)
211 $(call AddDepends/crypto)
212 endef
213
214 $(eval $(call KernelPackage,crypto-echainiv))
215
216
217 define KernelPackage/crypto-fcrypt
218 TITLE:=FCRYPT cipher CryptoAPI module
219 KCONFIG:=CONFIG_CRYPTO_FCRYPT
220 FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
221 AUTOLOAD:=$(call AutoLoad,09,fcrypt)
222 $(call AddDepends/crypto)
223 endef
224
225 $(eval $(call KernelPackage,crypto-fcrypt))
226
227
228 define KernelPackage/crypto-gcm
229 TITLE:=GCM/GMAC CryptoAPI module
230 DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
231 KCONFIG:=CONFIG_CRYPTO_GCM
232 FILES:=$(LINUX_DIR)/crypto/gcm.ko
233 AUTOLOAD:=$(call AutoLoad,09,gcm)
234 $(call AddDepends/crypto)
235 endef
236
237 $(eval $(call KernelPackage,crypto-gcm))
238
239
240 define KernelPackage/crypto-xcbc
241 TITLE:=XCBC CryptoAPI module
242 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
243 KCONFIG:=CONFIG_CRYPTO_XCBC
244 FILES:=$(LINUX_DIR)/crypto/xcbc.ko
245 AUTOLOAD:=$(call AutoLoad,09,xcbc)
246 $(call AddDepends/crypto)
247 endef
248
249 $(eval $(call KernelPackage,crypto-xcbc))
250
251
252 define KernelPackage/crypto-gf128
253 TITLE:=GF(2^128) multiplication functions CryptoAPI module
254 KCONFIG:=CONFIG_CRYPTO_GF128MUL
255 FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
256 AUTOLOAD:=$(call AutoLoad,09,gf128mul)
257 $(call AddDepends/crypto)
258 endef
259
260 $(eval $(call KernelPackage,crypto-gf128))
261
262
263 define KernelPackage/crypto-ghash
264 TITLE:=GHASH digest CryptoAPI module
265 DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
266 KCONFIG:=CONFIG_CRYPTO_GHASH
267 FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
268 AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
269 $(call AddDepends/crypto)
270 endef
271
272 $(eval $(call KernelPackage,crypto-ghash))
273
274
275 define KernelPackage/crypto-hash
276 TITLE:=CryptoAPI hash support
277 KCONFIG:=CONFIG_CRYPTO_HASH
278 FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
279 AUTOLOAD:=$(call AutoLoad,02,crypto_hash,1)
280 $(call AddDepends/crypto)
281 endef
282
283 $(eval $(call KernelPackage,crypto-hash))
284
285
286 define KernelPackage/crypto-hmac
287 TITLE:=HMAC digest CryptoAPI module
288 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
289 KCONFIG:=CONFIG_CRYPTO_HMAC
290 FILES:=$(LINUX_DIR)/crypto/hmac.ko
291 AUTOLOAD:=$(call AutoLoad,09,hmac)
292 $(call AddDepends/crypto)
293 endef
294
295 $(eval $(call KernelPackage,crypto-hmac))
296
297
298 define KernelPackage/crypto-hw-ccp
299 TITLE:=AMD Cryptographic Coprocessor
300 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
301 KCONFIG:= \
302 CONFIG_CRYPTO_HW=y \
303 CONFIG_CRYPTO_DEV_CCP=y \
304 CONFIG_CRYPTO_DEV_CCP_CRYPTO \
305 CONFIG_CRYPTO_DEV_CCP_DD \
306 CONFIG_CRYPTO_DEV_SP_CCP=y
307 FILES:= \
308 $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \
309 $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko
310 AUTOLOAD:=$(call AutoLoad,09,ccp ccp-crypto)
311 $(call AddDepends/crypto)
312 endef
313
314 $(eval $(call KernelPackage,crypto-hw-ccp))
315
316
317 define KernelPackage/crypto-hw-geode
318 TITLE:=AMD Geode hardware crypto module
319 DEPENDS:=+kmod-crypto-manager
320 KCONFIG:= \
321 CONFIG_CRYPTO_HW=y \
322 CONFIG_CRYPTO_DEV_GEODE
323 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
324 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
325 $(call AddDepends/crypto)
326 endef
327
328 $(eval $(call KernelPackage,crypto-hw-geode))
329
330
331 define KernelPackage/crypto-hw-hifn-795x
332 TITLE:=HIFN 795x crypto accelerator
333 DEPENDS:=+kmod-random-core +kmod-crypto-manager
334 KCONFIG:= \
335 CONFIG_CRYPTO_HW=y \
336 CONFIG_CRYPTO_DEV_HIFN_795X \
337 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
338 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
339 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
340 $(call AddDepends/crypto,+kmod-crypto-des)
341 endef
342
343 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
344
345
346 define KernelPackage/crypto-hw-padlock
347 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
348 DEPENDS:=+kmod-crypto-manager
349 KCONFIG:= \
350 CONFIG_CRYPTO_HW=y \
351 CONFIG_CRYPTO_DEV_PADLOCK \
352 CONFIG_CRYPTO_DEV_PADLOCK_AES \
353 CONFIG_CRYPTO_DEV_PADLOCK_SHA
354 FILES:= \
355 $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
356 $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
357 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
358 $(call AddDepends/crypto)
359 endef
360
361 $(eval $(call KernelPackage,crypto-hw-padlock))
362
363
364 define KernelPackage/crypto-hw-safexcel
365 TITLE:= MVEBU SafeXcel Crypto Engine module
366 DEPENDS:=@!LINUX_4_14 @(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) \
367 +kmod-crypto-authenc +kmod-crypto-md5 +kmod-crypto-hmac +kmod-crypto-sha256 +kmod-crypto-sha512
368 KCONFIG:= \
369 CONFIG_CRYPTO_HW=y \
370 CONFIG_CRYPTO_DEV_SAFEXCEL
371 FILES:=$(LINUX_DIR)/drivers/crypto/inside-secure/crypto_safexcel.ko
372 AUTOLOAD:=$(call AutoLoad,90,crypto_safexcel)
373 $(call AddDepends/crypto)
374 endef
375
376 define KernelPackage/crypto-hw-safexcel/description
377 MVEBU's EIP97 and EIP197 Cryptographic Engine driver designed by
378 Inside Secure. This is found on Marvell Armada 37xx/7k/8k SoCs.
379
380 Particular version of these IP (EIP197B and EIP197D) require firmware.
381 Unfortunately it's not freely available and needs signed Non-Disclosure
382 Agreement (NDA) with Marvell. For those who have signed NDA the firmware can be
383 obtained at https://extranet.marvell.com.
384 endef
385
386 $(eval $(call KernelPackage,crypto-hw-safexcel))
387
388
389 define KernelPackage/crypto-hw-talitos
390 TITLE:=Freescale integrated security engine (SEC) driver
391 DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
392 KCONFIG:= \
393 CONFIG_CRYPTO_HW=y \
394 CONFIG_CRYPTO_DEV_TALITOS \
395 CONFIG_CRYPTO_DEV_TALITOS1=y \
396 CONFIG_CRYPTO_DEV_TALITOS2=y
397 FILES:= \
398 $(LINUX_DIR)/drivers/crypto/talitos.ko
399 AUTOLOAD:=$(call AutoLoad,09,talitos)
400 $(call AddDepends/crypto)
401 endef
402
403 $(eval $(call KernelPackage,crypto-hw-talitos))
404
405
406 define KernelPackage/crypto-iv
407 TITLE:=CryptoAPI initialization vectors
408 DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
409 KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
410 HIDDEN:=1
411 FILES:= \
412 $(LINUX_DIR)/crypto/eseqiv.ko@lt4.9 \
413 $(LINUX_DIR)/crypto/chainiv.ko@lt4.9
414 AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
415 $(call AddDepends/crypto)
416 endef
417
418 $(eval $(call KernelPackage,crypto-iv))
419
420
421 define KernelPackage/crypto-kpp
422 TITLE:=Key-agreement Protocol Primitives
423 KCONFIG:=CONFIG_CRYPTO_KPP
424 HIDDEN:=1
425 FILES:=$(LINUX_DIR)/crypto/kpp.ko
426 AUTOLOAD:=$(call AutoLoad,09,kpp)
427 $(call AddDepends/crypto)
428 endef
429
430 $(eval $(call KernelPackage,crypto-kpp))
431
432
433 define KernelPackage/crypto-manager
434 TITLE:=CryptoAPI algorithm manager
435 DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
436 KCONFIG:= \
437 CONFIG_CRYPTO_MANAGER \
438 CONFIG_CRYPTO_MANAGER2
439 FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
440 AUTOLOAD:=$(call AutoLoad,09,cryptomgr,1)
441 $(call AddDepends/crypto)
442 endef
443
444 $(eval $(call KernelPackage,crypto-manager))
445
446
447 define KernelPackage/crypto-md4
448 TITLE:=MD4 digest CryptoAPI module
449 DEPENDS:=+kmod-crypto-hash
450 KCONFIG:=CONFIG_CRYPTO_MD4
451 FILES:=$(LINUX_DIR)/crypto/md4.ko
452 AUTOLOAD:=$(call AutoLoad,09,md4)
453 $(call AddDepends/crypto)
454 endef
455
456 $(eval $(call KernelPackage,crypto-md4))
457
458
459 define KernelPackage/crypto-md5
460 TITLE:=MD5 digest CryptoAPI module
461 DEPENDS:=+kmod-crypto-hash
462 KCONFIG:= \
463 CONFIG_CRYPTO_MD5 \
464 CONFIG_CRYPTO_MD5_OCTEON
465 FILES:=$(LINUX_DIR)/crypto/md5.ko
466 AUTOLOAD:=$(call AutoLoad,09,md5)
467 $(call AddDepends/crypto)
468 endef
469
470 define KernelPackage/crypto-md5/octeon
471 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
472 AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
473 endef
474
475 $(eval $(call KernelPackage,crypto-md5))
476
477
478 define KernelPackage/crypto-michael-mic
479 TITLE:=Michael MIC keyed digest CryptoAPI module
480 DEPENDS:=+kmod-crypto-hash
481 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
482 FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
483 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
484 $(call AddDepends/crypto)
485 endef
486
487 $(eval $(call KernelPackage,crypto-michael-mic))
488
489
490 define KernelPackage/crypto-misc
491 TITLE:=Other CryptoAPI modules
492 DEPENDS:=+kmod-crypto-xts
493 KCONFIG:= \
494 CONFIG_CRYPTO_CAMELLIA_X86_64 \
495 CONFIG_CRYPTO_BLOWFISH_X86_64 \
496 CONFIG_CRYPTO_TWOFISH_X86_64 \
497 CONFIG_CRYPTO_TWOFISH_X86_64_3WAY \
498 CONFIG_CRYPTO_SERPENT_SSE2_X86_64 \
499 CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 \
500 CONFIG_CRYPTO_CAST5_AVX_X86_64 \
501 CONFIG_CRYPTO_CAST6_AVX_X86_64 \
502 CONFIG_CRYPTO_TWOFISH_AVX_X86_64 \
503 CONFIG_CRYPTO_SERPENT_AVX_X86_64 \
504 CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 \
505 CONFIG_CRYPTO_SERPENT_AVX2_X86_64 \
506 CONFIG_CRYPTO_SERPENT_SSE2_586 \
507 CONFIG_CRYPTO_ANUBIS \
508 CONFIG_CRYPTO_BLOWFISH \
509 CONFIG_CRYPTO_CAMELLIA \
510 CONFIG_CRYPTO_CAST5 \
511 CONFIG_CRYPTO_CAST6 \
512 CONFIG_CRYPTO_FCRYPT \
513 CONFIG_CRYPTO_KHAZAD \
514 CONFIG_CRYPTO_SERPENT \
515 CONFIG_CRYPTO_TEA \
516 CONFIG_CRYPTO_TGR192 \
517 CONFIG_CRYPTO_TWOFISH \
518 CONFIG_CRYPTO_TWOFISH_COMMON \
519 CONFIG_CRYPTO_TWOFISH_586 \
520 CONFIG_CRYPTO_WP512
521 FILES:= \
522 $(LINUX_DIR)/crypto/anubis.ko \
523 $(LINUX_DIR)/crypto/camellia_generic.ko \
524 $(LINUX_DIR)/crypto/cast_common.ko \
525 $(LINUX_DIR)/crypto/cast5_generic.ko \
526 $(LINUX_DIR)/crypto/cast6_generic.ko \
527 $(LINUX_DIR)/crypto/khazad.ko \
528 $(LINUX_DIR)/crypto/tea.ko \
529 $(LINUX_DIR)/crypto/tgr192.ko \
530 $(LINUX_DIR)/crypto/twofish_common.ko \
531 $(LINUX_DIR)/crypto/wp512.ko \
532 $(LINUX_DIR)/crypto/twofish_generic.ko \
533 $(LINUX_DIR)/crypto/blowfish_common.ko \
534 $(LINUX_DIR)/crypto/blowfish_generic.ko \
535 $(LINUX_DIR)/crypto/serpent_generic.ko
536 AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
537 cast5_generic cast6_generic khazad tea tgr192 twofish_common \
538 wp512 blowfish_common serpent_generic)
539 ifndef CONFIG_TARGET_x86
540 AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
541 endif
542 $(call AddDepends/crypto)
543 endef
544
545 ifndef CONFIG_TARGET_x86_64
546 define KernelPackage/crypto-misc/x86
547 FILES+= \
548 $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
549 $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
550 $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
551 $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17 \
552 $(LINUX_DIR)/crypto/cryptd.ko \
553 $(LINUX_DIR)/crypto/lrw.ko@lt4.17 \
554 $(LINUX_DIR)/crypto/crypto_simd.ko@ge4.17
555 AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
556 serpent-sse2-i586 twofish-i586 blowfish_generic)
557 endef
558 endif
559
560 define KernelPackage/crypto-misc/x86/64
561 FILES+= \
562 $(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \
563 $(LINUX_DIR)/arch/x86/crypto/blowfish-x86_64.ko \
564 $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64.ko \
565 $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64-3way.ko \
566 $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-x86_64.ko \
567 $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx-x86_64.ko \
568 $(LINUX_DIR)/arch/x86/crypto/cast5-avx-x86_64.ko \
569 $(LINUX_DIR)/arch/x86/crypto/cast6-avx-x86_64.ko \
570 $(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \
571 $(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \
572 $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \
573 $(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \
574 $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17
575 AUTOLOAD+= $(call AutoLoad,10,camellia-x86_64 \
576 camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \
577 cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
578 twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2)
579 endef
580
581 $(eval $(call KernelPackage,crypto-misc))
582
583
584 define KernelPackage/crypto-null
585 TITLE:=Null CryptoAPI module
586 KCONFIG:=CONFIG_CRYPTO_NULL
587 FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
588 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
589 $(call AddDepends/crypto, +kmod-crypto-hash)
590 endef
591
592 $(eval $(call KernelPackage,crypto-null))
593
594
595 define KernelPackage/crypto-pcbc
596 TITLE:=Propagating Cipher Block Chaining CryptoAPI module
597 DEPENDS:=+kmod-crypto-manager
598 KCONFIG:=CONFIG_CRYPTO_PCBC
599 FILES:=$(LINUX_DIR)/crypto/pcbc.ko
600 AUTOLOAD:=$(call AutoLoad,09,pcbc)
601 $(call AddDepends/crypto)
602 endef
603
604 $(eval $(call KernelPackage,crypto-pcbc))
605
606
607 define KernelPackage/crypto-pcompress
608 TITLE:=CryptoAPI Partial (de)compression operations
609 KCONFIG:= \
610 CONFIG_CRYPTO_PCOMP=y \
611 CONFIG_CRYPTO_PCOMP2
612 FILES:=$(LINUX_DIR)/crypto/pcompress.ko
613 AUTOLOAD:=$(call AutoLoad,09,pcompress)
614 $(call AddDepends/crypto)
615 endef
616
617 $(eval $(call KernelPackage,crypto-pcompress))
618
619
620 define KernelPackage/crypto-rsa
621 TITLE:=RSA algorithm
622 DEPENDS:=+kmod-crypto-manager +kmod-asn1-decoder
623 KCONFIG:= CONFIG_CRYPTO_RSA
624 HIDDEN:=1
625 FILES:= \
626 $(LINUX_DIR)/lib/mpi/mpi.ko \
627 $(LINUX_DIR)/crypto/akcipher.ko \
628 $(LINUX_DIR)/crypto/rsa_generic.ko
629 AUTOLOAD:=$(call AutoLoad,10,rsa_generic)
630 $(call AddDepends/crypto)
631 endef
632
633 $(eval $(call KernelPackage,crypto-rsa))
634
635
636 define KernelPackage/crypto-rmd160
637 TITLE:=RIPEMD160 digest CryptoAPI module
638 DEPENDS:=+kmod-crypto-hash
639 KCONFIG:=CONFIG_CRYPTO_RMD160
640 FILES:=$(LINUX_DIR)/crypto/rmd160.ko
641 AUTOLOAD:=$(call AutoLoad,09,rmd160)
642 $(call AddDepends/crypto)
643 endef
644
645 $(eval $(call KernelPackage,crypto-rmd160))
646
647
648 define KernelPackage/crypto-rng
649 TITLE:=CryptoAPI random number generation
650 DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
651 KCONFIG:= \
652 CONFIG_CRYPTO_DRBG \
653 CONFIG_CRYPTO_DRBG_HMAC=y \
654 CONFIG_CRYPTO_DRBG_HASH=n \
655 CONFIG_CRYPTO_DRBG_MENU \
656 CONFIG_CRYPTO_JITTERENTROPY \
657 CONFIG_CRYPTO_RNG2
658 FILES:= \
659 $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \
660 $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \
661 $(LINUX_DIR)/crypto/krng.ko@lt4.2 \
662 $(LINUX_DIR)/crypto/rng.ko
663 AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng)
664 $(call AddDepends/crypto)
665 endef
666
667 $(eval $(call KernelPackage,crypto-rng))
668
669
670 define KernelPackage/crypto-seqiv
671 TITLE:=CryptoAPI Sequence Number IV Generator
672 DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
673 KCONFIG:=CONFIG_CRYPTO_SEQIV
674 FILES:=$(LINUX_DIR)/crypto/seqiv.ko
675 AUTOLOAD:=$(call AutoLoad,09,seqiv)
676 $(call AddDepends/crypto)
677 endef
678
679 $(eval $(call KernelPackage,crypto-seqiv))
680
681
682 define KernelPackage/crypto-sha1
683 TITLE:=SHA1 digest CryptoAPI module
684 DEPENDS:=+kmod-crypto-hash
685 KCONFIG:= \
686 CONFIG_CRYPTO_SHA1 \
687 CONFIG_CRYPTO_SHA1_OCTEON \
688 CONFIG_CRYPTO_SHA1_SSSE3
689 FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
690 AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
691 $(call AddDepends/crypto)
692 endef
693
694 define KernelPackage/crypto-sha1/octeon
695 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
696 AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
697 endef
698
699 define KernelPackage/crypto-sha1/x86/64
700 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
701 AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3)
702 endef
703
704 $(eval $(call KernelPackage,crypto-sha1))
705
706
707 define KernelPackage/crypto-sha256
708 TITLE:=SHA224 SHA256 digest CryptoAPI module
709 DEPENDS:=+kmod-crypto-hash
710 KCONFIG:= \
711 CONFIG_CRYPTO_SHA256 \
712 CONFIG_CRYPTO_SHA256_OCTEON \
713 CONFIG_CRYPTO_SHA256_SSSE3
714 FILES:=$(LINUX_DIR)/crypto/sha256_generic.ko
715 AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
716 $(call AddDepends/crypto)
717 endef
718
719 define KernelPackage/crypto-sha256/octeon
720 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko
721 AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
722 endef
723
724 define KernelPackage/crypto-sha256/x86/64
725 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
726 AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
727 endef
728
729 $(eval $(call KernelPackage,crypto-sha256))
730
731
732 define KernelPackage/crypto-sha512
733 TITLE:=SHA512 digest CryptoAPI module
734 DEPENDS:=+kmod-crypto-hash
735 KCONFIG:= \
736 CONFIG_CRYPTO_SHA512 \
737 CONFIG_CRYPTO_SHA512_OCTEON \
738 CONFIG_CRYPTO_SHA512_SSSE3
739 FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
740 AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
741 $(call AddDepends/crypto)
742 endef
743
744 define KernelPackage/crypto-sha512/octeon
745 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko
746 AUTOLOAD+=$(call AutoLoad,09,octeon-sha512)
747 endef
748
749 define KernelPackage/crypto-sha512/x86/64
750 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko
751 AUTOLOAD+=$(call AutoLoad,09,sha512-ssse3)
752 endef
753
754 $(eval $(call KernelPackage,crypto-sha512))
755
756
757 define KernelPackage/crypto-test
758 TITLE:=Test CryptoAPI module
759 KCONFIG:=CONFIG_CRYPTO_TEST
760 FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
761 $(call AddDepends/crypto,+kmod-crypto-manager)
762 endef
763
764 $(eval $(call KernelPackage,crypto-test))
765
766
767 define KernelPackage/crypto-user
768 TITLE:=CryptoAPI userspace interface
769 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
770 KCONFIG:= \
771 CONFIG_CRYPTO_USER \
772 CONFIG_CRYPTO_USER_API \
773 CONFIG_CRYPTO_USER_API_AEAD \
774 CONFIG_CRYPTO_USER_API_HASH \
775 CONFIG_CRYPTO_USER_API_RNG \
776 CONFIG_CRYPTO_USER_API_SKCIPHER
777 FILES:= \
778 $(LINUX_DIR)/crypto/af_alg.ko \
779 $(LINUX_DIR)/crypto/algif_aead.ko \
780 $(LINUX_DIR)/crypto/algif_hash.ko \
781 $(LINUX_DIR)/crypto/algif_rng.ko \
782 $(LINUX_DIR)/crypto/algif_skcipher.ko \
783 $(LINUX_DIR)/crypto/crypto_user.ko
784 AUTOLOAD:=$(call AutoLoad,09,af_alg algif_aead algif_hash algif_rng algif_skcipher crypto_user)
785 $(call AddDepends/crypto)
786 endef
787
788 $(eval $(call KernelPackage,crypto-user))
789
790
791 define KernelPackage/crypto-wq
792 TITLE:=CryptoAPI work queue handling
793 KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
794 FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
795 AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
796 $(call AddDepends/crypto)
797 endef
798 $(eval $(call KernelPackage,crypto-wq))
799
800
801 define KernelPackage/crypto-xts
802 TITLE:=XTS cipher CryptoAPI module
803 DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager
804 KCONFIG:=CONFIG_CRYPTO_XTS
805 FILES:=$(LINUX_DIR)/crypto/xts.ko
806 AUTOLOAD:=$(call AutoLoad,09,xts)
807 $(call AddDepends/crypto)
808 endef
809
810 $(eval $(call KernelPackage,crypto-xts))
811