亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? test_tkip.c

?? Linux下wifi實現(xiàn)
?? C
字號:
/*- * Copyright (c) 2004 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $Id: test_tkip.c 1426 2006-02-01 20:07:11Z mrenzmann $ *//* * TKIP test module. */#include <linux/config.h>#include <linux/version.h>#include <linux/module.h>#include <linux/init.h>#include <linux/skbuff.h>#include <linux/netdevice.h>#include "if_media.h"#include <net80211/ieee80211_var.h>/*Key	12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12	34 56 78 90 12 34 56 78 90 12 34 56 78 90 12 34PN	0x000000000001IV	00 20 01 20 00 00 00 00Phase1	bb 58 07 1f 9e 93 b4 38 25 4bPhase2	00 20 01 4c fe 67 be d2 7c 86 7b 1b f8 02 8b 1c */static const u_int8_t ref_key[] = {	0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12,	0x34, 0x56, 0x78, 0x90, 0x12,	0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78,		/* TX MIC */	/*	 * NB: 11i test vector specifies a RX MIC key different	 *     from the TX key.  But this doesn't work to enmic,	 *     encrypt, then decrypt, demic.  So instead we use	 *     the same key for doing the MIC in each direction.	 *	 * XXX need additional vectors to test alternate MIC keys	 */#if 0	0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34,		/* 11i RX MIC */#else	0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78,		/* TX copy */#endif};static const u_int8_t ref_phase1[] = {	0xbb, 0x58, 0x07, 0x1f, 0x9e, 0x93, 0xb4, 0x38, 0x25, 0x4b};static const u_int8_t ref_phase2[] = {	0x00, 0x20, 0x01, 0x4c, 0xfe, 0x67, 0xbe, 0xd2, 0x7c, 0x86,	0x7b, 0x1b, 0xf8, 0x02, 0x8b, 0x1c, };/* Plaintext MPDU with MIC */static const u_int8_t ref_plaintext[] = {0x08,0x42,0x2c,0x00,0x02,0x03,0x04,0x05,0x06,0x08,0x02,0x03,0x04,0x05,0x06,0x07,0x02,0x03,0x04,0x05,0x06,0x07,0xd0,0x02,0xaa,0xaa,0x03,0x00,0x00,0x00,0x08,0x00,0x45,0x00,0x00,0x54,0x00,0x00,0x40,0x00,0x40,0x01,0xa5,0x55,0xc0,0xa8,0x0a,0x02,0xc0,0xa8,0x0a,0x01,0x08,0x00,0x3a,0xb0,0x00,0x00,0x00,0x00,0xcd,0x4c,0x05,0x00,0x00,0x00,0x00,0x00,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,/* MIC */ 0x68,0x81,0xa3,0xf3,0xd6,0x48,0xd0,0x3c};/* Encrypted MPDU with MIC and ICV */static const u_int8_t ref_encrypted[] = {0x08,0x42,0x2c,0x00,0x02,0x03,0x04,0x05,0x06,0x08,0x02,0x03,0x04,0x05,0x06,0x07,0x02,0x03,0x04,0x05,0x06,0x07,0xd0,0x02,0x00,0x20,0x01,0x20,0x00,0x00,0x00,0x00,0xc0,0x0e,0x14,0xfc,0xe7,0xcf,0xab,0xc7,0x75,0x47,0xe6,0x66,0xe5,0x7c,0x0d,0xac,0x70,0x4a,0x1e,0x35,0x8a,0x88,0xc1,0x1c,0x8e,0x2e,0x28,0x2e,0x38,0x01,0x02,0x7a,0x46,0x56,0x05,0x5e,0xe9,0x3e,0x9c,0x25,0x47,0x02,0xe9,0x73,0x58,0x05,0xdd,0xb5,0x76,0x9b,0xa7,0x3f,0x1e,0xbb,0x56,0xe8,0x44,0xef,0x91,0x22,0x85,0xd3,0xdd,0x6e,0x54,0x1e,0x82,0x38,0x73,0x55,0x8a,0xdb,0xa0,0x79,0x06,0x8a,0xbd,0x7f,0x7f,0x50,0x95,0x96,0x75,0xac,0xc4,0xb4,0xde,0x9a,0xa9,0x9c,0x05,0xf2,0x89,0xa7,0xc5,0x2f,0xee,0x5b,0xfc,0x14,0xf6,0xf8,0xe5,0xf8};struct tkip_ctx {	struct ieee80211com *tc_ic;	/* for diagnostics */	u16	tx_ttak[5];	int	tx_phase1_done;	u8	tx_rc4key[16];	u16	rx_ttak[5];	int	rx_phase1_done;	u8	rx_rc4key[16];	u_int64_t rx_rsc;		/* held until MIC verified */};static voiddumpdata(const char *tag, const void *p, size_t len){	int i;	printk("%s: 0x%p len %u", tag, p, len);	for (i = 0; i < len; i++) {		if ((i % 16) == 0)			printk("\n%03d:", i);		printk(" %02x", ((u_int8_t *)p)[i]);	}	printk("\n");}static voidcmpfail(const void *gen, size_t genlen, const void *ref, size_t reflen){	int i;	for (i = 0; i < genlen; i++)		if (((u_int8_t *)gen)[i] != ((u_int8_t *)ref)[i]) {			printk("first difference at byte %u\n", i);			break;		}	dumpdata("Generated", gen, genlen);	dumpdata("Reference", ref, reflen);}voidtkip_test(struct ieee80211com *ic){	struct tkip_ctx *ctx;	struct ieee80211_key key;	struct sk_buff *skb = NULL;	const struct ieee80211_cipher *cip;	u_int8_t mac[IEEE80211_ADDR_LEN];	/*	 * Setup key.	 */	memset(&key, 0, sizeof(key));	key.wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV;	key.wk_cipher = &ieee80211_cipher_none;	if (!ieee80211_crypto_newkey(ic, IEEE80211_CIPHER_TKIP, &key)) {		printk("ieee80211_crypto_newkey failed\n");		goto bad;	}	memcpy(key.wk_key, ref_key, sizeof(ref_key));	key.wk_keylen = 128 / NBBY;	key.wk_keyrsc = 0;	key.wk_keytsc = 0;	if (!ieee80211_crypto_setkey(ic, &key, mac)) {		printk("ieee80211_crypto_setkey failed\n");		goto bad;	}	/*	 * Craft frame from plaintext data.  Note that	 * we leave the MIC off as we'll add it ourself	 * and then check it against the reference data.	 */	cip = key.wk_cipher;	skb = dev_alloc_skb(sizeof(ref_plaintext) +		cip->ic_miclen + cip->ic_header + cip->ic_trailer);	if (skb == NULL) {		printk("unable to allocate skbuff\n");		goto bad;	}	skb_reserve(skb, cip->ic_header);	memcpy(skb_put(skb, sizeof(ref_plaintext) - cip->ic_miclen),		ref_plaintext, sizeof(ref_plaintext) - cip->ic_miclen);	/*	 * Add MIC.	 */	if (!ieee80211_crypto_enmic(ic, &key, skb)) {		printk("tkip enmic failed\n");		goto bad;	}	/*	 * Verify: frame length, frame contents.	 */	if (skb->len != sizeof(ref_plaintext)) {		printk("enmic botch; length mismatch\n");		cmpfail(skb->data, skb->len,			ref_plaintext, sizeof(ref_plaintext));		goto bad;	}	if (memcmp(skb->data, ref_plaintext, sizeof(ref_plaintext))) {		printk("enmic botch\n");		cmpfail(skb->data, skb->len,			ref_plaintext, sizeof(ref_plaintext));		goto bad;	}	/*	 * Encrypt frame w/ MIC.	 */	if (!(*cip->ic_encap)(&key, skb, 0 << 6)) {		printk("tkip encap failed\n");		goto bad;	}	/*	 * Verify: phase1, phase2, frame length, frame contents.	 */	ctx = key.wk_private;	if (memcmp(ctx->tx_ttak, ref_phase1, sizeof(ref_phase1))) {		printk("encrypt phase1 botch\n");		cmpfail(ctx->tx_ttak, sizeof(ctx->tx_ttak),			ref_phase1, sizeof(ref_phase1));		goto bad;	} else if (memcmp(ctx->tx_rc4key, ref_phase2, sizeof(ref_phase2))) {		printf("encrypt phase2 botch\n");		cmpfail(ctx->tx_rc4key, sizeof(ctx->tx_rc4key),			ref_phase2, sizeof(ref_phase2));		goto bad;	} else if (skb->len != sizeof(ref_encrypted)) {		printk("encrypt data length mismatch\n");		cmpfail(skb->data, skb->len,			ref_encrypted, sizeof(ref_encrypted));		goto bad;	} else if (memcmp(skb->data, ref_encrypted, skb->len)) {		printk("encrypt data does not compare\n");		cmpfail(skb->data, skb->len,			ref_encrypted, sizeof(ref_encrypted));		dumpdata("Plaintext", ref_plaintext, sizeof(ref_plaintext));		goto bad;	}	/*	 * Decrypt frame.	 */	if (!(*cip->ic_decap)(&key, skb)) {		printk("tkip decap failed\n");		/*		 * Check reason for failure: phase1, phase2, frame data (ICV).		 */		if (memcmp(ctx->rx_ttak, ref_phase1, sizeof(ref_phase1))) {			printk("decrypt phase1 botch\n");			cmpfail(ctx->rx_ttak, sizeof(ctx->rx_ttak),				ref_phase1, sizeof(ref_phase1));		} else if (memcmp(ctx->rx_rc4key, ref_phase2, sizeof(ref_phase2))) {			printf("decrypt phase2 botch\n");			cmpfail(ctx->rx_rc4key, sizeof(ctx->rx_rc4key),				ref_phase2, sizeof(ref_phase2));		} else {			printk("decrypt data does not compare\n");			cmpfail(skb->data, skb->len,				ref_plaintext, sizeof(ref_plaintext));		}		goto bad;	}	/*	 * Verify: frame length, frame contents.	 */	if (skb->len != sizeof(ref_plaintext)) {		printk("decap botch; length mismatch\n");		cmpfail(skb->data, skb->len,			ref_plaintext, sizeof(ref_plaintext));		goto bad;	}	if (memcmp(skb->data, ref_plaintext, sizeof(ref_plaintext))) {		printk("decap botch; data does not compare\n");		cmpfail(skb->data, skb->len,			ref_plaintext, sizeof(ref_plaintext));		goto bad;	}	/*	 * De-MIC decrypted frame.	 */	if (!ieee80211_crypto_demic(ic, &key, skb)) {		printk("tkip demic failed\n");		goto bad;	}	/* XXX check frame length and contents... */	printk("802.11i TKIP test vectors passed\n");bad:	if (skb != NULL)		dev_kfree_skb(skb);	ieee80211_crypto_delkey(ic, &key);}/* * Module glue. */MODULE_AUTHOR("Errno Consulting, Sam Leffler");MODULE_DESCRIPTION("802.11 wireless support: TKIP cipher tester");#ifdef MODULE_LICENSEMODULE_LICENSE("Dual BSD/GPL");#endifstatic int debug = 0;MODULE_PARM(debug, "i");MODULE_PARM_DESC(debug, "Enable IEEE80211_MSG_CRYPTO");static int __initinit_crypto_tkip_test(void){	struct ieee80211com ic;	memset(&ic, 0, sizeof(ic));	if (debug)		ic.msg_enable = IEEE80211_MSG_CRYPTO;	ieee80211_crypto_attach(&ic);	tkip_test(&ic);	ieee80211_crypto_detach(&ic);	return 0;}module_init(init_crypto_tkip_test);static void __exitexit_crypto_tkip_test(void){}module_exit(exit_crypto_tkip_test);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲国产一区二区三区va| 91一区二区在线| 一区二区三区在线观看网站| 久久久久久黄色| 久久尤物电影视频在线观看| 欧美人与性动xxxx| 在线精品视频免费播放| 成人免费观看视频| 高清不卡一区二区| 国产成人自拍在线| 国产69精品久久久久777| 国产一区二区三区四| 日韩高清不卡一区二区三区| 日本成人超碰在线观看| 卡一卡二国产精品| 国产成人av福利| 91免费版在线看| 欧美日韩1区2区| 欧美一区二区三区男人的天堂| 欧美一区2区视频在线观看| 在线看国产一区二区| 色综合久久久久网| 欧美久久久久久久久中文字幕| 欧美一二区视频| 国产欧美一区二区三区沐欲| 欧美日韩视频专区在线播放| 欧美精品久久天天躁| 欧美男人的天堂一二区| 久久久夜色精品亚洲| 17c精品麻豆一区二区免费| 午夜精品在线视频一区| 久久er99精品| av激情成人网| 日韩小视频在线观看专区| 久久亚洲春色中文字幕久久久| 亚洲三级在线播放| 热久久一区二区| 成人18视频日本| 7777精品伊人久久久大香线蕉| 国产欧美日韩激情| 日本vs亚洲vs韩国一区三区二区| 国产在线国偷精品产拍免费yy| 成人免费黄色在线| 欧美成人a∨高清免费观看| 国产欧美一区视频| 男女激情视频一区| 色系网站成人免费| 国产亚洲综合av| 午夜电影一区二区三区| 成人妖精视频yjsp地址| 日韩精品在线一区二区| 国产精品看片你懂得| 日本 国产 欧美色综合| 91免费看`日韩一区二区| 久久久91精品国产一区二区精品| 亚洲色图另类专区| 国产毛片精品一区| 日韩午夜av电影| 亚洲国产综合在线| 成人高清免费在线播放| 欧美精品乱码久久久久久| 一区二区三区四区精品在线视频| 成人精品亚洲人成在线| 国产色一区二区| 极品少妇xxxx精品少妇偷拍| 欧美日韩精品欧美日韩精品| 中文字幕在线不卡一区| 粉嫩一区二区三区性色av| 久久综合九色综合欧美亚洲| 日韩激情视频网站| 欧美久久久久久久久久| 一区二区不卡在线视频 午夜欧美不卡在| 九九热在线视频观看这里只有精品| 精品视频一区 二区 三区| 亚洲天堂2014| 国产成人综合自拍| 精品国产免费一区二区三区香蕉| 午夜一区二区三区在线观看| 色综合天天综合网天天狠天天| 久久女同精品一区二区| 天天色综合成人网| 欧美一区二区在线免费播放| 日精品一区二区三区| 欧美日韩精品免费| 日韩不卡免费视频| 精品久久人人做人人爽| 国产一区二区调教| 国产三级一区二区| 色综合网站在线| 亚洲午夜久久久久久久久电影院| www.一区二区| 亚洲一区二区三区在线播放| 欧美日韩一级黄| 美国欧美日韩国产在线播放| 2020国产精品| av午夜精品一区二区三区| 国产精品传媒入口麻豆| 日本韩国一区二区三区视频| 五月激情综合婷婷| 精品成人在线观看| www..com久久爱| 亚洲免费av在线| 欧美一区二区人人喊爽| 国产91精品精华液一区二区三区 | 日本不卡高清视频| 日韩欧美综合一区| 成人午夜av电影| 亚洲欧洲制服丝袜| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲bdsm女犯bdsm网站| 久久综合九色综合欧美就去吻| proumb性欧美在线观看| 欧美bbbbb| 国产精品白丝在线| 制服丝袜av成人在线看| 粉嫩一区二区三区性色av| 亚洲蜜臀av乱码久久精品| 久久色.com| 欧美久久久久久久久中文字幕| 蜜桃av噜噜一区| 亚洲女人****多毛耸耸8| 日韩欧美一级二级三级| 日本乱人伦aⅴ精品| 国产成人在线视频网址| 午夜免费久久看| 亚洲色图欧洲色图| 国产日韩精品视频一区| 7777精品伊人久久久大香线蕉| 99精品视频中文字幕| 国产永久精品大片wwwapp| 亚洲第一精品在线| 国产精品久久久久久久久久免费看| 日韩欧美成人午夜| 欧美日韩精品久久久| 91蝌蚪porny| 国产成人在线视频网站| 美女精品一区二区| 丝袜亚洲另类欧美综合| 亚洲欧美偷拍卡通变态| 国产精品区一区二区三区| 久久网站最新地址| 91精品免费在线| 欧美日韩一区二区在线观看| 99久久婷婷国产综合精品| 成人激情免费电影网址| 国产在线视频精品一区| 美腿丝袜亚洲综合| 日韩中文字幕麻豆| 午夜不卡在线视频| 亚洲国产美女搞黄色| 亚洲一区二区三区美女| 一区二区三区高清在线| 亚洲精品一二三区| 一区二区激情视频| 午夜精品福利一区二区三区蜜桃| 一区二区三区在线视频播放| 亚洲啪啪综合av一区二区三区| 国产精品美女久久久久久2018 | 91精品国产91久久综合桃花| 欧美午夜视频网站| 欧美日韩国产小视频在线观看| 色婷婷国产精品综合在线观看| 成人av资源站| 99久久精品国产一区二区三区 | 卡一卡二国产精品 | 裸体健美xxxx欧美裸体表演| 热久久国产精品| 国产福利一区二区三区视频| 国产91在线看| 91九色最新地址| 欧美一级夜夜爽| 国产日韩精品一区二区三区| 亚洲视频小说图片| 丝袜诱惑亚洲看片| 国产精品一区二区久激情瑜伽 | 麻豆精品在线看| 国产精品资源网站| 99精品热视频| 欧美酷刑日本凌虐凌虐| 日韩免费看的电影| 精品美女在线观看| 亚洲青青青在线视频| 日日夜夜精品视频天天综合网| 久久99久久99小草精品免视看| 国产福利电影一区二区三区| 色一情一乱一乱一91av| 欧美一区二区三区在线电影 | 在线91免费看| 欧美精品一区二区三| 日韩毛片视频在线看| 视频精品一区二区| 国产原创一区二区三区| 色老汉av一区二区三区| 精品久久免费看| 亚洲欧美乱综合| 国产一区中文字幕| 在线观看免费亚洲| 国产情人综合久久777777| 亚洲综合清纯丝袜自拍| 国产精品影音先锋|