linux/drivers/crypto/ccp/ccp-crypto-rsa.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AMD Cryptographic Coprocessor (CCP) RSA crypto API support
 *
 * Copyright (C) 2017 Advanced Micro Devices, Inc.
 *
 * Author: Gary R Hook <[email protected]>
 */

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/scatterlist.h>
#include <linux/crypto.h>
#include <crypto/algapi.h>
#include <crypto/internal/rsa.h>
#include <crypto/internal/akcipher.h>
#include <crypto/akcipher.h>
#include <crypto/scatterwalk.h>

#include "ccp-crypto.h"

static inline struct akcipher_request *akcipher_request_cast(
	struct crypto_async_request *req)
{}

static inline int ccp_copy_and_save_keypart(u8 **kpbuf, unsigned int *kplen,
					    const u8 *buf, size_t sz)
{}

static int ccp_rsa_complete(struct crypto_async_request *async_req, int ret)
{}

static unsigned int ccp_rsa_maxsize(struct crypto_akcipher *tfm)
{}

static int ccp_rsa_crypt(struct akcipher_request *req, bool encrypt)
{}

static int ccp_rsa_encrypt(struct akcipher_request *req)
{}

static int ccp_rsa_decrypt(struct akcipher_request *req)
{}

static int ccp_check_key_length(unsigned int len)
{}

static void ccp_rsa_free_key_bufs(struct ccp_ctx *ctx)
{}

static int ccp_rsa_setkey(struct crypto_akcipher *tfm, const void *key,
			  unsigned int keylen, bool private)
{}

static int ccp_rsa_setprivkey(struct crypto_akcipher *tfm, const void *key,
			      unsigned int keylen)
{}

static int ccp_rsa_setpubkey(struct crypto_akcipher *tfm, const void *key,
			     unsigned int keylen)
{}

static int ccp_rsa_init_tfm(struct crypto_akcipher *tfm)
{}

static void ccp_rsa_exit_tfm(struct crypto_akcipher *tfm)
{}

static struct akcipher_alg ccp_rsa_defaults =;

struct ccp_rsa_def {};

static struct ccp_rsa_def rsa_algs[] =;

static int ccp_register_rsa_alg(struct list_head *head,
			        const struct ccp_rsa_def *def)
{}

int ccp_register_rsa_algs(struct list_head *head)
{}