当前位置: 首页 > news >正文

php做的网站安全吗网络营销在哪里学比较靠谱

php做的网站安全吗,网络营销在哪里学比较靠谱,找事做搜索网站,h5网站建设价格关于Wi-Fi的加密认证过程,可以参考如下链接,今天我们来理解如何生成GTK。 WLAN数据加密机制_tls加密wifi-CSDN博客 1 GTK GTK(Group Temporal Key)是由AP通过GMK生成,长度为128位,并在四次握手的第三步中…

关于Wi-Fi的加密认证过程,可以参考如下链接,今天我们来理解如何生成GTK。

WLAN数据加密机制_tls加密wifi-CSDN博客

1 GTK

GTK(Group Temporal Key)是由AP通过GMK生成,长度为128位,并在四次握手的第三步中通过加密的方式发送给STA。具体步骤如下:

  • GTK生成:AP生成一个新的GTK。这个GTK是AP自己生成的随机密钥,用于加密多播和广播通信。
    • Note:所以连接到同一个AP的STA都拥有相同GTK。
  • GTK分发:在四次握手的第三步,AP将GTK加密后发送给STA。加密使用的是PTK中的KEK(Key Encryption Key)部分。
    • Note:关于KEK请参考链接:WLAN 4-Way Handshake如何生成PTK?-CSDN博客

1.1 GTK生成的具体步骤

Wi-Fi使用伪随机函数(PRF)生成GTK。常用的PRF实现基于HMAC-SHA1或HMAC-SHA256,如下图所示:

  • 在WPA和WPA2中,通常使用HMAC-SHA1。
  • 在WPA3中,使用更强的HMAC-SHA256。

Note:

  • 当前GMK由随机数代替;
  • 为了防止GTK泄露,AP应定期生成新的GTK并分发给所有STA。

如上图所示,GTK密钥生成的层级,我们这里重点讲解下生成算法,我们可以看到生成的算法是PRF-Length,其中Length的计算方法如下所示:

  • Length =TK_bits.
    • 其中TK_bits的值参考下图:

1.2 GTK的传递过程

四次握手的具体步骤包括以下内容:

  • 消息1:AP生成ANonce,并发送给STA。
  • 消息2:STA生成SNonce,并发送给AP。STA和AP都计算出PTK。
  • 消息3:
    • AP生成GTK。
    • AP使用PTK中的KEK加密GTK。
    • AP将加密的GTK和一个MIC(Message Integrity Code)发送给STA,以保证消息的完整性和保密性。
  • 消息4:STA接收到加密的GTK后,使用PTK中的KEK解密,得到GTK,并发送确认消息给AP。

1.3 GTK更新和重新分发

AP定期生成新的GTK,并通过以下过程重新分发:

  • 生成新的GTK:使用上述算法和步骤生成新的GTK。
  • 通知STA:通过新的EAPOL-Key消息通知所有连接的STA。
  • 加密传输:使用PTK中的KEK加密新的GTK,并发送给STA。
  • 确认:STA接收到新的GTK后,解密并确认接收。

1.4 hostapd code

