Home
last modified time | relevance | path

Searched refs:enckey (Results 1 – 25 of 25) sorted by relevance

/linux/security/keys/
H A Dbig_key.c61 u8 *buf, *enckey; in big_key_preparse() local
92 enckey = kmalloc(CHACHA20POLY1305_KEY_SIZE, GFP_KERNEL); in big_key_preparse()
93 if (!enckey) { in big_key_preparse()
97 ret = get_random_bytes_wait(enckey, CHACHA20POLY1305_KEY_SIZE); in big_key_preparse()
103 0, enckey); in big_key_preparse()
123 payload->data = enckey; in big_key_preparse()
143 kfree_sensitive(enckey); in big_key_preparse()
238 u8 *buf, *enckey = payload->data; in big_key_read() local
261 enckey) ? 0 : -EBADMSG; in big_key_read()
/linux/drivers/crypto/qce/
H A Dcommon.c298 static void qce_xtskey(struct qce_device *qce, const u8 *enckey, in qce_xtskey() argument
304 qce_cpu_to_be32p_array((__be32 *)xtskey, enckey + enckeylen / 2, in qce_xtskey()
321 __be32 enckey[QCE_MAX_CIPHER_KEY_SIZE / sizeof(__be32)] = {0}; in qce_setup_regs_skcipher() local
336 qce_cpu_to_be32p_array(enckey, ctx->enc_key, keylen); in qce_setup_regs_skcipher()
358 qce_write_array(qce, REG_ENCR_KEY0, (u32 *)enckey, enckey_words); in qce_setup_regs_skcipher()
427 u32 enckey[QCE_MAX_CIPHER_KEY_SIZE / sizeof(u32)] = {0}; in qce_setup_regs_aead() local
445 enckey_words = qce_be32_to_cpu_array(enckey, ctx->enc_key, enc_keylen); in qce_setup_regs_aead()
446 qce_write_array(qce, REG_ENCR_KEY0, enckey, enckey_words); in qce_setup_regs_aead()
H A Daead.c612 err = verify_aead_des_key(tfm, authenc_keys.enckey, authenc_keys.enckeylen); in qce_aead_setkey()
616 err = verify_aead_des3_key(tfm, authenc_keys.enckey, authenc_keys.enckeylen); in qce_aead_setkey()
625 memcpy(_key, authenc_keys.enckey, DES3_EDE_KEY_SIZE); in qce_aead_setkey()
643 memcpy(ctx->enc_key, authenc_keys.enckey, authenc_keys.enckeylen); in qce_aead_setkey()
/linux/include/crypto/
H A Dauthenc.h23 const u8 *enckey; member
/linux/drivers/crypto/ccree/
H A Dcc_aead.c49 u8 *enckey; member
73 if (ctx->enckey) { in cc_aead_exit()
74 dma_free_coherent(dev, AES_MAX_KEY_SIZE, ctx->enckey, in cc_aead_exit()
79 ctx->enckey = NULL; in cc_aead_exit()
144 ctx->enckey = dma_alloc_coherent(dev, AES_MAX_KEY_SIZE, in cc_aead_init()
146 if (!ctx->enckey) { in cc_aead_init()
151 ctx->enckey); in cc_aead_init()
549 const u8 *enckey, *authkey; in cc_aead_setkey() local
563 enckey = keys.enckey; in cc_aead_setkey()
576 memcpy(ctx->ctr_nonce, enckey + ctx->enc_keylen - in cc_aead_setkey()
[all …]
/linux/drivers/crypto/intel/ixp4xx/
H A Dixp4xx_crypto.c184 u8 enckey[MAX_KEYLEN]; member
1217 ret = setup_cipher(&tfm->base, 0, ctx->enckey, ctx->enckey_len); in aead_setup()
1220 ret = setup_cipher(&tfm->base, 1, ctx->enckey, ctx->enckey_len); in aead_setup()
1256 if (keys.enckeylen > sizeof(ctx->enckey)) in aead_setkey()
1260 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_setkey()
1286 err = verify_aead_des3_key(tfm, keys.enckey, keys.enckeylen); in des3_aead_setkey()
1291 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in des3_aead_setkey()
/linux/crypto/
H A Dauthenc.c78 keys->enckey = key + keys->authkeylen; in crypto_authenc_extractkeys()
106 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_setkey()
H A Dauthencesn.c80 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_esn_setkey()
H A Dessiv.c114 crypto_shash_update(desc, keys.enckey, keys.enckeylen) ?: in essiv_aead_setkey()
/linux/drivers/crypto/bcm/
H A Dcipher.c328 cipher_parms.key_buf = ctx->enckey; in handle_skcipher_req()
1303 cipher_parms.key_buf = ctx->enckey; in handle_aead_req()
1847 memcpy(ctx->enckey, key, keylen); in skcipher_setkey()
1855 memcpy(ctx->enckey, key + xts_keylen, xts_keylen); in skcipher_setkey()
1856 memcpy(ctx->enckey + xts_keylen, key, xts_keylen); in skcipher_setkey()
1871 cipher_parms.key_buf = ctx->enckey; in skcipher_setkey()
2743 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_authenc_setkey()
2750 if (verify_aead_des_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey()
2756 if (verify_aead_des3_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey()
2783 flow_dump(" enc: ", ctx->enckey, ctx->enckeylen); in aead_authenc_setkey()
[all …]
H A Dcipher.h180 u8 enckey[MAX_KEY_SIZE + ARC4_STATE_SIZE]; member
/linux/drivers/s390/crypto/
H A Dzcrypt_ep11misc.c1106 const u8 *enckey, size_t enckeysize, in _ep11_unwrapkey() argument
1197 p += asn1tag_write(p, 0x04, enckey, enckeysize); in _ep11_unwrapkey()
1256 const u8 *enckey, size_t enckeysize, in ep11_unwrapkey() argument
1272 rc = _ep11_unwrapkey(card, domain, kek, keksize, enckey, enckeysize, in ep11_unwrapkey()
/linux/drivers/crypto/inside-secure/
H A Dsafexcel_cipher.c421 ctx->nonce = *(u32 *)(keys.enckey + keys.enckeylen - in safexcel_aead_setkey()
430 err = verify_aead_des_key(ctfm, keys.enckey, keys.enckeylen); in safexcel_aead_setkey()
435 err = verify_aead_des3_key(ctfm, keys.enckey, keys.enckeylen); in safexcel_aead_setkey()
440 err = aes_expandkey(&aes, keys.enckey, keys.enckeylen); in safexcel_aead_setkey()
456 ((u32 *)keys.enckey)[i]) { in safexcel_aead_setkey()
494 ctx->key[i] = cpu_to_le32(((u32 *)keys.enckey)[i]); in safexcel_aead_setkey()
/linux/drivers/ufs/host/
H A Dufs-exynos.c1324 const u8 *enckey = crypt_ctx->bc_key->raw; in exynos_ufs_fmp_fill_prdt() local
1325 const u8 *twkey = enckey + AES_KEYSIZE_256; in exynos_ufs_fmp_fill_prdt()
1356 prd->file_enckey[j] = fmp_key_word(enckey, j); in exynos_ufs_fmp_fill_prdt()
/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_algs.c257 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_enc_session()
343 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_dec_session()
/linux/drivers/crypto/caam/
H A Dcaamalg_qi.c231 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, in aead_setkey()
246 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
298 err = verify_aead_des3_key(aead, keys.enckey, keys.enckeylen) ?: in des3_aead_setkey()
H A Dcaamalg.c616 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, in aead_setkey()
632 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
659 err = verify_aead_des3_key(aead, keys.enckey, keys.enckeylen) ?: in des3_aead_setkey()
H A Dcaamalg_qi2.c313 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
343 err = crypto_des3_ede_verify_key(crypto_aead_tfm(aead), keys.enckey) ?: in des3_aead_setkey()
/linux/drivers/crypto/chelsio/
H A Dchcr_algo.c3589 memcpy(aeadctx->nonce, keys.enckey + (keys.enckeylen in chcr_authenc_setkey()
3608 memcpy(aeadctx->key, keys.enckey, keys.enckeylen); in chcr_authenc_setkey()
3708 memcpy(aeadctx->nonce, keys.enckey + (keys.enckeylen in chcr_aead_digest_null_setkey()
3722 memcpy(aeadctx->key, keys.enckey, keys.enckeylen); in chcr_aead_digest_null_setkey()
/linux/drivers/crypto/
H A Dtalitos.c906 memcpy(&ctx->key[keys.authkeylen], keys.enckey, keys.enckeylen); in aead_setkey()
938 err = verify_aead_des3_key(authenc, keys.enckey, keys.enckeylen); in aead_des3_setkey()
946 memcpy(&ctx->key[keys.authkeylen], keys.enckey, keys.enckeylen); in aead_des3_setkey()
H A Dsa2ul.c1840 if (sa_init_sc(&ctx->enc, ctx->dev_data->match_data, keys.enckey, in sa_aead_setkey()
1854 if (sa_init_sc(&ctx->dec, ctx->dev_data->match_data, keys.enckey, in sa_aead_setkey()
H A Datmel-aes.c1927 memcpy(ctx->base.key, keys.enckey, keys.enckeylen); in atmel_aes_authenc_setkey()
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c790 memcpy(ctx->key + authkeylen, keys->enckey, keys->enckeylen); in aead_hmac_init()
/linux/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptvf_algs.c879 memcpy(ctx->key + authkeylen, keys->enckey, keys->enckeylen); in aead_hmac_init()
/linux/drivers/crypto/hisilicon/sec2/
H A Dsec_crypto.c1083 memcpy(c_ctx->c_key, keys->enckey, keys->enckeylen); in sec_aead_aes_set_key()