Home
last modified time | relevance | path

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

12345678910>>...15

/openbmc/linux/include/crypto/
H 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 …]
H 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()
H 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()
/openbmc/linux/drivers/staging/wlan-ng/
H A Dp80211wep.c48 if (keylen < 0) in wep_change_key()
50 if (keylen >= MAX_KEYLEN) in wep_change_key()
59 wlandev->wep_keylens[keynum] = keylen; in wep_change_key()
72 u32 i, j, k, crc, keylen; in wep_decrypt() local
92 keylen = wlandev->wep_keylens[keyidx]; in wep_decrypt()
94 if (keylen == 0) in wep_decrypt()
100 keylen += 3; /* add in IV bytes */ in wep_decrypt()
143 u32 i, j, k, crc, keylen; in wep_encrypt() local
153 keylen = wlandev->wep_keylens[keynum]; in wep_encrypt()
154 if (keylen <= 0) in wep_encrypt()
[all …]
/openbmc/linux/fs/cachefiles/
H 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 …]
/openbmc/linux/drivers/crypto/amcc/
H 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 …]
/openbmc/linux/fs/hfs/
H 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 …]
/openbmc/linux/fs/hfsplus/
H A Dbfind.c106 u16 off, len, keylen; in __hfs_brec_find() local
119 if (keylen == 0) { in __hfs_brec_find()
133 if (keylen == 0) { in __hfs_brec_find()
143 fd->keylength = keylen; in __hfs_brec_find()
144 fd->entryoffset = off + keylen; in __hfs_brec_find()
145 fd->entrylength = len - keylen; in __hfs_brec_find()
225 u16 off, len, keylen; in hfs_brec_goto() local
271 if (keylen == 0) { in hfs_brec_goto()
276 fd->keylength = keylen; in hfs_brec_goto()
277 fd->entryoffset = off + keylen; in hfs_brec_goto()
[all …]
/openbmc/linux/drivers/crypto/cavium/cpt/
H 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 …]
/openbmc/linux/crypto/
H 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()
43 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() argument
48 if (keylen < cia->cia_min_keysize || keylen > cia->cia_max_keysize) in crypto_cipher_setkey()
52 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey()
54 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey()
/openbmc/linux/crypto/asymmetric_keys/
H A Dpublic_key.c179 memcpy(key, pkey->key, pkey->keylen); in software_key_query()
180 ptr = key + pkey->keylen; in software_key_query()
193 ret = crypto_sig_set_privkey(sig, key, pkey->keylen); in software_key_query()
195 ret = crypto_sig_set_pubkey(sig, key, pkey->keylen); in software_key_query()
298 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op()
299 ptr = key + pkey->keylen; in software_key_eds_op()
314 ret = crypto_sig_set_pubkey(sig, key, pkey->keylen); in software_key_eds_op()
426 memcpy(key, pkey->key, pkey->keylen); in public_key_verify_signature()
427 ptr = key + pkey->keylen; in public_key_verify_signature()
433 ret = crypto_sig_set_privkey(tfm, key, pkey->keylen); in public_key_verify_signature()
[all …]
/openbmc/linux/drivers/crypto/caam/
H 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()
H 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()
H 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 …]
/openbmc/linux/net/mac80211/
H 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 …]
/openbmc/linux/include/crypto/internal/
H 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()
/openbmc/linux/drivers/net/wireless/silabs/wfx/
H 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 …]
/openbmc/qemu/tests/unit/
H A Dtest-crypto-akcipher.c667 size_t keylen; member
697 .keylen = sizeof(rsa1024_public_key),
705 .keylen = sizeof(rsa1024_private_key),
713 .keylen = sizeof(rsa2048_public_key),
721 .keylen = sizeof(rsa2048_private_key),
729 .keylen = sizeof(rsa_public_key_lack_element),
736 .keylen = sizeof(rsa_private_key_lack_element),
743 .keylen = sizeof(rsa_public_key_empty_element),
757 .keylen = 0,
764 .keylen = 0,
[all …]
H A Dtest-crypto-xts.c33 int keylen; member
348 AES_set_encrypt_key(data->key1, data->keylen / 2 * 8, &aesdata.enc); in test_xts()
349 AES_set_decrypt_key(data->key1, data->keylen / 2 * 8, &aesdata.dec); in test_xts()
350 AES_set_encrypt_key(data->key2, data->keylen / 2 * 8, &aestweak.enc); in test_xts()
351 AES_set_decrypt_key(data->key2, data->keylen / 2 * 8, &aestweak.dec); in test_xts()
384 AES_set_encrypt_key(data->key1, data->keylen / 2 * 8, &aesdata.enc); in test_xts_split()
385 AES_set_decrypt_key(data->key1, data->keylen / 2 * 8, &aesdata.dec); in test_xts_split()
386 AES_set_encrypt_key(data->key2, data->keylen / 2 * 8, &aestweak.enc); in test_xts_split()
387 AES_set_decrypt_key(data->key2, data->keylen / 2 * 8, &aestweak.dec); in test_xts_split()
429 AES_set_encrypt_key(data->key1, data->keylen / 2 * 8, &aesdata.enc); in test_xts_unaligned()
[all …]
/openbmc/linux/drivers/crypto/cavium/nitrox/
H 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 …]
/openbmc/linux/drivers/s390/crypto/
H A Dpkey_api.c519 u32 keylen; in nonccatokecc2pkey() local
524 keylen = 32; in nonccatokecc2pkey()
527 keylen = 48; in nonccatokecc2pkey()
530 keylen = 80; in nonccatokecc2pkey()
533 keylen = 32; in nonccatokecc2pkey()
536 keylen = 64; in nonccatokecc2pkey()
653 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_ccainttok2pkey()
987 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_keyblob2pkey2()
1260 if (keylen < hdr->len || keylen > MAXCCAVLSCTOKENSIZE) in pkey_keyblob2pkey3()
1325 if (!ukey || keylen < MINKEYBLOBBUFSIZE || keylen > KEYBLOBBUFSIZE) in _copy_key_from_user()
[all …]
/openbmc/linux/arch/powerpc/platforms/powernv/
H 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()
/openbmc/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_algs.c432 memcpy(cd->ucs_aes.key, key, keylen); in qat_alg_skcipher_init_com()
433 keylen = keylen / 2; in qat_alg_skcipher_init_com()
438 keylen = round_up(keylen, 16); in qat_alg_skcipher_init_com()
440 memcpy(cd->aes.key, key, keylen); in qat_alg_skcipher_init_com()
444 cd_ctrl->cipher_key_sz = keylen >> 3; in qat_alg_skcipher_init_com()
472 if (keylen == AES_KEYSIZE_128) { in qat_alg_xts_reverse_key()
576 unsigned int keylen, in qat_alg_skcipher_init_sessions() argument
590 unsigned int keylen) in qat_alg_aead_rekey() argument
604 unsigned int keylen) in qat_alg_aead_newkey() argument
656 unsigned int keylen) in qat_alg_aead_setkey() argument
[all …]
/openbmc/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c109 const u8 *key, unsigned int keylen) in rk_aes_setkey() argument
114 if (keylen != AES_KEYSIZE_128 && keylen != AES_KEYSIZE_192 && in rk_aes_setkey()
115 keylen != AES_KEYSIZE_256) in rk_aes_setkey()
117 ctx->keylen = keylen; in rk_aes_setkey()
118 memcpy(ctx->key, key, keylen); in rk_aes_setkey()
124 const u8 *key, unsigned int keylen) in rk_des_setkey() argument
133 ctx->keylen = keylen; in rk_des_setkey()
134 memcpy(ctx->key, key, keylen); in rk_des_setkey()
149 ctx->keylen = keylen; in rk_tdes_setkey()
150 memcpy(ctx->key, key, keylen); in rk_tdes_setkey()
[all …]
/openbmc/linux/fs/befs/
H 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 strscpy(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 …]

12345678910>>...15