summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu2008-12-25 01:05:13 +0100
committerHerbert Xu2008-12-25 01:05:13 +0100
commit0ee4a96902dd7858e65f378c86f428a0355bd841 (patch)
tree0f7851aa3ced0070b58c8a114904330aa4555fe7 /include/crypto
parentcrypto: talitos - Ack done interrupt in isr instead of tasklet (diff)
downloadkernel-qcow2-linux-0ee4a96902dd7858e65f378c86f428a0355bd841.tar.gz
kernel-qcow2-linux-0ee4a96902dd7858e65f378c86f428a0355bd841.tar.xz
kernel-qcow2-linux-0ee4a96902dd7858e65f378c86f428a0355bd841.zip
crypto: aes - Precompute tables
The tables used by the various AES algorithms are currently computed at run-time. This has created an init ordering problem because some AES algorithms may be registered before the tables have been initialised. This patch gets around this whole thing by precomputing the tables. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/aes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/crypto/aes.h b/include/crypto/aes.h
index 40008d67ee3d..656a4c66a568 100644
--- a/include/crypto/aes.h
+++ b/include/crypto/aes.h
@@ -23,10 +23,10 @@ struct crypto_aes_ctx {
u32 key_dec[AES_MAX_KEYLENGTH_U32];
};
-extern u32 crypto_ft_tab[4][256];
-extern u32 crypto_fl_tab[4][256];
-extern u32 crypto_it_tab[4][256];
-extern u32 crypto_il_tab[4][256];
+extern const u32 crypto_ft_tab[4][256];
+extern const u32 crypto_fl_tab[4][256];
+extern const u32 crypto_it_tab[4][256];
+extern const u32 crypto_il_tab[4][256];
int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len);