(七十二)IEEE 802.11i2004——Four-way handshake

2023-12-19 07:48

本文主要是介绍(七十二)IEEE 802.11i2004——Four-way handshake,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

转载:

1.https://en.wikipedia.org/wiki/IEEE_802.11i-2004

2.https://en.wikipedia.org/wiki/Cryptographic_nonce

3.https://en.wikipedia.org/wiki/WLAN_Authentication_and_Privacy_Infrastructure

 

IEEE 802.11i-2004
From Wikipedia, the free encyclopedia
Jump to navigationJump to search
IEEE 802.11i-2004, or 802.11i for short, is an amendment to the original IEEE 802.11, implemented as Wi-Fi Protected Access II (WPA2). The draft standard was ratified on 24 June 2004. This standard specifies security mechanisms for wireless networks, replacing the short Authentication and privacy clause of the original standard with a detailed Security clause. In the process, the amendment deprecated broken Wired Equivalent Privacy (WEP), while it was later incorporated into the published IEEE 802.11-2007 standard.

PS:

Wired Equivalent Privacy (WEP) is a security algorithm for IEEE 802.11 wireless networks. Introduced as part of the original 802.11 standard ratified in 1997, its intention was to provide data confidentiality comparable to that of a traditional wired network. WEP, recognizable by its key of 10 or 26 hexadecimal digits, was at one time widely in use and was often the first security choice presented to users by router configuration tools.

A nonce is an arbitrary number used only once in a cryptographic communication, in the spirit of a nonce word. They are often random or pseudo-random numbers. Many nonces also include a timestamp to ensure exact timeliness, though this requires clock synchronization between organizations. The addition of a client nonce ("cnonce") helps to improve the security in some ways as implemented in digest access authentication. To ensure that a nonce is used only once, it should be time-variant (including a suitably fine-grained timestampin its value), or generated with enough random bits to ensure a probabilistically insignificant chance of repeating a previously generated value. Some authors define pseudo-randomness (or unpredictability) as a requirement for a nonce.

Informally, a message authentication code(MAC) consists of three algorithms:

  • A key generation algorithm selects a key from the key space uniformly at random.
  • A signing algorithm efficiently returns a tag given the key and the message.
  • A verifying algorithm efficiently verifies the authenticity of the message given the key and the tag. That is, return accepted when the message and tag are not tampered with or forged, and otherwise return rejected.

For a secure unforgeable message authentication code, it should be computationally infeasible to compute a valid tag of the given message without knowledge of the key, even if for the worst case, we assume the adversary can forge the tag of any message except the given one.

 

Contents

目录

Replacement of WEP

Protocol operation

Four-way handshake

Group key handshake

CCMP overview

Key Hierarchy

MAC frame formats

Frame Control field

Protected Frame field



Replacement of WEP


802.11i supersedes the previous security specification, Wired Equivalent Privacy (WEP), which was shown to have security vulnerabilities. Wi-Fi Protected Access (WPA) had previously been introduced by the Wi-Fi Alliance as an intermediate solution to WEP insecurities. WPA implemented a subset of a draft of 802.11i. The Wi-Fi Alliance refers to their approved, interoperable implementation of the full 802.11i as WPA2, also called RSN (Robust Security Network). 802.11i makes use of the Advanced Encryption Standard (AES) block cipher, whereas WEP and WPA use the RC4 stream cipher.[1]

 

Protocol operation

IEEE 802.11i enhances IEEE 802.11-1999 by providing a Robust Security Network (RSN) with two new protocols: the four-way handshake and the group key handshake. These utilize the authentication services and port access control described in IEEE 802.1X to establish and change the appropriate cryptographic keys.[2][3] The RSN is a security network that only allows the creation of robust security network associations (RSNAs), which are a type of association used by a pair of stations (STAs) if the procedure to establish authentication or association between them includes the 4-Way Handshake.[4]

The standard also provides two RSNA data confidentiality and integrity protocols, TKIP and CCMP, with implementation of CCMP being mandatory since the confidentiality and integrity mechanisms of TKIP are not as robust as those of CCMP.[5] The main purpose to implement TKIP was that the algorithm should be implementable within the capabilities of most of the old devices supporting only WEP.

The initial authentication process is carried out either using a pre-shared key (PSK), or following an EAP exchange through 802.1X (known as EAPOL, which requires the presence of an authentication server). This process ensures that the client station (STA) is authenticated with the access point (AP). After the PSK or 802.1X authentication, a shared secret key is generated, called the Pairwise Master Key (PMK). The PMK is derived from a password that is put through PBKDF2-SHA1 as the cryptographic hash function. In a pre-shared-key network, the PMK is actually the PSK. If an 802.1X EAP exchange was carried out, the PMK is derived from the EAP parameters provided by the authentication server.

 

Four-way handshake

