linux/crypto/blake2b_generic.c

// SPDX-License-Identifier: (GPL-2.0-only OR Apache-2.0)
/*
 * Generic implementation of the BLAKE2b digest algorithm.  Based on the BLAKE2b
 * reference implementation, but it has been heavily modified for use in the
 * kernel.  The reference implementation was:
 *
 *	Copyright 2012, Samuel Neves <[email protected]>.  You may use this under
 *	the terms of the CC0, the OpenSSL Licence, or the Apache Public License
 *	2.0, at your option.  The terms of these licenses can be found at:
 *
 *	- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
 *	- OpenSSL license   : https://www.openssl.org/source/license.html
 *	- Apache 2.0        : https://www.apache.org/licenses/LICENSE-2.0
 *
 * More information about BLAKE2 can be found at https://blake2.net.
 */

#include <asm/unaligned.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <crypto/internal/blake2b.h>
#include <crypto/internal/hash.h>

static const u8 blake2b_sigma[12][16] =;

static void blake2b_increment_counter(struct blake2b_state *S, const u64 inc)
{}

#define G

#define ROUND

static void blake2b_compress_one_generic(struct blake2b_state *S,
					 const u8 block[BLAKE2B_BLOCK_SIZE])
{}

#undef G
#undef ROUND

void blake2b_compress_generic(struct blake2b_state *state,
			      const u8 *block, size_t nblocks, u32 inc)
{}
EXPORT_SYMBOL();

static int crypto_blake2b_update_generic(struct shash_desc *desc,
					 const u8 *in, unsigned int inlen)
{}

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

#define BLAKE2B_ALG(name, driver_name, digest_size)

static struct shash_alg blake2b_algs[] =;

static int __init blake2b_mod_init(void)
{}

static void __exit blake2b_mod_fini(void)
{}

subsys_initcall(blake2b_mod_init);
module_exit(blake2b_mod_fini);

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