diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-09-26 09:47:20 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-10-21 08:23:08 -0400 |
commit | 91d41f159d75d602f6001218eec64c5e761475a6 (patch) | |
tree | 1bc2607e291604764348bccdb6cf6f9a0b5e4fbb /arch/x86/crypto/twofish_glue.c | |
parent | ee5002a5497f3219b4144b5370203ed6e43f7269 (diff) |
crypto: twofish-x86-asm - make assembler functions use twofish_ctx instead of crypto_tfm
This needed by 3-way twofish patch to be able to easily use one block
assembler functions. As glue code is shared between i586/x86_64 apply
change to i586 assembler too. Also export assembler functions for
3-way parallel twofish module.
CC: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/twofish_glue.c')
-rw-r--r-- | arch/x86/crypto/twofish_glue.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/x86/crypto/twofish_glue.c b/arch/x86/crypto/twofish_glue.c index cefaf8b9aa18..dc6b3fb817fc 100644 --- a/arch/x86/crypto/twofish_glue.c +++ b/arch/x86/crypto/twofish_glue.c | |||
@@ -44,17 +44,21 @@ | |||
44 | #include <linux/module.h> | 44 | #include <linux/module.h> |
45 | #include <linux/types.h> | 45 | #include <linux/types.h> |
46 | 46 | ||
47 | asmlinkage void twofish_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 47 | asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst, |
48 | asmlinkage void twofish_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 48 | const u8 *src); |
49 | EXPORT_SYMBOL_GPL(twofish_enc_blk); | ||
50 | asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst, | ||
51 | const u8 *src); | ||
52 | EXPORT_SYMBOL_GPL(twofish_dec_blk); | ||
49 | 53 | ||
50 | static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) | 54 | static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) |
51 | { | 55 | { |
52 | twofish_enc_blk(tfm, dst, src); | 56 | twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src); |
53 | } | 57 | } |
54 | 58 | ||
55 | static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) | 59 | static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) |
56 | { | 60 | { |
57 | twofish_dec_blk(tfm, dst, src); | 61 | twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src); |
58 | } | 62 | } |
59 | 63 | ||
60 | static struct crypto_alg alg = { | 64 | static struct crypto_alg alg = { |