Home
last modified time | relevance | path

Searched refs:keylen (Results 1 – 25 of 322) sorted by relevance

12345678910>>...13

/linux-6.3-rc2/drivers/staging/wlan-ng/
A Dp80211wep.c69 if (keylen < 0) in wep_change_key()
71 if (keylen >= MAX_KEYLEN) in wep_change_key()
80 wlandev->wep_keylens[keynum] = keylen; in wep_change_key()
93 u32 i, j, k, crc, keylen; in wep_decrypt() local
113 keylen = wlandev->wep_keylens[keyidx]; in wep_decrypt()
115 if (keylen == 0) in wep_decrypt()
121 keylen += 3; /* add in IV bytes */ in wep_decrypt()
164 u32 i, j, k, crc, keylen; in wep_encrypt() local
174 keylen = wlandev->wep_keylens[keynum]; in wep_encrypt()
175 if (keylen <= 0) in wep_encrypt()
[all …]
/linux-6.3-rc2/include/crypto/
A Dblake2s.h47 const void *key, size_t keylen) in __blake2s_init() argument
63 if (keylen) { in __blake2s_init()
64 memcpy(state->buf, key, keylen); in __blake2s_init()
65 memset(&state->buf[keylen], 0, BLAKE2S_BLOCK_SIZE - keylen); in __blake2s_init()
78 const size_t keylen) in blake2s_init_key() argument
81 !key || !keylen || keylen > BLAKE2S_KEY_SIZE)); in blake2s_init_key()
83 __blake2s_init(state, outlen, key, keylen); in blake2s_init_key()
91 const size_t keylen) in blake2s() argument
96 outlen > BLAKE2S_HASH_SIZE || keylen > BLAKE2S_KEY_SIZE || in blake2s()
97 (!key && keylen))); in blake2s()
[all …]
A Dxts.h12 const u8 *key, unsigned int keylen) in xts_verify_key() argument
18 if (keylen % 2) in xts_verify_key()
25 if (fips_enabled && keylen != 32 && keylen != 64) in xts_verify_key()
34 !crypto_memneq(key, key + (keylen / 2), keylen / 2)) in xts_verify_key()
A Dblake2b.h43 const void *key, size_t keylen) in __blake2b_init() argument
45 state->h[0] = BLAKE2B_IV0 ^ (0x01010000 | keylen << 8 | outlen); in __blake2b_init()
59 if (keylen) { in __blake2b_init()
60 memcpy(state->buf, key, keylen); in __blake2b_init()
61 memset(&state->buf[keylen], 0, BLAKE2B_BLOCK_SIZE - keylen); in __blake2b_init()
/linux-6.3-rc2/drivers/crypto/amcc/
A Dcrypto4xx_alg.c123 unsigned int keylen, in crypto4xx_setkey_aes() argument
131 if (keylen != AES_KEYSIZE_256 && keylen != AES_KEYSIZE_192 && in crypto4xx_setkey_aes()
132 keylen != AES_KEYSIZE_128) in crypto4xx_setkey_aes()
161 key, keylen); in crypto4xx_setkey_aes()
290 unsigned int keylen) in crypto4xx_sk_setup_fallback() argument
369 unsigned int keylen) in crypto4xx_aead_setup_fallback() argument
382 unsigned int keylen) in crypto4xx_setkey_aes_ccm() argument
498 switch (keylen) { in crypto4xx_aes_gcm_validate_keylen()
509 unsigned int keylen) in crypto4xx_compute_gcm_hash_key_sw() argument
567 key, keylen); in crypto4xx_setkey_aes_gcm()
[all …]
/linux-6.3-rc2/fs/cachefiles/
A Dkey.c41 unsigned int acc, i, n, nle, nbe, keylen = object->cookie->key_len; in cachefiles_cook_key() local
45 _enter(",%u,%*phN", keylen, keylen, key); in cachefiles_cook_key()
47 BUG_ON(keylen > NAME_MAX - 3); in cachefiles_cook_key()
50 for (i = 0; i < keylen; i++) { in cachefiles_cook_key()
57 len = 1 + keylen; in cachefiles_cook_key()
63 memcpy(name + 1, key, keylen); in cachefiles_cook_key()
71 n = round_up(keylen, 4); in cachefiles_cook_key()
81 b64len = DIV_ROUND_UP(keylen, 3); in cachefiles_cook_key()
82 pad = b64len * 3 - keylen; in cachefiles_cook_key()
84 _debug("len=%u nbe=%u nle=%u b64=%u", keylen, nbe, nle, b64len); in cachefiles_cook_key()
[all …]
/linux-6.3-rc2/fs/hfs/
A Dbfind.c58 u16 off, len, keylen; in __hfs_brec_find() local
70 if (keylen == 0) { in __hfs_brec_find()
89 if (keylen == 0) { in __hfs_brec_find()
98 fd->keylength = keylen; in __hfs_brec_find()
99 fd->entryoffset = off + keylen; in __hfs_brec_find()
100 fd->entrylength = len - keylen; in __hfs_brec_find()
179 u16 off, len, keylen; in hfs_brec_goto() local
225 if (keylen == 0) { in hfs_brec_goto()
230 fd->keylength = keylen; in hfs_brec_goto()
231 fd->entryoffset = off + keylen; in hfs_brec_goto()
[all …]
/linux-6.3-rc2/crypto/
A Dcipher.c21 unsigned int keylen) in setkey_unaligned() argument
29 absize = keylen + alignmask; in setkey_unaligned()
35 memcpy(alignbuffer, key, keylen); in setkey_unaligned()
36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen); in setkey_unaligned()
37 memset(alignbuffer, 0, keylen); in setkey_unaligned()
44 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() argument
49 if (keylen < cia->cia_min_keysize || keylen > cia->cia_max_keysize) in crypto_cipher_setkey()
53 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey()
55 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey()
/linux-6.3-rc2/fs/hfsplus/
A Dbfind.c117 u16 off, len, keylen; in __hfs_brec_find() local
130 if (keylen == 0) { in __hfs_brec_find()
144 if (keylen == 0) { in __hfs_brec_find()
154 fd->keylength = keylen; in __hfs_brec_find()
155 fd->entryoffset = off + keylen; in __hfs_brec_find()
156 fd->entrylength = len - keylen; in __hfs_brec_find()
236 u16 off, len, keylen; in hfs_brec_goto() local
282 if (keylen == 0) { in hfs_brec_goto()
287 fd->keylength = keylen; in hfs_brec_goto()
288 fd->entryoffset = off + keylen; in hfs_brec_goto()
[all …]
/linux-6.3-rc2/drivers/crypto/cavium/cpt/
A Dcptvf_algs.c233 u32 keylen) in cvm_xts_setkey() argument
243 ctx->key_len = keylen; in cvm_xts_setkey()
263 if ((keylen == 16) || (keylen == 24) || (keylen == 32)) { in cvm_validate_keylen()
264 ctx->key_len = keylen; in cvm_validate_keylen()
289 u32 keylen, u8 cipher_type) in cvm_setkey() argument
295 memcpy(ctx->enc_key, key, keylen); in cvm_setkey()
303 u32 keylen) in cvm_cbc_aes_setkey() argument
309 u32 keylen) in cvm_ecb_aes_setkey() argument
315 u32 keylen) in cvm_cfb_aes_setkey() argument
321 u32 keylen) in cvm_cbc_des3_setkey() argument
[all …]
/linux-6.3-rc2/drivers/crypto/caam/
A Dkey_gen.c45 struct alginfo * const adata, const u8 *key_in, u32 keylen, in gen_split_key() argument
54 adata->keylen = split_key_len(adata->algtype & OP_ALG_ALGSEL_MASK); in gen_split_key()
57 local_max = max(keylen, adata->keylen_pad); in gen_split_key()
60 adata->keylen, adata->keylen_pad); in gen_split_key()
62 DUMP_PREFIX_ADDRESS, 16, 4, key_in, keylen, 1); in gen_split_key()
73 memcpy(key_out, key_in, keylen); in gen_split_key()
82 append_key(desc, dma_addr, keylen, CLASS_2 | KEY_DEST_CLASS_REG); in gen_split_key()
100 append_fifo_store(desc, dma_addr, adata->keylen, in gen_split_key()
A Dcaamhash_desc.c36 if (state != OP_ALG_AS_UPDATE && adata->keylen) { in cnstr_shdsc_ahash()
46 adata->keylen, CLASS_2 | in cnstr_shdsc_ahash()
98 append_key_as_imm(desc, adata->key_virt, adata->keylen, in cnstr_shdsc_sk_hash()
99 adata->keylen, CLASS_1 | KEY_DEST_CLASS_REG); in cnstr_shdsc_sk_hash()
103 append_key(desc, adata->key_dma, adata->keylen, in cnstr_shdsc_sk_hash()
106 append_key_as_imm(desc, adata->key_virt, adata->keylen, in cnstr_shdsc_sk_hash()
107 adata->keylen, CLASS_1 | in cnstr_shdsc_sk_hash()
138 append_fifo_store(desc, adata->key_dma, adata->keylen, in cnstr_shdsc_sk_hash()
A Dcaamalg_desc.c69 adata->keylen_pad, adata->keylen, in cnstr_shdsc_aead_null_encap()
73 append_key(desc, adata->key_dma, adata->keylen, in cnstr_shdsc_aead_null_encap()
148 adata->keylen_pad, adata->keylen, in cnstr_shdsc_aead_null_decap()
216 unsigned int enckeylen = cdata->keylen; in init_sh_desc_key_aead()
236 adata->keylen_pad, adata->keylen, in init_sh_desc_key_aead()
899 cdata->keylen), 4, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4106_encap()
981 cdata->keylen, CLASS_1 | in cnstr_shdsc_rfc4106_decap()
1008 cdata->keylen), 4, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4106_decap()
1092 cdata->keylen), 4, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4543_encap()
1175 cdata->keylen), 4, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4543_decap()
[all …]
/linux-6.3-rc2/net/mac80211/
A Dwep.c40 if (B >= 3 && B < 3 + keylen) in ieee80211_wep_weak_iv()
48 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument
51 if (ieee80211_wep_weak_iv(local->wep_iv, keylen)) in ieee80211_wep_get_iv()
66 int keylen, int keyidx) in ieee80211_wep_add_iv() argument
133 const u8 *key, int keylen, int keyidx) in ieee80211_wep_encrypt() argument
142 iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); in ieee80211_wep_encrypt()
152 memcpy(rc4key + 3, key, keylen); in ieee80211_wep_encrypt()
217 klen = 3 + key->conf.keylen; in ieee80211_wep_decrypt()
223 memcpy(rc4key + 3, key->conf.key, key->conf.keylen); in ieee80211_wep_decrypt()
277 tx->key->conf.keylen, in wep_encrypt_skb()
[all …]
/linux-6.3-rc2/drivers/net/wireless/silabs/wfx/
A Dkey.c36 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_pair()
37 msg->key_length = key->keylen; in fill_wep_pair()
38 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_pair()
46 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_group()
48 msg->key_length = key->keylen; in fill_wep_group()
49 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_group()
93 WARN(key->keylen != sizeof(msg->aes_key_data), "inconsistent data"); in fill_ccmp_pair()
95 memcpy(msg->aes_key_data, key->key, key->keylen); in fill_ccmp_pair()
102 WARN(key->keylen != sizeof(msg->aes_key_data), "inconsistent data"); in fill_ccmp_group()
103 memcpy(msg->aes_key_data, key->key, key->keylen); in fill_ccmp_group()
[all …]
/linux-6.3-rc2/include/crypto/internal/
A Dblake2b.h69 unsigned int keylen; member
73 const u8 *key, unsigned int keylen) in crypto_blake2b_setkey() argument
77 if (keylen == 0 || keylen > BLAKE2B_KEY_SIZE) in crypto_blake2b_setkey()
80 memcpy(tctx->key, key, keylen); in crypto_blake2b_setkey()
81 tctx->keylen = keylen; in crypto_blake2b_setkey()
92 __blake2b_init(state, outlen, tctx->key, tctx->keylen); in crypto_blake2b_init()
/linux-6.3-rc2/drivers/crypto/cavium/nitrox/
A Dnitrox_skcipher.c167 unsigned int keylen) in nitrox_skcipher_setkey() argument
192 memcpy(fctx->crypto.u.key, key, keylen); in nitrox_skcipher_setkey()
198 unsigned int keylen) in nitrox_aes_setkey() argument
202 aes_keylen = flexi_aes_keylen(keylen); in nitrox_aes_setkey()
338 const u8 *key, unsigned int keylen) in nitrox_aes_xts_setkey() argument
348 keylen /= 2; in nitrox_aes_xts_setkey()
350 aes_keylen = flexi_aes_keylen(keylen); in nitrox_aes_xts_setkey()
356 memcpy(fctx->auth.u.key2, (key + keylen), keylen); in nitrox_aes_xts_setkey()
368 if (keylen < CTR_RFC3686_NONCE_SIZE) in nitrox_aes_ctr_rfc3686_setkey()
376 keylen -= CTR_RFC3686_NONCE_SIZE; in nitrox_aes_ctr_rfc3686_setkey()
[all …]
/linux-6.3-rc2/drivers/crypto/rockchip/
A Drk3288_crypto_skcipher.c103 const u8 *key, unsigned int keylen) in rk_aes_setkey() argument
108 if (keylen != AES_KEYSIZE_128 && keylen != AES_KEYSIZE_192 && in rk_aes_setkey()
109 keylen != AES_KEYSIZE_256) in rk_aes_setkey()
111 ctx->keylen = keylen; in rk_aes_setkey()
112 memcpy(ctx->key, key, keylen); in rk_aes_setkey()
118 const u8 *key, unsigned int keylen) in rk_des_setkey() argument
127 ctx->keylen = keylen; in rk_des_setkey()
128 memcpy(ctx->key, key, keylen); in rk_des_setkey()
143 ctx->keylen = keylen; in rk_tdes_setkey()
144 memcpy(ctx->key, key, keylen); in rk_tdes_setkey()
[all …]
/linux-6.3-rc2/drivers/crypto/qat/qat_common/
A Dqat_algs.c433 memcpy(cd->ucs_aes.key, key, keylen); in qat_alg_skcipher_init_com()
434 keylen = keylen / 2; in qat_alg_skcipher_init_com()
439 keylen = round_up(keylen, 16); in qat_alg_skcipher_init_com()
441 memcpy(cd->aes.key, key, keylen); in qat_alg_skcipher_init_com()
445 cd_ctrl->cipher_key_sz = keylen >> 3; in qat_alg_skcipher_init_com()
473 if (keylen == AES_KEYSIZE_128) { in qat_alg_xts_reverse_key()
577 unsigned int keylen, in qat_alg_skcipher_init_sessions() argument
591 unsigned int keylen) in qat_alg_aead_rekey() argument
605 unsigned int keylen) in qat_alg_aead_newkey() argument
657 unsigned int keylen) in qat_alg_aead_setkey() argument
[all …]
/linux-6.3-rc2/arch/powerpc/platforms/powernv/
A Dopal-secvar.c73 static int opal_get_next_variable(const char *key, u64 *keylen, u64 keybufsize) in opal_get_next_variable() argument
77 if (!key || !keylen) in opal_get_next_variable()
80 *keylen = cpu_to_be64(*keylen); in opal_get_next_variable()
82 rc = opal_secvar_get_next(key, keylen, keybufsize); in opal_get_next_variable()
84 *keylen = be64_to_cpu(*keylen); in opal_get_next_variable()
/linux-6.3-rc2/drivers/s390/crypto/
A Dpkey_api.c426 if (keylen != sizeof(*t) + t->len) in pkey_nonccatok2pkey()
503 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_ccainttok2pkey()
793 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_keyblob2pkey2()
1063 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_keyblob2pkey3()
1133 if (!ukey || keylen < MINKEYBLOBSIZE || keylen > KEYBLOBBUFSIZE) in _copy_key_from_user()
1136 return memdup_user(ukey, keylen); in _copy_key_from_user()
1330 if (kgs.keylen < klen) { in pkey_unlocked_ioctl()
1339 kgs.keylen = klen; in pkey_unlocked_ioctl()
1372 if (kcs.keylen < klen) { in pkey_unlocked_ioctl()
1381 kcs.keylen = klen; in pkey_unlocked_ioctl()
[all …]
/linux-6.3-rc2/crypto/asymmetric_keys/
A Dpublic_key.c174 memcpy(key, pkey->key, pkey->keylen); in software_key_query()
175 ptr = key + pkey->keylen; in software_key_query()
181 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query()
183 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query()
264 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op()
265 ptr = key + pkey->keylen; in software_key_eds_op()
271 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_eds_op()
273 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_eds_op()
428 memcpy(key, pkey->key, pkey->keylen); in public_key_verify_signature()
429 ptr = key + pkey->keylen; in public_key_verify_signature()
[all …]
/linux-6.3-rc2/fs/befs/
A Dbtree.c117 int index, u16 * keylen);
335 u16 keylen; in befs_find_key() local
346 thiskey = befs_bt_get_key(sb, node, last, &keylen); in befs_find_key()
421 u16 keylen; in befs_btree_read() local
494 (int)keylen); in befs_btree_read()
496 if (bufsize < keylen + 1) { in befs_btree_read()
503 strlcpy(keybuf, keystart, keylen + 1); in befs_btree_read()
505 *keysize = keylen; in befs_btree_read()
508 cur_key, keylen, keybuf, *value); in befs_btree_read()
676 int index, u16 * keylen) in befs_bt_get_key() argument
[all …]
/linux-6.3-rc2/drivers/crypto/allwinner/sun8i-ss/
A Dsun8i-ss-cipher.c202 op->keylen); in sun8i_ss_cipher()
210 rctx->keylen = op->keylen; in sun8i_ss_cipher()
437 unsigned int keylen) in sun8i_ss_aes_setkey() argument
442 switch (keylen) { in sun8i_ss_aes_setkey()
454 op->keylen = keylen; in sun8i_ss_aes_setkey()
455 op->key = kmemdup(key, keylen, GFP_KERNEL); in sun8i_ss_aes_setkey()
466 unsigned int keylen) in sun8i_ss_des3_setkey() argument
471 if (unlikely(keylen != 3 * DES_KEY_SIZE)) { in sun8i_ss_des3_setkey()
472 dev_dbg(ss->dev, "Invalid keylen %u\n", keylen); in sun8i_ss_des3_setkey()
477 op->keylen = keylen; in sun8i_ss_des3_setkey()
[all …]
/linux-6.3-rc2/drivers/crypto/qce/
A Dskcipher.c171 unsigned int keylen) in qce_skcipher_setkey() argument
179 if (!key || !keylen) in qce_skcipher_setkey()
187 __keylen = keylen >> 1; in qce_skcipher_setkey()
191 __keylen = keylen; in qce_skcipher_setkey()
207 ctx->enc_keylen = keylen; in qce_skcipher_setkey()
212 unsigned int keylen) in qce_des_setkey() argument
221 ctx->enc_keylen = keylen; in qce_des_setkey()
227 unsigned int keylen) in qce_des3_setkey() argument
251 ctx->enc_keylen = keylen; in qce_des3_setkey()
263 int keylen; in qce_skcipher_crypt() local
[all …]

Completed in 41 milliseconds

12345678910>>...13