802 11 Mac Layer

Project Outline

The goal of this project is to implement and optimize SOC design of a part of IEEE 802.11 MAC layer. I first design the MAC layer in software using C. It includes Encryption and CRC check. Then I use an ARM processor simulator to find out the buttleneck of its performance. I found the encryption part takes about 98% of total execute time.
Therefore, I decided to implement Hardware Coprocessor to deal with the wep encryption part, and speed up the software design. I implement the Hardware Coprocessor in Verilog. After implementing the HW coprocessor, I combined the HW and SW implementation, and create the SOC implementation of the 802.11 MAC layer. I used a HW/SW co-verification tool called Seamless CVS, to emulate the SOC design with an ARM9 processor.
The simulation result indicate that the HW/SW co-design has much higher performance than the pure software design.

加總檢查(Checksumming):首先,我們利用訊息 M 來計算一致性總和檢查
c(M),接著把 M 與 c(M)串接起來得到明文 P 當做下一個階段的輸入。 此明文
與金鑰無關。
加密(Encryption):我們使用 RC4 來加密明文 P,首先選擇一個初始向量 v
(Initialization Vector),然後把初始向量 v 和金鑰 k 輸入 RC4 演算法產生金鑰串流 (Keystream),金鑰串流是一個虛擬亂碼(Pseudorandom)的數值,用 RC4(v, k) 來表示。接著,我們把明文和金鑰串流兩者做 XOR 運算得到密文。
密文 = 明文 ⊕ RC4(v, k) (⊕ 表示 XOR)
傳送(Transmission):最後,我們透過無線電波傳送初始向量和密文。
圖一:加密過的 WEP 封包
在這裡訊息表示我們要保護的原始資料,明文是訊息加上加總檢查碼,透過
無線電波傳送時會把明文加密成密文。
接收者欲解密由 WEP 保護的封包,只要反向操作加密過程即可。首先,重
新產生金鑰串流 RC4(v, k) ,再把它與密文做 XOR 運算即可得到明文:
P’= C ⊕ CRC4(v, k) = (P ⊕ RC4(v, k) ) ⊕ RC4(v, k) =P.
接著,接收者確認解密過的明文上的加總檢查碼是否正確,方法為把接收到的訊
息 M’經過計算得出 c(M’),再把 c(M’)與 c’比對是否相同,如此可確保擁有有效
的加總檢查碼的封包才被接受。

Software

IEEE 802.11 MAC layer software implementation

Hardware

Coverify

Seamless CVE is a software which can co-verify the hardware part and software part of an SOC design. Once we properly set up the environment, it can call Xray debugger to simulate the software part, and use ModelSim to simulate the hardware part of the SOC design. The software includes an ARM processor module (arm946tr0.v) and a RAM module (sram.v).

Reference

http://docs.google.com/viewer?a=v&q=cache:CJ-UeDQMssMJ:dsns.csie.nctu.edu.tw/course/netsec/2004fall/handout/Chap21.pdf+802.11+%E6%AA%A2%E6%9F%A5%E5%8A%A0%E7%B8%BD&hl=zh-TW&gl=tw&pid=bl&srcid=ADGEEShSxvONU10mzvEqc0c_YW68-YP_fmK9OuQFxUvVPgqiQ0u9jv4uo3vodBp31tQTVe_z2IXzhgrU4N8s6lAyoKVxK5hzhT1qb50nnBuSI6sopw7Hnb1x7rBehTl85YzXBqh51PZc&sig=AHIEtbS5zAL08t4VfRAwG-7wurvTrNG7LA

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License