The four-way handshake in 802.11i
The four-way handshake is designed so that the access point (or authenticator) and wireless client (or supplicant) can independently prove to each other that they know the PSK/PMK, without ever disclosing the key. Instead of disclosing the key, the access point (AP) and client encrypt messages to each other—that can only be decrypted by using the PMK that they already share—and if decryption of the messages was successful, this proves knowledge of the PMK. The four-way handshake is critical for protection of the PMK from malicious access points—for example, an attacker's SSID impersonating a real access point—so that the client never has to tell the access point its PMK.

The PMK is designed to last the entire session and should be exposed as little as possible; therefore, keys to encrypt the traffic need to be derived. A four-way handshake is used to establish another key called the Pairwise Transient Key (PTK). The PTK is generated by concatenating the following attributes: PMK, AP nonce (ANonce), STA nonce (SNonce), AP MAC address, and STA MAC address. The product is then put through a pseudo-random function. The handshake also yields the GTK (Group Temporal Key), used to decrypt multicast and broadcast traffic.

The actual messages exchanged during the handshake are depicted in the figure and explained below (all messages are sent as EAPOL-Key frames):

The AP sends a nonce-value (ANonce) to the STA together with a Key Replay Counter, which is a number that is used to match each pair of messages sent, and discard replayed messages. The STA now has all the attributes to construct the PTK.
The STA sends its own nonce-value (SNonce) to the AP together with a Message Integrity Code (MIC), including authentication, which is really a Message Authentication and Integrity Code (MAIC), and the Key Replay Counter which will be the same as Message 1, to allow AP to match the right Message 1.
The AP verifies Message 2, by checking MIC, RSN, ANonce and Key Replay Counter Field, and if valid constructs and sends the GTK with another MIC.
The STA verifies Message 3, by checking MIC and Key Replay Counter Field, and if valid sends a confirmation to the AP.
The Pairwise Transient Key (64 bytes) is divided into five separate keys:

16 bytes of EAPOL-Key Confirmation Key (KCK) – Used to compute MIC on WPA EAPOL Key message
16 bytes of EAPOL-Key Encryption Key (KEK) – AP uses this key to encrypt additional data sent (in the 'Key Data' field) to the client (for example, the RSN IE or the GTK)
16 bytes of Temporal Key (TK) – Used to encrypt/decrypt Unicast data packets
8 bytes of Michael MIC Authenticator Tx Key – Used to compute MIC on unicast data packets transmitted by the AP
8 bytes of Michael MIC Authenticator Rx Key – Used to compute MIC on unicast data packets transmitted by the station
The Group Temporal Key (32 bytes) is divided into three separate keys:

16 bytes of Group Temporal Encryption Key – used to encrypt/decrypt Multicast and Broadcast data packets
8 bytes of Michael MIC Authenticator Tx Key – used to compute MIC on Multicast and Broadcast packets transmitted by AP
8 bytes of Michael MIC Authenticator Rx Key – currently unused as stations do not send multicast traffic
The Michael MIC Authenticator Tx/Rx Keys in both the PTK and GTK are only used if the network is using TKIP to encrypt the data.

The four-way handshake has been shown to be vulnerable to KRACK.

 

Group key handshake

The Group Temporal Key (GTK) used in the network may need to be updated due to the expiration of a preset timer. When a device leaves the network, the GTK also needs to be updated. This is to prevent the device from receiving any more multicast or broadcast messages from the AP.

To handle the updating, 802.11i defines a Group Key Handshake that consists of a two-way handshake:

The AP sends the new GTK to each STA in the network. The GTK is encrypted using the KEK assigned to that STA, and protects the data from tampering, by use of a MIC.
The STA acknowledges the new GTK and replies to the AP.

CCMP overview

CCMP is based on the CCM of the AES encryption algorithm. CCM combines CTR for confidentiality and CBC-MAC for authentication and integrity. CCM protects the integrity of both the MPDU Data field and selected portions of the IEEE 802.11 MPDU header.

 

Key Hierarchy

RSNA defines two key hierarchies:

Pairwise key hierarchy, to protect unicast traffic
GTK, a hierarchy consisting of a single key to protect multicast and broadcast traffic
The description of the key hierarchies uses the following two functions:

L(Str, F, L) - From Str starting from the left, extract bits F through F+L–1.
PRF-n - Pseudo-random function producing n bits of output, there are the 128,192,256,384 and 512 versions, each of these output these number of bits.
The pairwise key hierarchy utilizes PRF-384 or PRF-512 to derive session-specific keys from a PMK, generating a PTK, which gets partitioned into a KCK and a KEK plus all the temporal keys used by the MAC to protect unicast communication.

The GTK shall be a random number which also gets generated by using PRF-n, usually PRF-128 or PRF-256, in this model, the group key hierarchy takes a GMK (Group Master Key) and generates a GTK.

 

MAC frame formats

Frame Control field

Frame Control field[6]
Subfield    Protocol Version    Type    Subtype    To DS    From DS    More Fragments    Retry    Power Management    More Data    Protected Frame    Orders
Bits    2 bits    2 bits    4 bits    1 bit    1 bit    1 bit    1 bit    1 bit    1 bit    1 bit    1 bit

Protected Frame field

