802.11i所定義的RSN (Robust Security Network)定義了在一個無線網路下,一個"安全"的connection產生的流程,也可說是一個framework。這個流程也就是RSNA (Robust Security Networks Association),定義了認證,加密及金鑰管理。

 

STA通過802.1x的認證後,AP與STA都會拿到同一組session key。有RADIUS時稱 PMK (Pairwise Master Key),無RADIUS時PSK(Pre-Shared Key)即 PMK。之後即進行以下的4-way handshake。這個 PMK用來產生其他的key,在hierarchy中是最上層。

註:在沒有RADIUS的情況下,AP與STA會預先設定好一組passphrase,並用來衍生出PMK。

目的

1. AP證明自己的身份

2. 產生traffic用的encryption key

 

流程

對網路安全而言,key愈少傳輸愈好,因此4-way handshake用來建立 512 bits的PTK(Pairwise Transient Key)。PTK由PMK,AP nonce, STA nonce, AP MAC address及STA MAC adress組成。4-way handshake也會產生 GTK (Group Temporal Key),用來解密multicast和broadcast traffic。這個GTK是所有STA共用的同一組key。

 

4-way handshake  

步驟為:

1. AP 送給STA Anonce

2. STA收到後,已有足夠資訊組成其PTK。回送AP SNonce,並附上檢查碼MIC (Message Integrity Code)

3. AP 收到後,也組成其PTK,並產生256 bits 的GTK及另一個檢查碼MIC送給STA。

4. STA response。

上述的packet都是EAPOL-key frame。若檢查碼錯誤,則宣告handshake失敗。

PTK被分解如下,這些key是AP與STA之間用的,並且不會expose:

1. 128 bits的EAPOL-Key Confirmation Key (KCK),用來計算WPA EAPOL key message的MIC

2. 128 bits的EAPOL-Key Encryption Key (KEK),用來加密額外要送給STA的的data,如GTK or RSN IE

3. 128 bits的Temporal Key (TK),用來加解密unicast packets

4. 64 bits的Michael MIC Authenticator Tx Key,用來計算AP傳送的unicast packet的MIC

5. 64 bits的Michael MIC Authenticator Rx Key,用來計算STA傳送的unicast packet的MIC

其中4跟5只用在使用TKIP加密data時。

 

Reference

wiki-4-way-handshake

http://www.cnitblog.com/chliao618/archive/2007/03/13/23931.html

arrow
arrow
    全站熱搜

    kezeodsnx 發表在 痞客邦 留言(0) 人氣()