Home
last modified time | relevance | path

Searched refs:rsa_key (Results 1 – 10 of 10) sorted by relevance

/linux/drivers/crypto/starfive/
H A Djh7110-rsa.c173 struct starfive_rsa_key *key = &ctx->rsa_key; in starfive_rsa_cpu_start()
252 struct starfive_rsa_key *key = &ctx->rsa_key; in starfive_rsa_enc_core()
291 struct starfive_rsa_key *key = &ctx->rsa_key; in starfive_rsa_enc()
322 struct starfive_rsa_key *key = &ctx->rsa_key; in starfive_rsa_dec()
348 static int starfive_rsa_set_n(struct starfive_rsa_key *rsa_key, in starfive_rsa_set_n() argument
359 rsa_key->key_sz = vlen; in starfive_rsa_set_n()
360 bitslen = rsa_key->key_sz << 3; in starfive_rsa_set_n()
367 rsa_key->n = kmemdup(ptr, rsa_key->key_sz, GFP_KERNEL); in starfive_rsa_set_n()
368 if (!rsa_key->n) in starfive_rsa_set_n()
373 rsa_key->key_sz = 0; in starfive_rsa_set_n()
[all …]
H A Djh7110-cryp.h169 struct starfive_rsa_key rsa_key; member
/linux/crypto/
H A Drsa_helper.c19 struct rsa_key *key = context; in rsa_get_n()
49 struct rsa_key *key = context; in rsa_get_e()
64 struct rsa_key *key = context; in rsa_get_d()
79 struct rsa_key *key = context; in rsa_get_p()
94 struct rsa_key *key = context; in rsa_get_q()
109 struct rsa_key *key = context; in rsa_get_dp()
124 struct rsa_key *key = context; in rsa_get_dq()
139 struct rsa_key *key = context; in rsa_get_qinv()
162 int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key, in rsa_parse_pub_key() argument
165 return asn1_ber_decoder(&rsapubkey_decoder, rsa_key, key, key_len); in rsa_parse_pub_key()
[all …]
/linux/drivers/crypto/caam/
H A Dcaampkc.c947 struct rsa_key raw_key = {NULL}; in caam_rsa_set_pub_key()
948 struct caam_rsa_key *rsa_key = &ctx->key; in caam_rsa_set_pub_key() local
952 caam_rsa_free_key(rsa_key); in caam_rsa_set_pub_key()
959 rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_KERNEL); in caam_rsa_set_pub_key()
960 if (!rsa_key->e) in caam_rsa_set_pub_key()
969 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_pub_key()
970 if (!rsa_key->n) in caam_rsa_set_pub_key()
974 caam_rsa_free_key(rsa_key); in caam_rsa_set_pub_key()
978 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_pub_key()
979 rsa_key->n_sz = raw_key.n_sz; in caam_rsa_set_pub_key()
[all …]
/linux/include/crypto/internal/
H A Drsa.h32 struct rsa_key { struct
51 int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key, argument
54 int rsa_parse_priv_key(struct rsa_key *rsa_key, const void *key,
/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_asym_algs.c1076 static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) in qat_rsa_setkey_crt() argument
1085 ptr = rsa_key->p; in qat_rsa_setkey_crt()
1086 len = rsa_key->p_sz; in qat_rsa_setkey_crt()
1096 ptr = rsa_key->q; in qat_rsa_setkey_crt()
1097 len = rsa_key->q_sz; in qat_rsa_setkey_crt()
1107 ptr = rsa_key->dp; in qat_rsa_setkey_crt()
1108 len = rsa_key->dp_sz; in qat_rsa_setkey_crt()
1119 ptr = rsa_key->dq; in qat_rsa_setkey_crt()
1120 len = rsa_key->dq_sz; in qat_rsa_setkey_crt()
1131 ptr = rsa_key->qinv; in qat_rsa_setkey_crt()
[all …]
/linux/drivers/crypto/hisilicon/hpre/
H A Dhpre_crypto.c988 static int hpre_rsa_setkey_crt(struct hpre_ctx *ctx, struct rsa_key *rsa_key) in hpre_rsa_setkey_crt() argument
1002 rsa_key->dq, rsa_key->dq_sz); in hpre_rsa_setkey_crt()
1008 rsa_key->dp, rsa_key->dp_sz); in hpre_rsa_setkey_crt()
1014 rsa_key->q, rsa_key->q_sz); in hpre_rsa_setkey_crt()
1020 rsa_key->p, rsa_key->p_sz); in hpre_rsa_setkey_crt()
1026 rsa_key->qinv, rsa_key->qinv_sz); in hpre_rsa_setkey_crt()
1082 static bool hpre_is_crt_key(struct rsa_key *key) in hpre_is_crt_key()
1096 struct rsa_key rsa_key; in hpre_rsa_setkey() local
1102 ret = rsa_parse_priv_key(&rsa_key, key, keylen); in hpre_rsa_setkey()
1104 ret = rsa_parse_pub_key(&rsa_key, key, keylen); in hpre_rsa_setkey()
[all …]
/linux/drivers/crypto/virtio/
H A Dvirtio_crypto_akcipher_algs.c349 struct rsa_key rsa_key = {0}; in virtio_crypto_rsa_set_key() local
357 ret = rsa_parse_priv_key(&rsa_key, key, keylen); in virtio_crypto_rsa_set_key()
360 ret = rsa_parse_pub_key(&rsa_key, key, keylen); in virtio_crypto_rsa_set_key()
366 n = mpi_read_raw_data(rsa_key.n, rsa_key.n_sz); in virtio_crypto_rsa_set_key()
/linux/drivers/crypto/ccp/
H A Dccp-crypto-rsa.c130 struct rsa_key raw_key; in ccp_rsa_setkey()
/linux/drivers/crypto/aspeed/
H A Daspeed-acry.c115 struct rsa_key key;