--- zzzz-none-000/linux-2.6.19.2/crypto/aes.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/crypto/aes.c 2007-02-21 12:52:59.000000000 +0000 @@ -248,7 +248,16 @@ t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \ } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, +int aes_reinit(struct crypto_tfm *tfm) { + struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + memset(ctx, 0, sizeof(*ctx)); + return 0; +} + +#if !defined(CONFIG_SQUASHFS_CRYPT) +static +#endif /*--- #if !defined(CONFIG_SQUASHFS_CRYPT) ---*/ +int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct aes_ctx *ctx = crypto_tfm_ctx(tfm); @@ -256,6 +265,8 @@ u32 *flags = &tfm->crt_flags; u32 i, t, u, v, w; + /*--- printk("[aes_set_key] in_key \"%s\" len %u\n", in_key, key_len); ---*/ + if (key_len % 8) { *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; return -EINVAL; @@ -319,7 +330,7 @@ f_rl(bo, bi, 2, k); \ f_rl(bo, bi, 3, k) -static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct aes_ctx *ctx = crypto_tfm_ctx(tfm); const __le32 *src = (const __le32 *)in; @@ -374,7 +385,10 @@ i_rl(bo, bi, 2, k); \ i_rl(bo, bi, 3, k) -static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +#if !defined(CONFIG_SQUASHFS_CRYPT) +static +#endif /*--- #if !defined(CONFIG_SQUASHFS_CRYPT) ---*/ +void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct aes_ctx *ctx = crypto_tfm_ctx(tfm); const __le32 *src = (const __le32 *)in;