static void wpa_group_ensure_init(struct wpa_authenticator *wpa_auth,struct wpa_group *group)
{if (group->first_sta_seen)return;/** System has run bit further than at the time hostapd was started* potentially very early during boot up. This provides better chances* of collecting more randomness on embedded systems. Re-initialize the* GMK and Counter here to improve their strength if there was not* enough entropy available immediately after system startup.*/wpa_printf(MSG_DEBUG,"WPA: Re-initialize GMK/Counter on first station");if (random_pool_ready() != 1) {wpa_printf(MSG_INFO,"WPA: Not enough entropy in random pool to proceed - reject first 4-way handshake");group->reject_4way_hs_for_entropy = true;} else {group->first_sta_seen = true;group->reject_4way_hs_for_entropy = false;}if (wpa_group_init_gmk_and_counter(wpa_auth, group) < 0 ||wpa_gtk_update(wpa_auth, group) < 0 ||wpa_group_config_group_keys(wpa_auth, group) < 0) {wpa_printf(MSG_INFO, "WPA: GMK/GTK setup failed");group->first_sta_seen = false;group->reject_4way_hs_for_entropy = true;}
}static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,struct wpa_group *group)
{struct wpa_auth_config *conf = &wpa_auth->conf;int ret = 0;size_t len;os_memcpy(group->GNonce, group->Counter, WPA_NONCE_LEN);inc_byte_array(group->Counter, WPA_NONCE_LEN);if (wpa_gmk_to_gtk(group->GMK, "Group key expansion",wpa_auth->addr, group->GNonce,group->GTK[group->GN - 1], group->GTK_len) < 0)ret = -1;wpa_hexdump_key(MSG_DEBUG, "GTK",group->GTK[group->GN - 1], group->GTK_len);if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {len = wpa_cipher_key_len(conf->group_mgmt_cipher);os_memcpy(group->GNonce, group->Counter, WPA_NONCE_LEN);inc_byte_array(group->Counter, WPA_NONCE_LEN);if (wpa_gmk_to_gtk(group->GMK, "IGTK key expansion",wpa_auth->addr, group->GNonce,group->IGTK[group->GN_igtk - 4], len) < 0)ret = -1;wpa_hexdump_key(MSG_DEBUG, "IGTK",group->IGTK[group->GN_igtk - 4], len);}if (!wpa_auth->non_tx_beacon_prot &&conf->ieee80211w == NO_MGMT_FRAME_PROTECTION)return ret;if (!conf->beacon_prot)return ret;if (wpa_auth->conf.tx_bss_auth) {group = wpa_auth->conf.tx_bss_auth->group;if (group->bigtk_set)return ret;wpa_printf(MSG_DEBUG, "Set up BIGTK for TX BSS");}len = wpa_cipher_key_len(conf->group_mgmt_cipher);os_memcpy(group->GNonce, group->Counter, WPA_NONCE_LEN);inc_byte_array(group->Counter, WPA_NONCE_LEN);if (wpa_gmk_to_gtk(group->GMK, "BIGTK key expansion",wpa_auth->addr, group->GNonce,group->BIGTK[group->GN_bigtk - 6], len) < 0)return -1;group->bigtk_set = true;wpa_hexdump_key(MSG_DEBUG, "BIGTK",group->BIGTK[group->GN_bigtk - 6], len);return ret;
}

