#include <crypto/algapi.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/unaligned.h>
static const u32 camellia_sp1110[256] = …;
static const u32 camellia_sp0222[256] = …;
static const u32 camellia_sp3033[256] = …;
static const u32 camellia_sp4404[256] = …;
#define CAMELLIA_MIN_KEY_SIZE …
#define CAMELLIA_MAX_KEY_SIZE …
#define CAMELLIA_BLOCK_SIZE …
#define CAMELLIA_TABLE_BYTE_LEN …
#define CAMELLIA_SIGMA1L …
#define CAMELLIA_SIGMA1R …
#define CAMELLIA_SIGMA2L …
#define CAMELLIA_SIGMA2R …
#define CAMELLIA_SIGMA3L …
#define CAMELLIA_SIGMA3R …
#define CAMELLIA_SIGMA4L …
#define CAMELLIA_SIGMA4R …
#define CAMELLIA_SIGMA5L …
#define CAMELLIA_SIGMA5R …
#define CAMELLIA_SIGMA6L …
#define CAMELLIA_SIGMA6R …
#define ROLDQ(ll, lr, rl, rr, w0, w1, bits) …
#define ROLDQo32(ll, lr, rl, rr, w0, w1, bits) …
#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) …
#define SUBKEY_L(INDEX) …
#define SUBKEY_R(INDEX) …
static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
{ … }
static void camellia_setup128(const unsigned char *key, u32 *subkey)
{ … }
static void camellia_setup256(const unsigned char *key, u32 *subkey)
{ … }
static void camellia_setup192(const unsigned char *key, u32 *subkey)
{ … }
#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) …
#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir) …
static void camellia_do_encrypt(const u32 *subkey, u32 *io, unsigned max)
{ … }
static void camellia_do_decrypt(const u32 *subkey, u32 *io, unsigned i)
{ … }
struct camellia_ctx { … };
static int
camellia_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len)
{ … }
static void camellia_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
{ … }
static void camellia_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
{ … }
static struct crypto_alg camellia_alg = …;
static int __init camellia_init(void)
{ … }
static void __exit camellia_fini(void)
{ … }
subsys_initcall(camellia_init);
module_exit(camellia_fini);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;