/drivers/crypto/ccp/ |
D | ccp-crypto-aes.c | 42 unsigned int key_len) in ccp_aes_setkey() argument 48 switch (key_len) { in ccp_aes_setkey() 63 ctx->u.aes.key_len = key_len; in ccp_aes_setkey() 65 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_setkey() 66 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_setkey() 79 if (!ctx->u.aes.key_len) in ccp_aes_crypt() 106 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_crypt() 133 ctx->u.aes.key_len = 0; in ccp_aes_cra_init() 157 unsigned int key_len) in ccp_aes_rfc3686_setkey() argument 161 if (key_len < CTR_RFC3686_NONCE_SIZE) in ccp_aes_rfc3686_setkey() [all …]
|
D | ccp-crypto-aes-xts.c | 99 unsigned int key_len) in ccp_aes_xts_setkey() argument 106 switch (key_len) { in ccp_aes_xts_setkey() 108 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_xts_setkey() 111 ctx->u.aes.key_len = key_len / 2; in ccp_aes_xts_setkey() 112 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_xts_setkey() 115 key_len); in ccp_aes_xts_setkey() 129 if (!ctx->u.aes.key_len) in ccp_aes_xts_crypt() 149 (ctx->u.aes.key_len != AES_KEYSIZE_128)) { in ccp_aes_xts_crypt() 171 rctx->cmd.u.xts.key_len = ctx->u.aes.key_len; in ccp_aes_xts_crypt() 199 ctx->u.aes.key_len = 0; in ccp_aes_xts_cra_init()
|
D | ccp-crypto-aes-cmac.c | 71 if (!ctx->u.aes.key_len) in ccp_do_cmac_update() 152 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_do_cmac_update() 241 unsigned int key_len) in ccp_aes_cmac_setkey() argument 251 switch (key_len) { in ccp_aes_cmac_setkey() 268 ctx->u.aes.key_len = 0; in ccp_aes_cmac_setkey() 271 ret = crypto_cipher_setkey(ctx->u.aes.tfm_cipher, key, key_len); in ccp_aes_cmac_setkey() 312 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_cmac_setkey() 313 ctx->u.aes.key_len = key_len; in ccp_aes_cmac_setkey() 314 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_cmac_setkey() 326 ctx->u.aes.key_len = 0; in ccp_aes_cmac_cra_init()
|
D | ccp-crypto-sha.c | 131 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? in ccp_do_sha_update() 133 rctx->cmd.u.sha.opad_len = ctx->u.sha.key_len ? in ccp_do_sha_update() 161 if (ctx->u.sha.key_len) { in ccp_sha_init() 237 unsigned int key_len) in ccp_sha_setkey() argument 249 ctx->u.sha.key_len = 0; in ccp_sha_setkey() 256 if (key_len > block_size) { in ccp_sha_setkey() 262 ret = crypto_shash_digest(sdesc, key, key_len, in ccp_sha_setkey() 269 key_len = digest_size; in ccp_sha_setkey() 271 memcpy(ctx->u.sha.key, key, key_len); in ccp_sha_setkey() 281 ctx->u.sha.key_len = key_len; in ccp_sha_setkey() [all …]
|
/drivers/staging/rtl8192e/ |
D | rtllib_crypt_wep.c | 29 u8 key_len; member 121 klen = 3 + wep->key_len; in prism2_wep_encrypt() 142 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 194 klen = 3 + wep->key_len; in prism2_wep_decrypt() 197 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_decrypt() 234 wep->key_len = len; in prism2_wep_set_key() 244 if (len < wep->key_len) in prism2_wep_get_key() 247 memcpy(key, wep->key, wep->key_len); in prism2_wep_get_key() 249 return wep->key_len; in prism2_wep_get_key() 257 seq_printf(m, "key[%d] alg=WEP len=%d\n", wep->key_idx, wep->key_len); in prism2_wep_print_stats()
|
/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_wep.c | 34 u8 key_len; member 122 klen = 3 + wep->key_len; in prism2_wep_encrypt() 142 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 194 klen = 3 + wep->key_len; in prism2_wep_decrypt() 197 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_decrypt() 237 wep->key_len = len; in prism2_wep_set_key() 247 if (len < wep->key_len) in prism2_wep_get_key() 250 memcpy(key, wep->key, wep->key_len); in prism2_wep_get_key() 252 return wep->key_len; in prism2_wep_get_key() 260 wep->key_idx, wep->key_len); in prism2_wep_print_stats()
|
/drivers/crypto/nx/ |
D | nx-aes-ctr.c | 36 unsigned int key_len) in ctr_aes_nx_set_key() argument 43 switch (key_len) { in ctr_aes_nx_set_key() 61 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key() 68 unsigned int key_len) in ctr3686_aes_nx_set_key() argument 72 if (key_len < CTR_RFC3686_NONCE_SIZE) in ctr3686_aes_nx_set_key() 76 in_key + key_len - CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_set_key() 79 key_len -= CTR_RFC3686_NONCE_SIZE; in ctr3686_aes_nx_set_key() 81 return ctr_aes_nx_set_key(tfm, in_key, key_len); in ctr3686_aes_nx_set_key()
|
D | nx-aes-gcm.c | 37 unsigned int key_len) in gcm_aes_nx_set_key() argument 45 switch (key_len) { in gcm_aes_nx_set_key() 66 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key() 69 memcpy(csbcpb_aead->cpb.aes_gca.key, in_key, key_len); in gcm_aes_nx_set_key() 76 unsigned int key_len) in gcm4106_aes_nx_set_key() argument 82 if (key_len < 4) in gcm4106_aes_nx_set_key() 85 key_len -= 4; in gcm4106_aes_nx_set_key() 87 rc = gcm_aes_nx_set_key(tfm, in_key, key_len); in gcm4106_aes_nx_set_key() 91 memcpy(nonce, in_key + key_len, 4); in gcm4106_aes_nx_set_key()
|
D | nx-aes-ccm.c | 37 unsigned int key_len) in ccm_aes_nx_set_key() argument 45 switch (key_len) { in ccm_aes_nx_set_key() 56 memcpy(csbcpb->cpb.aes_ccm.key, in_key, key_len); in ccm_aes_nx_set_key() 59 memcpy(csbcpb_aead->cpb.aes_cca.key, in_key, key_len); in ccm_aes_nx_set_key() 67 unsigned int key_len) in ccm4309_aes_nx_set_key() argument 71 if (key_len < 3) in ccm4309_aes_nx_set_key() 74 key_len -= 3; in ccm4309_aes_nx_set_key() 76 memcpy(nx_ctx->priv.ccm.nonce, in_key + key_len, 3); in ccm4309_aes_nx_set_key() 78 return ccm_aes_nx_set_key(tfm, in_key, key_len); in ccm4309_aes_nx_set_key()
|
D | nx-aes-ecb.c | 35 unsigned int key_len) in ecb_aes_nx_set_key() argument 42 switch (key_len) { in ecb_aes_nx_set_key() 60 memcpy(csbcpb->cpb.aes_ecb.key, in_key, key_len); in ecb_aes_nx_set_key()
|
D | nx-aes-cbc.c | 35 unsigned int key_len) in cbc_aes_nx_set_key() argument 42 switch (key_len) { in cbc_aes_nx_set_key() 60 memcpy(csbcpb->cpb.aes_cbc.key, in_key, key_len); in cbc_aes_nx_set_key()
|
/drivers/net/wireless/orinoco/ |
D | wext.c | 31 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 …]
|
/drivers/staging/vt6655/ |
D | wpactl.c | 201 param->u.wpa_key.key_len > MAX_KEY_LEN || in wpa_set_keys() 219 memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len); in wpa_set_keys() 225 param->u.wpa_key.key_len)) { in wpa_set_keys() 245 param->u.wpa_key.key_len, in wpa_set_keys() 305 if (param->u.wpa_key.key_len == MAX_KEY_LEN) in wpa_set_keys() 307 else if (param->u.wpa_key.key_len == WLAN_WEP40_KEYLEN) in wpa_set_keys() 309 else if (param->u.wpa_key.key_len == WLAN_WEP104_KEYLEN) in wpa_set_keys() 312 if (param->u.wpa_key.key_len == WLAN_WEP40_KEYLEN) in wpa_set_keys() 314 else if (param->u.wpa_key.key_len == WLAN_WEP104_KEYLEN) in wpa_set_keys() 320 (param->u.wpa_key.key_len != MAX_KEY_LEN)) { in wpa_set_keys() [all …]
|
D | hostap.c | 426 if ((param->u.crypt.idx > 3) || (param->u.crypt.key_len > MAX_KEY_LEN)) { in hostap_set_encryption() 472 memcpy(abyKey, param->u.crypt.key, param->u.crypt.key_len); in hostap_set_encryption() 475 pMgmt->sNodeDBTable[iNodeIndex].uWepKeyLength = param->u.crypt.key_len; in hostap_set_encryption() 478 param->u.crypt.key_len in hostap_set_encryption() 492 param->u.crypt.key_len, in hostap_set_encryption() 505 param->u.crypt.key_len, in hostap_set_encryption() 538 if (param->u.crypt.key_len != MAX_KEY_LEN) in hostap_set_encryption() 547 if ((param->u.crypt.key_len != AES_KEY_LEN) || in hostap_set_encryption() 559 param->u.crypt.key_len, in hostap_set_encryption() 572 param->u.crypt.key_len, in hostap_set_encryption() [all …]
|
/drivers/staging/lustre/lustre/libcfs/linux/ |
D | linux-crypto.c | 44 unsigned int key_len) in cfs_crypto_hash_alloc() argument 75 err = crypto_hash_setkey(desc->tfm, key, key_len); in cfs_crypto_hash_alloc() 97 unsigned char *key, unsigned int key_len, in cfs_crypto_hash_digest() argument 108 err = cfs_crypto_hash_alloc(alg_id, &type, &hdesc, key, key_len); in cfs_crypto_hash_digest() 129 unsigned char *key, unsigned int key_len) in cfs_crypto_hash_init() argument 140 err = cfs_crypto_hash_alloc(alg_id, &type, hdesc, key, key_len); in cfs_crypto_hash_init()
|
/drivers/crypto/ |
D | ixp4xx_crypto.c | 590 int init_len, u32 ctx_addr, const u8 *key, int key_len) in register_chain_var() argument 615 memcpy(pad, key, key_len); in register_chain_var() 616 memset(pad + key_len, 0, HMAC_PAD_BLOCKLEN - key_len); in register_chain_var() 646 const u8 *key, int key_len, unsigned digest_len) in setup_auth() argument 685 init_len, npe_ctx_addr, key, key_len); in setup_auth() 689 init_len, npe_ctx_addr, key, key_len); in setup_auth() 721 const u8 *key, int key_len) in setup_cipher() argument 740 switch (key_len) { in setup_cipher() 768 memcpy(cinfo, key, key_len); in setup_cipher() 770 if (key_len < DES3_EDE_KEY_SIZE && !(cipher_cfg & MOD_AES)) { in setup_cipher() [all …]
|
D | padlock-aes.c | 74 aes_hw_extkey_available(uint8_t key_len) in aes_hw_extkey_available() argument 79 if (key_len == 16) in aes_hw_extkey_available() 105 unsigned int key_len) in aes_set_key() argument 113 if (key_len % 8) { in aes_set_key() 134 ctx->cword.encrypt.rounds = 10 + (key_len - 16) / 4; in aes_set_key() 136 ctx->cword.encrypt.ksize = (key_len - 16) / 8; in aes_set_key() 140 if (aes_hw_extkey_available(key_len)) in aes_set_key() 147 if (crypto_aes_expand_key(&gen_aes, in_key, key_len)) { in aes_set_key()
|
/drivers/net/wireless/mwifiex/ |
D | sta_cmd.c | 513 key_param_set->key_len = in mwifiex_set_keyparamset_wep() 568 km->key_param_set.key_params.cmac_aes.key_len = in mwifiex_set_aes_key_v2() 569 cpu_to_le16(enc_key->key_len); in mwifiex_set_aes_key_v2() 571 enc_key->key_material, enc_key->key_len); in mwifiex_set_aes_key_v2() 579 km->key_param_set.key_params.aes.key_len = in mwifiex_set_aes_key_v2() 580 cpu_to_le16(enc_key->key_len); in mwifiex_set_aes_key_v2() 582 enc_key->key_material, enc_key->key_len); in mwifiex_set_aes_key_v2() 665 if (enc_key->key_len <= WLAN_KEY_LEN_WEP104) { in mwifiex_cmd_802_11_key_material_v2() 693 km->key_param_set.key_params.wep.key_len = in mwifiex_cmd_802_11_key_material_v2() 694 cpu_to_le16(enc_key->key_len); in mwifiex_cmd_802_11_key_material_v2() [all …]
|
D | sta_ioctl.c | 874 } else if (!encrypt_key->key_len) { in mwifiex_sec_ioctl_set_wep_key() 886 encrypt_key->key_len = wep_key->key_length; in mwifiex_sec_ioctl_set_wep_key() 897 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wep_key() 899 wep_key->key_length = encrypt_key->key_len; in mwifiex_sec_ioctl_set_wep_key() 951 if (encrypt_key->key_len > WLAN_MAX_KEY_LEN) { in mwifiex_sec_ioctl_set_wpa_key() 974 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wpa_key() 975 memcpy(&ibss_key->key_param_set.key_len, &encrypt_key->key_len, in mwifiex_sec_ioctl_set_wpa_key() 976 sizeof(ibss_key->key_param_set.key_len)); in mwifiex_sec_ioctl_set_wpa_key() 1014 else if (encrypt_key->key_len > WLAN_KEY_LEN_WEP104) in mwifiex_sec_ioctl_encrypt_key() 1051 const u8 *key, int key_len, u8 key_index, in mwifiex_set_encode() argument [all …]
|
/drivers/net/wireless/ti/wl18xx/ |
D | cmd.c | 136 u8 key_len, u8 *key) in wl18xx_cmd_smart_config_set_group_key() argument 144 if (key_len != sizeof(cmd->key)) { in wl18xx_cmd_smart_config_set_group_key() 145 wl1271_error("invalid group key size: %d", key_len); in wl18xx_cmd_smart_config_set_group_key() 156 memcpy(cmd->key, key, key_len); in wl18xx_cmd_smart_config_set_group_key()
|
/drivers/staging/skein/ |
D | skein_api.c | 84 int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len, in skein_mac_init() argument 103 (const u8 *)key, key_len); in skein_mac_init() 109 (const u8 *)key, key_len); in skein_mac_init() 114 (const u8 *)key, key_len); in skein_mac_init()
|
/drivers/s390/crypto/ |
D | zcrypt_cca_key.h | 290 int short_len, long_len, pad_len, key_len, size; in zcrypt_type6_crt_key() local 297 key_len = 3*long_len + 2*short_len + pad_len + crt->inputdatalength; in zcrypt_type6_crt_key() 298 size = sizeof(*key) + key_len + sizeof(*pub) + 3; in zcrypt_type6_crt_key() 315 key->pvt.section_length = sizeof(key->pvt) + key_len; in zcrypt_type6_crt_key() 336 pub = (struct cca_public_sec *)(key->key_parts + key_len); in zcrypt_type6_crt_key()
|
/drivers/staging/rtl8723au/os_dep/ |
D | ioctl_cfg80211.c | 456 memcpy(&psetkeyparm->key, parms->key, parms->key_len); in set_group_key() 475 int key_len; in rtw_cfg80211_ap_set_encryption() local 493 key_len = keyparms->key_len; in rtw_cfg80211_ap_set_encryption() 500 key_index, key_len); in rtw_cfg80211_ap_set_encryption() 515 keyparms->key, key_len); in rtw_cfg80211_ap_set_encryption() 517 psecuritypriv->wep_key[key_index].keylen = key_len; in rtw_cfg80211_ap_set_encryption() 532 keyparms->key, key_len); in rtw_cfg80211_ap_set_encryption() 546 (key_len > 16 ? 16 : key_len)); in rtw_cfg80211_ap_set_encryption() 568 (key_len > 16 ? 16 : key_len)); in rtw_cfg80211_ap_set_encryption() 606 keyparms->key, (key_len > 16 ? 16 : key_len)); in rtw_cfg80211_ap_set_encryption() [all …]
|
/drivers/staging/rtl8188eu/os_dep/ |
D | ioctl_linux.c | 364 if (param_len < (u32) ((u8 *)param->u.crypt.key - (u8 *)param) + param->u.crypt.key_len) { in wpa_set_encryption() 390 wep_key_len = param->u.crypt.key_len; in wpa_set_encryption() 456 …1x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)… in wpa_set_encryption() 468 ….crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len)… in wpa_set_encryption() 1895 param_len = sizeof(struct ieee_param) + pext->key_len; in rtw_wx_set_enc_ext() 1942 if (pext->key_len) { in rtw_wx_set_enc_ext() 1943 param->u.crypt.key_len = pext->key_len; in rtw_wx_set_enc_ext() 1944 memcpy(param->u.crypt.key, pext + 1, pext->key_len); in rtw_wx_set_enc_ext() 2236 if (param_len != sizeof(struct ieee_param) + param->u.crypt.key_len) { in rtw_set_encryption() 2264 wep_key_len = param->u.crypt.key_len; in rtw_set_encryption() [all …]
|
/drivers/staging/lustre/include/linux/libcfs/ |
D | libcfs_crypto.h | 131 unsigned char *key, unsigned int key_len, 147 unsigned char *key, unsigned int key_len);
|