/linux-6.1.9/include/crypto/ |
D | authenc.h | 18 __be32 enckeylen; member 26 unsigned int enckeylen; member
|
/linux-6.1.9/drivers/crypto/qce/ |
D | aead.c | 607 if (authenc_keys.enckeylen > QCE_MAX_KEY_SIZE || in qce_aead_setkey() 612 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() 632 if (authenc_keys.enckeylen != AES_KEYSIZE_128 && in qce_aead_setkey() 633 authenc_keys.enckeylen != AES_KEYSIZE_192 && in qce_aead_setkey() 634 authenc_keys.enckeylen != AES_KEYSIZE_256) in qce_aead_setkey() 636 if (authenc_keys.enckeylen == AES_KEYSIZE_192) in qce_aead_setkey() 640 ctx->enc_keylen = authenc_keys.enckeylen; in qce_aead_setkey() 643 memcpy(ctx->enc_key, authenc_keys.enckey, authenc_keys.enckeylen); in qce_aead_setkey()
|
D | common.c | 298 unsigned int enckeylen, unsigned int cryptlen) in qce_xtskey() argument 301 unsigned int xtsklen = enckeylen / (2 * sizeof(u32)); in qce_xtskey() 303 qce_cpu_to_be32p_array((__be32 *)xtskey, enckey + enckeylen / 2, in qce_xtskey() 304 enckeylen / 2); in qce_xtskey()
|
/linux-6.1.9/crypto/ |
D | authenc.c | 68 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()
|
D | authencesn.c | 80 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_esn_setkey()
|
D | essiv.c | 114 crypto_shash_update(desc, keys.enckey, keys.enckeylen) ?: in essiv_aead_setkey()
|
/linux-6.1.9/drivers/crypto/marvell/octeontx/ |
D | otx_cptvf_algs.c | 842 int enckeylen = 0, authkeylen = 0; in otx_cpt_aead_cbc_aes_sha_setkey() local 856 enckeylen = be32_to_cpu(param->enckeylen); in otx_cpt_aead_cbc_aes_sha_setkey() 859 if (keylen < enckeylen) in otx_cpt_aead_cbc_aes_sha_setkey() 865 authkeylen = keylen - enckeylen; in otx_cpt_aead_cbc_aes_sha_setkey() 868 switch (enckeylen) { in otx_cpt_aead_cbc_aes_sha_setkey() 883 ctx->enc_key_len = enckeylen; in otx_cpt_aead_cbc_aes_sha_setkey() 902 int enckeylen = 0; in otx_cpt_aead_ecb_null_sha_setkey() local 914 enckeylen = be32_to_cpu(param->enckeylen); in otx_cpt_aead_ecb_null_sha_setkey() 917 if (enckeylen != 0) in otx_cpt_aead_ecb_null_sha_setkey() 924 ctx->enc_key_len = enckeylen; in otx_cpt_aead_ecb_null_sha_setkey()
|
/linux-6.1.9/drivers/crypto/marvell/octeontx2/ |
D | otx2_cptvf_algs.c | 897 int enckeylen = 0, authkeylen = 0; in otx2_cpt_aead_cbc_aes_sha_setkey() local 910 enckeylen = be32_to_cpu(param->enckeylen); in otx2_cpt_aead_cbc_aes_sha_setkey() 913 if (keylen < enckeylen) in otx2_cpt_aead_cbc_aes_sha_setkey() 919 authkeylen = keylen - enckeylen; in otx2_cpt_aead_cbc_aes_sha_setkey() 922 switch (enckeylen) { in otx2_cpt_aead_cbc_aes_sha_setkey() 937 ctx->enc_key_len = enckeylen; in otx2_cpt_aead_cbc_aes_sha_setkey() 950 int enckeylen = 0; in otx2_cpt_aead_ecb_null_sha_setkey() local 962 enckeylen = be32_to_cpu(param->enckeylen); in otx2_cpt_aead_ecb_null_sha_setkey() 965 if (enckeylen != 0) in otx2_cpt_aead_ecb_null_sha_setkey() 972 ctx->enc_key_len = enckeylen; in otx2_cpt_aead_ecb_null_sha_setkey()
|
/linux-6.1.9/drivers/crypto/bcm/ |
D | cipher.c | 328 cipher_parms.key_len = ctx->enckeylen; in handle_skcipher_req() 1305 cipher_parms.key_len = ctx->enckeylen; in handle_aead_req() 1849 ctx->enckeylen = keylen; in skcipher_setkey() 1873 cipher_parms.key_len = ctx->enckeylen; in skcipher_setkey() 1882 ctx->enckeylen, in skcipher_setkey() 2773 if (keys.enckeylen > MAX_KEY_SIZE || in aead_authenc_setkey() 2777 ctx->enckeylen = keys.enckeylen; in aead_authenc_setkey() 2780 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_authenc_setkey() 2787 if (verify_aead_des_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey() 2793 if (verify_aead_des3_key(cipher, keys.enckey, keys.enckeylen)) in aead_authenc_setkey() [all …]
|
D | cipher.h | 181 unsigned int enckeylen; member
|
/linux-6.1.9/drivers/crypto/caam/ |
D | caamalg_qi.c | 208 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()
|
D | caamalg.c | 588 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()
|
D | caamalg_desc.c | 216 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()
|
D | caamalg_qi2.c | 298 keys.authkeylen + keys.enckeylen, keys.enckeylen, in aead_setkey() 307 if (ctx->adata.keylen_pad + keys.enckeylen > CAAM_MAX_KEY_SIZE) in aead_setkey() 311 memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); in aead_setkey() 313 keys.enckeylen, ctx->dir); in aead_setkey() 316 ctx->adata.keylen_pad + keys.enckeylen, 1); in aead_setkey() 318 ctx->cdata.keylen = keys.enckeylen; in aead_setkey() 338 if (keys.enckeylen != DES3_EDE_KEY_SIZE) in des3_aead_setkey()
|
/linux-6.1.9/drivers/crypto/chelsio/ |
D | chcr_algo.c | 3578 if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE) in chcr_authenc_setkey() 3580 memcpy(aeadctx->nonce, keys.enckey + (keys.enckeylen in chcr_authenc_setkey() 3582 keys.enckeylen -= CTR_RFC3686_NONCE_SIZE; in chcr_authenc_setkey() 3584 if (keys.enckeylen == AES_KEYSIZE_128) { in chcr_authenc_setkey() 3586 } else if (keys.enckeylen == AES_KEYSIZE_192) { in chcr_authenc_setkey() 3588 } else if (keys.enckeylen == AES_KEYSIZE_256) { in chcr_authenc_setkey() 3599 memcpy(aeadctx->key, keys.enckey, keys.enckeylen); in chcr_authenc_setkey() 3600 aeadctx->enckey_len = keys.enckeylen; in chcr_authenc_setkey() 3654 roundup(keys.enckeylen, 16) + in chcr_authenc_setkey() 3697 if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE) in chcr_aead_digest_null_setkey() [all …]
|
/linux-6.1.9/drivers/crypto/ |
D | talitos.c | 858 unsigned int enckeylen; member 899 if (keys.authkeylen + keys.enckeylen > TALITOS_MAX_KEY_SIZE) in aead_setkey() 906 memcpy(&ctx->key[keys.authkeylen], keys.enckey, keys.enckeylen); in aead_setkey() 908 ctx->keylen = keys.authkeylen + keys.enckeylen; in aead_setkey() 909 ctx->enckeylen = keys.enckeylen; in aead_setkey() 935 if (keys.authkeylen + keys.enckeylen > TALITOS_MAX_KEY_SIZE) in aead_des3_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() 948 ctx->keylen = keys.authkeylen + keys.enckeylen; in aead_des3_setkey() 949 ctx->enckeylen = keys.enckeylen; in aead_des3_setkey() [all …]
|
D | ixp4xx_crypto.c | 1253 if (keys.enckeylen > sizeof(ctx->enckey)) in aead_setkey() 1257 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in aead_setkey() 1259 ctx->enckey_len = keys.enckeylen; in aead_setkey() 1283 err = verify_aead_des3_key(tfm, keys.enckey, keys.enckeylen); in des3_aead_setkey() 1288 memcpy(ctx->enckey, keys.enckey, keys.enckeylen); in des3_aead_setkey() 1290 ctx->enckey_len = keys.enckeylen; in des3_aead_setkey()
|
D | atmel-aes.c | 2112 if (keys.enckeylen > sizeof(ctx->base.key)) in atmel_aes_authenc_setkey() 2125 ctx->base.keylen = keys.enckeylen; in atmel_aes_authenc_setkey() 2126 memcpy(ctx->base.key, keys.enckey, keys.enckeylen); in atmel_aes_authenc_setkey()
|
D | sa2ul.c | 1813 key_idx = (keys.enckeylen >> 3) - 2; in sa_aead_setkey() 1840 keys.enckeylen, keys.authkey, keys.authkeylen, in sa_aead_setkey() 1854 keys.enckeylen, keys.authkey, keys.authkeylen, in sa_aead_setkey()
|
/linux-6.1.9/drivers/crypto/qat/qat_common/ |
D | qat_algs.c | 247 sizeof(struct icp_qat_hw_auth_setup) + keys->enckeylen); in qat_alg_aead_init_enc_session() 257 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_enc_session() 280 cipher_cd_ctrl->cipher_key_sz = keys->enckeylen >> 3; in qat_alg_aead_init_enc_session() 343 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_dec_session() 367 cipher_cd_ctrl->cipher_key_sz = keys->enckeylen >> 3; in qat_alg_aead_init_dec_session() 555 if (qat_alg_validate_key(keys.enckeylen, &alg, mode)) in qat_alg_aead_init_sessions()
|
/linux-6.1.9/drivers/crypto/inside-secure/ |
D | safexcel_cipher.c | 418 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()
|
/linux-6.1.9/drivers/md/ |
D | dm-crypt.c | 2359 unsigned enckeylen, unsigned authkeylen) in crypt_copy_authenckey() argument 2366 param->enckeylen = cpu_to_be32(enckeylen); in crypt_copy_authenckey() 2370 memcpy(p, key + enckeylen, authkeylen); in crypt_copy_authenckey() 2372 memcpy(p, key, enckeylen); in crypt_copy_authenckey()
|
/linux-6.1.9/net/ipv4/ |
D | esp4.c | 1129 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
|
/linux-6.1.9/net/ipv6/ |
D | esp6.c | 1172 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
|
/linux-6.1.9/drivers/crypto/ccree/ |
D | cc_aead.c | 565 ctx->enc_keylen = keys.enckeylen; in cc_aead_setkey() 648 err = verify_aead_des3_key(aead, keys.enckey, keys.enckeylen) ?: in cc_des3_aead_setkey()
|