Lines Matching refs:raw_key

947 	struct rsa_key raw_key = {NULL};  in caam_rsa_set_pub_key()  local
954 ret = rsa_parse_pub_key(&raw_key, key, keylen); 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()
969 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_pub_key()
973 if (caam_rsa_check_key_length(raw_key.n_sz << 3)) { 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()
988 struct rsa_key *raw_key) in caam_rsa_set_priv_key_form() argument
991 size_t p_sz = raw_key->p_sz; in caam_rsa_set_priv_key_form()
992 size_t q_sz = raw_key->q_sz; in caam_rsa_set_priv_key_form()
995 rsa_key->p = caam_read_raw_data(raw_key->p, &p_sz); in caam_rsa_set_priv_key_form()
1000 rsa_key->q = caam_read_raw_data(raw_key->q, &q_sz); in caam_rsa_set_priv_key_form()
1005 aligned_size = ALIGN(raw_key->p_sz, dma_get_cache_alignment()); in caam_rsa_set_priv_key_form()
1010 aligned_size = ALIGN(raw_key->q_sz, dma_get_cache_alignment()); in caam_rsa_set_priv_key_form()
1017 rsa_key->dp = caam_read_rsa_crt(raw_key->dp, raw_key->dp_sz, p_sz); in caam_rsa_set_priv_key_form()
1021 rsa_key->dq = caam_read_rsa_crt(raw_key->dq, raw_key->dq_sz, q_sz); in caam_rsa_set_priv_key_form()
1025 rsa_key->qinv = caam_read_rsa_crt(raw_key->qinv, raw_key->qinv_sz, in caam_rsa_set_priv_key_form()
1052 struct rsa_key raw_key = {NULL}; in caam_rsa_set_priv_key() local
1059 ret = rsa_parse_priv_key(&raw_key, key, keylen); in caam_rsa_set_priv_key()
1064 rsa_key->d = kmemdup(raw_key.d, raw_key.d_sz, GFP_KERNEL); in caam_rsa_set_priv_key()
1068 rsa_key->e = kmemdup(raw_key.e, raw_key.e_sz, GFP_KERNEL); in caam_rsa_set_priv_key()
1078 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_priv_key()
1082 if (caam_rsa_check_key_length(raw_key.n_sz << 3)) { in caam_rsa_set_priv_key()
1087 rsa_key->d_sz = raw_key.d_sz; in caam_rsa_set_priv_key()
1088 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_priv_key()
1089 rsa_key->n_sz = raw_key.n_sz; in caam_rsa_set_priv_key()
1091 caam_rsa_set_priv_key_form(ctx, &raw_key); in caam_rsa_set_priv_key()