#include <linux/err.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/crypto.h>
#include <crypto/algapi.h>
#include <crypto/cryptd.h>
#include <crypto/gf128mul.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <asm/cpu_device_id.h>
#include <asm/simd.h>
#include <asm/unaligned.h>
#define GHASH_BLOCK_SIZE …
#define GHASH_DIGEST_SIZE …
void clmul_ghash_mul(char *dst, const le128 *shash);
void clmul_ghash_update(char *dst, const char *src, unsigned int srclen,
const le128 *shash);
struct ghash_async_ctx { … };
struct ghash_ctx { … };
struct ghash_desc_ctx { … };
static int ghash_init(struct shash_desc *desc)
{ … }
static int ghash_setkey(struct crypto_shash *tfm,
const u8 *key, unsigned int keylen)
{ … }
static int ghash_update(struct shash_desc *desc,
const u8 *src, unsigned int srclen)
{ … }
static void ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
{ … }
static int ghash_final(struct shash_desc *desc, u8 *dst)
{ … }
static struct shash_alg ghash_alg = …;
static int ghash_async_init(struct ahash_request *req)
{ … }
static int ghash_async_update(struct ahash_request *req)
{ … }
static int ghash_async_final(struct ahash_request *req)
{ … }
static int ghash_async_import(struct ahash_request *req, const void *in)
{ … }
static int ghash_async_export(struct ahash_request *req, void *out)
{ … }
static int ghash_async_digest(struct ahash_request *req)
{ … }
static int ghash_async_setkey(struct crypto_ahash *tfm, const u8 *key,
unsigned int keylen)
{ … }
static int ghash_async_init_tfm(struct crypto_tfm *tfm)
{ … }
static void ghash_async_exit_tfm(struct crypto_tfm *tfm)
{ … }
static struct ahash_alg ghash_async_alg = …;
static const struct x86_cpu_id pcmul_cpu_id[] = …;
MODULE_DEVICE_TABLE(x86cpu, pcmul_cpu_id);
static int __init ghash_pclmulqdqni_mod_init(void)
{ … }
static void __exit ghash_pclmulqdqni_mod_exit(void)
{ … }
module_init(…) …;
module_exit(ghash_pclmulqdqni_mod_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS_CRYPTO(…) …;