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
80 CONFIG_CRYPTO_DEV_PADLOCK \
81 CONFIG_CRYPTO_DEV_PADLOCK_AES \
82 CONFIG_CRYPTO_DEV_PADLOCK_SHA
84 $(LINUX_DIR
)/drivers
/crypto
/padlock-aes.
$(LINUX_KMOD_SUFFIX
) \
85 $(LINUX_DIR
)/drivers
/crypto
/padlock-sha.
$(LINUX_KMOD_SUFFIX
)
86 AUTOLOAD
:=$(call AutoLoad
,09,padlock-aes padlock-sha
)
89 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
92 define KernelPackage
/crypto-hw-geode
93 SUBMENU
:=$(CRYPTO_MENU
)
94 TITLE
:=AMD Geode hardware crypto module
95 DEPENDS
:=+kmod-crypto-core
97 CONFIG_CRYPTO_DEV_GEODE
98 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
99 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
102 $(eval
$(call KernelPackage
,crypto-hw-geode
))
105 define KernelPackage
/crypto-hw-hifn-795x
106 SUBMENU
:=$(CRYPTO_MENU
)
107 TITLE
:=HIFN
795x crypto accelerator
108 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-des
110 CONFIG_CRYPTO_DEV_HIFN_795X \
111 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
112 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
113 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
116 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
119 define KernelPackage
/crypto-hw-ixp4xx
120 SUBMENU
:=$(CRYPTO_MENU
)
121 TITLE
:=Intel IXP4xx hardware crypto module
123 @TARGET_ixp4xx
+kmod-crypto-core
+kmod-crypto-des
+kmod-crypto-aead \
125 KCONFIG
:= CONFIG_CRYPTO_DEV_IXP4XX
126 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
127 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
130 define KernelPackage
/crypto-hw-ixp4xx
/description
131 Kernel support for the Intel IXP4xx HW crypto engine.
134 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
137 define KernelPackage
/crypto-aes
138 SUBMENU
:=$(CRYPTO_MENU
)
139 TITLE
:=AES cipher CryptoAPI module
140 DEPENDS
:=+kmod-crypto-core
141 KCONFIG
:=CONFIG_CRYPTO_AES
142 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
143 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
146 define KernelPackage
/crypto-aes
/x86-2.6
147 KCONFIG
+=CONFIG_CRYPTO_AES_586
148 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
149 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
152 $(eval
$(call KernelPackage
,crypto-aes
))
155 define KernelPackage
/crypto-arc4
156 SUBMENU
:=$(CRYPTO_MENU
)
157 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
158 DEPENDS
:=+kmod-crypto-core
159 KCONFIG
:=CONFIG_CRYPTO_ARC4
160 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
161 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
164 $(eval
$(call KernelPackage
,crypto-arc4
))
167 define KernelPackage
/crypto-aead
168 SUBMENU
:=$(CRYPTO_MENU
)
169 TITLE
:=Authenticated Encryption with Associated Data
170 DEPENDS
:=+kmod-crypto-core
171 KCONFIG
:=CONFIG_CRYPTO_AEAD
172 FILES
:=$(LINUX_DIR
)/crypto
/aead.
$(LINUX_KMOD_SUFFIX
)
173 AUTOLOAD
:=$(call AutoLoad
,09,aead
)
176 $(eval
$(call KernelPackage
,crypto-aead
))
178 define KernelPackage
/crypto-authenc
179 SUBMENU
:=$(CRYPTO_MENU
)
180 TITLE
:=Combined mode wrapper for IPsec
181 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-aead
182 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
183 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
184 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
187 $(eval
$(call KernelPackage
,crypto-authenc
))
189 define KernelPackage
/crypto-des
190 SUBMENU
:=$(CRYPTO_MENU
)
191 TITLE
:=DES
/3DES cipher CryptoAPI module
192 DEPENDS
:=+kmod-crypto-core
193 KCONFIG
:=CONFIG_CRYPTO_DES
194 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
195 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
198 $(eval
$(call KernelPackage
,crypto-des
))
201 define KernelPackage
/crypto-hmac
202 SUBMENU
:=$(CRYPTO_MENU
)
203 TITLE
:=HMAC digest CryptoAPI module
204 DEPENDS
:=+kmod-crypto-core
205 KCONFIG
:=CONFIG_CRYPTO_HMAC
206 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
207 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
210 $(eval
$(call KernelPackage
,crypto-hmac
))
213 define KernelPackage
/crypto-md5
214 SUBMENU
:=$(CRYPTO_MENU
)
215 TITLE
:=MD5 digest CryptoAPI module
216 DEPENDS
:=+kmod-crypto-core
217 KCONFIG
:=CONFIG_CRYPTO_MD5
218 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
219 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
222 $(eval
$(call KernelPackage
,crypto-md5
))
225 define KernelPackage
/crypto-michael-mic
226 SUBMENU
:=$(CRYPTO_MENU
)
227 TITLE
:=Michael MIC keyed digest CryptoAPI module
228 DEPENDS
:=+kmod-crypto-core
229 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
230 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
231 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
234 $(eval
$(call KernelPackage
,crypto-michael-mic
))
237 define KernelPackage
/crypto-sha1
238 SUBMENU
:=$(CRYPTO_MENU
)
239 TITLE
:=SHA1 digest CryptoAPI module
240 DEPENDS
:=+kmod-crypto-core
241 KCONFIG
:=CONFIG_CRYPTO_SHA1
242 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
243 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
246 $(eval
$(call KernelPackage
,crypto-sha1
))
249 define KernelPackage
/crypto-misc
250 SUBMENU
:=$(CRYPTO_MENU
)
251 TITLE
:=Other CryptoAPI modules
252 DEPENDS
:=+kmod-crypto-core
254 CONFIG_CRYPTO_ANUBIS \
255 CONFIG_CRYPTO_BLOWFISH \
256 CONFIG_CRYPTO_CAMELLIA \
257 CONFIG_CRYPTO_CAST5 \
258 CONFIG_CRYPTO_CAST6 \
259 CONFIG_CRYPTO_CRC32C \
260 CONFIG_CRYPTO_FCRYPT \
261 CONFIG_CRYPTO_KHAZAD \
263 CONFIG_CRYPTO_SERPENT \
264 CONFIG_CRYPTO_SHA256 \
265 CONFIG_CRYPTO_SHA512 \
267 CONFIG_CRYPTO_TGR192 \
268 CONFIG_CRYPTO_TWOFISH \
269 CONFIG_CRYPTO_TWOFISH_586 \
272 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
273 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
274 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
275 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
276 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
277 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
278 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
279 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
280 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
281 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
282 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
283 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
286 define KernelPackage
/crypto-misc
/2.6
288 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
289 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
290 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
291 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
294 $(eval
$(call KernelPackage
,crypto-misc
))
296 define KernelPackage
/crypto-ocf
297 SUBMENU
:=$(CRYPTO_MENU
)
299 DEPENDS
:=+kmod-crypto-core @
!TARGET_uml
302 CONFIG_OCF_CRYPTODEV \
303 CONFIG_OCF_CRYPTOSOFT \
305 CONFIG_OCF_RANDOMHARVEST
=y
307 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
308 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
309 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
310 AUTOLOAD
:=$(call AutoLoad
,09, \
317 $(eval
$(call KernelPackage
,crypto-ocf
))
320 define KernelPackage
/crypto-null
321 SUBMENU
:=$(CRYPTO_MENU
)
322 TITLE
:=Null CryptoAPI module
323 DEPENDS
:=+kmod-crypto-core
324 KCONFIG
:=CONFIG_CRYPTO_NULL
325 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
326 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
329 $(eval
$(call KernelPackage
,crypto-null
))
332 define KernelPackage
/crypto-test
333 SUBMENU
:=$(CRYPTO_MENU
)
334 TITLE
:=Test CryptoAPI module
335 DEPENDS
:=+kmod-crypto-core
336 KCONFIG
:=CONFIG_CRYPTO_TEST
337 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
340 $(eval
$(call KernelPackage
,crypto-test
))