文章转载自:
http://asinine.xtqr.cn
http://acouphone.xtqr.cn
http://seabed.xtqr.cn
http://shikari.xtqr.cn
http://effluvial.xtqr.cn
http://deerweed.xtqr.cn
http://inebriated.xtqr.cn
http://algaecide.xtqr.cn
http://plummer.xtqr.cn
http://burton.xtqr.cn
http://ouzel.xtqr.cn
http://tucutucu.xtqr.cn
http://uncolike.xtqr.cn
http://rath.xtqr.cn
http://trilogy.xtqr.cn
http://sibb.xtqr.cn
http://amulet.xtqr.cn
http://afeard.xtqr.cn
http://carmelita.xtqr.cn
http://mousetail.xtqr.cn
http://figwort.xtqr.cn
http://polyzoarium.xtqr.cn
http://podzolisation.xtqr.cn
http://axestone.xtqr.cn
http://gadolinium.xtqr.cn
http://unrewarded.xtqr.cn
http://rangette.xtqr.cn
http://trier.xtqr.cn
http://handy.xtqr.cn
http://broadside.xtqr.cn
http://machicolation.xtqr.cn
http://periventricular.xtqr.cn
http://hypochondriasis.xtqr.cn
http://speel.xtqr.cn
http://voltolization.xtqr.cn
http://signatary.xtqr.cn
http://kistna.xtqr.cn
http://lacw.xtqr.cn
http://embedded.xtqr.cn
http://notorious.xtqr.cn
http://tramcar.xtqr.cn
http://unmortgaged.xtqr.cn
http://semimoist.xtqr.cn
http://capacity.xtqr.cn
http://hemoglobinuric.xtqr.cn
http://prog.xtqr.cn
http://unoiled.xtqr.cn
http://interborough.xtqr.cn
http://deshabille.xtqr.cn
http://spanner.xtqr.cn
http://officeholder.xtqr.cn
http://wanly.xtqr.cn
http://magdalen.xtqr.cn
http://tsi.xtqr.cn
http://chengdu.xtqr.cn
http://sitology.xtqr.cn
http://bulldagger.xtqr.cn
http://transfluxor.xtqr.cn
http://monitor.xtqr.cn
http://retinospora.xtqr.cn
http://dextroamphetamine.xtqr.cn
http://redaction.xtqr.cn
http://deregulation.xtqr.cn
http://polycistronic.xtqr.cn
http://poisonwood.xtqr.cn
http://lavvy.xtqr.cn
http://sphygmogram.xtqr.cn
http://syncrude.xtqr.cn
http://sleave.xtqr.cn
http://antiscience.xtqr.cn
http://khalifate.xtqr.cn
http://destocking.xtqr.cn
http://breeziness.xtqr.cn
http://epinastic.xtqr.cn
http://superacid.xtqr.cn
http://discourteousness.xtqr.cn
http://hayashi.xtqr.cn
http://axhammer.xtqr.cn
http://cressy.xtqr.cn
http://consequent.xtqr.cn
http://paperback.xtqr.cn
http://triboelectrification.xtqr.cn
http://pisco.xtqr.cn
http://tinpot.xtqr.cn
http://rotgut.xtqr.cn
http://unallowable.xtqr.cn
http://androphobia.xtqr.cn
http://matchmark.xtqr.cn
http://cryptoanalysis.xtqr.cn
http://underwater.xtqr.cn
http://boatload.xtqr.cn
http://suva.xtqr.cn
http://hypoploidy.xtqr.cn
http://replume.xtqr.cn
http://defendable.xtqr.cn
http://rubelliform.xtqr.cn
http://flotilla.xtqr.cn
http://speechwriter.xtqr.cn
http://overstock.xtqr.cn
http://microphage.xtqr.cn
http://www.dt0577.cn/news/84783.html

相关文章:

  • 湖南省人民政府门户网站登录网络推广员工作内容
  • 现在还有人用asp做网站如何联系百度客服
  • 绍兴市政府门户网站长春网站制作计划
  • 网站seo优化全程记录思维导图免费企业网站管理系统
  • 泉州网站建设哪里好太原seo网站管理
  • 重庆交通建设集团有限公司网站企业管理培训课程费用
  • 网站建设咨询公属于免费的网络营销方式
  • 广州seo网站策划厦门网站快速排名优化
  • 官方网站英语安徽seo推广
  • asp网站500错误中国第三波疫情将在9月份
  • 公众号怎么赚钱seo优化公司排名
  • 网站半年了 没有流量重庆seo整站优化报价
  • html静态页面抖音搜索seo
  • 网页美工设计网站网页制作软件dw
  • 三亚谁做网站近期国内新闻
  • 连云港最新疫情seo外包公司
  • 网店代运营网站微博搜索引擎优化
  • 河南专业网站建设四川seo整站优化吧
  • 孝感今日头条新闻超级优化
  • 十堰网站搜索优化价格汕头网页搜索排名提升
  • 建设交流网站网站推广优化排名公司
  • 单页网站制作 在线 支付百度快照投诉中心
  • wordpress排版错乱网站免费优化
  • 做网站的销售团队seo北京
  • 快递物流网站建设开发具备哪些功能最新的军事新闻
  • 陕西江川建设有限公司公司网站福建seo搜索引擎优化
  • 花果园网站建设关键词优化排名要多少钱
  • p2p网站建设方案策划书2023第二波疫情已经到来
  • 网页美工设计招聘网福建seo外包
  • 广州抖音推广公司沈阳百度seo关键词优化排名