In this chapter we shall see the keys exchanged between different procedures.
Below security flows is a smaller part in LTE Attach Request.
To know where these security will be exchanged, then please go through LTE Attach request call flow.
ASME Access Security Management Entity
Hierarchy Of LTE Security Keys:
The above image shows the LTE security keys.
K: It is the master key. It is stored in SIM and HSS/AuC. It will never be transmitted.
CK, IK: K key is used to derive Cipher Key (CK) and Integrity Key (IK).
Keys for NAS traffic:
It is used to protect NAS traffic with a particular integrity algorithm
It is used to protect NAS traffic with a particular encryption algorithm
Keys for UP traffic:
It is used to protect UP traffic with a particular encryption algorithm
Keys for RRC traffic:
It is used to protect RRC traffic with a particular integrity algorithm
It is used to protect RRC traffic with a particular encryption algorithm
Call Flow 1: Authentication Request/ Authentication Response
According to the diagram above, both UE and HSS will have “K” key stored in them.
For UE “K” key is stored in SIM card. In HSS “K” key is stored in subscriber database.
The security flow will start when a UE will send Initial NAS message.
In that message, “UE security capabilities” IE will be present and it is sent to MME.
Initially MME will not be having any information about the UE, and hence it will be able to authenticate the subscriber.
So MME will send “Authentication Information Request” using Diameter protocol.
IMSI will be sent in the “UE security capabilities” by UE to MME. MME will use this identifier to get the required information from HSS.
HSS will also be having “K” key and gets the authentication vectors.
With the help of “K” keys, it will derive “KASME, AUTN, XRES, RAND” and delivers to MME using “Authentication Information Response”
MME will take this information, from “KASME” it will derive “KNASenc, KNASint, KeNB”
Once this is completed, MME will send “Authentication Request” to UE. It will send “RAND, AUTN” along with the request.
UE will uses the “k + AUTN + RAND” to derive the “RES”.
The “RES” will be sent to MME in “Authentication Response”. MME will check “RES=XRES” and UE will be authenticated.
This is how UE Authentication will at the network side.
The AUTN calculated by UE is equal to AUTN sent by the network, Network will be authenticated by UE.
Call Flow 2: NAS Security Mode command/ NAS Security Mode Complete
Till the last flow, only the user has been authenticated. Encryption and Integrity protection has not been completed.
These keys will be exchanged in this flow.
Once the user has been authenticated, MME will send the “NAS Security Mode Command” that will have EPS Encryption algorithm and EPS Integrity Algorithm. It will also send KASME key.
UE will use the above information “KASME, EPS Encryption algorithm, EPS Integrity Algorithm” and will derive KNASenc, KNASint keys.
Then UE will encrypt and integrity protect the “NAS Security Mode Complete”
Till here the NAS layer encryption and integrity protection will be completed.
But still RRC layer encryption and user plane encryption needs to be taken care.
So MME will send “Initiation context setup” to eNB over S1AP protocol.
In that message it will include “security capabilities and KeNB”
The eNB will receive it, and it si able to derive “KRRCenc, KRRCint, KUPenc”.
Then eNB will send “RRC Security Mode Command” to UE.
It will include “AS Encryption Algo, AS Integrity Algorithm, START Parameter enc + int”
Then the UE is able to derive “KRRCenc, KRRCint, KUPenc”.
Then UE will encrypt and integrity protect the “RRC Security Mode Complete”