Symbol: rsa_key
crypto/rsa.c
273
struct rsa_key raw_key = {0};
crypto/rsa.c
312
struct rsa_key raw_key = {0};
crypto/rsa_helper.c
109
struct rsa_key *key = context;
crypto/rsa_helper.c
124
struct rsa_key *key = context;
crypto/rsa_helper.c
139
struct rsa_key *key = context;
crypto/rsa_helper.c
162
int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key,
crypto/rsa_helper.c
165
return asn1_ber_decoder(&rsapubkey_decoder, rsa_key, key, key_len);
crypto/rsa_helper.c
181
int rsa_parse_priv_key(struct rsa_key *rsa_key, const void *key,
crypto/rsa_helper.c
184
return asn1_ber_decoder(&rsaprivkey_decoder, rsa_key, key, key_len);
crypto/rsa_helper.c
19
struct rsa_key *key = context;
crypto/rsa_helper.c
49
struct rsa_key *key = context;
crypto/rsa_helper.c
64
struct rsa_key *key = context;
crypto/rsa_helper.c
79
struct rsa_key *key = context;
crypto/rsa_helper.c
94
struct rsa_key *key = context;
drivers/crypto/aspeed/aspeed-acry.c
115
struct rsa_key key;
drivers/crypto/caam/caampkc.c
1000
rsa_key->q = caam_read_raw_data(raw_key->q, &q_sz);
drivers/crypto/caam/caampkc.c
1001
if (!rsa_key->q)
drivers/crypto/caam/caampkc.c
1003
rsa_key->q_sz = q_sz;
drivers/crypto/caam/caampkc.c
1006
rsa_key->tmp1 = kzalloc(aligned_size, GFP_KERNEL);
drivers/crypto/caam/caampkc.c
1007
if (!rsa_key->tmp1)
drivers/crypto/caam/caampkc.c
1011
rsa_key->tmp2 = kzalloc(aligned_size, GFP_KERNEL);
drivers/crypto/caam/caampkc.c
1012
if (!rsa_key->tmp2)
drivers/crypto/caam/caampkc.c
1015
rsa_key->priv_form = FORM2;
drivers/crypto/caam/caampkc.c
1017
rsa_key->dp = caam_read_rsa_crt(raw_key->dp, raw_key->dp_sz, p_sz);
drivers/crypto/caam/caampkc.c
1018
if (!rsa_key->dp)
drivers/crypto/caam/caampkc.c
1021
rsa_key->dq = caam_read_rsa_crt(raw_key->dq, raw_key->dq_sz, q_sz);
drivers/crypto/caam/caampkc.c
1022
if (!rsa_key->dq)
drivers/crypto/caam/caampkc.c
1025
rsa_key->qinv = caam_read_rsa_crt(raw_key->qinv, raw_key->qinv_sz,
drivers/crypto/caam/caampkc.c
1027
if (!rsa_key->qinv)
drivers/crypto/caam/caampkc.c
1030
rsa_key->priv_form = FORM3;
drivers/crypto/caam/caampkc.c
1035
kfree_sensitive(rsa_key->dq);
drivers/crypto/caam/caampkc.c
1037
kfree_sensitive(rsa_key->dp);
drivers/crypto/caam/caampkc.c
1039
kfree_sensitive(rsa_key->tmp2);
drivers/crypto/caam/caampkc.c
1041
kfree_sensitive(rsa_key->tmp1);
drivers/crypto/caam/caampkc.c
1043
kfree_sensitive(rsa_key->q);
drivers/crypto/caam/caampkc.c
1045
kfree_sensitive(rsa_key->p);
drivers/crypto/caam/caampkc.c
1053
struct rsa_key raw_key = {NULL};
drivers/crypto/caam/caampkc.c
1054
struct caam_rsa_key *rsa_key = &ctx->key;
drivers/crypto/caam/caampkc.c
1058
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
1065
rsa_key->d = kmemdup(raw_key.d, raw_key.d_sz, GFP_KERNEL);
drivers/crypto/caam/caampkc.c
1066
if (!rsa_key->d)
drivers/crypto/caam/caampkc.c
1069
rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_KERNEL);
drivers/crypto/caam/caampkc.c
1070
if (!rsa_key->e)
drivers/crypto/caam/caampkc.c
1079
rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz);
drivers/crypto/caam/caampkc.c
1080
if (!rsa_key->n)
drivers/crypto/caam/caampkc.c
1084
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
1088
rsa_key->d_sz = raw_key.d_sz;
drivers/crypto/caam/caampkc.c
1089
rsa_key->e_sz = raw_key.e_sz;
drivers/crypto/caam/caampkc.c
1090
rsa_key->n_sz = raw_key.n_sz;
drivers/crypto/caam/caampkc.c
1099
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
947
struct rsa_key raw_key = {NULL};
drivers/crypto/caam/caampkc.c
948
struct caam_rsa_key *rsa_key = &ctx->key;
drivers/crypto/caam/caampkc.c
952
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
959
rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_KERNEL);
drivers/crypto/caam/caampkc.c
960
if (!rsa_key->e)
drivers/crypto/caam/caampkc.c
969
rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz);
drivers/crypto/caam/caampkc.c
970
if (!rsa_key->n)
drivers/crypto/caam/caampkc.c
974
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
978
rsa_key->e_sz = raw_key.e_sz;
drivers/crypto/caam/caampkc.c
979
rsa_key->n_sz = raw_key.n_sz;
drivers/crypto/caam/caampkc.c
983
caam_rsa_free_key(rsa_key);
drivers/crypto/caam/caampkc.c
988
struct rsa_key *raw_key)
drivers/crypto/caam/caampkc.c
990
struct caam_rsa_key *rsa_key = &ctx->key;
drivers/crypto/caam/caampkc.c
995
rsa_key->p = caam_read_raw_data(raw_key->p, &p_sz);
drivers/crypto/caam/caampkc.c
996
if (!rsa_key->p)
drivers/crypto/caam/caampkc.c
998
rsa_key->p_sz = p_sz;
drivers/crypto/ccp/ccp-crypto-rsa.c
130
struct rsa_key raw_key;
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1027
static bool hpre_is_crt_key(struct rsa_key *key)
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1041
struct rsa_key rsa_key;
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1047
ret = rsa_parse_priv_key(&rsa_key, key, keylen);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1049
ret = rsa_parse_pub_key(&rsa_key, key, keylen);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1053
ret = hpre_rsa_set_n(ctx, rsa_key.n, rsa_key.n_sz, private);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1058
ret = hpre_rsa_set_d(ctx, rsa_key.d, rsa_key.d_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1062
if (hpre_is_crt_key(&rsa_key)) {
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1063
ret = hpre_rsa_setkey_crt(ctx, &rsa_key);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
1069
ret = hpre_rsa_set_e(ctx, rsa_key.e, rsa_key.e_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
933
static int hpre_rsa_setkey_crt(struct hpre_ctx *ctx, struct rsa_key *rsa_key)
drivers/crypto/hisilicon/hpre/hpre_crypto.c
947
rsa_key->dq, rsa_key->dq_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
953
rsa_key->dp, rsa_key->dp_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
959
rsa_key->q, rsa_key->q_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
965
rsa_key->p, rsa_key->p_sz);
drivers/crypto/hisilicon/hpre/hpre_crypto.c
971
rsa_key->qinv, rsa_key->qinv_sz);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1076
static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key)
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1085
ptr = rsa_key->p;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1086
len = rsa_key->p_sz;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1096
ptr = rsa_key->q;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1097
len = rsa_key->q_sz;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1107
ptr = rsa_key->dp;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1108
len = rsa_key->dp_sz;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1119
ptr = rsa_key->dq;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1120
len = rsa_key->dq_sz;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1131
ptr = rsa_key->qinv;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1132
len = rsa_key->qinv_sz;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1216
struct rsa_key rsa_key;
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1222
ret = rsa_parse_priv_key(&rsa_key, key, keylen);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1224
ret = rsa_parse_pub_key(&rsa_key, key, keylen);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1228
ret = qat_rsa_set_n(ctx, rsa_key.n, rsa_key.n_sz);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1231
ret = qat_rsa_set_e(ctx, rsa_key.e, rsa_key.e_sz);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1235
ret = qat_rsa_set_d(ctx, rsa_key.d, rsa_key.d_sz);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
1238
qat_rsa_setkey_crt(ctx, &rsa_key);
drivers/crypto/starfive/jh7110-cryp.h
169
struct starfive_rsa_key rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
173
struct starfive_rsa_key *key = &ctx->rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
252
struct starfive_rsa_key *key = &ctx->rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
291
struct starfive_rsa_key *key = &ctx->rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
322
struct starfive_rsa_key *key = &ctx->rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
348
static int starfive_rsa_set_n(struct starfive_rsa_key *rsa_key,
drivers/crypto/starfive/jh7110-rsa.c
359
rsa_key->key_sz = vlen;
drivers/crypto/starfive/jh7110-rsa.c
360
bitslen = rsa_key->key_sz << 3;
drivers/crypto/starfive/jh7110-rsa.c
367
rsa_key->n = kmemdup(ptr, rsa_key->key_sz, GFP_KERNEL);
drivers/crypto/starfive/jh7110-rsa.c
368
if (!rsa_key->n)
drivers/crypto/starfive/jh7110-rsa.c
373
rsa_key->key_sz = 0;
drivers/crypto/starfive/jh7110-rsa.c
374
rsa_key->n = NULL;
drivers/crypto/starfive/jh7110-rsa.c
375
starfive_rsa_free_key(rsa_key);
drivers/crypto/starfive/jh7110-rsa.c
379
static int starfive_rsa_set_e(struct starfive_rsa_key *rsa_key,
drivers/crypto/starfive/jh7110-rsa.c
392
if (!rsa_key->key_sz || !vlen || vlen > rsa_key->key_sz) {
drivers/crypto/starfive/jh7110-rsa.c
393
rsa_key->e = NULL;
drivers/crypto/starfive/jh7110-rsa.c
397
rsa_key->e = kzalloc(rsa_key->key_sz, GFP_KERNEL);
drivers/crypto/starfive/jh7110-rsa.c
398
if (!rsa_key->e)
drivers/crypto/starfive/jh7110-rsa.c
406
rsa_key->e_bitlen = (vlen - 1) * 8 + loop;
drivers/crypto/starfive/jh7110-rsa.c
408
memcpy(rsa_key->e + (rsa_key->key_sz - vlen), ptr, vlen);
drivers/crypto/starfive/jh7110-rsa.c
413
static int starfive_rsa_set_d(struct starfive_rsa_key *rsa_key,
drivers/crypto/starfive/jh7110-rsa.c
428
if (!rsa_key->key_sz || !vlen || vlen > rsa_key->key_sz)
drivers/crypto/starfive/jh7110-rsa.c
432
rsa_key->d = kzalloc(rsa_key->key_sz, GFP_KERNEL);
drivers/crypto/starfive/jh7110-rsa.c
433
if (!rsa_key->d)
drivers/crypto/starfive/jh7110-rsa.c
441
rsa_key->d_bitlen = (vlen - 1) * 8 + loop;
drivers/crypto/starfive/jh7110-rsa.c
443
memcpy(rsa_key->d + (rsa_key->key_sz - vlen), ptr, vlen);
drivers/crypto/starfive/jh7110-rsa.c
447
rsa_key->d = NULL;
drivers/crypto/starfive/jh7110-rsa.c
455
struct rsa_key raw_key = {NULL};
drivers/crypto/starfive/jh7110-rsa.c
456
struct starfive_rsa_key *rsa_key = &ctx->rsa_key;
drivers/crypto/starfive/jh7110-rsa.c
466
starfive_rsa_free_key(rsa_key);
drivers/crypto/starfive/jh7110-rsa.c
472
ret = starfive_rsa_set_n(rsa_key, raw_key.n, raw_key.n_sz);
drivers/crypto/starfive/jh7110-rsa.c
476
ret = starfive_rsa_set_e(rsa_key, raw_key.e, raw_key.e_sz);
drivers/crypto/starfive/jh7110-rsa.c
481
ret = starfive_rsa_set_d(rsa_key, raw_key.d, raw_key.d_sz);
drivers/crypto/starfive/jh7110-rsa.c
486
if (!rsa_key->n || !rsa_key->e) {
drivers/crypto/starfive/jh7110-rsa.c
491
if (private && !rsa_key->d) {
drivers/crypto/starfive/jh7110-rsa.c
498
starfive_rsa_free_key(rsa_key);
drivers/crypto/starfive/jh7110-rsa.c
532
if (ctx->rsa_key.key_sz)
drivers/crypto/starfive/jh7110-rsa.c
533
return ctx->rsa_key.key_sz;
drivers/crypto/starfive/jh7110-rsa.c
559
struct starfive_rsa_key *key = (struct starfive_rsa_key *)&ctx->rsa_key;
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c
349
struct rsa_key rsa_key = {0};
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c
357
ret = rsa_parse_priv_key(&rsa_key, key, keylen);
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c
360
ret = rsa_parse_pub_key(&rsa_key, key, keylen);
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c
366
n = mpi_read_raw_data(rsa_key.n, rsa_key.n_sz);
include/crypto/internal/rsa.h
51
int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key,
include/crypto/internal/rsa.h
54
int rsa_parse_priv_key(struct rsa_key *rsa_key, const void *key,