/linux-6.12.1/crypto/ |
D | rsa.c | 273 struct rsa_key raw_key = {0}; in rsa_set_pub_key() local 279 ret = rsa_parse_pub_key(&raw_key, key, keylen); in rsa_set_pub_key() 283 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_pub_key() 287 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_pub_key() 312 struct rsa_key raw_key = {0}; in rsa_set_priv_key() local 318 ret = rsa_parse_priv_key(&raw_key, key, keylen); in rsa_set_priv_key() 322 mpi_key->d = mpi_read_raw_data(raw_key.d, raw_key.d_sz); in rsa_set_priv_key() 326 mpi_key->e = mpi_read_raw_data(raw_key.e, raw_key.e_sz); in rsa_set_priv_key() 330 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_priv_key() 334 mpi_key->p = mpi_read_raw_data(raw_key.p, raw_key.p_sz); in rsa_set_priv_key() [all …]
|
/linux-6.12.1/drivers/crypto/caam/ |
D | caampkc.c | 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() [all …]
|
/linux-6.12.1/drivers/crypto/ccp/ |
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-6.12.1/fs/crypto/ |
D | keysetup_v1.c | 181 const u8 *raw_key, in find_or_insert_direct_key() argument 206 if (crypto_memneq(raw_key, dk->dk_raw, ci->ci_mode->keysize)) in find_or_insert_direct_key() 222 fscrypt_get_direct_key(const struct fscrypt_inode_info *ci, const u8 *raw_key) in fscrypt_get_direct_key() argument 228 dk = find_or_insert_direct_key(NULL, raw_key, ci); in fscrypt_get_direct_key() 239 err = fscrypt_prepare_key(&dk->dk_key, raw_key, ci); in fscrypt_get_direct_key() 244 memcpy(dk->dk_raw, raw_key, ci->ci_mode->keysize); in fscrypt_get_direct_key() 246 return find_or_insert_direct_key(dk, raw_key, ci); in fscrypt_get_direct_key()
|
D | keysetup.c | 100 fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, in fscrypt_allocate_skcipher() argument 133 err = crypto_skcipher_setkey(tfm, raw_key, mode->keysize); in fscrypt_allocate_skcipher() 151 const u8 *raw_key, const struct fscrypt_inode_info *ci) in fscrypt_prepare_key() argument 156 return fscrypt_prepare_inline_crypt_key(prep_key, raw_key, ci); in fscrypt_prepare_key() 158 tfm = fscrypt_allocate_skcipher(ci->ci_mode, raw_key, ci->ci_inode); in fscrypt_prepare_key() 182 const u8 *raw_key) in fscrypt_set_per_file_enc_key() argument 185 return fscrypt_prepare_key(&ci->ci_enc_key, raw_key, ci); in fscrypt_set_per_file_enc_key()
|
D | fscrypt_private.h | 388 const u8 *raw_key, 430 const u8 *raw_key, in fscrypt_prepare_inline_crypt_key() argument 655 const u8 *raw_key, const struct fscrypt_inode_info *ci); 661 const u8 *raw_key);
|
D | inline_crypt.c | 153 const u8 *raw_key, in fscrypt_prepare_inline_crypt_key() argument 169 err = blk_crypto_init_key(blk_key, raw_key, crypto_mode, in fscrypt_prepare_inline_crypt_key()
|
/linux-6.12.1/lib/crypto/ |
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()
|
D | poly1305-donna64.c | 14 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_core_setkey() 19 t0 = get_unaligned_le64(&raw_key[0]); in poly1305_core_setkey() 20 t1 = get_unaligned_le64(&raw_key[8]); in poly1305_core_setkey()
|
/linux-6.12.1/drivers/crypto/starfive/ |
D | jh7110-rsa.c | 455 struct rsa_key raw_key = {NULL}; in starfive_rsa_setkey() local 460 ret = rsa_parse_priv_key(&raw_key, key, keylen); in starfive_rsa_setkey() 462 ret = rsa_parse_pub_key(&raw_key, key, keylen); in starfive_rsa_setkey() 469 if (raw_key.n_sz > STARFIVE_RSA_MAX_KEYSZ + 1) in starfive_rsa_setkey() 472 ret = starfive_rsa_set_n(rsa_key, raw_key.n, raw_key.n_sz); in starfive_rsa_setkey() 476 ret = starfive_rsa_set_e(rsa_key, raw_key.e, raw_key.e_sz); in starfive_rsa_setkey() 481 ret = starfive_rsa_set_d(rsa_key, raw_key.d, raw_key.d_sz); in starfive_rsa_setkey()
|
/linux-6.12.1/include/crypto/internal/ |
D | poly1305.h | 22 const u8 raw_key[POLY1305_BLOCK_SIZE]);
|
/linux-6.12.1/block/ |
D | blk-crypto.c | 328 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key, in blk_crypto_init_key() argument 355 memcpy(blk_key->raw, raw_key, mode->keysize); in blk_crypto_init_key()
|
/linux-6.12.1/include/linux/ |
D | blk-crypto.h | 90 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,
|
/linux-6.12.1/arch/x86/crypto/ |
D | aesni-intel_glue.c | 1190 static int gcm_setkey(struct crypto_aead *tfm, const u8 *raw_key, in gcm_setkey() argument 1200 key->rfc4106_nonce = get_unaligned_be32(raw_key + keylen); in gcm_setkey() 1219 aesni_set_key(&key->aes_key, raw_key, keylen); in gcm_setkey() 1233 err = aes_expandkey(&key->aes_key, raw_key, keylen); in gcm_setkey() 1447 static int gcm_setkey_##suffix(struct crypto_aead *tfm, const u8 *raw_key, \ 1450 return gcm_setkey(tfm, raw_key, keylen, (flags)); \ 1463 static int rfc4106_setkey_##suffix(struct crypto_aead *tfm, const u8 *raw_key, \ 1466 return gcm_setkey(tfm, raw_key, keylen, (flags) | FLAG_RFC4106); \
|