aboutsummaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-12-25 11:05:13 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-25 11:05:13 +1100
commit0ee4a96902dd7858e65f378c86f428a0355bd841 (patch)
tree0f7851aa3ced0070b58c8a114904330aa4555fe7 /include/crypto
parentca38a814c6f86db0aa58884a31093d4f096e20aa (diff)
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 40008d67ee3..656a4c66a56 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);