/linux/crypto/ |
A D | rsa.c | 160 struct rsa_key raw_key = {0}; in rsa_set_pub_key() local 166 ret = rsa_parse_pub_key(&raw_key, key, keylen); 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() 174 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_pub_key() 194 struct rsa_key raw_key = {0}; in rsa_set_priv_key() local 200 ret = rsa_parse_priv_key(&raw_key, key, keylen); 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() 208 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); 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()
|
/linux/drivers/crypto/caam/ |
A D | caampkc.c | 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() 968 rsa_key->e_sz = raw_key.e_sz; in caam_rsa_set_pub_key() 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() 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() 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() [all …]
|
/linux/drivers/crypto/ccp/ |
A D | ccp-crypto-rsa.c | 130 struct rsa_key raw_key; in ccp_rsa_setkey() local 134 memset(&raw_key, 0, sizeof(raw_key)); in ccp_rsa_setkey() 138 ret = rsa_parse_priv_key(&raw_key, key, keylen); in ccp_rsa_setkey() 140 ret = rsa_parse_pub_key(&raw_key, key, keylen); in ccp_rsa_setkey() 145 raw_key.n, raw_key.n_sz); in ccp_rsa_setkey() 157 raw_key.e, raw_key.e_sz); in ccp_rsa_setkey() 165 raw_key.d, raw_key.d_sz); in ccp_rsa_setkey()
|
/linux/fs/crypto/ |
A D | keysetup_v1.c | 180 const u8 *raw_key, const struct fscrypt_info *ci) in find_or_insert_direct_key() argument 204 if (crypto_memneq(raw_key, dk->dk_raw, ci->ci_mode->keysize)) in find_or_insert_direct_key() 220 fscrypt_get_direct_key(const struct fscrypt_info *ci, const u8 *raw_key) in fscrypt_get_direct_key() argument 226 dk = find_or_insert_direct_key(NULL, raw_key, ci); in fscrypt_get_direct_key() 236 err = fscrypt_prepare_key(&dk->dk_key, raw_key, ci); in fscrypt_get_direct_key() 241 memcpy(dk->dk_raw, raw_key, ci->ci_mode->keysize); in fscrypt_get_direct_key() 243 return find_or_insert_direct_key(dk, raw_key, ci); in fscrypt_get_direct_key()
|
A D | keysetup.c | 79 fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, in fscrypt_allocate_skcipher() argument 112 err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize); in fscrypt_allocate_skcipher() 130 const u8 *raw_key, const struct fscrypt_info *ci) in fscrypt_prepare_key() argument 135 return fscrypt_prepare_inline_crypt_key(prep_key, raw_key, ci); in fscrypt_prepare_key() 137 tfm = fscrypt_allocate_skcipher(ci->ci_mode, raw_key, ci->ci_inode); in fscrypt_prepare_key() 158 int fscrypt_set_per_file_enc_key(struct fscrypt_info *ci, const u8 *raw_key) in fscrypt_set_per_file_enc_key() argument 161 return fscrypt_prepare_key(&ci->ci_enc_key, raw_key, ci); in fscrypt_set_per_file_enc_key()
|
A D | fscrypt_private.h | 347 const u8 *raw_key, 388 const u8 *raw_key, in fscrypt_prepare_inline_crypt_key() argument 571 const u8 *raw_key, const struct fscrypt_info *ci); 575 int fscrypt_set_per_file_enc_key(struct fscrypt_info *ci, const u8 *raw_key);
|
A D | inline_crypt.c | 127 const u8 *raw_key, in fscrypt_prepare_inline_crypt_key() argument 146 err = blk_crypto_init_key(&blk_key->base, raw_key, crypto_mode, in fscrypt_prepare_inline_crypt_key()
|
/linux/lib/crypto/ |
A D | poly1305-donna32.c | 14 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_core_setkey() 17 key->key.r[0] = (get_unaligned_le32(&raw_key[0])) & 0x3ffffff; in poly1305_core_setkey() 18 key->key.r[1] = (get_unaligned_le32(&raw_key[3]) >> 2) & 0x3ffff03; in poly1305_core_setkey() 19 key->key.r[2] = (get_unaligned_le32(&raw_key[6]) >> 4) & 0x3ffc0ff; in poly1305_core_setkey() 20 key->key.r[3] = (get_unaligned_le32(&raw_key[9]) >> 6) & 0x3f03fff; in poly1305_core_setkey() 21 key->key.r[4] = (get_unaligned_le32(&raw_key[12]) >> 8) & 0x00fffff; in poly1305_core_setkey()
|
A D | poly1305-donna64.c | 16 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_core_setkey() 21 t0 = get_unaligned_le64(&raw_key[0]); in poly1305_core_setkey() 22 t1 = get_unaligned_le64(&raw_key[8]); in poly1305_core_setkey()
|
/linux/include/crypto/internal/ |
A D | poly1305.h | 22 const u8 raw_key[POLY1305_BLOCK_SIZE]);
|
/linux/block/ |
A D | blk-crypto.c | 321 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key, in blk_crypto_init_key() argument 348 memcpy(blk_key->raw, raw_key, mode->keysize); in blk_crypto_init_key()
|
/linux/include/linux/ |
A D | blk-crypto.h | 92 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,
|