Lines Matching refs:mpi_key
159 struct rsa_mpi_key *mpi_key = akcipher_tfm_ctx(tfm); in rsa_set_pub_key() local
164 rsa_free_mpi_key(mpi_key); in rsa_set_pub_key()
170 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_pub_key()
171 if (!mpi_key->e) in rsa_set_pub_key()
174 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_pub_key()
175 if (!mpi_key->n) in rsa_set_pub_key()
178 if (rsa_check_key_length(mpi_get_size(mpi_key->n) << 3)) { in rsa_set_pub_key()
179 rsa_free_mpi_key(mpi_key); in rsa_set_pub_key()
186 rsa_free_mpi_key(mpi_key); in rsa_set_pub_key()
193 struct rsa_mpi_key *mpi_key = akcipher_tfm_ctx(tfm); in rsa_set_priv_key() local
198 rsa_free_mpi_key(mpi_key); in rsa_set_priv_key()
204 mpi_key->d = mpi_read_raw_data(raw_key.d, raw_key.d_sz); in rsa_set_priv_key()
205 if (!mpi_key->d) in rsa_set_priv_key()
208 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_priv_key()
209 if (!mpi_key->e) in rsa_set_priv_key()
212 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_priv_key()
213 if (!mpi_key->n) in rsa_set_priv_key()
216 if (rsa_check_key_length(mpi_get_size(mpi_key->n) << 3)) { in rsa_set_priv_key()
217 rsa_free_mpi_key(mpi_key); in rsa_set_priv_key()
224 rsa_free_mpi_key(mpi_key); in rsa_set_priv_key()