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-aes
76 SUBMENU
:=$(CRYPTO_MENU
)
77 TITLE
:=AES cipher CryptoAPI module
78 DEPENDS
:=+kmod-crypto-core
79 KCONFIG
:=CONFIG_CRYPTO_AES
80 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
81 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
84 define KernelPackage
/crypto-aes
/x86-2.6
85 KCONFIG
+=CONFIG_CRYPTO_AES_586
86 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
87 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
90 $(eval
$(call KernelPackage
,crypto-aes
))
93 define KernelPackage
/crypto-arc4
94 SUBMENU
:=$(CRYPTO_MENU
)
95 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
96 DEPENDS
:=+kmod-crypto-core
97 KCONFIG
:=CONFIG_CRYPTO_ARC4
98 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
99 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
102 $(eval
$(call KernelPackage
,crypto-arc4
))
105 define KernelPackage
/crypto-aead
106 SUBMENU
:=$(CRYPTO_MENU
)
107 TITLE
:=Authenticated Encryption with Associated Data
108 DEPENDS
:=+kmod-crypto-core
109 KCONFIG
:=CONFIG_CRYPTO_AEAD
110 FILES
:=$(LINUX_DIR
)/crypto
/aead.
$(LINUX_KMOD_SUFFIX
)
111 AUTOLOAD
:=$(call AutoLoad
,09,aead
)
114 $(eval
$(call KernelPackage
,crypto-aead
))
116 define KernelPackage
/crypto-authenc
117 SUBMENU
:=$(CRYPTO_MENU
)
118 TITLE
:=Combined mode wrapper for IPsec
119 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-aead
120 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
121 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
122 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
125 $(eval
$(call KernelPackage
,crypto-authenc
))
127 define KernelPackage
/crypto-des
128 SUBMENU
:=$(CRYPTO_MENU
)
129 TITLE
:=DES
/3DES cipher CryptoAPI module
130 DEPENDS
:=+kmod-crypto-core
131 KCONFIG
:=CONFIG_CRYPTO_DES
132 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
133 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
136 $(eval
$(call KernelPackage
,crypto-des
))
139 define KernelPackage
/crypto-hmac
140 SUBMENU
:=$(CRYPTO_MENU
)
141 TITLE
:=HMAC digest CryptoAPI module
142 DEPENDS
:=+kmod-crypto-core
143 KCONFIG
:=CONFIG_CRYPTO_HMAC
144 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
145 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
148 $(eval
$(call KernelPackage
,crypto-hmac
))
151 define KernelPackage
/crypto-md5
152 SUBMENU
:=$(CRYPTO_MENU
)
153 TITLE
:=MD5 digest CryptoAPI module
154 DEPENDS
:=+kmod-crypto-core
155 KCONFIG
:=CONFIG_CRYPTO_MD5
156 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
157 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
160 $(eval
$(call KernelPackage
,crypto-md5
))
163 define KernelPackage
/crypto-michael-mic
164 SUBMENU
:=$(CRYPTO_MENU
)
165 TITLE
:=Michael MIC keyed digest CryptoAPI module
166 DEPENDS
:=+kmod-crypto-core
167 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
168 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
169 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
172 $(eval
$(call KernelPackage
,crypto-michael-mic
))
175 define KernelPackage
/crypto-sha1
176 SUBMENU
:=$(CRYPTO_MENU
)
177 TITLE
:=SHA1 digest CryptoAPI module
178 DEPENDS
:=+kmod-crypto-core
179 KCONFIG
:=CONFIG_CRYPTO_SHA1
180 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
181 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
184 $(eval
$(call KernelPackage
,crypto-sha1
))
187 define KernelPackage
/crypto-misc
188 SUBMENU
:=$(CRYPTO_MENU
)
189 TITLE
:=Other CryptoAPI modules
190 DEPENDS
:=+kmod-crypto-core
192 CONFIG_CRYPTO_ANUBIS \
193 CONFIG_CRYPTO_BLOWFISH \
194 CONFIG_CRYPTO_CAMELLIA \
195 CONFIG_CRYPTO_CAST5 \
196 CONFIG_CRYPTO_CAST6 \
197 CONFIG_CRYPTO_CRC32C \
198 CONFIG_CRYPTO_FCRYPT \
199 CONFIG_CRYPTO_KHAZAD \
201 CONFIG_CRYPTO_SERPENT \
202 CONFIG_CRYPTO_SHA256 \
203 CONFIG_CRYPTO_SHA512 \
205 CONFIG_CRYPTO_TGR192 \
206 CONFIG_CRYPTO_TWOFISH \
207 CONFIG_CRYPTO_TWOFISH_586 \
210 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
211 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
212 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
213 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
214 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
215 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
216 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
217 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
218 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
219 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
220 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
221 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
224 define KernelPackage
/crypto-misc
/2.6
226 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
227 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
228 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
229 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
232 $(eval
$(call KernelPackage
,crypto-misc
))
234 define KernelPackage
/crypto-ocf
235 SUBMENU
:=$(CRYPTO_MENU
)
237 DEPENDS
:=+kmod-crypto-core @
!TARGET_uml
240 CONFIG_OCF_CRYPTODEV \
241 CONFIG_OCF_CRYPTOSOFT \
243 CONFIG_OCF_RANDOMHARVEST
=y
245 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
246 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
247 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
248 AUTOLOAD
:=$(call AutoLoad
,09, \
255 $(eval
$(call KernelPackage
,crypto-ocf
))
258 define KernelPackage
/crypto-null
259 SUBMENU
:=$(CRYPTO_MENU
)
260 TITLE
:=Null CryptoAPI module
261 DEPENDS
:=+kmod-crypto-core
262 KCONFIG
:=CONFIG_CRYPTO_NULL
263 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
264 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
267 $(eval
$(call KernelPackage
,crypto-null
))
270 define KernelPackage
/crypto-test
271 SUBMENU
:=$(CRYPTO_MENU
)
272 TITLE
:=Test CryptoAPI module
273 DEPENDS
:=+kmod-crypto-core
274 KCONFIG
:=CONFIG_CRYPTO_TEST
275 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
276 AUTOLOAD
:=$(call AutoLoad
,09,tcrypt
)
279 $(eval
$(call KernelPackage
,crypto-test
))