/kernel/linux/linux-5.10/crypto/ |
H A D | ecdh.c | 16 unsigned int curve_id; member 26 static unsigned int ecdh_supported_curve(unsigned int curve_id) in ecdh_supported_curve() argument 28 switch (curve_id) { in ecdh_supported_curve() 46 ndigits = ecdh_supported_curve(params.curve_id); in ecdh_set_secret() 50 ctx->curve_id = params.curve_id; in ecdh_set_secret() 54 return ecc_gen_privkey(ctx->curve_id, ctx->ndigits, in ecdh_set_secret() 59 if (ecc_is_key_valid(ctx->curve_id, ctx->ndigits, in ecdh_set_secret() 104 ret = crypto_ecdh_shared_secret(ctx->curve_id, ctx->ndigits, in ecdh_compute_value() 110 ret = ecc_make_pub_key(ctx->curve_id, ct in ecdh_compute_value() [all...] |
H A D | ecc.h | 92 * ecc_get_curve() - Get a curve given its curve_id 93 * @curve_id: Id of the curve 97 const struct ecc_curve *ecc_get_curve(unsigned int curve_id); 102 * @curve_id: id representing the curve to use 109 int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, 117 * @curve_id: id representing the curve to use 124 int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey); 129 * @curve_id: id representing the curve to use 137 int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits, 143 * @curve_id [all...] |
H A D | ecdh_helper.c | 49 ptr = ecdh_pack_data(ptr, ¶ms->curve_id, sizeof(params->curve_id)); in crypto_ecdh_encode_key() 73 ptr = ecdh_unpack_data(¶ms->curve_id, ptr, sizeof(params->curve_id)); in crypto_ecdh_decode_key()
|
H A D | ecdsa.c | 17 unsigned int curve_id; member 188 static int ecdsa_ecc_ctx_init(struct ecc_ctx *ctx, unsigned int curve_id) in ecdsa_ecc_ctx_init() argument 190 ctx->curve_id = curve_id; in ecdsa_ecc_ctx_init() 191 ctx->curve = ecc_get_curve(curve_id); in ecdsa_ecc_ctx_init() 206 unsigned int curve_id = ctx->curve_id; in ecdsa_ecc_ctx_reset() local 210 ret = ecdsa_ecc_ctx_init(ctx, curve_id); in ecdsa_ecc_ctx_reset()
|
H A D | ecc.c | 45 const struct ecc_curve *ecc_get_curve(unsigned int curve_id) in ecc_get_curve() argument 47 switch (curve_id) { in ecc_get_curve() 1428 int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, in ecc_is_key_valid() argument 1432 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_is_key_valid() 1455 int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey) in ecc_gen_privkey() argument 1457 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_gen_privkey() 1496 int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits, in ecc_make_pub_key() argument 1502 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_make_pub_key() 1595 int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits, in crypto_ecdh_shared_secret() argument 1604 const struct ecc_curve *curve = ecc_get_curve(curve_id); in crypto_ecdh_shared_secret() [all...] |
/kernel/linux/linux-6.6/crypto/ |
H A D | ecdh.c | 16 unsigned int curve_id; member 37 return ecc_gen_privkey(ctx->curve_id, ctx->ndigits, in ecdh_set_secret() 42 if (ecc_is_key_valid(ctx->curve_id, ctx->ndigits, in ecdh_set_secret() 87 ret = crypto_ecdh_shared_secret(ctx->curve_id, ctx->ndigits, in ecdh_compute_value() 93 ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits, in ecdh_compute_value() 130 ctx->curve_id = ECC_CURVE_NIST_P192; in ecdh_nist_p192_init_tfm() 155 ctx->curve_id = ECC_CURVE_NIST_P256; in ecdh_nist_p256_init_tfm() 180 ctx->curve_id = ECC_CURVE_NIST_P384; in ecdh_nist_p384_init_tfm()
|
H A D | ecdsa.c | 17 unsigned int curve_id; member 188 static int ecdsa_ecc_ctx_init(struct ecc_ctx *ctx, unsigned int curve_id) in ecdsa_ecc_ctx_init() argument 190 ctx->curve_id = curve_id; in ecdsa_ecc_ctx_init() 191 ctx->curve = ecc_get_curve(curve_id); in ecdsa_ecc_ctx_init() 206 unsigned int curve_id = ctx->curve_id; in ecdsa_ecc_ctx_reset() local 210 ret = ecdsa_ecc_ctx_init(ctx, curve_id); in ecdsa_ecc_ctx_reset()
|
H A D | ecc.c | 53 const struct ecc_curve *ecc_get_curve(unsigned int curve_id) in ecc_get_curve() argument 55 switch (curve_id) { in ecc_get_curve() 1442 int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, in ecc_is_key_valid() argument 1446 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_is_key_valid() 1469 int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey) in ecc_gen_privkey() argument 1471 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_gen_privkey() 1510 int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits, in ecc_make_pub_key() argument 1516 const struct ecc_curve *curve = ecc_get_curve(curve_id); in ecc_make_pub_key() 1609 int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits, in crypto_ecdh_shared_secret() argument 1618 const struct ecc_curve *curve = ecc_get_curve(curve_id); in crypto_ecdh_shared_secret() [all...] |
/kernel/linux/linux-6.6/include/crypto/internal/ |
H A D | ecc.h | 62 * @curve_id: id representing the curve to use 69 int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, 77 * @curve_id: id representing the curve to use 84 int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey); 89 * @curve_id: id representing the curve to use 97 int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits, 103 * @curve_id: id representing the curve to use 115 int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
|
/kernel/linux/linux-5.10/drivers/crypto/ |
H A D | atmel-ecc.c | 36 * @curve_id : elliptic curve id 45 unsigned int curve_id; member 76 static unsigned int atmel_ecdh_supported_curve(unsigned int curve_id) in atmel_ecdh_supported_curve() argument 78 if (curve_id == ECC_CURVE_NIST_P256) in atmel_ecdh_supported_curve() 107 ctx->n_sz = atmel_ecdh_supported_curve(params.curve_id); in atmel_ecdh_set_secret() 128 ctx->curve_id = params.curve_id; in atmel_ecdh_set_secret()
|
/kernel/linux/linux-5.10/include/crypto/ |
H A D | ecdh.h | 33 * @curve_id: ECC curve the key is based on. 38 unsigned short curve_id; member
|
/kernel/linux/linux-6.6/include/crypto/ |
H A D | ecc_curve.h | 46 * @curve_id: Curves IDs: 51 const struct ecc_curve *ecc_get_curve(unsigned int curve_id);
|
/kernel/linux/linux-6.6/drivers/crypto/ |
H A D | atmel-ecc.c | 36 * @curve_id : elliptic curve id 44 unsigned int curve_id; member 253 ctx->curve_id = ECC_CURVE_NIST_P256; in atmel_ecdh_init_tfm()
|
/kernel/linux/linux-5.10/net/bluetooth/ |
H A D | ecdh_helper.c | 129 p.curve_id = ECC_CURVE_NIST_P256; in set_ecdh_privkey()
|
/kernel/linux/linux-6.6/drivers/crypto/hisilicon/hpre/ |
H A D | hpre_crypto.c | 130 unsigned int curve_id; member 1280 const struct ecc_curve *curve = ecc_get_curve(ctx->curve_id); in hpre_ecdh_fill_curve() 1328 ctx->key_sz = hpre_ecdh_supported_curve(ctx->curve_id); in hpre_ecdh_set_param() 1332 curve_sz = hpre_ecdh_get_curvesz(ctx->curve_id); in hpre_ecdh_set_param() 1409 curve_sz = hpre_ecdh_get_curvesz(ctx->curve_id); in hpre_ecdh_set_secret() 1469 unsigned int curve_sz = hpre_ecdh_get_curvesz(ctx->curve_id); in hpre_ecdh_cb() 1639 ctx->curve_id = ECC_CURVE_NIST_P192; in hpre_ecdh_nist_p192_init_tfm() 1650 ctx->curve_id = ECC_CURVE_NIST_P256; in hpre_ecdh_nist_p256_init_tfm() 1661 ctx->curve_id = ECC_CURVE_NIST_P384; in hpre_ecdh_nist_p384_init_tfm()
|
/kernel/linux/linux-5.10/include/uapi/linux/ |
H A D | virtio_crypto.h | 213 __le32 curve_id; member
|
/kernel/linux/linux-6.6/include/uapi/linux/ |
H A D | virtio_crypto.h | 213 __le32 curve_id; member
|
/kernel/linux/linux-6.6/drivers/crypto/intel/keembay/ |
H A D | keembay-ocs-ecc.c | 776 static int kmb_ecc_tctx_init(struct ocs_ecc_ctx *tctx, unsigned int curve_id) in kmb_ecc_tctx_init() argument 788 tctx->curve = ecc_get_curve(curve_id); in kmb_ecc_tctx_init()
|