linux/crypto/ecdsa.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (c) 2021 IBM Corporation
 */

#include <linux/module.h>
#include <crypto/internal/akcipher.h>
#include <crypto/internal/ecc.h>
#include <crypto/akcipher.h>
#include <crypto/ecdh.h>
#include <linux/asn1_decoder.h>
#include <linux/scatterlist.h>

#include "ecdsasignature.asn1.h"

struct ecc_ctx {};

struct ecdsa_signature_ctx {};

/*
 * Get the r and s components of a signature from the X509 certificate.
 */
static int ecdsa_get_signature_rs(u64 *dest, size_t hdrlen, unsigned char tag,
				  const void *value, size_t vlen, unsigned int ndigits)
{}

int ecdsa_get_signature_r(void *context, size_t hdrlen, unsigned char tag,
			  const void *value, size_t vlen)
{}

int ecdsa_get_signature_s(void *context, size_t hdrlen, unsigned char tag,
			  const void *value, size_t vlen)
{}

static int _ecdsa_verify(struct ecc_ctx *ctx, const u64 *hash, const u64 *r, const u64 *s)
{}

/*
 * Verify an ECDSA signature.
 */
static int ecdsa_verify(struct akcipher_request *req)
{}

static int ecdsa_ecc_ctx_init(struct ecc_ctx *ctx, unsigned int curve_id)
{}


static void ecdsa_ecc_ctx_deinit(struct ecc_ctx *ctx)
{}

static int ecdsa_ecc_ctx_reset(struct ecc_ctx *ctx)
{}

/*
 * Set the public ECC key as defined by RFC5480 section 2.2 "Subject Public
 * Key". Only the uncompressed format is supported.
 */
static int ecdsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, unsigned int keylen)
{}

static void ecdsa_exit_tfm(struct crypto_akcipher *tfm)
{}

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

static int ecdsa_nist_p521_init_tfm(struct crypto_akcipher *tfm)
{}

static struct akcipher_alg ecdsa_nist_p521 =;

static int ecdsa_nist_p384_init_tfm(struct crypto_akcipher *tfm)
{}

static struct akcipher_alg ecdsa_nist_p384 =;

static int ecdsa_nist_p256_init_tfm(struct crypto_akcipher *tfm)
{}

static struct akcipher_alg ecdsa_nist_p256 =;

static int ecdsa_nist_p192_init_tfm(struct crypto_akcipher *tfm)
{}

static struct akcipher_alg ecdsa_nist_p192 =;
static bool ecdsa_nist_p192_registered;

static int __init ecdsa_init(void)
{}

static void __exit ecdsa_exit(void)
{}

subsys_initcall(ecdsa_init);
module_exit(ecdsa_exit);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();
MODULE_ALIAS_CRYPTO();