Contributors: 7
Author Tokens Token Proportion Commits Commit Proportion
Jussi Kivilinna 278 90.85% 3 33.33%
Kees Cook 14 4.58% 1 11.11%
James Morris 6 1.96% 1 11.11%
Cheng Renquan 4 1.31% 1 11.11%
Alexander Shishkin 2 0.65% 1 11.11%
Greg Kroah-Hartman 1 0.33% 1 11.11%
Herbert Xu 1 0.33% 1 11.11%
Total 306 9

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ASM_X86_SERPENT_SSE2_H
#define ASM_X86_SERPENT_SSE2_H

#include <linux/crypto.h>
#include <crypto/serpent.h>

#ifdef CONFIG_X86_32

#define SERPENT_PARALLEL_BLOCKS 4

asmlinkage void __serpent_enc_blk_4way(const struct serpent_ctx *ctx, u8 *dst,
				       const u8 *src, bool xor);
asmlinkage void serpent_dec_blk_4way(const struct serpent_ctx *ctx, u8 *dst,
				     const u8 *src);

static inline void serpent_enc_blk_xway(const void *ctx, u8 *dst, const u8 *src)
{
	__serpent_enc_blk_4way(ctx, dst, src, false);
}

static inline void serpent_enc_blk_xway_xor(const struct serpent_ctx *ctx,
					    u8 *dst, const u8 *src)
{
	__serpent_enc_blk_4way(ctx, dst, src, true);
}

static inline void serpent_dec_blk_xway(const void *ctx, u8 *dst, const u8 *src)
{
	serpent_dec_blk_4way(ctx, dst, src);
}

#else

#define SERPENT_PARALLEL_BLOCKS 8

asmlinkage void __serpent_enc_blk_8way(const struct serpent_ctx *ctx, u8 *dst,
				       const u8 *src, bool xor);
asmlinkage void serpent_dec_blk_8way(const struct serpent_ctx *ctx, u8 *dst,
				     const u8 *src);

static inline void serpent_enc_blk_xway(const void *ctx, u8 *dst, const u8 *src)
{
	__serpent_enc_blk_8way(ctx, dst, src, false);
}

static inline void serpent_enc_blk_xway_xor(const struct serpent_ctx *ctx,
					    u8 *dst, const u8 *src)
{
	__serpent_enc_blk_8way(ctx, dst, src, true);
}

static inline void serpent_dec_blk_xway(const void *ctx, u8 *dst, const u8 *src)
{
	serpent_dec_blk_8way(ctx, dst, src);
}

#endif

#endif