linux/drivers/crypto/tegra/tegra-se-hash.c

// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
 * Crypto driver to handle HASH algorithms using NVIDIA Security Engine.
 */

#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>

#include <crypto/aes.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
#include <crypto/internal/des.h>
#include <crypto/engine.h>
#include <crypto/scatterwalk.h>
#include <crypto/internal/hash.h>

#include "tegra-se.h"

struct tegra_sha_ctx {};

struct tegra_sha_reqctx {};

static int tegra_sha_get_config(u32 alg)
{}

static int tegra_sha_fallback_init(struct ahash_request *req)
{}

static int tegra_sha_fallback_update(struct ahash_request *req)
{}

static int tegra_sha_fallback_final(struct ahash_request *req)
{}

static int tegra_sha_fallback_finup(struct ahash_request *req)
{}

static int tegra_sha_fallback_digest(struct ahash_request *req)
{}

static int tegra_sha_fallback_import(struct ahash_request *req, const void *in)
{}

static int tegra_sha_fallback_export(struct ahash_request *req, void *out)
{}

static int tegra_sha_prep_cmd(struct tegra_se *se, u32 *cpuvaddr,
			      struct tegra_sha_reqctx *rctx)
{}

static void tegra_sha_copy_hash_result(struct tegra_se *se, struct tegra_sha_reqctx *rctx)
{}

static void tegra_sha_paste_hash_result(struct tegra_se *se, struct tegra_sha_reqctx *rctx)
{}

static int tegra_sha_do_update(struct ahash_request *req)
{}

static int tegra_sha_do_final(struct ahash_request *req)
{}

static int tegra_sha_do_one_req(struct crypto_engine *engine, void *areq)
{}

static void tegra_sha_init_fallback(struct crypto_ahash *tfm, struct tegra_sha_ctx *ctx,
				    const char *algname)
{}

static int tegra_sha_cra_init(struct crypto_tfm *tfm)
{}

static void tegra_sha_cra_exit(struct crypto_tfm *tfm)
{}

static int tegra_sha_init(struct ahash_request *req)
{}

static int tegra_hmac_fallback_setkey(struct tegra_sha_ctx *ctx, const u8 *key,
				      unsigned int keylen)
{}

static int tegra_hmac_setkey(struct crypto_ahash *tfm, const u8 *key,
			     unsigned int keylen)
{}

static int tegra_sha_update(struct ahash_request *req)
{}

static int tegra_sha_final(struct ahash_request *req)
{}

static int tegra_sha_finup(struct ahash_request *req)
{}

static int tegra_sha_digest(struct ahash_request *req)
{}

static int tegra_sha_export(struct ahash_request *req, void *out)
{}

static int tegra_sha_import(struct ahash_request *req, const void *in)
{}

static struct tegra_se_alg tegra_hash_algs[] =;

static int tegra_hash_kac_manifest(u32 user, u32 alg, u32 keylen)
{}

int tegra_init_hash(struct tegra_se *se)
{}

void tegra_deinit_hash(struct tegra_se *se)
{}