Lines Matching refs:rsa_key
961 static int hpre_rsa_setkey_crt(struct hpre_ctx *ctx, struct rsa_key *rsa_key) in hpre_rsa_setkey_crt() argument
975 rsa_key->dq, rsa_key->dq_sz); in hpre_rsa_setkey_crt()
981 rsa_key->dp, rsa_key->dp_sz); in hpre_rsa_setkey_crt()
987 rsa_key->q, rsa_key->q_sz); in hpre_rsa_setkey_crt()
993 rsa_key->p, rsa_key->p_sz); in hpre_rsa_setkey_crt()
999 rsa_key->qinv, rsa_key->qinv_sz); in hpre_rsa_setkey_crt()
1055 static bool hpre_is_crt_key(struct rsa_key *key) in hpre_is_crt_key()
1069 struct rsa_key rsa_key; in hpre_rsa_setkey() local
1075 ret = rsa_parse_priv_key(&rsa_key, key, keylen); in hpre_rsa_setkey()
1077 ret = rsa_parse_pub_key(&rsa_key, key, keylen); in hpre_rsa_setkey()
1081 ret = hpre_rsa_set_n(ctx, rsa_key.n, rsa_key.n_sz, private); in hpre_rsa_setkey()
1086 ret = hpre_rsa_set_d(ctx, rsa_key.d, rsa_key.d_sz); in hpre_rsa_setkey()
1090 if (hpre_is_crt_key(&rsa_key)) { in hpre_rsa_setkey()
1091 ret = hpre_rsa_setkey_crt(ctx, &rsa_key); in hpre_rsa_setkey()
1097 ret = hpre_rsa_set_e(ctx, rsa_key.e, rsa_key.e_sz); in hpre_rsa_setkey()