linux/arch/x86/crypto/serpent_avx2_glue.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Glue Code for x86_64/AVX2 assembler optimized version of Serpent
 *
 * Copyright © 2012-2013 Jussi Kivilinna <[email protected]>
 */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/crypto.h>
#include <linux/err.h>
#include <crypto/algapi.h>
#include <crypto/internal/simd.h>
#include <crypto/serpent.h>

#include "serpent-avx.h"
#include "ecb_cbc_helpers.h"

#define SERPENT_AVX2_PARALLEL_BLOCKS

/* 16-way AVX2 parallel cipher functions */
asmlinkage void serpent_ecb_enc_16way(const void *ctx, u8 *dst, const u8 *src);
asmlinkage void serpent_ecb_dec_16way(const void *ctx, u8 *dst, const u8 *src);
asmlinkage void serpent_cbc_dec_16way(const void *ctx, u8 *dst, const u8 *src);

static int serpent_setkey_skcipher(struct crypto_skcipher *tfm,
				   const u8 *key, unsigned int keylen)
{}

static int ecb_encrypt(struct skcipher_request *req)
{}

static int ecb_decrypt(struct skcipher_request *req)
{}

static int cbc_encrypt(struct skcipher_request *req)
{}

static int cbc_decrypt(struct skcipher_request *req)
{}

static struct skcipher_alg serpent_algs[] =;

static struct simd_skcipher_alg *serpent_simd_algs[ARRAY_SIZE(serpent_algs)];

static int __init serpent_avx2_init(void)
{}

static void __exit serpent_avx2_fini(void)
{}

module_init();
module_exit(serpent_avx2_fini);

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();