crypto: serpent - add 8-way parallel x86_64/SSE2 assembler implementation
[linux-2.6.git] / arch / x86 / include / asm / serpent.h
blobb7fd3b595b275f7fb62d33924997415ca5e10dca
1 #ifndef ASM_X86_SERPENT_H
2 #define ASM_X86_SERPENT_H
4 #include <linux/crypto.h>
5 #include <crypto/serpent.h>
7 #define SERPENT_PARALLEL_BLOCKS 8
9 asmlinkage void __serpent_enc_blk_8way(struct serpent_ctx *ctx, u8 *dst,
10 const u8 *src, bool xor);
11 asmlinkage void serpent_dec_blk_8way(struct serpent_ctx *ctx, u8 *dst,
12 const u8 *src);
14 static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
15 const u8 *src)
17 __serpent_enc_blk_8way(ctx, dst, src, false);
20 static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
21 const u8 *src)
23 __serpent_enc_blk_8way(ctx, dst, src, true);
26 static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
27 const u8 *src)
29 serpent_dec_blk_8way(ctx, dst, src);
32 #endif