/linux-6.1.9/arch/x86/crypto/ |
D | aes_ctrby8_avx-x86_64.S | 112 .macro do_aes b, k, key_len, xctr 115 .set klen, \key_len 400 .macro do_aes_load val, key_len, xctr 401 do_aes \val, 1, \key_len, \xctr 404 .macro do_aes_noload val, key_len, xctr 405 do_aes \val, 0, \key_len, \xctr 410 .macro do_aes_ctrmain key_len, xctr 412 jb .Ldo_return2\xctr\key_len 425 jz .Lmult_of_8_blks\xctr\key_len 429 jg .Lgt4\xctr\key_len [all …]
|
/linux-6.1.9/drivers/firmware/efi/ |
D | apple-properties.c | 57 u32 key_len, val_len, entry_len; in unmarshal_key_value_pairs() local 61 if (sizeof(key_len) > remaining) in unmarshal_key_value_pairs() 64 key_len = *(typeof(key_len) *)ptr; in unmarshal_key_value_pairs() 65 if (key_len + sizeof(val_len) > remaining || in unmarshal_key_value_pairs() 66 key_len < sizeof(key_len) + sizeof(efi_char16_t) || in unmarshal_key_value_pairs() 67 *(efi_char16_t *)(ptr + sizeof(key_len)) == 0) { in unmarshal_key_value_pairs() 73 val_len = *(typeof(val_len) *)(ptr + key_len); in unmarshal_key_value_pairs() 74 if (key_len + val_len > remaining || in unmarshal_key_value_pairs() 77 ptr - (void *)dev_header + key_len); in unmarshal_key_value_pairs() 82 key = kzalloc((key_len - sizeof(key_len)) * 4 + 1, GFP_KERNEL); in unmarshal_key_value_pairs() [all …]
|
/linux-6.1.9/arch/sparc/crypto/ |
D | camellia_glue.c | 31 int key_len; member 35 unsigned int key_len, u64 *decrypt_key); 38 unsigned int key_len) in camellia_set_key() argument 43 if (key_len != 16 && key_len != 24 && key_len != 32) in camellia_set_key() 46 ctx->key_len = key_len; in camellia_set_key() 49 key_len, &ctx->decrypt_key[0]); in camellia_set_key() 54 const u8 *in_key, unsigned int key_len) in camellia_set_key_skcipher() argument 56 return camellia_set_key(crypto_skcipher_tfm(tfm), in_key, key_len); in camellia_set_key_skcipher() 60 u32 *output, unsigned int key_len); 68 (u32 *) dst, ctx->key_len); in camellia_encrypt() [all …]
|
/linux-6.1.9/arch/s390/crypto/ |
D | aes_s390.c | 45 int key_len; member 56 int key_len; member 73 unsigned int key_len) in setkey_fallback_cip() argument 81 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip() 85 unsigned int key_len) in aes_set_key() argument 91 fc = (key_len == 16) ? CPACF_KM_AES_128 : in aes_set_key() 92 (key_len == 24) ? CPACF_KM_AES_192 : in aes_set_key() 93 (key_len == 32) ? CPACF_KM_AES_256 : 0; in aes_set_key() 98 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key() 100 sctx->key_len = key_len; in aes_set_key() [all …]
|
/linux-6.1.9/drivers/crypto/ccp/ |
D | ccp-crypto-aes-xts.c | 76 unsigned int key_len) in ccp_aes_xts_setkey() argument 82 ret = xts_verify_key(tfm, key, key_len); in ccp_aes_xts_setkey() 89 switch (key_len) { in ccp_aes_xts_setkey() 91 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_xts_setkey() 95 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_xts_setkey() 98 ctx->u.aes.key_len = key_len / 2; in ccp_aes_xts_setkey() 99 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_xts_setkey() 101 return crypto_skcipher_setkey(ctx->u.aes.tfm_skcipher, key, key_len); in ccp_aes_xts_setkey() 116 if (!ctx->u.aes.key_len) in ccp_aes_xts_crypt() 142 (ctx->u.aes.key_len != AES_KEYSIZE_128)) in ccp_aes_xts_crypt() [all …]
|
D | ccp-crypto-aes.c | 38 unsigned int key_len) in ccp_aes_setkey() argument 43 switch (key_len) { in ccp_aes_setkey() 57 ctx->u.aes.key_len = key_len; in ccp_aes_setkey() 59 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_setkey() 60 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_setkey() 73 if (!ctx->u.aes.key_len) in ccp_aes_crypt() 99 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_crypt() 124 ctx->u.aes.key_len = 0; in ccp_aes_init_tfm() 144 unsigned int key_len) in ccp_aes_rfc3686_setkey() argument 148 if (key_len < CTR_RFC3686_NONCE_SIZE) in ccp_aes_rfc3686_setkey() [all …]
|
D | ccp-crypto-aes-galois.c | 30 unsigned int key_len) in ccp_aes_gcm_setkey() argument 34 switch (key_len) { in ccp_aes_gcm_setkey() 49 ctx->u.aes.key_len = key_len; in ccp_aes_gcm_setkey() 51 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_gcm_setkey() 52 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_gcm_setkey() 86 if (!ctx->u.aes.key_len) in ccp_aes_gcm_crypt() 124 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_gcm_crypt() 154 ctx->u.aes.key_len = 0; in ccp_aes_gcm_cra_init()
|
D | ccp-crypto-des3.c | 37 unsigned int key_len) in ccp_des3_setkey() argument 52 ctx->u.des3.key_len = key_len; in ccp_des3_setkey() 54 memcpy(ctx->u.des3.key, key, key_len); in ccp_des3_setkey() 55 sg_init_one(&ctx->u.des3.key_sg, ctx->u.des3.key, key_len); in ccp_des3_setkey() 68 if (!ctx->u.des3.key_len) in ccp_des3_crypt() 95 rctx->cmd.u.des3.key_len = ctx->u.des3.key_len; in ccp_des3_crypt() 120 ctx->u.des3.key_len = 0; in ccp_des3_init_tfm()
|
D | ccp-crypto-aes-cmac.c | 69 if (!ctx->u.aes.key_len) in ccp_do_cmac_update() 163 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_do_cmac_update() 257 unsigned int key_len) in ccp_aes_cmac_setkey() argument 268 switch (key_len) { in ccp_aes_cmac_setkey() 284 ctx->u.aes.key_len = 0; in ccp_aes_cmac_setkey() 287 ret = aes_expandkey(&aes, key, key_len); in ccp_aes_cmac_setkey() 328 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_cmac_setkey() 329 ctx->u.aes.key_len = key_len; in ccp_aes_cmac_setkey() 330 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_cmac_setkey() 341 ctx->u.aes.key_len = 0; in ccp_aes_cmac_cra_init()
|
/linux-6.1.9/arch/arm64/crypto/ |
D | aes-ce-glue.c | 75 unsigned int key_len) in ce_aes_expandkey() argument 84 u32 kwords = key_len / sizeof(u32); in ce_aes_expandkey() 88 if (key_len != AES_KEYSIZE_128 && in ce_aes_expandkey() 89 key_len != AES_KEYSIZE_192 && in ce_aes_expandkey() 90 key_len != AES_KEYSIZE_256) in ce_aes_expandkey() 93 ctx->key_length = key_len; in ce_aes_expandkey() 107 if (key_len == AES_KEYSIZE_192) { in ce_aes_expandkey() 112 } else if (key_len == AES_KEYSIZE_256) { in ce_aes_expandkey() 143 unsigned int key_len) in ce_aes_setkey() argument 147 return ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
|
/linux-6.1.9/net/wireless/ |
D | lib80211_crypt_wep.c | 33 u8 key_len; member 77 klen = 3 + wep->key_len; in lib80211_wep_build_iv() 124 memcpy(key + 3, wep->key, wep->key_len); in lib80211_wep_encrypt() 128 klen = 3 + wep->key_len; in lib80211_wep_encrypt() 169 klen = 3 + wep->key_len; in lib80211_wep_decrypt() 172 memcpy(key + 3, wep->key, wep->key_len); in lib80211_wep_decrypt() 206 wep->key_len = len; in lib80211_wep_set_key() 215 if (len < wep->key_len) in lib80211_wep_get_key() 218 memcpy(key, wep->key, wep->key_len); in lib80211_wep_get_key() 220 return wep->key_len; in lib80211_wep_get_key() [all …]
|
/linux-6.1.9/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_wep.c | 29 u8 key_len; member 85 klen = 3 + wep->key_len; in prism2_wep_encrypt() 107 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 154 klen = 3 + wep->key_len; in prism2_wep_decrypt() 157 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_decrypt() 193 wep->key_len = len; in prism2_wep_set_key() 203 if (len < wep->key_len) in prism2_wep_get_key() 206 memcpy(key, wep->key, wep->key_len); in prism2_wep_get_key() 208 return wep->key_len; in prism2_wep_get_key() 217 wep->key_idx, wep->key_len); in prism2_wep_print_stats()
|
/linux-6.1.9/drivers/nvme/common/ |
D | auth.c | 159 int ret, key_len; in nvme_auth_extract_key() local 175 key_len = base64_decode(secret, allocated_len, key->key); in nvme_auth_extract_key() 176 if (key_len < 0) { in nvme_auth_extract_key() 178 key_len); in nvme_auth_extract_key() 179 ret = key_len; in nvme_auth_extract_key() 183 if (key_len != 36 && key_len != 52 && in nvme_auth_extract_key() 184 key_len != 68) { in nvme_auth_extract_key() 185 pr_err("Invalid key len %d\n", key_len); in nvme_auth_extract_key() 191 (key_len - 4) != nvme_auth_hmac_hash_len(key_hash)) { in nvme_auth_extract_key() 192 pr_err("Mismatched key len %d for %s\n", key_len, in nvme_auth_extract_key() [all …]
|
/linux-6.1.9/drivers/staging/rtl8192e/ |
D | rtllib_crypt_wep.c | 24 u8 key_len; member 83 klen = 3 + wep->key_len; in prism2_wep_encrypt() 105 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 153 klen = 3 + wep->key_len; in prism2_wep_decrypt() 156 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_decrypt() 192 wep->key_len = len; in prism2_wep_set_key() 202 if (len < wep->key_len) in prism2_wep_get_key() 205 memcpy(key, wep->key, wep->key_len); in prism2_wep_get_key() 207 return wep->key_len; in prism2_wep_get_key() 215 seq_printf(m, "key[%d] alg=WEP len=%d\n", wep->key_idx, wep->key_len); in prism2_wep_print_stats()
|
/linux-6.1.9/security/keys/trusted-keys/ |
D | trusted_core.c | 96 p->key_len = keylen; in datablob_parse() 155 size_t key_len; in trusted_instantiate() local 188 key_len = payload->key_len; in trusted_instantiate() 190 key_len); in trusted_instantiate() 194 if (ret != key_len) { in trusted_instantiate() 264 new_p->key_len = p->key_len; in trusted_update() 265 memcpy(new_p->key, p->key, p->key_len); in trusted_update() 324 static int kernel_get_random(unsigned char *key, size_t key_len) in kernel_get_random() argument 326 return get_random_bytes_wait(key, key_len) ?: key_len; in kernel_get_random() 331 int (*get_random)(unsigned char *key, size_t key_len); in init_trusted()
|
/linux-6.1.9/drivers/crypto/nx/ |
D | nx-aes-ctr.c | 24 unsigned int key_len) in ctr_aes_nx_set_key() argument 31 switch (key_len) { in ctr_aes_nx_set_key() 49 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key() 56 unsigned int key_len) in ctr3686_aes_nx_set_key() argument 60 if (key_len < CTR_RFC3686_NONCE_SIZE) in ctr3686_aes_nx_set_key() 64 in_key + key_len - CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_set_key() 67 key_len -= CTR_RFC3686_NONCE_SIZE; in ctr3686_aes_nx_set_key() 69 return ctr_aes_nx_set_key(tfm, in_key, key_len); in ctr3686_aes_nx_set_key()
|
/linux-6.1.9/drivers/crypto/bcm/ |
D | spu2.c | 1003 flow_log(" key: %d\n", cipher_parms->key_len); in spu2_create_request() 1004 flow_dump(" key: ", cipher_parms->key_buf, cipher_parms->key_len); in spu2_create_request() 1010 flow_log(" authkey: %d\n", hash_parms->key_len); in spu2_create_request() 1011 flow_dump(" authkey: ", hash_parms->key_buf, hash_parms->key_len); in spu2_create_request() 1037 hash_parms->key_len = cipher_parms->key_len; in spu2_create_request() 1039 cipher_parms->key_len); in spu2_create_request() 1040 cipher_parms->key_len = 0; in spu2_create_request() 1075 hash_parms->key_len, cipher_parms->key_len, in spu2_create_request() 1082 spu2_fmd_ctrl2_write(fmd, cipher_offset, hash_parms->key_len, 0, in spu2_create_request() 1083 cipher_parms->key_len, cipher_parms->iv_len); in spu2_create_request() [all …]
|
D | spu.c | 647 flow_log(" key: %d\n", cipher_parms->key_len); in spum_create_request() 648 flow_dump(" key: ", cipher_parms->key_buf, cipher_parms->key_len); in spum_create_request() 654 flow_log(" authkey: %d\n", hash_parms->key_len); in spum_create_request() 655 flow_dump(" authkey: ", hash_parms->key_buf, hash_parms->key_len); in spum_create_request() 703 if (hash_parms->key_len) { in spum_create_request() 704 memcpy(ptr, hash_parms->key_buf, hash_parms->key_len); in spum_create_request() 705 ptr += hash_parms->key_len; in spum_create_request() 706 buf_len += hash_parms->key_len; in spum_create_request() 707 sctx_words += hash_parms->key_len / 4; in spum_create_request() 737 if (cipher_parms->key_len) { in spum_create_request() [all …]
|
/linux-6.1.9/crypto/ |
D | aria_generic.c | 28 unsigned int key_len) in aria_set_encrypt_key() argument 36 ck = &key_rc[(key_len - 16) / 2]; in aria_set_encrypt_key() 50 if (key_len > 16) { in aria_set_encrypt_key() 53 if (key_len > 24) { in aria_set_encrypt_key() 134 if (key_len > 16) { in aria_set_encrypt_key() 140 if (key_len > 24) { in aria_set_encrypt_key() 174 int aria_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) in aria_set_key() argument 178 if (key_len != 16 && key_len != 24 && key_len != 32) in aria_set_key() 181 ctx->key_length = key_len; in aria_set_key() 182 ctx->rounds = (key_len + 32) / 4; in aria_set_key() [all …]
|
/linux-6.1.9/lib/crypto/ |
D | aes.c | 186 unsigned int key_len) in aes_expandkey() argument 188 u32 kwords = key_len / sizeof(u32); in aes_expandkey() 192 err = aes_check_keylen(key_len); in aes_expandkey() 196 ctx->key_length = key_len; in aes_expandkey() 210 if (key_len == AES_KEYSIZE_192) { in aes_expandkey() 215 } else if (key_len == AES_KEYSIZE_256) { in aes_expandkey() 231 ctx->key_dec[0] = ctx->key_enc[key_len + 24]; in aes_expandkey() 232 ctx->key_dec[1] = ctx->key_enc[key_len + 25]; in aes_expandkey() 233 ctx->key_dec[2] = ctx->key_enc[key_len + 26]; in aes_expandkey() 234 ctx->key_dec[3] = ctx->key_enc[key_len + 27]; in aes_expandkey() [all …]
|
/linux-6.1.9/arch/arm/crypto/ |
D | aes-neonbs-glue.c | 69 unsigned int key_len) in aesbs_setkey() argument 75 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey() 79 ctx->rounds = 6 + key_len / 4; in aesbs_setkey() 128 unsigned int key_len) in aesbs_cbc_setkey() argument 134 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey() 138 ctx->key.rounds = 6 + key_len / 4; in aesbs_cbc_setkey() 145 return crypto_skcipher_setkey(ctx->enc_tfm, in_key, key_len); in aesbs_cbc_setkey() 217 unsigned int key_len) in aesbs_ctr_setkey_sync() argument 222 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync() 226 ctx->key.rounds = 6 + key_len / 4; in aesbs_ctr_setkey_sync() [all …]
|
/linux-6.1.9/net/mac80211/ |
D | fils_aead.c | 66 static int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 79 key_len /= 2; /* S2V key || CTR key */ in aes_siv_encrypt() 91 res = crypto_shash_setkey(tfm, key, key_len); in aes_siv_encrypt() 122 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_encrypt() 144 static int aes_siv_decrypt(const u8 *key, size_t key_len, in aes_siv_decrypt() argument 159 key_len /= 2; /* S2V key || CTR key */ in aes_siv_decrypt() 179 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_decrypt() 206 res = crypto_shash_setkey(tfm, key, key_len); in aes_siv_decrypt()
|
/linux-6.1.9/include/keys/ |
D | trusted-type.h | 28 unsigned int key_len; member 68 int (*get_random)(unsigned char *key, size_t key_len); 86 pr_info("key_len %d\n", p->key_len); in dump_payload() 88 16, 1, p->key, p->key_len, 0); in dump_payload()
|
/linux-6.1.9/drivers/net/ethernet/netronome/nfp/ |
D | nfp_net_debugdump.c | 199 u32 tl_len, key_len; in nfp_calc_hwinfo_field_sz() local 203 key_len = strnlen(spec->data, tl_len); in nfp_calc_hwinfo_field_sz() 204 if (key_len == tl_len) in nfp_calc_hwinfo_field_sz() 211 return sizeof(struct nfp_dump_tl) + ALIGN8(key_len + strlen(value) + 2); in nfp_calc_hwinfo_field_sz() 234 u32 tl_len, key_len; in nfp_calc_rtsym_dump_sz() local 238 key_len = strnlen(spec_rtsym->rtsym, tl_len); in nfp_calc_rtsym_dump_sz() 239 if (key_len == tl_len) in nfp_calc_rtsym_dump_sz() 246 return ALIGN8(offsetof(struct nfp_dump_rtsym, rtsym) + key_len + 1) + in nfp_calc_rtsym_dump_sz() 415 u32 tl_len, key_len, val_len; in nfp_dump_hwinfo_field() local 421 key_len = strnlen(spec->data, tl_len); in nfp_dump_hwinfo_field() [all …]
|
/linux-6.1.9/arch/powerpc/include/asm/ |
D | secvar.h | 17 int (*get)(const char *key, uint64_t key_len, u8 *data, 19 int (*get_next)(const char *key, uint64_t *key_len, 21 int (*set)(const char *key, uint64_t key_len, u8 *data,
|