linux/arch/x86/crypto/sha512_ssse3_glue.c

/*
 * Cryptographic API.
 *
 * Glue code for the SHA512 Secure Hash Algorithm assembler
 * implementation using supplemental SSE3 / AVX / AVX2 instructions.
 *
 * This file is based on sha512_generic.c
 *
 * Copyright (C) 2013 Intel Corporation
 * Author: Tim Chen <[email protected]>
 *
 * 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.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

#define pr_fmt(fmt)

#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/types.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <asm/cpu_device_id.h>
#include <asm/simd.h>

asmlinkage void sha512_transform_ssse3(struct sha512_state *state,
				       const u8 *data, int blocks);

static int sha512_update(struct shash_desc *desc, const u8 *data,
		       unsigned int len, sha512_block_fn *sha512_xform)
{}

static int sha512_finup(struct shash_desc *desc, const u8 *data,
	      unsigned int len, u8 *out, sha512_block_fn *sha512_xform)
{}

static int sha512_ssse3_update(struct shash_desc *desc, const u8 *data,
		       unsigned int len)
{}

static int sha512_ssse3_finup(struct shash_desc *desc, const u8 *data,
	      unsigned int len, u8 *out)
{}

/* Add padding and return the message digest. */
static int sha512_ssse3_final(struct shash_desc *desc, u8 *out)
{}

static struct shash_alg sha512_ssse3_algs[] =;

static int register_sha512_ssse3(void)
{}

static void unregister_sha512_ssse3(void)
{}

asmlinkage void sha512_transform_avx(struct sha512_state *state,
				     const u8 *data, int blocks);
static bool avx_usable(void)
{}

static int sha512_avx_update(struct shash_desc *desc, const u8 *data,
		       unsigned int len)
{}

static int sha512_avx_finup(struct shash_desc *desc, const u8 *data,
	      unsigned int len, u8 *out)
{}

/* Add padding and return the message digest. */
static int sha512_avx_final(struct shash_desc *desc, u8 *out)
{}

static struct shash_alg sha512_avx_algs[] =;

static int register_sha512_avx(void)
{}

static void unregister_sha512_avx(void)
{}

asmlinkage void sha512_transform_rorx(struct sha512_state *state,
				      const u8 *data, int blocks);

static int sha512_avx2_update(struct shash_desc *desc, const u8 *data,
		       unsigned int len)
{}

static int sha512_avx2_finup(struct shash_desc *desc, const u8 *data,
	      unsigned int len, u8 *out)
{}

/* Add padding and return the message digest. */
static int sha512_avx2_final(struct shash_desc *desc, u8 *out)
{}

static struct shash_alg sha512_avx2_algs[] =;

static bool avx2_usable(void)
{}

static int register_sha512_avx2(void)
{}
static const struct x86_cpu_id module_cpu_ids[] =;
MODULE_DEVICE_TABLE(x86cpu, module_cpu_ids);

static void unregister_sha512_avx2(void)
{}

static int __init sha512_ssse3_mod_init(void)
{}

static void __exit sha512_ssse3_mod_fini(void)
{}

module_init();
module_exit(sha512_ssse3_mod_fini);

MODULE_LICENSE();
MODULE_DESCRIPTION();

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