Home
last modified time | relevance | path

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

12345678910>>...16

/kernel/linux/linux-5.10/arch/x86/crypto/
Daes_ctrby8_avx-x86_64.S148 .macro do_aes b, k, key_len argument
151 .set klen, \key_len
417 .macro do_aes_load val, key_len argument
418 do_aes \val, 1, \key_len
421 .macro do_aes_noload val, key_len argument
422 do_aes \val, 0, \key_len
427 .macro do_aes_ctrmain key_len argument
429 jb .Ldo_return2\key_len
437 jz .Lmult_of_8_blks\key_len
441 jg .Lgt4\key_len
[all …]
/kernel/linux/linux-5.10/drivers/firmware/efi/
Dapple-properties.c57 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 …]
/kernel/linux/linux-5.10/arch/sparc/crypto/
Dcamellia_glue.c31 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 …]
/kernel/linux/linux-5.10/arch/s390/crypto/
Daes_s390.c44 int key_len; member
55 int key_len; member
72 unsigned int key_len) in setkey_fallback_cip() argument
80 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
84 unsigned int key_len) in aes_set_key() argument
90 fc = (key_len == 16) ? CPACF_KM_AES_128 : in aes_set_key()
91 (key_len == 24) ? CPACF_KM_AES_192 : in aes_set_key()
92 (key_len == 32) ? CPACF_KM_AES_256 : 0; in aes_set_key()
97 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key()
99 sctx->key_len = key_len; in aes_set_key()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/ccp/
Dccp-crypto-aes-xts.c76 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 …]
Dccp-crypto-aes.c38 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()
74 if (!ctx->u.aes.key_len) in ccp_aes_crypt()
100 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_crypt()
127 ctx->u.aes.key_len = 0; in ccp_aes_init_tfm()
147 unsigned int key_len) in ccp_aes_rfc3686_setkey() argument
151 if (key_len < CTR_RFC3686_NONCE_SIZE) in ccp_aes_rfc3686_setkey()
[all …]
Dccp-crypto-aes-galois.c30 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()
Dccp-crypto-des3.c37 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()
69 if (!ctx->u.des3.key_len) in ccp_des3_crypt()
96 rctx->cmd.u.des3.key_len = ctx->u.des3.key_len; in ccp_des3_crypt()
123 ctx->u.des3.key_len = 0; in ccp_des3_init_tfm()
Dccp-crypto-aes-cmac.c69 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()
/kernel/linux/linux-5.10/arch/arm64/crypto/
Daes-ce-glue.c75 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()
Daes-neonbs-glue.c78 unsigned int key_len) in aesbs_setkey() argument
84 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
88 ctx->rounds = 6 + key_len / 4; in aesbs_setkey()
137 unsigned int key_len) in aesbs_cbc_setkey() argument
143 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
147 ctx->key.rounds = 6 + key_len / 4; in aesbs_cbc_setkey()
211 unsigned int key_len) in aesbs_ctr_setkey_sync() argument
216 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync()
220 ctx->key.rounds = 6 + key_len / 4; in aesbs_ctr_setkey_sync()
271 unsigned int key_len) in aesbs_xts_setkey() argument
[all …]
/kernel/linux/linux-5.10/net/wireless/
Dlib80211_crypt_wep.c33 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 …]
/kernel/linux/linux-5.10/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt_wep.c29 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()
/kernel/linux/linux-5.10/drivers/staging/rtl8192e/
Drtllib_crypt_wep.c24 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()
/kernel/linux/linux-5.10/drivers/crypto/nx/
Dnx-aes-ctr.c24 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()
/kernel/linux/linux-5.10/drivers/crypto/bcm/
Dspu2.c1000 flow_log(" key: %d\n", cipher_parms->key_len); in spu2_create_request()
1001 flow_dump(" key: ", cipher_parms->key_buf, cipher_parms->key_len); in spu2_create_request()
1007 flow_log(" authkey: %d\n", hash_parms->key_len); in spu2_create_request()
1008 flow_dump(" authkey: ", hash_parms->key_buf, hash_parms->key_len); in spu2_create_request()
1034 hash_parms->key_len = cipher_parms->key_len; in spu2_create_request()
1036 cipher_parms->key_len); in spu2_create_request()
1037 cipher_parms->key_len = 0; in spu2_create_request()
1072 hash_parms->key_len, cipher_parms->key_len, in spu2_create_request()
1079 spu2_fmd_ctrl2_write(fmd, cipher_offset, hash_parms->key_len, 0, in spu2_create_request()
1080 cipher_parms->key_len, cipher_parms->iv_len); in spu2_create_request()
[all …]
Dspu.c649 flow_log(" key: %d\n", cipher_parms->key_len); in spum_create_request()
650 flow_dump(" key: ", cipher_parms->key_buf, cipher_parms->key_len); in spum_create_request()
656 flow_log(" authkey: %d\n", hash_parms->key_len); in spum_create_request()
657 flow_dump(" authkey: ", hash_parms->key_buf, hash_parms->key_len); in spum_create_request()
705 if (hash_parms->key_len) { in spum_create_request()
706 memcpy(ptr, hash_parms->key_buf, hash_parms->key_len); in spum_create_request()
707 ptr += hash_parms->key_len; in spum_create_request()
708 buf_len += hash_parms->key_len; in spum_create_request()
709 sctx_words += hash_parms->key_len / 4; in spum_create_request()
739 if (cipher_parms->key_len) { in spum_create_request()
[all …]
/kernel/linux/linux-5.10/lib/crypto/
Daes.c186 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 …]
/kernel/linux/linux-5.10/arch/arm/crypto/
Daes-neonbs-glue.c66 unsigned int key_len) in aesbs_setkey() argument
72 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
76 ctx->rounds = 6 + key_len / 4; in aesbs_setkey()
125 unsigned int key_len) in aesbs_cbc_setkey() argument
131 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
135 ctx->key.rounds = 6 + key_len / 4; in aesbs_cbc_setkey()
142 return crypto_skcipher_setkey(ctx->enc_tfm, in_key, key_len); in aesbs_cbc_setkey()
214 unsigned int key_len) in aesbs_ctr_setkey_sync() argument
219 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync()
223 ctx->key.rounds = 6 + key_len / 4; in aesbs_ctr_setkey_sync()
[all …]
/kernel/linux/linux-5.10/net/mac80211/
Dfils_aead.c66 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()
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/
Dnfp_net_debugdump.c199 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 …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/
Dsecvar.h17 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,
/kernel/linux/linux-5.10/crypto/
Daes_generic.c1137 unsigned int key_len) in crypto_aes_set_key() argument
1141 return aes_expandkey(ctx, in_key, key_len); in crypto_aes_set_key()
1181 const int key_len = ctx->key_length; in crypto_aes_encrypt() local
1188 if (key_len > 24) { in crypto_aes_encrypt()
1193 if (key_len > 16) { in crypto_aes_encrypt()
1250 const int key_len = ctx->key_length; in crypto_aes_decrypt() local
1258 if (key_len > 24) { in crypto_aes_decrypt()
1263 if (key_len > 16) { in crypto_aes_decrypt()
/kernel/linux/linux-5.10/drivers/net/wireless/microchip/wilc1000/
Dfw.h46 u8 key_len; member
52 u8 key_len; member
59 u8 key_len; member
67 u8 key_len; member
/kernel/linux/linux-5.10/drivers/net/wireless/intersil/orinoco/
Dwext.c31 enum orinoco_alg alg, const u8 *key, int key_len, in orinoco_set_key() argument
37 if (key_len) { in orinoco_set_key()
38 priv->keys[index].key = kzalloc(key_len, GFP_ATOMIC); in orinoco_set_key()
51 priv->keys[index].key_len = key_len; in orinoco_set_key()
54 if (key_len) in orinoco_set_key()
55 memcpy((void *)priv->keys[index].key, key, key_len); in orinoco_set_key()
65 priv->keys[index].cipher = (key_len > SMALL_KEY_SIZE) ? in orinoco_set_key()
82 priv->keys[index].key_len = 0; in orinoco_set_key()
287 if (priv->keys[index].key_len == 0) { in orinoco_ioctl_setiwencode()
354 erq->length = priv->keys[index].key_len; in orinoco_ioctl_getiwencode()
[all …]

12345678910>>...16