Home
last modified time | relevance | path

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

12345678910>>...16

/linux/arch/x86/crypto/
A Daes_ctrby8_avx-x86_64.S441 jg .Lgt4\key_len
442 je .Leq4\key_len
444 .Llt4\key_len:
449 .Leq1\key_len:
456 .Leq2\key_len:
464 .Leq3\key_len:
471 .Leq4\key_len:
478 .Lgt4\key_len:
483 .Leq5\key_len:
490 .Leq6\key_len:
[all …]
/linux/drivers/firmware/efi/
A 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()
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()
87 ucs2_as_utf8(key, ptr + sizeof(key_len), in unmarshal_key_value_pairs()
88 key_len - sizeof(key_len)); in unmarshal_key_value_pairs()
[all …]
/linux/arch/sparc/crypto/
A Dcamellia_glue.c31 int key_len; member
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()
60 u32 *output, unsigned int key_len);
68 (u32 *) dst, ctx->key_len); in camellia_encrypt()
77 (u32 *) dst, ctx->key_len); in camellia_decrypt()
99 if (ctx->key_len != 16) in __ecb_crypt()
149 if (ctx->key_len != 16) in cbc_encrypt()
[all …]
/linux/arch/s390/crypto/
A Daes_s390.c45 int key_len; member
56 int key_len; member
73 unsigned int key_len) in setkey_fallback_cip() argument
100 sctx->key_len = key_len; in aes_set_key()
217 sctx->key_len = key_len; in ecb_aes_set_key()
313 sctx->key_len = key_len; in cbc_aes_set_key()
402 if (fips_enabled && key_len != 32 && key_len != 64) in xts_aes_set_key()
415 key_len = key_len / 2; in xts_aes_set_key()
416 xts_ctx->key_len = key_len; in xts_aes_set_key()
418 memcpy(xts_ctx->pcc_key, in_key + key_len, key_len); in xts_aes_set_key()
[all …]
/linux/drivers/crypto/ccp/
A 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()
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()
145 (ctx->u.aes.key_len != AES_KEYSIZE_256)) in ccp_aes_xts_crypt()
175 rctx->cmd.u.xts.key_len = ctx->u.aes.key_len; in ccp_aes_xts_crypt()
[all …]
A 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()
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()
154 key_len -= CTR_RFC3686_NONCE_SIZE; in ccp_aes_rfc3686_setkey()
[all …]
A 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()
A 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()
A 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()
/linux/arch/arm64/crypto/
A 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()
A Daes-neonbs-glue.c73 unsigned int key_len) in aesbs_setkey() argument
79 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
83 ctx->rounds = 6 + key_len / 4; in aesbs_setkey()
132 unsigned int key_len) in aesbs_cbc_setkey() argument
138 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
142 ctx->key.rounds = 6 + key_len / 4; in aesbs_cbc_setkey()
247 unsigned int key_len) in aesbs_xts_setkey() argument
253 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
257 key_len /= 2; in aesbs_xts_setkey()
262 err = aes_expandkey(&rk, in_key + key_len, key_len); in aesbs_xts_setkey()
[all …]
/linux/net/wireless/
A 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 …]
/linux/drivers/staging/rtl8192u/ieee80211/
A 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()
/linux/drivers/staging/rtl8192e/
A 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()
/linux/drivers/crypto/bcm/
A Dspu2.c1003 flow_log(" key: %d\n", cipher_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()
1091 if (hash_parms->key_len) { in spu2_create_request()
1093 ptr += hash_parms->key_len; in spu2_create_request()
1094 buf_len += hash_parms->key_len; in spu2_create_request()
1096 if (cipher_parms->key_len) { in spu2_create_request()
1098 ptr += cipher_parms->key_len; in spu2_create_request()
[all …]
A Dspu.c703 if (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()
739 cipher_parms->key_len); in spum_create_request()
740 ptr += cipher_parms->key_len; in spum_create_request()
741 buf_len += cipher_parms->key_len; in spum_create_request()
742 sctx_words += cipher_parms->key_len / 4; in spum_create_request()
864 if (cipher_parms->key_len) { in spum_cipher_req_init()
[all …]
/linux/drivers/crypto/nx/
A 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()
/linux/lib/crypto/
A 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 …]
/linux/arch/arm/crypto/
A Daes-neonbs-glue.c69 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()
217 unsigned int key_len) in aesbs_ctr_setkey_sync() argument
226 ctx->key.rounds = 6 + key_len / 4; in aesbs_ctr_setkey_sync()
301 unsigned int key_len) in aesbs_xts_setkey() argument
310 key_len /= 2; in aesbs_xts_setkey()
[all …]
/linux/net/mac80211/
A 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()
/linux/drivers/net/ethernet/netronome/nfp/
A 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()
234 u32 tl_len, key_len; in nfp_calc_rtsym_dump_sz() local
239 if (key_len == tl_len) 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()
422 if (key_len == tl_len) in nfp_dump_hwinfo_field()
605 u32 tl_len, key_len; in nfp_dump_single_rtsym() local
611 key_len = strnlen(spec->rtsym, tl_len); in nfp_dump_single_rtsym()
[all …]
/linux/security/keys/trusted-keys/
A Dtrusted_core.c87 p->key_len = keylen; in datablob_parse()
146 size_t key_len; in trusted_instantiate() local
179 key_len = payload->key_len; in trusted_instantiate()
181 key_len); in trusted_instantiate()
185 if (ret != key_len) { in trusted_instantiate()
255 new_p->key_len = p->key_len; in trusted_update()
256 memcpy(new_p->key, p->key, p->key_len); in trusted_update()
/linux/drivers/staging/rtl8723bs/os_dep/
A Dioctl_linux.c85 wep_key_len = param->u.crypt.key_len; in wpa_set_encryption()
171 if (param->u.crypt.key_len > 16) { in wpa_set_encryption()
636 memcpy(grpkey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); in rtw_set_encryption()
639 if (param->u.crypt.key_len == 13) in rtw_set_encryption()
645 memcpy(grpkey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); in rtw_set_encryption()
658 memcpy(grpkey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); in rtw_set_encryption()
689 if (param->u.crypt.key_len == 13) in rtw_set_encryption()
714 … memcpy(grpkey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); in rtw_set_encryption()
717 if (param->u.crypt.key_len == 13) in rtw_set_encryption()
722 … memcpy(grpkey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)); in rtw_set_encryption()
[all …]
/linux/crypto/
A 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()
/linux/include/keys/
A Dtrusted-type.h28 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()

Completed in 42 milliseconds

12345678910>>...16