Searched refs:raw_key (Results 1 – 4 of 4) sorted by relevance
/Linux-v4.19/crypto/ |
D | rsa.c | 271 struct rsa_key raw_key = {0}; in rsa_set_pub_key() local 277 ret = rsa_parse_pub_key(&raw_key, key, keylen); in rsa_set_pub_key() 281 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_pub_key() 285 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_pub_key() 305 struct rsa_key raw_key = {0}; in rsa_set_priv_key() local 311 ret = rsa_parse_priv_key(&raw_key, key, keylen); in rsa_set_priv_key() 315 mpi_key->d = mpi_read_raw_data(raw_key.d, raw_key.d_sz); in rsa_set_priv_key() 319 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_priv_key() 323 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_priv_key()
|
/Linux-v4.19/drivers/crypto/caam/ |
D | caampkc.c | 805 struct rsa_key raw_key = {NULL}; in caam_rsa_set_pub_key() local 812 ret = rsa_parse_pub_key(&raw_key, key, keylen); in caam_rsa_set_pub_key() 817 rsa_key->e = kzalloc(raw_key.e_sz, GFP_DMA | GFP_KERNEL); in caam_rsa_set_pub_key() 827 rsa_key->n = caam_read_raw_data(raw_key.n, &raw_key.n_sz); in caam_rsa_set_pub_key() 831 if (caam_rsa_check_key_length(raw_key.n_sz << 3)) { in caam_rsa_set_pub_key() 836 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_pub_key() 837 rsa_key->n_sz = raw_key.n_sz; in caam_rsa_set_pub_key() 839 memcpy(rsa_key->e, raw_key.e, raw_key.e_sz); in caam_rsa_set_pub_key() 848 struct rsa_key *raw_key) in caam_rsa_set_priv_key_form() argument 851 size_t p_sz = raw_key->p_sz; in caam_rsa_set_priv_key_form() [all …]
|
/Linux-v4.19/drivers/crypto/ccp/ |
D | ccp-crypto-rsa.c | 134 struct rsa_key raw_key; in ccp_rsa_setkey() local 138 memset(&raw_key, 0, sizeof(raw_key)); in ccp_rsa_setkey() 142 ret = rsa_parse_priv_key(&raw_key, key, keylen); in ccp_rsa_setkey() 144 ret = rsa_parse_pub_key(&raw_key, key, keylen); in ccp_rsa_setkey() 149 raw_key.n, raw_key.n_sz); in ccp_rsa_setkey() 161 raw_key.e, raw_key.e_sz); in ccp_rsa_setkey() 169 raw_key.d, raw_key.d_sz); in ccp_rsa_setkey()
|
/Linux-v4.19/fs/crypto/ |
D | keyinfo.c | 252 static int init_essiv_generator(struct fscrypt_info *ci, const u8 *raw_key, in init_essiv_generator() argument 265 err = derive_essiv_salt(raw_key, keysize, salt); in init_essiv_generator() 294 u8 *raw_key = NULL; in fscrypt_get_encryption_info() local 348 raw_key = kmalloc(mode->keysize, GFP_NOFS); in fscrypt_get_encryption_info() 349 if (!raw_key) in fscrypt_get_encryption_info() 352 res = find_and_derive_key(inode, &ctx, raw_key, mode->keysize); in fscrypt_get_encryption_info() 379 res = crypto_skcipher_setkey(ctfm, raw_key, mode->keysize); in fscrypt_get_encryption_info() 385 res = init_essiv_generator(crypt_info, raw_key, mode->keysize); in fscrypt_get_encryption_info() 399 kzfree(raw_key); in fscrypt_get_encryption_info()
|