2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 CRYPTO_MENU
:=Cryptographic API modules
11 # XXX: added workarounds for modules renamed in 2.6 series:
12 # - aes > aes_generic (2.6.24)
13 # - blkcipher -> crypto_blkcipher (2.6.25)
14 # - des > des_generic (2.6.24)
15 # - sha1 > sha1_generic (2.6.24)
16 # - sha256 > sha256_generic (2.6.24)
17 # - sha512 > sha512_generic (2.6.26)
18 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),ge
,2.6.24)),1)
19 CRYPTO_GENERIC
:=_generic
20 AES_SUFFIX
:=$(CRYPTO_GENERIC
)
21 DES_SUFFIX
:=$(CRYPTO_GENERIC
)
22 SHA1_SUFFIX
:=$(CRYPTO_GENERIC
)
23 SHA256_SUFFIX
:=$(CRYPTO_GENERIC
)
25 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),ge
,2.6.25)),1)
26 CRYPTO_PREFIX
:=crypto_
27 BLKCIPHER_PREFIX
:=$(CRYPTO_PREFIX
)
29 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),ge
,2.6.26)),1)
30 SHA512_SUFFIX
:=$(CRYPTO_GENERIC
)
33 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
34 # always set, even if no hash modules are selected
35 define KernelPackage
/crypto-core
36 SUBMENU
:=$(CRYPTO_MENU
)
37 TITLE
:=Core CryptoAPI modules
40 CONFIG_CRYPTO_ALGAPI \
41 CONFIG_CRYPTO_BLKCIPHER \
43 CONFIG_CRYPTO_DEFLATE \
49 $(LINUX_DIR
)/crypto
/crypto_algapi.
$(LINUX_KMOD_SUFFIX
) \
50 $(LINUX_DIR
)/crypto
/$(BLKCIPHER_PREFIX
)blkcipher.
$(LINUX_KMOD_SUFFIX
) \
51 $(LINUX_DIR
)/crypto
/cbc.
$(LINUX_KMOD_SUFFIX
) \
52 $(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
) \
53 $(LINUX_DIR
)/crypto
/ecb.
$(LINUX_KMOD_SUFFIX
) \
54 $(LINUX_DIR
)/crypto
/crypto_hash.
$(LINUX_KMOD_SUFFIX
) \
55 $(LINUX_DIR
)/crypto
/cryptomgr.
$(LINUX_KMOD_SUFFIX
)
56 AUTOLOAD
:=$(call AutoLoad
,01, \
60 $(BLKCIPHER_PREFIX
)blkcipher \
67 define KernelPackage
/crypto-core
/2.4
68 FILES
:=$(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
)
69 AUTOLOAD
:=$(call AutoLoad
,01, deflate
)
72 $(eval
$(call KernelPackage
,crypto-core
))
75 define KernelPackage
/crypto-hw-padlock
76 SUBMENU
:=$(CRYPTO_MENU
)
77 TITLE
:=VIA PadLock ACE with AES
/SHA hw crypto module
78 DEPENDS
:=+kmod-crypto-core
81 CONFIG_CRYPTO_DEV_PADLOCK \
82 CONFIG_CRYPTO_DEV_PADLOCK_AES \
83 CONFIG_CRYPTO_DEV_PADLOCK_SHA
85 $(LINUX_DIR
)/drivers
/crypto
/padlock-aes.
$(LINUX_KMOD_SUFFIX
) \
86 $(LINUX_DIR
)/drivers
/crypto
/padlock-sha.
$(LINUX_KMOD_SUFFIX
)
87 AUTOLOAD
:=$(call AutoLoad
,09,padlock-aes padlock-sha
)
90 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
93 define KernelPackage
/crypto-hw-geode
94 SUBMENU
:=$(CRYPTO_MENU
)
95 TITLE
:=AMD Geode hardware crypto module
96 DEPENDS
:=+kmod-crypto-core
99 CONFIG_CRYPTO_DEV_GEODE
100 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
101 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
104 $(eval
$(call KernelPackage
,crypto-hw-geode
))
107 define KernelPackage
/crypto-hw-hifn-795x
108 SUBMENU
:=$(CRYPTO_MENU
)
109 TITLE
:=HIFN
795x crypto accelerator
110 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-des
113 CONFIG_CRYPTO_DEV_HIFN_795X \
114 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
115 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
116 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
119 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
122 define KernelPackage
/crypto-hw-ixp4xx
123 SUBMENU
:=$(CRYPTO_MENU
)
124 TITLE
:=Intel IXP4xx hardware crypto module
126 @TARGET_ixp4xx
+kmod-crypto-core
+kmod-crypto-des
+kmod-crypto-aead \
128 KCONFIG
:= CONFIG_CRYPTO_DEV_IXP4XX
129 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
130 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
133 define KernelPackage
/crypto-hw-ixp4xx
/description
134 Kernel support for the Intel IXP4xx HW crypto engine.
137 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
140 define KernelPackage
/crypto-aes
141 SUBMENU
:=$(CRYPTO_MENU
)
142 TITLE
:=AES cipher CryptoAPI module
143 DEPENDS
:=+kmod-crypto-core
144 KCONFIG
:=CONFIG_CRYPTO_AES
145 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
146 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
149 define KernelPackage
/crypto-aes
/x86-2.6
150 KCONFIG
+=CONFIG_CRYPTO_AES_586
151 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
152 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
155 $(eval
$(call KernelPackage
,crypto-aes
))
158 define KernelPackage
/crypto-arc4
159 SUBMENU
:=$(CRYPTO_MENU
)
160 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
161 DEPENDS
:=+kmod-crypto-core
162 KCONFIG
:=CONFIG_CRYPTO_ARC4
163 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
164 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
167 $(eval
$(call KernelPackage
,crypto-arc4
))
170 define KernelPackage
/crypto-aead
171 SUBMENU
:=$(CRYPTO_MENU
)
172 TITLE
:=Authenticated Encryption with Associated Data
173 DEPENDS
:=+kmod-crypto-core
174 KCONFIG
:=CONFIG_CRYPTO_AEAD
175 FILES
:=$(LINUX_DIR
)/crypto
/aead.
$(LINUX_KMOD_SUFFIX
)
176 AUTOLOAD
:=$(call AutoLoad
,09,aead
)
179 $(eval
$(call KernelPackage
,crypto-aead
))
181 define KernelPackage
/crypto-authenc
182 SUBMENU
:=$(CRYPTO_MENU
)
183 TITLE
:=Combined mode wrapper for IPsec
184 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-aead
185 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
186 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
187 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
190 $(eval
$(call KernelPackage
,crypto-authenc
))
192 define KernelPackage
/crypto-des
193 SUBMENU
:=$(CRYPTO_MENU
)
194 TITLE
:=DES
/3DES cipher CryptoAPI module
195 DEPENDS
:=+kmod-crypto-core
196 KCONFIG
:=CONFIG_CRYPTO_DES
197 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
198 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
201 $(eval
$(call KernelPackage
,crypto-des
))
204 define KernelPackage
/crypto-hmac
205 SUBMENU
:=$(CRYPTO_MENU
)
206 TITLE
:=HMAC digest CryptoAPI module
207 DEPENDS
:=+kmod-crypto-core
208 KCONFIG
:=CONFIG_CRYPTO_HMAC
209 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
210 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
213 $(eval
$(call KernelPackage
,crypto-hmac
))
216 define KernelPackage
/crypto-md5
217 SUBMENU
:=$(CRYPTO_MENU
)
218 TITLE
:=MD5 digest CryptoAPI module
219 DEPENDS
:=+kmod-crypto-core
220 KCONFIG
:=CONFIG_CRYPTO_MD5
221 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
222 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
225 $(eval
$(call KernelPackage
,crypto-md5
))
228 define KernelPackage
/crypto-michael-mic
229 SUBMENU
:=$(CRYPTO_MENU
)
230 TITLE
:=Michael MIC keyed digest CryptoAPI module
231 DEPENDS
:=+kmod-crypto-core
232 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
233 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
234 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
237 $(eval
$(call KernelPackage
,crypto-michael-mic
))
240 define KernelPackage
/crypto-sha1
241 SUBMENU
:=$(CRYPTO_MENU
)
242 TITLE
:=SHA1 digest CryptoAPI module
243 DEPENDS
:=+kmod-crypto-core
244 KCONFIG
:=CONFIG_CRYPTO_SHA1
245 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
246 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
249 $(eval
$(call KernelPackage
,crypto-sha1
))
252 define KernelPackage
/crypto-misc
253 SUBMENU
:=$(CRYPTO_MENU
)
254 TITLE
:=Other CryptoAPI modules
255 DEPENDS
:=+kmod-crypto-core
257 CONFIG_CRYPTO_ANUBIS \
258 CONFIG_CRYPTO_BLOWFISH \
259 CONFIG_CRYPTO_CAMELLIA \
260 CONFIG_CRYPTO_CAST5 \
261 CONFIG_CRYPTO_CAST6 \
262 CONFIG_CRYPTO_CRC32C \
263 CONFIG_CRYPTO_FCRYPT \
264 CONFIG_CRYPTO_KHAZAD \
266 CONFIG_CRYPTO_SERPENT \
267 CONFIG_CRYPTO_SHA256 \
268 CONFIG_CRYPTO_SHA512 \
270 CONFIG_CRYPTO_TGR192 \
271 CONFIG_CRYPTO_TWOFISH \
272 CONFIG_CRYPTO_TWOFISH_586 \
275 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
276 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
277 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
278 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
279 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
280 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
281 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
282 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
283 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
284 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
285 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
286 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
289 define KernelPackage
/crypto-misc
/2.6
291 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
292 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
293 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
294 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
297 $(eval
$(call KernelPackage
,crypto-misc
))
299 define KernelPackage
/crypto-ocf
300 SUBMENU
:=$(CRYPTO_MENU
)
302 DEPENDS
:=+kmod-crypto-core @
!TARGET_uml
305 CONFIG_OCF_CRYPTODEV \
306 CONFIG_OCF_CRYPTOSOFT \
308 CONFIG_OCF_RANDOMHARVEST
=y
310 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
311 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
312 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
313 AUTOLOAD
:=$(call AutoLoad
,09, \
320 $(eval
$(call KernelPackage
,crypto-ocf
))
323 define KernelPackage
/crypto-null
324 SUBMENU
:=$(CRYPTO_MENU
)
325 TITLE
:=Null CryptoAPI module
326 DEPENDS
:=+kmod-crypto-core
327 KCONFIG
:=CONFIG_CRYPTO_NULL
328 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
329 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
332 $(eval
$(call KernelPackage
,crypto-null
))
335 define KernelPackage
/crypto-test
336 SUBMENU
:=$(CRYPTO_MENU
)
337 TITLE
:=Test CryptoAPI module
338 DEPENDS
:=+kmod-crypto-core
339 KCONFIG
:=CONFIG_CRYPTO_TEST
340 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
343 $(eval
$(call KernelPackage
,crypto-test
))