# 蔡瀚興-讀書會-21/07/17 ## 推薦連結 - [文件翻譯](https://www.cnblogs.com/soqu36/articles/12767236.html) ## <font color="FF0000">Introduction</font> 無線通信,因為數據有安全上的風險。用戶的位置和移動軌跡,會引起隱私侵權。因此提供安全特性保護用戶的隱私。 ## <font color="FF0000">Scope and Concept of LTE security</font> 1. <font color="0000ff">LTE Authentication:</font> 在UE和網絡之間執行相互的鑑權。 2. <font color="0000ff">NAS Security:</font> 在UE和MME之間執行完整性保護驗證和NAS信令的加密(加密和解密) 3. <font color="0000ff">AS Security:</font> 在UE和eNB之間執行完整性保護驗證和RRC信令消息的加密,執行用戶數據的加密。 ![](https://i.imgur.com/GEizm27.jpg) ![](https://i.imgur.com/ByIVjXa.jpg) ## <font color="FF0000">LTE authentication</font> 在移動網絡中,鑑權是判定試圖接入網絡的用戶是否是合法的簽約用戶 ### <font color="0000ff">EPS AKA (Authentication and Key Agreement)</font> 1. **HSS generates EPS authentication vectors** (RAND, AUTN, XRES, K-ASME) and sends them to MME. 2. The **MME selects one of the EPS authentication vectors** and uses it for two-way authentication, and **shares the same authentication key-KASME** with each other. ### <font color="0000ff">ASME (Access Security Management Entity)</font> 是一個**從 HSS 接收 Top-Level key 的實體**,用在 access network 中。在EPS中,**MME充當ASME的功能**,K-ASME作為一個 Top-Level key 在接入網絡中使用。MME代表HSS使用K-ASME和UE實施相互鑑權。一旦相互鑑權,UE和MME共享K-ASME作為鑑權秘鑰。 ### <font color="0000ff">**Process:**</font> 1. 當用戶請求接入LTE網絡時,在用戶和網絡之間使用EPS KAK過程來進行相互鑑權。MME使用IMSI來標識用戶,並向HSS請求鑑權向量(AV)。 2. HSS使用EPS AKA算法生成AV,AV={RAND, XRES, AUTN-HSS, K-ASME},並轉發給MME 3. 在MME存儲AV之後,從中選擇一個,使用這個AV來和UE執行相互鑑權,並轉發RAND和AUTH-HSS給UE 4. UE使用EPS AKA算法計算出RES,AUTN-UE和K-ASME 5. UE比較自己的AUTN-UE和從MME接收到的AUTH-HSS來執行網絡鑑權 6. 一旦鑑權完成,發送RES給MME,MME比較從HSS接收到的XRES和從UE接收到的RES來執行用戶鑑權 7. 如果鑑權成功,則他們就共享了相同的K-ASME(儘管K-ASME不在UE和MME之間傳送) ## <font color="FF0000">NAS Security</font> NAS security is designed to **safely transmit signaling information** between the wireless link UE and MME 1. **Perform integrity check:** Most required. *EX:integrity key (K-NASint)* 2. **Encryption of NAS signaling messages:** Optional. *EX:encryption key (K-NASenc)* ### <font color="0000ff">**Process:**</font> 1. 一旦UE和MME相互鑑權完畢並具有相同的秘鑰K-ASME,NAS安全過程開始 2. 當傳送NAS信令消息時,NAS安全秘鑰從K-ASME中衍生,用於NAS消息的安全傳送。過程包含Security Mode Command 和Security Mode Complete消息的來回,並由MME傳送Security Mode Command 消息給UE是開始。 3. MME選擇使用一個**NAS安全算法(Alg-ID)**,從K-ASME來產生K-NASinc和K-NASenc 4. MME把K-NASinc算法用於Security Mode Command消息產生**NAS-MAC(Message Authentication Code for NAS for Integrity)** 5. MME傳輸包含選擇的NAS安全算法和NAS-MAC的Security Mode Command消息給UE。因為UE並不知道選擇的加密算法,所以這個消息是完整性保護的,但是沒有加密 6. UE一旦接收到了Security Mode Command消息,使用MME選擇的NAS完整性算法來驗證完整性,並使用NAS完整性/加密算法從K-ASME中產生NAS安全秘鑰(K-NASinc,K-NASenc) 7. UE使用K-NASenc加密Security Command Complete消息,並使用K-NASinc生成消息鑑權碼NAS-MAC用於加密的消息。**現在UE可以傳輸包含NAS-MAC的加密和完整性保護的消息到MME了** 8. 一旦NAS安全建立起來,在UE和MME之間的NAS信令都是通過NAS安全秘鑰加密和完整性保護的,在無線鏈路上安全的傳輸 ## <font color="FF0000">AS Security</font> AS security is used to ensure the security of data transmission between the UE and eNB on the wireless link - **On control side:** Integrity check and encryption are performed on the RRC signaling message - **On user side:** Only encryption is performed for IP data packet ### <font color="0000ff">**Note:**</font> - Integrity protection is required, and encryption is an optional - **K-RRCint and K-RRCenc** are Used for the integrity check and encryption of **control plane data** - **K-UPenc** is used for the encryption of **user plane data** - Integrity checking and encryption are performed at the **PDCP layer** ### <font color="0000ff">**Process:**</font> 1. NAS安全建立完成之後,在UE和eNB之間AS安全建立過程開始。 2. 當傳輸RRC信令消息和IP數據包時,使用從K-eNB產生的AS安全秘鑰用於這些數據的安全傳輸。這個過程包括RRC信令消息的一個來回(Security Mode Command 和Security Mode Complete 消息),並且這個過程在eNB傳輸Security Mode Command消息給UE時開始。 3. MME從K-ASME中計算出K-eNB並傳輸給eNB,eNB使用K-eNB來執行AS安全過程。 4. eNB選擇AS安全算法(Alg-ID:算法ID)並使用這個算法ID從K-eNB中計算出完整性秘鑰(K-RRCinc)和加密秘鑰(K-RRCenc)用於RRC信令消息,計算出加密秘鑰(K-UPenc)用於用戶面 5. eNB應用K-RRCint到Security Mode Command消息產生一個消息鑑權碼(MAC-I,Message Authentication Code for Integrity)。 6. eNB開始傳輸包含選擇的AS安全算法和MAC-I的Security Mode Command消息到UE。 7. UE一旦從eNB接收到Security Mode Command消息,使用eNB選擇的AS完整性算法驗證完整性,並使用AS完整性/加密算法來計算出AS加密秘鑰(K-RRCint, K-RRCenc and K-UPenc ) 8. 接著使用RRC完整性秘鑰產生一個消息鑑權碼MAC-I給Security Mode Complete 消息,接著轉發包含MAC-I的這條消息給eNB 9. 當eNB使用AS安全秘鑰成功的驗證了接收到的Security Mode Complete 消息的完整性,AS安全建立過程完成的 10. 在AS安全建立之後,UE和eNB之間的RRC信令消息都是使用AS安全秘鑰加密的和完整性保護的,在空中鏈路上傳輸的用戶IP數據包是加密的。 ## <font color="ff0000">LTE Authentication Procedure</font> ![](https://i.imgur.com/xVi2HzP.jpg) ### 1. <font color="0000ff">**[UE -> MME] UE requests authentication to the network:**</font> UE first attach to network, sends an Attach Request message including: - **IMSI** - **KSIA-SME = 7:** indicates that the UE does not have a security key. - **UE network capability:** The security algorithm available to the UE (說明UE具備連線到何種EPS的能力及支持的NAS,AS演算法) ### 2. <font color="0000ff">**[MME -> HSS] MME requests authentication data from HSS:**</font> MME recognizes that there is no K-ASME available,sending an Authentication Information Request message to the HSS which including: - **IMSI** - **SN ID(Serving Network ID)**: Refers to the network user accesses, composed of PLMN - **n (number of AV):** the number of AV requested by the MME - **Network Type:** The type of UE access to the network (here E-UTRAN) ### 3. <font color="0000ff">**[MME <- HSS] HSS responds to requests for authentication data:**</font> 1. The HSS generates the required AV at the request of the MME, and then sends an Authentication Information Answer (AVs) message to the MME. 2. MME selects one to use in the UE's LTE authentication 3. MME allocates KSI-ASME (the index of K-ASME) instead of K-ASME to transmit to the UE for security ### 4. <font color="0000ff">**[UE <- MME] MME requests user authentication:**</font> ### 5. <font color="0000ff">**[UE -> MME] The UE responds to the authentication of the user:**</font>