"The Protected Frame field is 1 bit in length. The Protected Frame field is set to 1 if the Frame Body field contains information that has been processed by a cryptographic encapsulation algorithm. The Protected Frame field is set to 1 only within data frames of type Data and within management frames of type Management, subtype Authentication. The Protected Frame field is set to 0 in all other frames. When the bit Protected Frame field is set to 1 in a data frame, the Frame Body field is protected utilizing the cryptographic encapsulation algorithm and expanded as defined in Clause 8. Only WEP is allowed as the cryptographic encapsulation algorithm for management frames of subtype Authentication."[7]

这篇关于(七十二)IEEE 802.11i2004——Four-way handshake的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/511419

相关文章

IEEE会议投稿资料汇总http://cadcg2015.nwpu.edu.cn/index.htm

最近投了篇IEEE的顶级会议文章,一下是比较有用的一些资料,以供参考。 1.会议主页:http://cadcg2015.nwpu.edu.cn/index.htm     (The 14th International Conference on Computer-Aided Design and Computer Graphics (CAD/Graphics 2015)) 2.I

【IEEE出版】2024博鳌新型电力系统国际论坛——电力系统与新能源技术创新论坛(NPSIF 2024,10月30-11月1)

2024博鳌新型电力系统国际论坛——电力系统与新能源技术创新论坛将于2024年10月30-11月1日于海南博鳌举办。 会议的历史悠久,致力于促进电力系统领域的研究和开发活动,同时也着眼于促进全球各地研究人员、开发人员、工程师、学生和从业人员之间的科学信息交流,推动新能源技术的创新和应用,为全球能源领域的可持续发展贡献力量。期待着各方专家学者的共同参与和卓越贡献,共同开创电力系统未来的新篇章。

MACS bdgdiff: Differential peak detection based on paired four bedGraph files.

参考原文地址:[http://manpages.ubuntu.com/manpages/xenial/man1/macs2_bdgdiff.1.html](http://manpages.ubuntu.com/manpages/xenial/man1/macs2_bdgdiff.1.html) 文章目录 一、MACS bdgdiff 简介DESCRIPTION 二、用法

【python requests错误】Caused by SSLError(SSLError(bad handshake: SysCallError(104, 'ECONNRESET')

错误描述: 在发送get请求时错误,执行下面一句时报错了: response = requests.get(image_url) 原因HTTPSConnectionPool(host='test-kkbuluo-resource.cdn.hzmltest.com', port=443): Max retries exceeded with url: /IMCORE/RESOURCE/LOG

IEEE格式参考和指导

IEEE Conference Template: Word [Link]Links to an external site., Latex [LinkLinks to an external site.]IEEE Reference Guide: LinkLinks to an external site. IEEE格式是一种广泛用于工程、技术和计算机科学领域的引用和参考文献格式。IEEE

Flink实战(七十二):监控(四)自定义metrics相关指标(二)

项目实现代码举例: 添加自定义监控指标,以flink1.5的Kafka读取以及写入为例,添加rps、dirtyData等相关指标信息。�kafka读取和写入重点是先拿到RuntimeContex初始化指标,并传递给要使用的序列类,通过重写序列化和反序列化方法,来更新指标信息。 不加指标的kafka数据读取、写入Demo。 public class FlinkEtlTest {priv

802.11报文类型在wireshark的过滤条件

– Common Filters for wireshark sniffer: #地址过滤 wlan.addr == wlan.sa eq 00:09:5b:e8:c4:03 and wlan.bssid ne ff:ff:ff:ff:ff:ff wlan.bssid eq 00:11:92:6e:cf:00 wlan.sa eq 00:09:5b:e8:c4:03 #802.11报文类型过滤

LaTeX的IEEE模板,以及有用的链接

虽然本人用Word用的挺不错的,但是正规学术文章必须用LaTeX。以下是一个IEEE的会议LaTeX模板。我加入了{CJK}包,这样可以写中文。学会用LaTeX很重要:1)写国际论文都用这个;2)平时写课程报告用LaTeX,逼格陡增~ 1 IEEE模板,包含中文CJK包 \documentclass[10pt, conference, compsocconf]{IEEEtran}\usepa

IEEE的浮点数表示

IEEE浮点标准用V=(-1)^s*M*2^E 由符号,尾数,阶码表示 32位单精度 单精度 二进制小数,使用32位存储。 1 8 23 位长 +-+--------+-----------------------+ |s| exp | fraction | +-+--------+-----------------------+ 31 30 23 22 0 位

【ACM独立出版|EI快检索-高录用|IEEE Fellow支持】2024年数字经济与计算机科学国际学术会议(DECS2024)

【ACM独立出版|EI快检索-高录用|IEEE Fellow支持】 2024年数字经济与计算机科学国际学术会议(DECS2024) *ACM独立出版,快检索,高录用 *见刊后1个月左右完成EI&Scopus检索 *国内211大学、世界QS名校等海内外高校大力支持,IEEE Fellow、世界级科学家、国际化组委加入 会议信息 大会官网:www.icdecs.net 大会时间:20