linux/crypto/wp512.c

/*
 * Cryptographic API.
 *
 * Whirlpool hashing Algorithm
 *
 * The Whirlpool algorithm was developed by Paulo S. L. M. Barreto and
 * Vincent Rijmen.  It has been selected as one of cryptographic
 * primitives by the NESSIE project http://www.cryptonessie.org/
 *
 * The original authors have disclaimed all copyright interest in this
 * code and thus put it in the public domain. The subsequent authors
 * have put this under the GNU General Public License.
 *
 * By Aaron Grothe [email protected], August 23, 2004
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 */
#include <crypto/internal/hash.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <asm/byteorder.h>
#include <linux/types.h>

#define WP512_DIGEST_SIZE
#define WP384_DIGEST_SIZE
#define WP256_DIGEST_SIZE

#define WP512_BLOCK_SIZE
#define WP512_LENGTHBYTES

#define WHIRLPOOL_ROUNDS

struct wp512_ctx {};

/*
 * Though Whirlpool is endianness-neutral, the encryption tables are listed
 * in BIG-ENDIAN format, which is adopted throughout this implementation
 * (but little-endian notation would be equally suitable if consistently
 * employed).
 */

static const u64 C0[256] =;

static const u64 C1[256] =;

static const u64 C2[256] =;

static const u64 C3[256] =;

static const u64 C4[256] =;

static const u64 C5[256] =;

static const u64 C6[256] =;

static const u64 C7[256] =;

static const u64 rc[WHIRLPOOL_ROUNDS] =;

/*
 * The core Whirlpool transform.
 */

static __no_kmsan_checks void wp512_process_buffer(struct wp512_ctx *wctx) {}

static int wp512_init(struct shash_desc *desc) {}

static int wp512_update(struct shash_desc *desc, const u8 *source,
			 unsigned int len)
{}

static int wp512_final(struct shash_desc *desc, u8 *out)
{}

static int wp384_final(struct shash_desc *desc, u8 *out)
{}

static int wp256_final(struct shash_desc *desc, u8 *out)
{}

static struct shash_alg wp_algs[3] =;

static int __init wp512_mod_init(void)
{}

static void __exit wp512_mod_fini(void)
{}

MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();

subsys_initcall(wp512_mod_init);
module_exit(wp512_mod_fini);

MODULE_LICENSE();
MODULE_DESCRIPTION();