linux/crypto/serpent_generic.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Cryptographic API.
 *
 * Serpent Cipher Algorithm.
 *
 * Copyright (C) 2002 Dag Arne Osvik <[email protected]>
 */

#include <crypto/algapi.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <asm/unaligned.h>
#include <linux/types.h>
#include <crypto/serpent.h>

/* Key is padded to the maximum of 256 bits before round key generation.
 * Any key length <= 256 bits (32 bytes) is allowed by the algorithm.
 */

#define PHI

#define keyiter(a, b, c, d, i, j)

#define loadkeys(x0, x1, x2, x3, i)

#define storekeys(x0, x1, x2, x3, i)

#define store_and_load_keys(x0, x1, x2, x3, s, l)

#define K(x0, x1, x2, x3, i)

#define LK(x0, x1, x2, x3, x4, i)

#define KL(x0, x1, x2, x3, x4, i)

#define S0(x0, x1, x2, x3, x4)

#define S1(x0, x1, x2, x3, x4)

#define S2(x0, x1, x2, x3, x4)

#define S3(x0, x1, x2, x3, x4)

#define S4(x0, x1, x2, x3, x4)

#define S5(x0, x1, x2, x3, x4)

#define S6(x0, x1, x2, x3, x4)

#define S7(x0, x1, x2, x3, x4)

#define SI0(x0, x1, x2, x3, x4)

#define SI1(x0, x1, x2, x3, x4)

#define SI2(x0, x1, x2, x3, x4)

#define SI3(x0, x1, x2, x3, x4)

#define SI4(x0, x1, x2, x3, x4)

#define SI5(x0, x1, x2, x3, x4)

#define SI6(x0, x1, x2, x3, x4)

#define SI7(x0, x1, x2, x3, x4)

/*
 * both gcc and clang have misoptimized this function in the past,
 * producing horrible object code from spilling temporary variables
 * on the stack. Forcing this part out of line avoids that.
 */
static noinline void __serpent_setkey_sbox(u32 r0, u32 r1, u32 r2,
					   u32 r3, u32 r4, u32 *k)
{}

int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key,
		     unsigned int keylen)
{}
EXPORT_SYMBOL_GPL();

int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
{}
EXPORT_SYMBOL_GPL();

void __serpent_encrypt(const void *c, u8 *dst, const u8 *src)
{}
EXPORT_SYMBOL_GPL();

static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{}

void __serpent_decrypt(const void *c, u8 *dst, const u8 *src)
{}
EXPORT_SYMBOL_GPL();

static void serpent_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{}

static struct crypto_alg srp_alg =;

static int __init serpent_mod_init(void)
{}

static void __exit serpent_mod_fini(void)
{}

subsys_initcall(serpent_mod_init);
module_exit(serpent_mod_fini);

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