2 # Copyright (C) 2006 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 CRYPTO_GENERIC as a workaround for modules renamed in 2.6.24:
14 # - sha1 > sha1_generic
15 # - sha256 > sha256_generic
16 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),ge
,2.6.24)),1)
17 CRYPTO_GENERIC
:=_generic
20 # XXX: added CRYPTO_PREFIX as a workaround for modules renamed in 2.6.25:
21 # - blkcipher -> crypto_blkcipher
22 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),ge
,2.6.25)),1)
23 CRYPTO_PREFIX
:=crypto_
26 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
27 # always set, even if no hash modules are selected
28 define KernelPackage
/crypto-core
29 SUBMENU
:=$(CRYPTO_MENU
)
30 TITLE
:=Core CryptoAPI modules
33 CONFIG_CRYPTO_ALGAPI \
34 CONFIG_CRYPTO_BLKCIPHER \
36 CONFIG_CRYPTO_DEFLATE \
42 $(LINUX_DIR
)/crypto
/crypto_algapi.
$(LINUX_KMOD_SUFFIX
) \
43 $(LINUX_DIR
)/crypto
/$(CRYPTO_PREFIX
)blkcipher.
$(LINUX_KMOD_SUFFIX
) \
44 $(LINUX_DIR
)/crypto
/cbc.
$(LINUX_KMOD_SUFFIX
) \
45 $(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
) \
46 $(LINUX_DIR
)/crypto
/ecb.
$(LINUX_KMOD_SUFFIX
) \
47 $(LINUX_DIR
)/crypto
/crypto_hash.
$(LINUX_KMOD_SUFFIX
) \
48 $(LINUX_DIR
)/crypto
/cryptomgr.
$(LINUX_KMOD_SUFFIX
)
49 AUTOLOAD
:=$(call AutoLoad
,01, \
53 $(CRYPTO_PREFIX
)blkcipher \
60 define KernelPackage
/crypto-core
/2.4
61 FILES
:=$(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
)
62 AUTOLOAD
:=$(call AutoLoad
,01, deflate
)
65 $(eval
$(call KernelPackage
,crypto-core
))
68 define KernelPackage
/crypto-aes
69 SUBMENU
:=$(CRYPTO_MENU
)
70 TITLE
:=AES cipher CryptoAPI module
71 DEPENDS
:=+kmod-crypto-core
75 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
)
76 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(CRYPTO_GENERIC
))
79 define KernelPackage
/crypto-aes
/x86-2.6
80 KCONFIG
:=CONFIG_CRYPTO_AES_586
81 FILES
:=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
82 AUTOLOAD
:=$(call AutoLoad
,09,aes-i586
)
85 $(eval
$(call KernelPackage
,crypto-aes
))
88 define KernelPackage
/crypto-arc4
89 SUBMENU
:=$(CRYPTO_MENU
)
90 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
91 DEPENDS
:=+kmod-crypto-core
92 KCONFIG
:=CONFIG_CRYPTO_ARC4
93 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
94 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
97 $(eval
$(call KernelPackage
,crypto-arc4
))
100 define KernelPackage
/crypto-aead
101 SUBMENU
:=$(CRYPTO_MENU
)
102 TITLE
:=Authenticated Encryption with Associated Data
103 DEPENDS
:=+kmod-crypto-core
104 KCONFIG
:=CONFIG_CRYPTO_AEAD
105 FILES
:=$(LINUX_DIR
)/crypto
/aead.
$(LINUX_KMOD_SUFFIX
)
106 AUTOLOAD
:=$(call AutoLoad
,09,aead
)
109 $(eval
$(call KernelPackage
,crypto-aead
))
111 define KernelPackage
/crypto-authenc
112 SUBMENU
:=$(CRYPTO_MENU
)
113 TITLE
:=Combined mode wrapper for IPsec
114 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-aead
115 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
116 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
117 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
120 $(eval
$(call KernelPackage
,crypto-authenc
))
122 define KernelPackage
/crypto-des
123 SUBMENU
:=$(CRYPTO_MENU
)
124 TITLE
:=DES
/3DES cipher CryptoAPI module
125 DEPENDS
:=+kmod-crypto-core
126 KCONFIG
:=CONFIG_CRYPTO_DES
127 FILES
:=$(LINUX_DIR
)/crypto
/des
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
)
128 AUTOLOAD
:=$(call AutoLoad
,09,des
$(CRYPTO_GENERIC
))
131 $(eval
$(call KernelPackage
,crypto-des
))
134 define KernelPackage
/crypto-hmac
135 SUBMENU
:=$(CRYPTO_MENU
)
136 TITLE
:=HMAC digest CryptoAPI module
137 DEPENDS
:=+kmod-crypto-core
138 KCONFIG
:=CONFIG_CRYPTO_HMAC
139 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
140 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
143 $(eval
$(call KernelPackage
,crypto-hmac
))
146 define KernelPackage
/crypto-md5
147 SUBMENU
:=$(CRYPTO_MENU
)
148 TITLE
:=MD5 digest CryptoAPI module
149 DEPENDS
:=+kmod-crypto-core
150 KCONFIG
:=CONFIG_CRYPTO_MD5
151 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
152 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
155 $(eval
$(call KernelPackage
,crypto-md5
))
158 define KernelPackage
/crypto-michael-mic
159 SUBMENU
:=$(CRYPTO_MENU
)
160 TITLE
:=Michael MIC keyed digest CryptoAPI module
161 DEPENDS
:=+kmod-crypto-core
162 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
163 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
164 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
167 $(eval
$(call KernelPackage
,crypto-michael-mic
))
170 define KernelPackage
/crypto-sha1
171 SUBMENU
:=$(CRYPTO_MENU
)
172 TITLE
:=SHA1 digest CryptoAPI module
173 DEPENDS
:=+kmod-crypto-core
174 KCONFIG
:=CONFIG_CRYPTO_SHA1
175 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
)
176 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(CRYPTO_GENERIC
))
179 $(eval
$(call KernelPackage
,crypto-sha1
))
182 define KernelPackage
/crypto-misc
183 SUBMENU
:=$(CRYPTO_MENU
)
184 TITLE
:=Other CryptoAPI modules
185 DEPENDS
:=+kmod-crypto-core
187 CONFIG_CRYPTO_ANUBIS \
188 CONFIG_CRYPTO_BLOWFISH \
189 CONFIG_CRYPTO_CAMELLIA \
190 CONFIG_CRYPTO_CAST5 \
191 CONFIG_CRYPTO_CAST6 \
192 CONFIG_CRYPTO_CRC32C \
193 CONFIG_CRYPTO_FCRYPT \
194 CONFIG_CRYPTO_KHAZAD \
196 CONFIG_CRYPTO_SERPENT \
197 CONFIG_CRYPTO_SHA256 \
198 CONFIG_CRYPTO_SHA512 \
200 CONFIG_CRYPTO_TGR192 \
201 CONFIG_CRYPTO_TWOFISH \
202 CONFIG_CRYPTO_TWOFISH_586 \
205 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
206 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
207 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
208 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
209 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
210 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
211 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
212 $(LINUX_DIR
)/crypto
/sha256
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
) \
213 $(LINUX_DIR
)/crypto
/sha512.
$(LINUX_KMOD_SUFFIX
) \
214 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
215 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
216 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
219 define KernelPackage
/crypto-misc
/2.6
221 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
222 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
223 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
224 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
227 $(eval
$(call KernelPackage
,crypto-misc
))
229 define KernelPackage
/crypto-ocf
230 SUBMENU
:=$(CRYPTO_MENU
)
232 DEPENDS
:=+kmod-crypto-core
235 CONFIG_OCF_CRYPTODEV \
236 CONFIG_OCF_CRYPTOSOFT \
238 CONFIG_OCF_RANDOMHARVEST
=y
240 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
241 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
242 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
243 AUTOLOAD
:=$(call AutoLoad
,09, \
250 $(eval
$(call KernelPackage
,crypto-ocf
))
253 define KernelPackage
/crypto-null
254 SUBMENU
:=$(CRYPTO_MENU
)
255 TITLE
:=Null CryptoAPI module
256 DEPENDS
:=+kmod-crypto-core
257 KCONFIG
:=CONFIG_CRYPTO_NULL
258 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
259 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
262 $(eval
$(call KernelPackage
,crypto-null
))
265 define KernelPackage
/crypto-test
266 SUBMENU
:=$(CRYPTO_MENU
)
267 TITLE
:=Test CryptoAPI module
268 DEPENDS
:=+kmod-crypto-core
269 KCONFIG
:=CONFIG_CRYPTO_TEST
270 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
271 AUTOLOAD
:=$(call AutoLoad
,09,tcrypt
)
274 $(eval
$(call KernelPackage
,crypto-test
))