Lines Matching refs:raw_key

937 	struct rsa_key raw_key = {NULL};  in caam_rsa_set_pub_key()  local
944 ret = rsa_parse_pub_key(&raw_key, key, keylen); in caam_rsa_set_pub_key()
949 rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_pub_key()
959 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_pub_key()
963 if (caam_rsa_check_key_length(raw_key.n_sz << 3)) { in caam_rsa_set_pub_key()
968 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_pub_key()
969 rsa_key->n_sz = raw_key.n_sz; in caam_rsa_set_pub_key()
978 struct rsa_key *raw_key) in caam_rsa_set_priv_key_form() argument
981 size_t p_sz = raw_key->p_sz; in caam_rsa_set_priv_key_form()
982 size_t q_sz = raw_key->q_sz; in caam_rsa_set_priv_key_form()
984 rsa_key->p = caam_read_raw_data(raw_key->p, &p_sz); in caam_rsa_set_priv_key_form()
989 rsa_key->q = caam_read_raw_data(raw_key->q, &q_sz); in caam_rsa_set_priv_key_form()
994 rsa_key->tmp1 = kzalloc(raw_key->p_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_priv_key_form()
998 rsa_key->tmp2 = kzalloc(raw_key->q_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_priv_key_form()
1004 rsa_key->dp = caam_read_rsa_crt(raw_key->dp, raw_key->dp_sz, p_sz); in caam_rsa_set_priv_key_form()
1008 rsa_key->dq = caam_read_rsa_crt(raw_key->dq, raw_key->dq_sz, q_sz); in caam_rsa_set_priv_key_form()
1012 rsa_key->qinv = caam_read_rsa_crt(raw_key->qinv, raw_key->qinv_sz, in caam_rsa_set_priv_key_form()
1039 struct rsa_key raw_key = {NULL}; in caam_rsa_set_priv_key() local
1046 ret = rsa_parse_priv_key(&raw_key, key, keylen); in caam_rsa_set_priv_key()
1051 rsa_key->d = kmemdup(raw_key.d, raw_key.d_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_priv_key()
1055 rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_priv_key()
1065 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_priv_key()
1069 if (caam_rsa_check_key_length(raw_key.n_sz << 3)) { in caam_rsa_set_priv_key()
1074 rsa_key->d_sz = raw_key.d_sz; in caam_rsa_set_priv_key()
1075 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_priv_key()
1076 rsa_key->n_sz = raw_key.n_sz; in caam_rsa_set_priv_key()
1078 caam_rsa_set_priv_key_form(ctx, &raw_key); in caam_rsa_set_priv_key()