X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fcrypto%2Faes.c;fp=arch%2Fi386%2Fcrypto%2Faes.c;h=a50397b1d5c7b28ea05767ede5dca98dd40a898e;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=d3806daa3de3b91c3c13c7dedc28ec451809dd67;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c index d3806daa3..a50397b1d 100644 --- a/arch/i386/crypto/aes.c +++ b/arch/i386/crypto/aes.c @@ -45,8 +45,8 @@ #include #include -asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); -asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); +asmlinkage void aes_enc_blk(const u8 *src, u8 *dst, void *ctx); +asmlinkage void aes_dec_blk(const u8 *src, u8 *dst, void *ctx); #define AES_MIN_KEY_SIZE 16 #define AES_MAX_KEY_SIZE 32 @@ -378,12 +378,12 @@ static void gen_tabs(void) k[8*(i)+11] = ss[3]; \ } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int +aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) { int i; u32 ss[8]; - struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + struct aes_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; /* encryption schedule */ @@ -464,16 +464,16 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, return 0; } -static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static inline void aes_encrypt(void *ctx, u8 *dst, const u8 *src) { - aes_enc_blk(tfm, dst, src); + aes_enc_blk(src, dst, ctx); } - -static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src) { - aes_dec_blk(tfm, dst, src); + aes_dec_blk(src, dst, ctx); } + static struct crypto_alg aes_alg = { .cra_name = "aes", .cra_driver_name = "aes-i586",