/linux-2.6.39/drivers/staging/wlan-ng/ |
D | p80211wep.c | 123 int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) in wep_change_key() argument 125 if (keylen < 0) in wep_change_key() 127 if (keylen >= MAX_KEYLEN) in wep_change_key() 139 keynum, keylen, key[0], key[1], key[2], key[3], key[4], key[5], in wep_change_key() 143 wlandev->wep_keylens[keynum] = keylen; in wep_change_key() 144 memcpy(wlandev->wep_keys[keynum], key, keylen); in wep_change_key() 156 u32 i, j, k, crc, keylen; in wep_decrypt() local 176 keylen = wlandev->wep_keylens[keyidx]; in wep_decrypt() 178 if (keylen == 0) in wep_decrypt() 182 memcpy(key + 3, wlandev->wep_keys[keyidx], keylen); in wep_decrypt() [all …]
|
/linux-2.6.39/fs/cachefiles/ |
D | key.c | 37 char *cachefiles_cook_key(const u8 *raw, int keylen, uint8_t type) in cachefiles_cook_key() argument 44 _enter(",%d", keylen); in cachefiles_cook_key() 46 BUG_ON(keylen < 2 || keylen > 514); in cachefiles_cook_key() 50 for (loop = 2; loop < keylen; loop++) { in cachefiles_cook_key() 58 max = keylen - 2; in cachefiles_cook_key() 67 keylen = (keylen + 2) / 3; in cachefiles_cook_key() 69 max = keylen * 4; in cachefiles_cook_key() 102 for (loop = keylen; loop > 0; loop--) { in cachefiles_cook_key() 121 for (loop = keylen; loop > 0; loop--) { in cachefiles_cook_key()
|
D | interface.c | 37 unsigned keylen, auxlen; in cachefiles_alloc_object() local 71 keylen = cookie->def->get_key(cookie->netfs_data, buffer + 2, 512); in cachefiles_alloc_object() 72 ASSERTCMP(keylen, <, 512); in cachefiles_alloc_object() 74 *(uint16_t *)buffer = keylen; in cachefiles_alloc_object() 75 ((char *)buffer)[keylen + 2] = 0; in cachefiles_alloc_object() 76 ((char *)buffer)[keylen + 3] = 0; in cachefiles_alloc_object() 77 ((char *)buffer)[keylen + 4] = 0; in cachefiles_alloc_object() 80 key = cachefiles_cook_key(buffer, keylen + 2, object->type); in cachefiles_alloc_object()
|
/linux-2.6.39/fs/hfsplus/ |
D | bfind.c | 45 u16 off, len, keylen; in __hfs_brec_find() local 56 keylen = hfs_brec_keylen(bnode, rec); in __hfs_brec_find() 57 if (keylen == 0) { in __hfs_brec_find() 61 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find() 75 keylen = hfs_brec_keylen(bnode, e); in __hfs_brec_find() 76 if (keylen == 0) { in __hfs_brec_find() 80 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find() 85 fd->keylength = keylen; in __hfs_brec_find() 86 fd->entryoffset = off + keylen; in __hfs_brec_find() 87 fd->entrylength = len - keylen; in __hfs_brec_find() [all …]
|
/linux-2.6.39/fs/hfs/ |
D | bfind.c | 43 u16 off, len, keylen; in __hfs_brec_find() local 54 keylen = hfs_brec_keylen(bnode, rec); in __hfs_brec_find() 55 if (keylen == 0) { in __hfs_brec_find() 59 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find() 73 keylen = hfs_brec_keylen(bnode, e); in __hfs_brec_find() 74 if (keylen == 0) { in __hfs_brec_find() 78 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find() 83 fd->keylength = keylen; in __hfs_brec_find() 84 fd->entryoffset = off + keylen; in __hfs_brec_find() 85 fd->entrylength = len - keylen; in __hfs_brec_find() [all …]
|
/linux-2.6.39/crypto/ |
D | cipher.c | 24 unsigned int keylen) in setkey_unaligned() argument 32 absize = keylen + alignmask; in setkey_unaligned() 38 memcpy(alignbuffer, key, keylen); in setkey_unaligned() 39 ret = cia->cia_setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 40 memset(alignbuffer, 0, keylen); in setkey_unaligned() 46 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument 52 if (keylen < cia->cia_min_keysize || keylen > cia->cia_max_keysize) { in setkey() 58 return setkey_unaligned(tfm, key, keylen); in setkey() 60 return cia->cia_setkey(tfm, key, keylen); in setkey()
|
D | hmac.c | 45 const u8 *inkey, unsigned int keylen) in hmac_setkey() argument 65 if (keylen > bs) { in hmac_setkey() 68 err = crypto_shash_digest(&desc.shash, inkey, keylen, ipad); in hmac_setkey() 72 keylen = ds; in hmac_setkey() 74 memcpy(ipad, inkey, keylen); in hmac_setkey() 76 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
|
D | shash.c | 26 unsigned int keylen) in shash_no_setkey() argument 32 unsigned int keylen) in shash_setkey_unaligned() argument 40 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned() 46 memcpy(alignbuffer, key, keylen); in shash_setkey_unaligned() 47 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 53 unsigned int keylen) in crypto_shash_setkey() argument 59 return shash_setkey_unaligned(tfm, key, keylen); in crypto_shash_setkey() 61 return shash->setkey(tfm, key, keylen); in crypto_shash_setkey() 199 unsigned int keylen) in shash_async_setkey() argument 203 return crypto_shash_setkey(*ctx, key, keylen); in shash_async_setkey() [all …]
|
D | blowfish.c | 401 static int bf_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in bf_setkey() argument 421 ((u32)key[(j + 1) % keylen] << 16) | in bf_setkey() 422 ((u32)key[(j + 2) % keylen] << 8) | in bf_setkey() 423 ((u32)key[(j + 3) % keylen])); in bf_setkey() 426 j = (j + 4) % keylen; in bf_setkey()
|
D | blkcipher.c | 360 unsigned int keylen) in setkey_unaligned() argument 368 absize = keylen + alignmask; in setkey_unaligned() 374 memcpy(alignbuffer, key, keylen); in setkey_unaligned() 375 ret = cipher->setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 376 memset(alignbuffer, 0, keylen); in setkey_unaligned() 381 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument 386 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) { in setkey() 392 return setkey_unaligned(tfm, key, keylen); in setkey() 394 return cipher->setkey(tfm, key, keylen); in setkey() 398 unsigned int keylen) in async_setkey() argument [all …]
|
D | ahash.c | 148 unsigned int keylen) in ahash_setkey_unaligned() argument 155 absize = keylen + alignmask; in ahash_setkey_unaligned() 161 memcpy(alignbuffer, key, keylen); in ahash_setkey_unaligned() 162 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned() 168 unsigned int keylen) in crypto_ahash_setkey() argument 173 return ahash_setkey_unaligned(tfm, key, keylen); in crypto_ahash_setkey() 175 return tfm->setkey(tfm, key, keylen); in crypto_ahash_setkey() 180 unsigned int keylen) in ahash_nosetkey() argument
|
/linux-2.6.39/net/mac80211/ |
D | wep.c | 59 static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) in ieee80211_wep_weak_iv() argument 68 if (B >= 3 && B < 3 + keylen) in ieee80211_wep_weak_iv() 76 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument 79 if (ieee80211_wep_weak_iv(local->wep_iv, keylen)) in ieee80211_wep_get_iv() 94 int keylen, int keyidx) in ieee80211_wep_add_iv() argument 109 ieee80211_wep_get_iv(local, keylen, keyidx, newhdr + hdrlen); in ieee80211_wep_add_iv() 160 const u8 *key, int keylen, int keyidx) in ieee80211_wep_encrypt() argument 166 iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); in ieee80211_wep_encrypt() 176 memcpy(rc4key + 3, key, keylen); in ieee80211_wep_encrypt() 181 return ieee80211_wep_encrypt_data(local->wep_tx_tfm, rc4key, keylen + 3, in ieee80211_wep_encrypt() [all …]
|
/linux-2.6.39/fs/befs/ |
D | btree.c | 114 int index, u16 * keylen); 341 u16 keylen; in befs_find_key() local 354 thiskey = befs_bt_get_key(sb, node, last, &keylen); in befs_find_key() 356 eq = befs_compare_strings(thiskey, keylen, findkey, findkey_len); in befs_find_key() 371 thiskey = befs_bt_get_key(sb, node, mid, &keylen); in befs_find_key() 372 eq = befs_compare_strings(thiskey, keylen, findkey, in befs_find_key() 426 u16 keylen; in befs_btree_read() local 494 keystart = befs_bt_get_key(sb, this_node, cur_key, &keylen); in befs_btree_read() 496 befs_debug(sb, "Read [%Lu,%d]: keysize %d", node_off, cur_key, keylen); in befs_btree_read() 498 if (bufsize < keylen + 1) { in befs_btree_read() [all …]
|
/linux-2.6.39/drivers/staging/rtl8192e/ieee80211/ |
D | rtl_crypto.h | 76 unsigned int keylen, u32 *flags); 87 unsigned int keylen, u32 *flags); 142 const u8 *key, unsigned int keylen); 170 const u8 *key, unsigned int keylen); 302 const u8 *key, unsigned int keylen) in crypto_digest_setkey() argument 307 return tfm->crt_digest.dit_setkey(tfm, key, keylen); in crypto_digest_setkey() 311 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() argument 314 return tfm->crt_cipher.cit_setkey(tfm, key, keylen); in crypto_cipher_setkey() 389 void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen); 393 unsigned int *keylen, u8 *out); [all …]
|
/linux-2.6.39/drivers/staging/rtl8192u/ieee80211/ |
D | rtl_crypto.h | 76 unsigned int keylen, u32 *flags); 87 unsigned int keylen, u32 *flags); 142 const u8 *key, unsigned int keylen); 170 const u8 *key, unsigned int keylen); 302 const u8 *key, unsigned int keylen) in crypto_digest_setkey() argument 307 return tfm->crt_digest.dit_setkey(tfm, key, keylen); in crypto_digest_setkey() 311 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() argument 314 return tfm->crt_cipher.cit_setkey(tfm, key, keylen); in crypto_cipher_setkey() 389 void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen); 393 unsigned int *keylen, u8 *out); [all …]
|
/linux-2.6.39/drivers/crypto/amcc/ |
D | crypto4xx_alg.c | 105 unsigned int keylen, in crypto4xx_setkey_aes() argument 114 if (keylen != AES_KEYSIZE_256 && in crypto4xx_setkey_aes() 115 keylen != AES_KEYSIZE_192 && keylen != AES_KEYSIZE_128) { in crypto4xx_setkey_aes() 125 rc = crypto4xx_alloc_sa(ctx, SA_AES128_LEN + (keylen-16) / 4); in crypto4xx_setkey_aes() 153 key, keylen); in crypto4xx_setkey_aes() 154 sa->sa_contents = SA_AES_CONTENTS | (keylen << 2); in crypto4xx_setkey_aes() 155 sa->sa_command_1.bf.key_len = keylen >> 3; in crypto4xx_setkey_aes() 170 const u8 *key, unsigned int keylen) in crypto4xx_setkey_aes_cbc() argument 172 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
|
/linux-2.6.39/drivers/net/ |
D | ppp_mppe.c | 103 unsigned keylen; /* key length in bytes */ member 145 nbytes = setup_sg(&sg[0], state->master_key, state->keylen); in get_new_key_from_sha() 148 nbytes += setup_sg(&sg[2], state->session_key, state->keylen); in get_new_key_from_sha() 170 state->keylen); in mppe_rekey() 173 setup_sg(sg_in, state->sha1_digest, state->keylen); in mppe_rekey() 174 setup_sg(sg_out, state->session_key, state->keylen); in mppe_rekey() 176 state->keylen) != 0) { in mppe_rekey() 180 memcpy(state->session_key, state->sha1_digest, state->keylen); in mppe_rekey() 182 if (state->keylen == 8) { in mppe_rekey() 188 crypto_blkcipher_setkey(state->arc4, state->session_key, state->keylen); in mppe_rekey() [all …]
|
/linux-2.6.39/arch/powerpc/boot/ |
D | planetcore.c | 43 int keylen = strlen(key); in planetcore_get_key() local 46 if (!strncmp(table, key, keylen) && table[keylen] == '=') in planetcore_get_key() 47 return table + keylen + 1; in planetcore_get_key()
|
/linux-2.6.39/drivers/net/wireless/iwlegacy/ |
D | iwl-4965-sta.c | 227 if (keyconf->keylen != WEP_KEY_LEN_128 && in iwl4965_set_default_wep_key() 228 keyconf->keylen != WEP_KEY_LEN_64) { in iwl4965_set_default_wep_key() 229 IWL_DEBUG_WEP(priv, "Bad WEP key length %d\n", keyconf->keylen); in iwl4965_set_default_wep_key() 237 ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; in iwl4965_set_default_wep_key() 239 keyconf->keylen); in iwl4965_set_default_wep_key() 243 keyconf->keylen, keyconf->keyidx, ret); in iwl4965_set_default_wep_key() 265 if (keyconf->keylen == WEP_KEY_LEN_128) in iwl4965_set_wep_dynamic_key_info() 274 priv->stations[sta_id].keyinfo.keylen = keyconf->keylen; in iwl4965_set_wep_dynamic_key_info() 278 keyconf->key, keyconf->keylen); in iwl4965_set_wep_dynamic_key_info() 281 keyconf->key, keyconf->keylen); in iwl4965_set_wep_dynamic_key_info() [all …]
|
/linux-2.6.39/fs/cifs/ |
D | cache.c | 233 uint16_t keylen; in cifs_fscache_inode_get_key() local 236 keylen = sizeof(cifsi->uniqueid); in cifs_fscache_inode_get_key() 237 if (keylen > maxbuf) in cifs_fscache_inode_get_key() 238 keylen = 0; in cifs_fscache_inode_get_key() 240 memcpy(buffer, &cifsi->uniqueid, keylen); in cifs_fscache_inode_get_key() 242 return keylen; in cifs_fscache_inode_get_key()
|
/linux-2.6.39/lib/ |
D | btree.c | 52 int keylen; member 58 .keylen = 1, 66 .keylen = LONG_PER_U64, 73 .keylen = 2 * LONG_PER_U64, 140 for (i = geo->keylen - 1; i >= 0; i--) { in dec_key() 150 return &node[n * geo->keylen]; in bkey() 161 longcpy(bkey(geo, node, n), key, geo->keylen); in setkey() 172 longset(bkey(geo, node, n), 0, geo->keylen); in clearpair() 218 longcpy(key, bkey(geo, node, 0), geo->keylen); in btree_last() 226 return longcmp(bkey(geo, node, pos), key, geo->keylen); in keycmp() [all …]
|
/linux-2.6.39/drivers/net/wireless/iwlwifi/ |
D | iwl-agn-sta.c | 223 if (keyconf->keylen != WEP_KEY_LEN_128 && in iwl_set_default_wep_key() 224 keyconf->keylen != WEP_KEY_LEN_64) { in iwl_set_default_wep_key() 225 IWL_DEBUG_WEP(priv, "Bad WEP key length %d\n", keyconf->keylen); in iwl_set_default_wep_key() 233 ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; in iwl_set_default_wep_key() 235 keyconf->keylen); in iwl_set_default_wep_key() 239 keyconf->keylen, keyconf->keyidx, ret); in iwl_set_default_wep_key() 261 if (keyconf->keylen == WEP_KEY_LEN_128) in iwl_set_wep_dynamic_key_info() 270 priv->stations[sta_id].keyinfo.keylen = keyconf->keylen; in iwl_set_wep_dynamic_key_info() 274 keyconf->key, keyconf->keylen); in iwl_set_wep_dynamic_key_info() 277 keyconf->key, keyconf->keylen); in iwl_set_wep_dynamic_key_info() [all …]
|
/linux-2.6.39/include/linux/ |
D | crypto.h | 193 unsigned int keylen); 208 unsigned int keylen); 223 unsigned int keylen); 242 unsigned int keylen); 322 unsigned int keylen); 336 unsigned int keylen); 352 unsigned int keylen); 361 const u8 *key, unsigned int keylen); 374 unsigned int keylen); 640 const u8 *key, unsigned int keylen) in crypto_ablkcipher_setkey() argument [all …]
|
/linux-2.6.39/fs/fscache/ |
D | object-list.c | 170 uint16_t keylen, auxlen; in fscache_objlist_show() local 254 keylen = auxlen = 0; in fscache_objlist_show() 280 keylen = obj->cookie->def->get_key( in fscache_objlist_show() 288 buf + keylen, 512 - keylen); in fscache_objlist_show() 294 if (!no_cookie && (keylen > 0 || auxlen > 0)) { in fscache_objlist_show() 296 for (p = buf; keylen > 0; keylen--) in fscache_objlist_show()
|
/linux-2.6.39/drivers/isdn/mISDN/ |
D | dsp_blowfish.c | 599 dsp_bf_init(struct dsp *dsp, const u8 *key, uint keylen) in dsp_bf_init() argument 606 if (keylen < 4 || keylen > 56) in dsp_bf_init() 634 ((u32)key[(j + 1) % keylen] << 16) | in dsp_bf_init() 635 ((u32)key[(j + 2) % keylen] << 8) | in dsp_bf_init() 636 ((u32)key[(j + 3) % keylen])); in dsp_bf_init() 639 j = (j + 4) % keylen; in dsp_bf_init()
|