Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/include/crypto/
Dauthenc.h18 __be32 enckeylen; member
26 unsigned int enckeylen; member
/kernel/linux/linux-5.10/crypto/
Dauthenc.c68 keys->enckeylen = be32_to_cpu(param->enckeylen); in crypto_authenc_extractkeys()
73 if (keylen < keys->enckeylen) in crypto_authenc_extractkeys()
76 keys->authkeylen = keylen - keys->enckeylen; in crypto_authenc_extractkeys()
106 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_setkey()
Dauthencesn.c80 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_esn_setkey()
Dessiv.c113 crypto_shash_update(desc, keys.enckey, keys.enckeylen) ?: in essiv_aead_setkey()
/kernel/linux/linux-5.10/drivers/crypto/qce/
Dcommon.c293 unsigned int enckeylen, unsigned int cryptlen) in qce_xtskey() argument
296 unsigned int xtsklen = enckeylen / (2 * sizeof(u32)); in qce_xtskey()
299 qce_cpu_to_be32p_array((__be32 *)xtskey, enckey + enckeylen / 2, in qce_xtskey()
300 enckeylen / 2); in qce_xtskey()
/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/
Dotx_cptvf_algs.c841 int enckeylen = 0, authkeylen = 0; in otx_cpt_aead_cbc_aes_sha_setkey() local
855 enckeylen = be32_to_cpu(param->enckeylen); in otx_cpt_aead_cbc_aes_sha_setkey()
858 if (keylen < enckeylen) in otx_cpt_aead_cbc_aes_sha_setkey()
864 authkeylen = keylen - enckeylen; in otx_cpt_aead_cbc_aes_sha_setkey()
867 switch (enckeylen) { in otx_cpt_aead_cbc_aes_sha_setkey()
882 ctx->enc_key_len = enckeylen; in otx_cpt_aead_cbc_aes_sha_setkey()
901 int enckeylen = 0; in otx_cpt_aead_ecb_null_sha_setkey() local
913 enckeylen = be32_to_cpu(param->enckeylen); in otx_cpt_aead_ecb_null_sha_setkey()
916 if (enckeylen != 0) in otx_cpt_aead_ecb_null_sha_setkey()
923 ctx->enc_key_len = enckeylen; in otx_cpt_aead_ecb_null_sha_setkey()
/kernel/linux/linux-5.10/drivers/crypto/bcm/
Dcipher.c327 cipher_parms.key_len = ctx->enckeylen; in handle_skcipher_req()
1307 cipher_parms.key_len = ctx->enckeylen; in handle_aead_req()
1851 ctx->enckeylen = keylen; in skcipher_setkey()
1875 cipher_parms.key_len = ctx->enckeylen; in skcipher_setkey()
1884 ctx->enckeylen, in skcipher_setkey()
2775 if (keys.enckeylen > MAX_KEY_SIZE || in aead_authenc_setkey()
2779 ctx->enckeylen = keys.enckeylen; in aead_authenc_setkey()
2782 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_authenc_setkey()
2789 if (verify_aead_des_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey()
2795 if (verify_aead_des3_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey()
[all …]
Dcipher.h180 unsigned int enckeylen; member
/kernel/linux/linux-5.10/drivers/crypto/caam/
Dcaamalg_qi.c208 keys.authkeylen + keys.enckeylen, keys.enckeylen, in aead_setkey()
222 if (ctx->adata.keylen_pad + keys.enckeylen > CAAM_MAX_KEY_SIZE) in aead_setkey()
227 keys.enckeylen); in aead_setkey()
230 keys.enckeylen, ctx->dir); in aead_setkey()
236 keys.enckeylen); in aead_setkey()
241 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
243 ctx->adata.keylen_pad + keys.enckeylen, in aead_setkey()
248 ctx->adata.keylen_pad + keys.enckeylen, 1); in aead_setkey()
251 ctx->cdata.keylen = keys.enckeylen; in aead_setkey()
293 err = verify_aead_des3_key(aead, keys.enckey, keys.enckeylen) ?: in des3_aead_setkey()
Dcaamalg.c588 keys.authkeylen + keys.enckeylen, keys.enckeylen, in aead_setkey()
602 if (ctx->adata.keylen_pad + keys.enckeylen > CAAM_MAX_KEY_SIZE) in aead_setkey()
607 keys.enckeylen); in aead_setkey()
610 keys.enckeylen, ctx->dir); in aead_setkey()
616 keys.enckeylen); in aead_setkey()
622 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
624 keys.enckeylen, ctx->dir); in aead_setkey()
628 ctx->adata.keylen_pad + keys.enckeylen, 1); in aead_setkey()
631 ctx->cdata.keylen = keys.enckeylen; in aead_setkey()
649 err = verify_aead_des3_key(aead, keys.enckey, keys.enckeylen) ?: in des3_aead_setkey()
Dcaamalg_desc.c216 unsigned int enckeylen = cdata->keylen; in init_sh_desc_key_aead() local
231 enckeylen -= CTR_RFC3686_NONCE_SIZE; in init_sh_desc_key_aead()
247 append_key_as_imm(desc, cdata->key_virt, enckeylen, in init_sh_desc_key_aead()
248 enckeylen, CLASS_1 | KEY_DEST_CLASS_REG); in init_sh_desc_key_aead()
250 append_key(desc, cdata->key_dma, enckeylen, CLASS_1 | in init_sh_desc_key_aead()
Dcaamalg_qi2.c295 keys.authkeylen + keys.enckeylen, keys.enckeylen, in aead_setkey()
304 if (ctx->adata.keylen_pad + keys.enckeylen > CAAM_MAX_KEY_SIZE) in aead_setkey()
308 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey()
310 keys.enckeylen, ctx->dir); in aead_setkey()
313 ctx->adata.keylen_pad + keys.enckeylen, 1); in aead_setkey()
315 ctx->cdata.keylen = keys.enckeylen; in aead_setkey()
335 if (keys.enckeylen != DES3_EDE_KEY_SIZE) in des3_aead_setkey()
/kernel/linux/linux-5.10/drivers/crypto/chelsio/
Dchcr_algo.c3584 if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE) in chcr_authenc_setkey()
3586 memcpy(aeadctx->nonce, keys.enckey + (keys.enckeylen in chcr_authenc_setkey()
3588 keys.enckeylen -= CTR_RFC3686_NONCE_SIZE; in chcr_authenc_setkey()
3590 if (keys.enckeylen == AES_KEYSIZE_128) { in chcr_authenc_setkey()
3592 } else if (keys.enckeylen == AES_KEYSIZE_192) { in chcr_authenc_setkey()
3594 } else if (keys.enckeylen == AES_KEYSIZE_256) { in chcr_authenc_setkey()
3605 memcpy(aeadctx->key, keys.enckey, keys.enckeylen); in chcr_authenc_setkey()
3606 aeadctx->enckey_len = keys.enckeylen; in chcr_authenc_setkey()
3660 roundup(keys.enckeylen, 16) + in chcr_authenc_setkey()
3703 if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE) in chcr_aead_digest_null_setkey()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/
Dixp4xx_crypto.c1161 if (keys.enckeylen > sizeof(ctx->enckey)) in aead_setkey()
1165 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_setkey()
1167 ctx->enckey_len = keys.enckeylen; in aead_setkey()
1191 err = verify_aead_des3_key(tfm, keys.enckey, keys.enckeylen); in des3_aead_setkey()
1196 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in des3_aead_setkey()
1198 ctx->enckey_len = keys.enckeylen; in des3_aead_setkey()
Dtalitos.c857 unsigned int enckeylen; member
898 if (keys.authkeylen + keys.enckeylen > TALITOS_MAX_KEY_SIZE) in aead_setkey()
905 memcpy(&ctx->key[keys.authkeylen], keys.enckey, keys.enckeylen); in aead_setkey()
907 ctx->keylen = keys.authkeylen + keys.enckeylen; in aead_setkey()
908 ctx->enckeylen = keys.enckeylen; in aead_setkey()
934 if (keys.authkeylen + keys.enckeylen > TALITOS_MAX_KEY_SIZE) in aead_des3_setkey()
937 err = verify_aead_des3_key(authenc, keys.enckey, keys.enckeylen); in aead_des3_setkey()
945 memcpy(&ctx->key[keys.authkeylen], keys.enckey, keys.enckeylen); in aead_des3_setkey()
947 ctx->keylen = keys.authkeylen + keys.enckeylen; in aead_des3_setkey()
948 ctx->enckeylen = keys.enckeylen; in aead_des3_setkey()
[all …]
Dpicoxcell_crypto.c475 if (keys.enckeylen > AES_MAX_KEY_SIZE) in spacc_aead_setkey()
481 memcpy(ctx->cipher_key, keys.enckey, keys.enckeylen); in spacc_aead_setkey()
482 ctx->cipher_key_len = keys.enckeylen; in spacc_aead_setkey()
Datmel-aes.c2049 if (keys.enckeylen > sizeof(ctx->base.key)) in atmel_aes_authenc_setkey()
2062 ctx->base.keylen = keys.enckeylen; in atmel_aes_authenc_setkey()
2063 memcpy(ctx->base.key, keys.enckey, keys.enckeylen); in atmel_aes_authenc_setkey()
Dsa2ul.c1793 key_idx = (keys.enckeylen >> 3) - 2; in sa_aead_setkey()
1819 if (sa_init_sc(&ctx->enc, keys.enckey, keys.enckeylen, in sa_aead_setkey()
1833 if (sa_init_sc(&ctx->dec, keys.enckey, keys.enckeylen, in sa_aead_setkey()
/kernel/linux/linux-5.10/drivers/crypto/qat/qat_common/
Dqat_algs.c263 sizeof(struct icp_qat_hw_auth_setup) + keys->enckeylen); in qat_alg_aead_init_enc_session()
273 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_enc_session()
296 cipher_cd_ctrl->cipher_key_sz = keys->enckeylen >> 3; in qat_alg_aead_init_enc_session()
359 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_dec_session()
383 cipher_cd_ctrl->cipher_key_sz = keys->enckeylen >> 3; in qat_alg_aead_init_dec_session()
519 if (qat_alg_validate_key(keys.enckeylen, &alg, mode)) in qat_alg_aead_init_sessions()
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
Dsafexcel_cipher.c418 if (unlikely(keys.enckeylen < CTR_RFC3686_NONCE_SIZE)) in safexcel_aead_setkey()
421 ctx->nonce = *(u32 *)(keys.enckey + keys.enckeylen - in safexcel_aead_setkey()
424 keys.enckeylen -= CTR_RFC3686_NONCE_SIZE; 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()
445 if (unlikely(keys.enckeylen != SM4_KEY_SIZE)) in safexcel_aead_setkey()
454 for (i = 0; i < keys.enckeylen / sizeof(u32); i++) { in safexcel_aead_setkey()
493 for (i = 0; i < keys.enckeylen / sizeof(u32); i++) in safexcel_aead_setkey()
495 ctx->key_len = keys.enckeylen; in safexcel_aead_setkey()
/kernel/linux/linux-5.10/drivers/md/
Ddm-crypt.c2358 unsigned enckeylen, unsigned authkeylen) in crypt_copy_authenckey() argument
2365 param->enckeylen = cpu_to_be32(enckeylen); in crypt_copy_authenckey()
2369 memcpy(p, key + enckeylen, authkeylen); in crypt_copy_authenckey()
2371 memcpy(p, key, enckeylen); in crypt_copy_authenckey()
/kernel/linux/linux-5.10/drivers/crypto/hisilicon/sec2/
Dsec_crypto.c837 switch (keys->enckeylen) { in sec_aead_aes_set_key()
851 memcpy(c_ctx->c_key, keys->enckey, keys->enckeylen); in sec_aead_aes_set_key()
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/drivers/
D0016_linux_drivers_crypto.patch943 + dev_err(jrdev, "keylen %d enckeylen %d authkeylen %d\n",
944 + keys.authkeylen + keys.enckeylen, keys.enckeylen,
959 + if (ctx->adata.keylen_pad + keys.enckeylen > CAAM_MAX_KEY_SIZE)
964 + keys.enckeylen);
967 + keys.enckeylen, ctx->dir);
973 + keys.enckeylen);
978 + memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen);
980 + keys.enckeylen, ctx->dir);
987 + ctx->adata.keylen_pad + keys.enckeylen, 1);
991 + ctx->cdata.keylen = keys.enckeylen;
[all …]
/kernel/linux/linux-5.10/net/ipv4/
Desp4.c1132 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
/kernel/linux/linux-5.10/net/ipv6/
Desp6.c1174 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()

12