linux/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c

// SPDX-License-Identifier: GPL-2.0
/*
 * sun8i-ss-hash.c - hardware cryptographic offloader for
 * Allwinner A80/A83T SoC
 *
 * Copyright (C) 2015-2020 Corentin Labbe <[email protected]>
 *
 * This file add support for MD5 and SHA1/SHA224/SHA256.
 *
 * You could find the datasheet in Documentation/arch/arm/sunxi.rst
 */

#include <crypto/hmac.h>
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <linux/bottom_half.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/string.h>
#include "sun8i-ss.h"

static int sun8i_ss_hashkey(struct sun8i_ss_hash_tfm_ctx *tfmctx, const u8 *key,
			    unsigned int keylen)
{}

int sun8i_ss_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,
			 unsigned int keylen)
{}

int sun8i_ss_hash_init_tfm(struct crypto_ahash *tfm)
{}

void sun8i_ss_hash_exit_tfm(struct crypto_ahash *tfm)
{}

int sun8i_ss_hash_init(struct ahash_request *areq)
{}

int sun8i_ss_hash_export(struct ahash_request *areq, void *out)
{}

int sun8i_ss_hash_import(struct ahash_request *areq, const void *in)
{}

int sun8i_ss_hash_final(struct ahash_request *areq)
{}

int sun8i_ss_hash_update(struct ahash_request *areq)
{}

int sun8i_ss_hash_finup(struct ahash_request *areq)
{}

static int sun8i_ss_hash_digest_fb(struct ahash_request *areq)
{}

static int sun8i_ss_run_hash_task(struct sun8i_ss_dev *ss,
				  struct sun8i_ss_hash_reqctx *rctx,
				  const char *name)
{}

static bool sun8i_ss_hash_need_fallback(struct ahash_request *areq)
{}

int sun8i_ss_hash_digest(struct ahash_request *areq)
{}

static u64 hash_pad(__le32 *buf, unsigned int bufsize, u64 padi, u64 byte_count, bool le, int bs)
{}

/* sun8i_ss_hash_run - run an ahash request
 * Send the data of the request to the SS along with an extra SG with padding
 */
int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)
{}