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-des
101 SUBMENU
:=$(CRYPTO_MENU
)
102 TITLE
:=DES
/3DES cipher CryptoAPI module
103 DEPENDS
:=+kmod-crypto-core
104 KCONFIG
:=CONFIG_CRYPTO_DES
105 FILES
:=$(LINUX_DIR
)/crypto
/des
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
)
106 AUTOLOAD
:=$(call AutoLoad
,09,des
$(CRYPTO_GENERIC
))
109 $(eval
$(call KernelPackage
,crypto-des
))
112 define KernelPackage
/crypto-hmac
113 SUBMENU
:=$(CRYPTO_MENU
)
114 TITLE
:=HMAC digest CryptoAPI module
115 DEPENDS
:=+kmod-crypto-core
116 KCONFIG
:=CONFIG_CRYPTO_HMAC
117 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
118 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
121 $(eval
$(call KernelPackage
,crypto-hmac
))
124 define KernelPackage
/crypto-md5
125 SUBMENU
:=$(CRYPTO_MENU
)
126 TITLE
:=MD5 digest CryptoAPI module
127 DEPENDS
:=+kmod-crypto-core
128 KCONFIG
:=CONFIG_CRYPTO_MD5
129 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
130 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
133 $(eval
$(call KernelPackage
,crypto-md5
))
136 define KernelPackage
/crypto-michael-mic
137 SUBMENU
:=$(CRYPTO_MENU
)
138 TITLE
:=Michael MIC keyed digest CryptoAPI module
139 DEPENDS
:=+kmod-crypto-core
140 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
141 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
142 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
145 $(eval
$(call KernelPackage
,crypto-michael-mic
))
148 define KernelPackage
/crypto-sha1
149 SUBMENU
:=$(CRYPTO_MENU
)
150 TITLE
:=SHA1 digest CryptoAPI module
151 DEPENDS
:=+kmod-crypto-core
152 KCONFIG
:=CONFIG_CRYPTO_SHA1
153 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
)
154 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(CRYPTO_GENERIC
))
157 $(eval
$(call KernelPackage
,crypto-sha1
))
160 define KernelPackage
/crypto-misc
161 SUBMENU
:=$(CRYPTO_MENU
)
162 TITLE
:=Other CryptoAPI modules
163 DEPENDS
:=+kmod-crypto-core
165 CONFIG_CRYPTO_ANUBIS \
166 CONFIG_CRYPTO_BLOWFISH \
167 CONFIG_CRYPTO_CAMELLIA \
168 CONFIG_CRYPTO_CAST5 \
169 CONFIG_CRYPTO_CAST6 \
170 CONFIG_CRYPTO_CRC32C \
171 CONFIG_CRYPTO_FCRYPT \
172 CONFIG_CRYPTO_KHAZAD \
174 CONFIG_CRYPTO_SERPENT \
175 CONFIG_CRYPTO_SHA256 \
176 CONFIG_CRYPTO_SHA512 \
178 CONFIG_CRYPTO_TGR192 \
179 CONFIG_CRYPTO_TWOFISH \
180 CONFIG_CRYPTO_TWOFISH_586 \
183 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
184 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
185 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
186 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
187 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
188 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
189 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
190 $(LINUX_DIR
)/crypto
/sha256
$(CRYPTO_GENERIC
).
$(LINUX_KMOD_SUFFIX
) \
191 $(LINUX_DIR
)/crypto
/sha512.
$(LINUX_KMOD_SUFFIX
) \
192 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
193 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
194 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
197 define KernelPackage
/crypto-misc
/2.6
199 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
200 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
201 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
202 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
205 $(eval
$(call KernelPackage
,crypto-misc
))
208 define KernelPackage
/crypto-null
209 SUBMENU
:=$(CRYPTO_MENU
)
210 TITLE
:=Null CryptoAPI module
211 DEPENDS
:=+kmod-crypto-core
212 KCONFIG
:=CONFIG_CRYPTO_NULL
213 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
214 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
217 $(eval
$(call KernelPackage
,crypto-null
))
220 define KernelPackage
/crypto-test
221 SUBMENU
:=$(CRYPTO_MENU
)
222 TITLE
:=Test CryptoAPI module
223 DEPENDS
:=+kmod-crypto-core
224 KCONFIG
:=CONFIG_CRYPTO_TEST
225 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
226 AUTOLOAD
:=$(call AutoLoad
,09,tcrypt
)
229 $(eval
$(call KernelPackage
,crypto-test
))