0fe6416df0eba1a96c9c294ccb6831c003632974
[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
114 AUTOLOAD:=$(call AutoLoad,04,crc32_generic,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
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 +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:= \
173 $(LINUX_DIR)/crypto/des_generic.ko \
174 $(LINUX_DIR)/lib/crypto/libdes.ko@ge5.4
175 AUTOLOAD:=$(call AutoLoad,09,des_generic)
176 $(call AddDepends/crypto)
177 endef
178
179 $(eval $(call KernelPackage,crypto-des))
180
181
182 define KernelPackage/crypto-ecb
183 TITLE:=Electronic CodeBook CryptoAPI module
184 DEPENDS:=+kmod-crypto-manager
185 KCONFIG:=CONFIG_CRYPTO_ECB
186 FILES:=$(LINUX_DIR)/crypto/ecb.ko
187 AUTOLOAD:=$(call AutoLoad,09,ecb)
188 $(call AddDepends/crypto)
189 endef
190
191 $(eval $(call KernelPackage,crypto-ecb))
192
193
194 define KernelPackage/crypto-ecdh
195 TITLE:=ECDH algorithm
196 DEPENDS:=+kmod-crypto-kpp
197 KCONFIG:= CONFIG_CRYPTO_ECDH
198 FILES:= \
199 $(LINUX_DIR)/crypto/ecdh_generic.ko \
200 $(LINUX_DIR)/crypto/ecc.ko@ge5.2
201 AUTOLOAD:=$(call AutoLoad,10,ecdh_generic)
202 $(call AddDepends/crypto)
203 endef
204
205 $(eval $(call KernelPackage,crypto-ecdh))
206
207
208 define KernelPackage/crypto-echainiv
209 TITLE:=Encrypted Chain IV Generator
210 DEPENDS:=+kmod-crypto-aead
211 KCONFIG:=CONFIG_CRYPTO_ECHAINIV
212 FILES:=$(LINUX_DIR)/crypto/echainiv.ko
213 AUTOLOAD:=$(call AutoLoad,09,echainiv)
214 $(call AddDepends/crypto)
215 endef
216
217 $(eval $(call KernelPackage,crypto-echainiv))
218
219
220 define KernelPackage/crypto-fcrypt
221 TITLE:=FCRYPT cipher CryptoAPI module
222 KCONFIG:=CONFIG_CRYPTO_FCRYPT
223 FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
224 AUTOLOAD:=$(call AutoLoad,09,fcrypt)
225 $(call AddDepends/crypto)
226 endef
227
228 $(eval $(call KernelPackage,crypto-fcrypt))
229
230
231 define KernelPackage/crypto-gcm
232 TITLE:=GCM/GMAC CryptoAPI module
233 DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
234 KCONFIG:=CONFIG_CRYPTO_GCM
235 FILES:=$(LINUX_DIR)/crypto/gcm.ko
236 AUTOLOAD:=$(call AutoLoad,09,gcm)
237 $(call AddDepends/crypto)
238 endef
239
240 $(eval $(call KernelPackage,crypto-gcm))
241
242
243 define KernelPackage/crypto-xcbc
244 TITLE:=XCBC CryptoAPI module
245 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
246 KCONFIG:=CONFIG_CRYPTO_XCBC
247 FILES:=$(LINUX_DIR)/crypto/xcbc.ko
248 AUTOLOAD:=$(call AutoLoad,09,xcbc)
249 $(call AddDepends/crypto)
250 endef
251
252 $(eval $(call KernelPackage,crypto-xcbc))
253
254
255 define KernelPackage/crypto-gf128
256 TITLE:=GF(2^128) multiplication functions CryptoAPI module
257 KCONFIG:=CONFIG_CRYPTO_GF128MUL
258 FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
259 AUTOLOAD:=$(call AutoLoad,09,gf128mul)
260 $(call AddDepends/crypto)
261 endef
262
263 $(eval $(call KernelPackage,crypto-gf128))
264
265
266 define KernelPackage/crypto-ghash
267 TITLE:=GHASH digest CryptoAPI module
268 DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
269 KCONFIG:= \
270 CONFIG_CRYPTO_GHASH \
271 CONFIG_CRYPTO_GHASH_ARM_CE
272 FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
273 AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
274 $(call AddDepends/crypto)
275 endef
276
277 define KernelPackage/crypto-ghash/arm-ce
278 FILES+= $(LINUX_DIR)/arch/arm/crypto/ghash-arm-ce.ko
279 AUTOLOAD+=$(call AutoLoad,09,ghash-arm-ce)
280 endef
281
282 KernelPackage/crypto-ghash/imx6=$(KernelPackage/crypto-ghash/arm-ce)
283 KernelPackage/crypto-ghash/ipq40xx=$(KernelPackage/crypto-ghash/arm-ce)
284 KernelPackage/crypto-ghash/mvebu=$(KernelPackage/crypto-ghash/arm-ce)
285
286 $(eval $(call KernelPackage,crypto-ghash))
287
288
289 define KernelPackage/crypto-hash
290 TITLE:=CryptoAPI hash support
291 KCONFIG:=CONFIG_CRYPTO_HASH
292 FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
293 AUTOLOAD:=$(call AutoLoad,02,crypto_hash,1)
294 $(call AddDepends/crypto)
295 endef
296
297 $(eval $(call KernelPackage,crypto-hash))
298
299
300 define KernelPackage/crypto-hmac
301 TITLE:=HMAC digest CryptoAPI module
302 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
303 KCONFIG:=CONFIG_CRYPTO_HMAC
304 FILES:=$(LINUX_DIR)/crypto/hmac.ko
305 AUTOLOAD:=$(call AutoLoad,09,hmac)
306 $(call AddDepends/crypto)
307 endef
308
309 $(eval $(call KernelPackage,crypto-hmac))
310
311
312 define KernelPackage/crypto-hw-ccp
313 TITLE:=AMD Cryptographic Coprocessor
314 DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 +kmod-crypto-rsa
315 KCONFIG:= \
316 CONFIG_CRYPTO_HW=y \
317 CONFIG_CRYPTO_DEV_CCP=y \
318 CONFIG_CRYPTO_DEV_CCP_CRYPTO \
319 CONFIG_CRYPTO_DEV_CCP_DD \
320 CONFIG_CRYPTO_DEV_SP_CCP=y
321 FILES:= \
322 $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \
323 $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko
324 AUTOLOAD:=$(call AutoLoad,09,ccp ccp-crypto)
325 $(call AddDepends/crypto)
326 endef
327
328 $(eval $(call KernelPackage,crypto-hw-ccp))
329
330
331 define KernelPackage/crypto-hw-geode
332 TITLE:=AMD Geode hardware crypto module
333 DEPENDS:=+kmod-crypto-manager
334 KCONFIG:= \
335 CONFIG_CRYPTO_HW=y \
336 CONFIG_CRYPTO_DEV_GEODE
337 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
338 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
339 $(call AddDepends/crypto)
340 endef
341
342 $(eval $(call KernelPackage,crypto-hw-geode))
343
344
345 define KernelPackage/crypto-hw-hifn-795x
346 TITLE:=HIFN 795x crypto accelerator
347 DEPENDS:=+kmod-random-core +kmod-crypto-manager
348 KCONFIG:= \
349 CONFIG_CRYPTO_HW=y \
350 CONFIG_CRYPTO_DEV_HIFN_795X \
351 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
352 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
353 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
354 $(call AddDepends/crypto,+kmod-crypto-des)
355 endef
356
357 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
358
359
360 define KernelPackage/crypto-hw-padlock
361 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
362 DEPENDS:=+kmod-crypto-manager
363 KCONFIG:= \
364 CONFIG_CRYPTO_HW=y \
365 CONFIG_CRYPTO_DEV_PADLOCK \
366 CONFIG_CRYPTO_DEV_PADLOCK_AES \
367 CONFIG_CRYPTO_DEV_PADLOCK_SHA
368 FILES:= \
369 $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
370 $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
371 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
372 $(call AddDepends/crypto)
373 endef
374
375 $(eval $(call KernelPackage,crypto-hw-padlock))
376
377
378 define KernelPackage/crypto-hw-safexcel
379 TITLE:= MVEBU SafeXcel Crypto Engine module
380 DEPENDS:=@!LINUX_4_14 @(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) \
381 +kmod-crypto-authenc +kmod-crypto-md5 +kmod-crypto-hmac +kmod-crypto-sha256 +kmod-crypto-sha512
382 KCONFIG:= \
383 CONFIG_CRYPTO_HW=y \
384 CONFIG_CRYPTO_DEV_SAFEXCEL
385 FILES:=$(LINUX_DIR)/drivers/crypto/inside-secure/crypto_safexcel.ko
386 AUTOLOAD:=$(call AutoLoad,90,crypto_safexcel)
387 $(call AddDepends/crypto)
388 endef
389
390 define KernelPackage/crypto-hw-safexcel/description
391 MVEBU's EIP97 and EIP197 Cryptographic Engine driver designed by
392 Inside Secure. This is found on Marvell Armada 37xx/7k/8k SoCs.
393
394 Particular version of these IP (EIP197B and EIP197D) require firmware.
395 Unfortunately it's not freely available and needs signed Non-Disclosure
396 Agreement (NDA) with Marvell. For those who have signed NDA the firmware can be
397 obtained at https://extranet.marvell.com.
398 endef
399
400 $(eval $(call KernelPackage,crypto-hw-safexcel))
401
402
403 define KernelPackage/crypto-hw-talitos
404 TITLE:=Freescale integrated security engine (SEC) driver
405 DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
406 KCONFIG:= \
407 CONFIG_CRYPTO_HW=y \
408 CONFIG_CRYPTO_DEV_TALITOS \
409 CONFIG_CRYPTO_DEV_TALITOS1=y \
410 CONFIG_CRYPTO_DEV_TALITOS2=y
411 FILES:= \
412 $(LINUX_DIR)/drivers/crypto/talitos.ko
413 AUTOLOAD:=$(call AutoLoad,09,talitos)
414 $(call AddDepends/crypto)
415 endef
416
417 $(eval $(call KernelPackage,crypto-hw-talitos))
418
419
420 define KernelPackage/crypto-kpp
421 TITLE:=Key-agreement Protocol Primitives
422 KCONFIG:=CONFIG_CRYPTO_KPP
423 HIDDEN:=1
424 FILES:=$(LINUX_DIR)/crypto/kpp.ko
425 AUTOLOAD:=$(call AutoLoad,09,kpp)
426 $(call AddDepends/crypto)
427 endef
428
429 $(eval $(call KernelPackage,crypto-kpp))
430
431
432 define KernelPackage/crypto-manager
433 TITLE:=CryptoAPI algorithm manager
434 DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
435 KCONFIG:= \
436 CONFIG_CRYPTO_MANAGER \
437 CONFIG_CRYPTO_MANAGER2
438 FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
439 AUTOLOAD:=$(call AutoLoad,09,cryptomgr,1)
440 $(call AddDepends/crypto)
441 endef
442
443 $(eval $(call KernelPackage,crypto-manager))
444
445
446 define KernelPackage/crypto-md4
447 TITLE:=MD4 digest CryptoAPI module
448 DEPENDS:=+kmod-crypto-hash
449 KCONFIG:=CONFIG_CRYPTO_MD4
450 FILES:=$(LINUX_DIR)/crypto/md4.ko
451 AUTOLOAD:=$(call AutoLoad,09,md4)
452 $(call AddDepends/crypto)
453 endef
454
455 $(eval $(call KernelPackage,crypto-md4))
456
457
458 define KernelPackage/crypto-md5
459 TITLE:=MD5 digest CryptoAPI module
460 DEPENDS:=+kmod-crypto-hash
461 KCONFIG:= \
462 CONFIG_CRYPTO_MD5 \
463 CONFIG_CRYPTO_MD5_OCTEON
464 FILES:=$(LINUX_DIR)/crypto/md5.ko
465 AUTOLOAD:=$(call AutoLoad,09,md5)
466 $(call AddDepends/crypto)
467 endef
468
469 define KernelPackage/crypto-md5/octeon
470 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
471 AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
472 endef
473
474 $(eval $(call KernelPackage,crypto-md5))
475
476
477 define KernelPackage/crypto-michael-mic
478 TITLE:=Michael MIC keyed digest CryptoAPI module
479 DEPENDS:=+kmod-crypto-hash
480 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
481 FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
482 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
483 $(call AddDepends/crypto)
484 endef
485
486 $(eval $(call KernelPackage,crypto-michael-mic))
487
488
489 define KernelPackage/crypto-misc
490 TITLE:=Other CryptoAPI modules
491 DEPENDS:=+kmod-crypto-xts
492 KCONFIG:= \
493 CONFIG_CRYPTO_CAMELLIA_X86_64 \
494 CONFIG_CRYPTO_BLOWFISH_X86_64 \
495 CONFIG_CRYPTO_TWOFISH_X86_64 \
496 CONFIG_CRYPTO_TWOFISH_X86_64_3WAY \
497 CONFIG_CRYPTO_SERPENT_SSE2_X86_64 \
498 CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 \
499 CONFIG_CRYPTO_CAST5_AVX_X86_64 \
500 CONFIG_CRYPTO_CAST6_AVX_X86_64 \
501 CONFIG_CRYPTO_TWOFISH_AVX_X86_64 \
502 CONFIG_CRYPTO_SERPENT_AVX_X86_64 \
503 CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 \
504 CONFIG_CRYPTO_SERPENT_AVX2_X86_64 \
505 CONFIG_CRYPTO_SERPENT_SSE2_586 \
506 CONFIG_CRYPTO_ANUBIS \
507 CONFIG_CRYPTO_BLOWFISH \
508 CONFIG_CRYPTO_CAMELLIA \
509 CONFIG_CRYPTO_CAST5 \
510 CONFIG_CRYPTO_CAST6 \
511 CONFIG_CRYPTO_FCRYPT \
512 CONFIG_CRYPTO_KHAZAD \
513 CONFIG_CRYPTO_SERPENT \
514 CONFIG_CRYPTO_TEA \
515 CONFIG_CRYPTO_TGR192 \
516 CONFIG_CRYPTO_TWOFISH \
517 CONFIG_CRYPTO_TWOFISH_COMMON \
518 CONFIG_CRYPTO_TWOFISH_586 \
519 CONFIG_CRYPTO_WP512
520 FILES:= \
521 $(LINUX_DIR)/crypto/anubis.ko \
522 $(LINUX_DIR)/crypto/camellia_generic.ko \
523 $(LINUX_DIR)/crypto/cast_common.ko \
524 $(LINUX_DIR)/crypto/cast5_generic.ko \
525 $(LINUX_DIR)/crypto/cast6_generic.ko \
526 $(LINUX_DIR)/crypto/khazad.ko \
527 $(LINUX_DIR)/crypto/tea.ko \
528 $(LINUX_DIR)/crypto/tgr192.ko \
529 $(LINUX_DIR)/crypto/twofish_common.ko \
530 $(LINUX_DIR)/crypto/wp512.ko \
531 $(LINUX_DIR)/crypto/twofish_generic.ko \
532 $(LINUX_DIR)/crypto/blowfish_common.ko \
533 $(LINUX_DIR)/crypto/blowfish_generic.ko \
534 $(LINUX_DIR)/crypto/serpent_generic.ko
535 AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
536 cast5_generic cast6_generic khazad tea tgr192 twofish_common \
537 wp512 blowfish_common serpent_generic)
538 ifndef CONFIG_TARGET_x86
539 AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
540 endif
541 $(call AddDepends/crypto)
542 endef
543
544 ifndef CONFIG_TARGET_x86_64
545 define KernelPackage/crypto-misc/x86
546 FILES+= \
547 $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
548 $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
549 $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
550 $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17 \
551 $(LINUX_DIR)/crypto/cryptd.ko \
552 $(LINUX_DIR)/crypto/lrw.ko@lt4.17 \
553 $(LINUX_DIR)/crypto/crypto_simd.ko@ge4.17
554 AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
555 serpent-sse2-i586 twofish-i586 blowfish_generic)
556 endef
557 endif
558
559 define KernelPackage/crypto-misc/x86/64
560 FILES+= \
561 $(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \
562 $(LINUX_DIR)/arch/x86/crypto/blowfish-x86_64.ko \
563 $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64.ko \
564 $(LINUX_DIR)/arch/x86/crypto/twofish-x86_64-3way.ko \
565 $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-x86_64.ko \
566 $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx-x86_64.ko \
567 $(LINUX_DIR)/arch/x86/crypto/cast5-avx-x86_64.ko \
568 $(LINUX_DIR)/arch/x86/crypto/cast6-avx-x86_64.ko \
569 $(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \
570 $(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \
571 $(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \
572 $(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \
573 $(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17
574 AUTOLOAD+= $(call AutoLoad,10,camellia-x86_64 \
575 camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \
576 cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
577 twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2)
578 endef
579
580 $(eval $(call KernelPackage,crypto-misc))
581
582
583 define KernelPackage/crypto-null
584 TITLE:=Null CryptoAPI module
585 KCONFIG:=CONFIG_CRYPTO_NULL
586 FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
587 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
588 $(call AddDepends/crypto, +kmod-crypto-hash)
589 endef
590
591 $(eval $(call KernelPackage,crypto-null))
592
593
594 define KernelPackage/crypto-pcbc
595 TITLE:=Propagating Cipher Block Chaining CryptoAPI module
596 DEPENDS:=+kmod-crypto-manager
597 KCONFIG:=CONFIG_CRYPTO_PCBC
598 FILES:=$(LINUX_DIR)/crypto/pcbc.ko
599 AUTOLOAD:=$(call AutoLoad,09,pcbc)
600 $(call AddDepends/crypto)
601 endef
602
603 $(eval $(call KernelPackage,crypto-pcbc))
604
605
606 define KernelPackage/crypto-pcompress
607 TITLE:=CryptoAPI Partial (de)compression operations
608 KCONFIG:= \
609 CONFIG_CRYPTO_PCOMP=y \
610 CONFIG_CRYPTO_PCOMP2
611 FILES:=$(LINUX_DIR)/crypto/pcompress.ko
612 AUTOLOAD:=$(call AutoLoad,09,pcompress)
613 $(call AddDepends/crypto)
614 endef
615
616 $(eval $(call KernelPackage,crypto-pcompress))
617
618
619 define KernelPackage/crypto-rsa
620 TITLE:=RSA algorithm
621 DEPENDS:=+kmod-crypto-manager +kmod-asn1-decoder
622 KCONFIG:= CONFIG_CRYPTO_RSA
623 HIDDEN:=1
624 FILES:= \
625 $(LINUX_DIR)/lib/mpi/mpi.ko \
626 $(LINUX_DIR)/crypto/akcipher.ko \
627 $(LINUX_DIR)/crypto/rsa_generic.ko
628 AUTOLOAD:=$(call AutoLoad,10,rsa_generic)
629 $(call AddDepends/crypto)
630 endef
631
632 $(eval $(call KernelPackage,crypto-rsa))
633
634
635 define KernelPackage/crypto-rmd160
636 TITLE:=RIPEMD160 digest CryptoAPI module
637 DEPENDS:=+kmod-crypto-hash
638 KCONFIG:=CONFIG_CRYPTO_RMD160
639 FILES:=$(LINUX_DIR)/crypto/rmd160.ko
640 AUTOLOAD:=$(call AutoLoad,09,rmd160)
641 $(call AddDepends/crypto)
642 endef
643
644 $(eval $(call KernelPackage,crypto-rmd160))
645
646
647 define KernelPackage/crypto-rng
648 TITLE:=CryptoAPI random number generation
649 DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
650 KCONFIG:= \
651 CONFIG_CRYPTO_DRBG \
652 CONFIG_CRYPTO_DRBG_HMAC=y \
653 CONFIG_CRYPTO_DRBG_HASH=n \
654 CONFIG_CRYPTO_DRBG_MENU \
655 CONFIG_CRYPTO_JITTERENTROPY \
656 CONFIG_CRYPTO_RNG2
657 FILES:= \
658 $(LINUX_DIR)/crypto/drbg.ko \
659 $(LINUX_DIR)/crypto/jitterentropy_rng.ko \
660 $(LINUX_DIR)/crypto/rng.ko
661 AUTOLOAD:=$(call AutoLoad,09,drbg jitterentropy_rng rng)
662 $(call AddDepends/crypto)
663 endef
664
665 $(eval $(call KernelPackage,crypto-rng))
666
667
668 define KernelPackage/crypto-seqiv
669 TITLE:=CryptoAPI Sequence Number IV Generator
670 DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
671 KCONFIG:=CONFIG_CRYPTO_SEQIV
672 FILES:=$(LINUX_DIR)/crypto/seqiv.ko
673 AUTOLOAD:=$(call AutoLoad,09,seqiv)
674 $(call AddDepends/crypto)
675 endef
676
677 $(eval $(call KernelPackage,crypto-seqiv))
678
679
680 define KernelPackage/crypto-sha1
681 TITLE:=SHA1 digest CryptoAPI module
682 DEPENDS:=+kmod-crypto-hash
683 KCONFIG:= \
684 CONFIG_CRYPTO_SHA1 \
685 CONFIG_CRYPTO_SHA1_OCTEON \
686 CONFIG_CRYPTO_SHA1_SSSE3
687 FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
688 AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
689 $(call AddDepends/crypto)
690 endef
691
692 define KernelPackage/crypto-sha1/octeon
693 FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
694 AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
695 endef
696
697 define KernelPackage/crypto-sha1/x86/64
698 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
699 AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3)
700 endef
701
702 $(eval $(call KernelPackage,crypto-sha1))
703
704
705 define KernelPackage/crypto-sha256
706 TITLE:=SHA224 SHA256 digest CryptoAPI module
707 DEPENDS:=+kmod-crypto-hash
708 KCONFIG:= \
709 CONFIG_CRYPTO_SHA256 \
710 CONFIG_CRYPTO_SHA256_OCTEON \
711 CONFIG_CRYPTO_SHA256_SSSE3
712 FILES:= \
713 $(LINUX_DIR)/crypto/sha256_generic.ko \
714 $(LINUX_DIR)/lib/crypto/libsha256.ko@ge5.4
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