diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 11:03:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 11:03:29 -0700 |
commit | 972d19e837833b93466c6f6a8ef2a7d653000aa3 (patch) | |
tree | 069258492d5347cf440b8240dadfa20621f54842 /arch/i386/crypto/aes.c | |
parent | cdf4f383a4b0ffbf458f65380ecffbeee1f79841 (diff) | |
parent | b9d0a25a484a90c1d60b974d115eff2fe580ce16 (diff) | |
download | linux-972d19e837833b93466c6f6a8ef2a7d653000aa3.tar.gz linux-972d19e837833b93466c6f6a8ef2a7d653000aa3.tar.bz2 linux-972d19e837833b93466c6f6a8ef2a7d653000aa3.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] tcrypt: Forbid tcrypt from being built-in
[CRYPTO] aes: Add wrappers for assembly routines
[CRYPTO] tcrypt: Speed benchmark support for digest algorithms
[CRYPTO] tcrypt: Return -EAGAIN from module_init()
[CRYPTO] api: Allow replacement when registering new algorithms
[CRYPTO] api: Removed const from cra_name/cra_driver_name
[CRYPTO] api: Added cra_init/cra_exit
[CRYPTO] api: Fixed incorrect passing of context instead of tfm
[CRYPTO] padlock: Rearrange context structure to reduce code size
[CRYPTO] all: Pass tfm instead of ctx to algorithms
[CRYPTO] digest: Remove unnecessary zeroing during init
[CRYPTO] aes-i586: Get rid of useless function wrappers
[CRYPTO] digest: Add alignment handling
[CRYPTO] khazad: Use 32-bit reads on key
Diffstat (limited to 'arch/i386/crypto/aes.c')
-rw-r--r-- | arch/i386/crypto/aes.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c index a50397b1d5c7..d3806daa3de3 100644 --- a/arch/i386/crypto/aes.c +++ b/arch/i386/crypto/aes.c @@ -45,8 +45,8 @@ #include <linux/crypto.h> #include <linux/linkage.h> -asmlinkage void aes_enc_blk(const u8 *src, u8 *dst, void *ctx); -asmlinkage void aes_dec_blk(const u8 *src, u8 *dst, void *ctx); +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); #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(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) +static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, + unsigned int key_len, u32 *flags) { int i; u32 ss[8]; - struct aes_ctx *ctx = ctx_arg; + struct aes_ctx *ctx = crypto_tfm_ctx(tfm); const __le32 *key = (const __le32 *)in_key; /* encryption schedule */ @@ -464,16 +464,16 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) return 0; } -static inline void aes_encrypt(void *ctx, u8 *dst, const u8 *src) +static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { - aes_enc_blk(src, dst, ctx); + aes_enc_blk(tfm, dst, src); } -static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src) + +static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { - aes_dec_blk(src, dst, ctx); + aes_dec_blk(tfm, dst, src); } - static struct crypto_alg aes_alg = { .cra_name = "aes", .cra_driver_name = "aes-i586", |