1、移动移动 网络安全标准与协议网络安全标准与协议1主要内容 EPS 安全综述安全综述 EPS AKA与与S.M.C过程过程 EPS MM程与程与HO过程中的安全过程中的安全 EPS KDF EPS EEA1/2/3与与EIA/1/2/3算法算法2安全系统的两大基本问题密钥的管理与安全算法的管理独立进行安全密钥的管理安全算法的管理产生传递更新存贮新鲜性AKAHO加密算法的选择完整性算法选择算法的更新算法的存贮新鲜性SMC及HO3EPS 安全目标 双向认证 防止中间人攻击 网络将UE的安全能力通过I.P.方式传递给UE,UE检验是否受到修改。多安全算法 安全隔离 足够强度的密钥长度 目前定义为128
2、位,但可容易更新到256位。向下兼容,但要有更高的安全强度 支持USIM卡,但不支持SIM卡 保持Key的新鲜性 COUNT不允许反转 两套安全上下文以支持ISR USIM与ME同时支持两套安全上下文4EPS的最新特性:安全隔离的最新特性:安全隔离保证非安全的影响最小化,当一个局部出现不安全时,不影响其它部分的安全性不同算法之间的安全隔离多安全算法,当一个算法不安全时,启用另一个安全算法。不同的PLMN之间安全隔离Kasme的计算需要PLMN-Id当PLMN发生改变,所有的Key及AV全部更新不同的MME之间的安全隔离当MME发生改变时,NAS S.C.可更新不同的ENB之间的安全隔离当ENB
3、发生改变时,AS S.C.全部更新不同的S.C.的安全隔离在LTE内,当一个S.C.成为Current,原来的Current S.C.就删除,不再使用。在LTE内,当创建一个新的S.C.则覆盖Non-Current S.C.当UE从GERAN/UTRAN切换到LTE后,一进入Idle或Detach,则旧RAT的S.C.删除。所有Key的计算都是单向函数当一个Key被破解了,其父Key不位被破解。5LTE/EPS加密与完整性保护 NASRRCUEENBS-GWMME加密与完加密与完整性保护整性保护加密与完加密与完整性保护整性保护加密或不加密,加密或不加密,没有完整性保护没有完整性保护NDS/IP
4、(TS33.210)用户平面用户平面6LTE/EPS加密与完整性保护 NAS的加密(可选)KNASCenc:NAS Ciphering Algorithm NAS的完整性保护 KNASint:NAS Integrate Protection Algorithm RRC的加密(可选)KRRCenc:RRC Ciphering Algorithm RRRC的完整性保护 KRRCint:RRC Integrate Protection Algorithm UP的加密(可选)KUPenc:UP(=RRC)Ciphering Algorithm7 USIM/AuC UE/MME KASME K KUPe
5、nc KeNB/NH KNASint UE/HSS UE/eNB KNASenc CK,IK KRRCint KRRCenc 8ME及USIM卡的能力 E-UTRAN不能使用,因此不能接入到LTE系统中,也就是2G的SIM卡不能用于LTE的UE中。只可实现GERAN与UTRAN之间的移动性 E-UTRAN可以使用,因此可实现GERAN、UTRAN与E-UTRAN之间的移动性 E-UTRAN可以使用,因此可实现GERAN、UTRAN与E-UTRAN之间的移动性 SIMMEGERANUTRANE-UTRAN USIMMEGERANUTRANE-UTRAN E-USIMMEGERANUTRANE-U
6、TRANEMM S.C.能够存放EMM S.C.的USIM为E-USIM9USIM,ME及EPS S.C.USIM产生的CK,IK传递给ME,ME产生EPS S.C.(如Kasme等)ME产生的EPS S.C.是在Votile Memeory中,进入Detach时,将Kasme,Knasenc,Knasint,NAS Count,eKSI写入到ME中的Non-Votile Memeory中。USIM产生的CK,IK传递给ME,ME产生EPS S.C.(如Kasme等)ME产生的EPS S.C.是在Votile Memeory中,进入Detach时,将Kasme,Knasenc,Knasint,
7、NAS Count,eKSI写入到E-USIM中的Non-Votile Memeory中。USIMMECK,IK E-USIMMEEMM S.C.EPS S.C.CK,IKEPS S.C.10删除ME中存储的EPS S.C.(E-)USIMMEEPS S.C.当ME中有EPS S.C.,当下面的情形出现时,则ME中的EPS S.C.与卡中的数据均出现冲突。开机状态下:卡被拨出,关机状态下:换上另一张(E-)USIM卡时,关机状态下:卡被拨出为了解决上面的三个问题,就直接(在开机后)删除ME中存储的EPS S.C.开机状态下卡被拨出开机状态下卡被拨出关机状态下关机状态下USIM卡被换成另一个卡卡
8、被换成另一个卡关机状态下卡被拨出关机状态下卡被拨出11USIM,ME及S.C.及IRAT移动性GERAN/UTRAN的3G S.C.与EPS S.C.是相互独立的。即使将一个映射到另一个时,就成为另外一个类型,而原来的类型不变,即两者还是独立的。当UE从LTE进入(HO或Idle的RAU)到GERAN/UTRAN后,SGSN执行UMTS AKA后,会出现两个S.C.,一个用于GERAN/UTRAN,而另一个用于EPS,这两个S.C.是独立的。若SGSN不执行UMTS AKA,则SGSN一直使用从EPS S.C.映射过来的3G S.C.,并且将此映射的3G S.C.替代所有的原来SGSN及UE上
9、的3G S.C.然后,当UE从GERAN/UTRAN通过HO到LTE后,UE使用的是从3G S.C.映射过来的Mapped EPS S.C.;若前面SGSN没有执行UMTS AKA,则UE将原来的EPS S.C.映射为Mapped 3G S.C.,此时使用的Mapped EPS S.C.是在此Mapped 3G S.C.的再次映射,而此时最初的EPS S.C.还是有效的但是进入了Non-Current状态。若此后,UE进入Idle状态后,再次进入连接状态,则使用原来的EPS S.C.2次Mapped的EPS S.C.被删除(但Mapped 3G S.C.还是不作任何的变化)若UE从GERAN/
10、UTRAN通过Idle的TAU进入到LTE,则UE使用EPS S.C.,而3G S.C.(包括(E-)USIM中的CK,IK)不作任何的变化。USIMME E-USIMMEEMM S.C.EPS S.C.3G S.C.CK,IK,KSI3G S.C.CK,IK,KSIEPS S.C.12Type of EPS Security ContextSecurity ContextFull native SCPartial Native SC没有确定NAS完整保护算法及加密算法Mapped SCCNCNCC13Security ContextSecurity ContextEPSNAS Securit
11、y ContextEPSAS Security ContextAS keys&IDNHNCCthe identifiers of the selected AS cryptographic algorithms&counters used for replay protection KASME,KSIasmeUE security capabilities UL&DL NAS COUNTKnas-int&Knas-enc&identifiers of the selected NAS integrity&encryption algorithms.Full EPS14EPS S.C.状态的转移
12、在EPS中,最多只能有一个Current及一个Non-Current EPS S.C.当AKA产生一个Non-Current EPS S.C.时,若存在其它Non-Current,则覆盖之前的。通过NAS S.M.C.将一个Non-Current的EPS S.C.激活为Current时,新激活的EPS S.C.覆盖之前的Current EPS S.C.(可能是Native,也可能是Mapped)。但是当UE从GERAN/UTRAN切换到E-UTRAN时,UMTS S.C.是映射到EPS S.C.并自动成为Current EPS(mapped)S.C.,同时原来LTE中的Current EPS
13、native S.C.就自动地变为Non-Current,并覆盖原来的Non-Current。这是一个很大的不同的。Native EPS S.C.CurrentNon-CurrentFull(Knas)Partial(no Knas)Mapped EPS S.C.Full(Knas)Partial(no Knas)AKANAS SMC从从GERAN/UTRAN切换到切换到LTE从从GERAN/UTRAN切换到切换到LTE15EPS UE与EMM S.C.当UE关机或进入DEREGISTER状态时,EMM S.C.只能放入到ME中的Non-Votile Memeory中。当UE开机时,使用ME中
14、的EMM S.C.当UE关机或进入DEREGISTER状态时,ME中的EMM S.C.必须存放到USIM中的Non-Votile Memeory中并标识有效,还标识ME中的S.C.无效(相当于删除)。当UE开机时,使用USIM中的EMM S.C.(如果标识为有效).UMTSUSIME-UTRANMEE-UTRANUSIME-UTRANMEEMM S.C.EMM S.C.EMM S.C.16Current EPS S.C.的选择与激活 If the MME receives a TAU Request or Attach Request protected with a non-current
15、full EPS security context,then this context becomes the current EPS security context and the MME shall delete any existing current EPS security context.After a successful run of a NAS SMC relating to the eKSI associated with an EPS security context,this context becomes the current EPS security conte
16、xt and shall overwrite any existing current EPS security context.17S.C.的类型与状态的关系Non-CurrentCurrentFull Mapped EPS S.C.Not allowed当UE从GERAN/UTRAN通过HO进入到E-UTRAN中。当UE从G/U通过Idle TAU(或先是HO进入E然后进入Idle)进入E时,若UE有Full Native S.C.时,UE应当使用这个Full Native S.C.,否则,UE使用Mapped EPS S.C.Partial(Native)EPS S.C.执行了EPS A
17、KA过程,但没有通过NAS S.M.C过程激活使用此KSIasme。Not allowedFull native EPS S.C.执行了EPS AKA过程,并且通过NAS S.M.C过程激活Kasme0,此时Kasme0是Full Native Current。但UE进入GERAN/UTRAN后通过UMTS AKA及S.M.C过程激活了UMTS S.C.,当UE切换到回LTE时,Mapped EPS S.C.成为Current时,则Kasme0就成为了Non-Current。执行了EPS AKA过程,并且通过NAS S.M.C过程激活使用此KSIasme。18Storage S.C.in th
18、e UE during power-offS.C.in the ME volatile Memory USIMME NV-MEMEMM capable in USIMNo EMM capable in USIMFull native EPS S.C.Full native S.C is Stored and markedvalidN/AAny native S.C.is marked invalid or removed.N/AYesFull native S.C is Stored and markedvalidFull mapped EPS S.C.or partial native EP
19、S S.C.Any native S.C.is marked invalid or removed.19主要内容 EPS 安全综述安全综述 EPS AKA与与S.M.C过程过程 EPS MM程与程与HO过程中的安全过程中的安全 EPS KDF EPS EEA1/2/3与与EIA/1/2/3算法算法20EPS Authentication and Key Agreemen UEMMEHSSGenerate authenticationvectors AV(1.n)Store authentication vectorsSelect authentication vector AV(i)Authe
20、ntication data requestAuthentication data responseAV(1.n)User authentication requestKSIasme,RAND(i)|AUTN(i)User authentication responseRES(i)Compare RES(i)and XRES(i)Verify AUTN(i)Compute RES(i)Select Kasme(i)Authentication andkey establishmentDistribution ofauthenticationvectors from HEto SNCompute
21、 CK(i)and IK(i),thenKasme(i)21EPS AKA If the keys CK,IK resulting from an EPS AKA run were stored in the fields already available on the USIM for storing keys CK and IK this could lead to overwriting keys resulting from an earlier run of UMTS AKA.This would lead to problems when EPS security context
22、 and UMTS security context were held simultaneously(as is the case when security context is stored e.g.for the purposes of Idle Mode Signaling Reduction).Therefore,plastic roaming where a UICC is inserted into another ME will necessitate an EPS AKA authentication run if the USIM does not support EMM
23、 parameters storage.也就是说,在EPS AKA过程中产生的CK,IK不能存贮于USIM中存贮UMTS AKA产生的CK,IK的地方。USIM应当为EPS AKA的CK,IK使用独立的Files。若USIM不支持EMM File,则EPS CK,IK必须存贮在ME中。这就说明,当USIM不支持EMM Files,当USIM卡换ME时,则必须要执行EPS AKA过程。22EPS-Authentication Vector M M E HE Authentication data request IM SI,SN identity,Network Type Type Authen
24、tication data response EPS-Authentication Vector(s)说明Kasme不是由MME产生的,而是由HE直接产生的EPS AV(4)RANDUMTS AV(5)GERAN AV(3)XRESAUTNKasmeCKIKKc23EPS user authentication(EPS AKA)ME/U S I M MME U s e r a u t h e n t i c a t i o n r e q u e s t (R A N D,A U T N,K S IA S ME)U s e r a u t h e n t i c a t i o n r e s
25、 p o n s e (R E S)U s e r a u t h e n t i c a t i o n r e j e c t (C A U S E)24UMTS HSSAMFRANDSQNKf1f2f3f4f5MACXRESCKIKAKAMFSQNSQN(+)AKAMFMACMAC认证向量五元组认证向量五元组认证令牌认证令牌认认证证算算法法认证配置认证配置RANDAUTNHSS25UMTS UERANDKf1f2f3f4f5XMACRESCKIKSQN(+)AK双向认证双向认证认证令牌及随机数认证令牌及随机数AMFMACSQNAK认认证证算算法法MACUSIMMEME26EPS HSSA
26、MFRANDSQNKf1f2f3f4f5MACXRESCKIKAKAMFSQNSQN(+)AKAMFMACMAC认证向量四元组认证向量四元组认证令牌认证令牌认认证证算算法法认证配置认证配置RANDAUTNSN-IdKasmeHSS27EPS UERANDKf1f2f3f4f5XMACRESCKIKSQN(+)AK双向认证双向认证认证令牌及随机数认证令牌及随机数AMFMACSQNAK认认证证算算法法MACUSIMSN-IdKasmeMEME28Different serving network domains MMEMMESGSNAn SGSN may forward unused UMTS a
27、uthentication vectors to an MME UMTS AVs which were previously stored in the MME may be forwarded back towards the same SGSN.UMTS AVs which were previously stored in the MME shall not be forwarded towards other SGSNs.EPS authentication vectors shall not be forwarded from an MME towards an SGSN.Unuse
28、d EPS authentication vectors shall not be distributed between MMEs belonging to different serving domains(PLMNs)UMTS authentication vectors that were previously received from an SGSN shall not be forwarded between MMEsOnly EPS AVs in the same PLMNOnly UMTS AVs in the same SGSNOnly UMTS AVs in the sa
29、me PLMN2930MMEHSSCK,IKKDF256256SN id,SQN,AKKeNBKASME256KDFKDFKDFKDF256-bitkeysKNASencKNASint128-bitkeysKNASencKNASintTruncTrunc256256128128256256256NAS-enc-alg,Alg-IDNAS-int-alg,Alg-IDNAS UPLINK COUNTKDFKDF256-bitkeysKRRCencKRRCint128-bitkeysKRRCencKRRCintTruncTrunc256256128128256256RRC-enc-alg,Alg-
30、IDRRC-int-alg,Alg-IDUP-enc-alg,Alg-ID256256Physical cell ID,EARFCN-DL256KeNBeNBeNBKeNB*KDFKUPencKUPenc256256128TruncKDFNHNHKeNB25631MECK,IKKDF256256SN id,SQN,AKKeNBKASME256KDFKDFKDFKDF256-bitkeysKNASencKNASint128-bitkeysKNASencKNASintTruncTrunc256256128128256256256NAS-enc-alg,Alg-IDNAS-int-alg,Alg-I
31、DNAS UPLINK COUNTKDFKDF256-bitkeysKRRCencKRRCint128-bitkeysKRRCencKRRCintTruncTrunc256256128128256256RRC-enc-alg,Alg-IDRRC-int-alg,Alg-IDUP-enc-alg,Alg-ID256Physical cell ID,EARFCN-DL256256KeNB*KDFKUPencKUPencTrunc256128256KDFNHNHKeNB25632Kasme与SN ID SN ID=MCC+MNC Kasme=f(CK,IK,SN id,SQN(+)AK)Kasme的
32、产生与SN id有关,因此,当SN id发生改变时,则原来的Kasme不能使用。因此,在Inter-PLMN的TAU时,则必须要运行EPS AKA。33NAS COUNT Reset0 NAS Count(复位)AKAS.C.Mapping in UTRAN/GERANE-UTRAN HO S.C.Mapping in UTRAN/GERANE-UTRAN idle Mobility The NAS COUNTs shall not be reset during idle mode mobility or handover for an already existing native EPS
33、 NAS security context.也就是说NAS Count快还返转时,就要更换Kasme了34NAS S.M.CThe NAS security mode command message from MME to UE shall contain the replayed UE security capabilities,the selected NAS algorithms,the eKSI for identifying KASME,and both NONCEue and NONCEmme in the case of creating a mapped context in
34、idle mobility.This message shall be integrity protected(but not ciphered)with NAS integrity key based on KASME indicated by the eKSI in the message.The UE shall verify the integrity of the NAS security mode command message.This includes ensuring that the UE security capabilities sent by the MME matc
35、h the ones stored in the UE to ensure that these were not modified by an attacker and checking the integrity protection using the indicated NAS integrity algorithm and the NAS integrity key based on KASME indicated by the eKSI.In addition,when creating a mapped context for the case described in clau
36、se 9.1.2,the UE shall ensure the received NONCEUE is the same as the NONCEUE sent in the TAU Request and also calculate KASME from CK,IK and the two nonces(see Annex A.11).If successfully verified,the UE shall start NAS integrity protection and ciphering/deciphering with this security context and se
37、nds the NAS security mode complete message to MME ciphered and integrity protected The NAS security mode complete message shall include IMEI in case MME requested it in the NAS SMC Command message.The MME shall de-cipher and check the integrity protection on the NAS Security Mode Complete using the
38、keys and algorithms indicated in the NAS Security Mode Command.NAS downlink ciphering at the MME with this security context shall start after receiving the NAS security mode complete message.NAS uplink deciphering at the MME with this context starts after sending the NAS security mode command messag
39、e.MMEUENAS S.M.Command(UE S.Cap,Selected NAS Algoritm,eKSI,IMEISV Request,NONCEue,NONCEmme,NAS-MAC)NAS S.M.Complete(IMEISV,NAS-MAC)Start I.P.&(de-)CipheringStart UL de-CipheringStart DL-CipheringStart I.P.35NonceIf the MME does not have the context indicated by the UE in the TAU request,or the TAU r
40、equest was received unprotected,the MME shall create a new mapped security context(that shall become the current security context).In this case,the MME shall generate a 32bit NONCEmme and use the received NONCEue with the NONCEmme to generate a fresh mapped KASME from CK and IK,where CK,IK were iden
41、tified by the KSI and P-TMSI in the TAU Request.See Annex A.11 for more information on how to derive the fresh KASME.The MME initiates a NAS Security mode command procedure with the UE including the KSISGSN,NONCEUE,and NONCEMME in the NAS Security mode command.The uplink and downlink NAS COUNT for m
42、apped security context shall be set to start value(i.e.,0)when new mapped security context is created in UE and MME.Nonce-UE When creating a mapped context for the case described in clause 9.1.2,the UE shall ensure the received NONCEUE is the same as the NONCEUE sent in the TAU Request and also calc
43、ulate KASME from CK,IK and the two nonces(see Annex A.11).36AS S.M.CThe AS security mode command message from eNB to UE shall contain the selected AS algorithms.This message shall be integrity protected with RRC integrity key based on the current KASME.The AS security mode complete message from UE t
44、o eNB shall be integrity protected with the selected RRC algorithm indicated in the AS security mode command message and RRC integrity key based on the current KASME.RRC and UP downlink ciphering(encryption)at the eNB shall start after sending the AS security mode command message.RRC and UP uplink d
45、eciphering(decryption)at the eNB shall start after receiving and successful verification of the AS security mode complete message.RRC and UP uplink ciphering(encryption)at the UE shall start after sending the AS security mode complete message.RRC and UP downlink deciphering(decryption)at the UE shal
46、l start after receiving and successful verification of the AS security mode command message 37AS SMC过程 ME eNB AS Security Mode Command(Integrity algorithm,Ciphering algorithm,MAC-I)AS Security Mode Complete(MAC-I)Verify AS SMC integrity.If succesful,start RRC integrity protection,RRC/UP downlink dec
47、iphering,and send AS Security Mode Complete.Start RRC/UP uplink ciphering Start RRC/UP uplink deciphering Start RRC integrity protection Start RRC/UP downlink ciphering 38AS SMC与NAS SMC的同步 NAS SMC正在进行 1:MME不应当发起触发AS SMC的S1-AP过程 6:MME只有完成了NAS SMC后才继续Inter-MME HO。Inter-ENB HO正在进行 5:源ENB reject触发AS SMC
48、的S1-AP过程 5:源ENB当AS Refresh/Re-key结束后,才可以进行HO HO过程中 3:MME发起NAS SMC,但在HO Request/Path Switch Request Acknowledge中使用Old AS S.C.4:UE收到NAS SMC,但在HO过程中继续使用Old AS S.C.触发AS SMC的SA-AP正在进行中 2:MME不应当发起NAS SMC.7:MME当S1-AP结束后,才可以进行Inter-MME HO NAS SMC完成,但S1-AP未进行 8,9:有Inter-MME HO,新旧MME则继续使用Old AS S.C.传输,同时在S10接
49、口上传输两套S.C.39主要内容 EPS 安全综述安全综述 EPS AKA与与S.M.C过程过程 EPS MM程与程与HO过程中的安全过程中的安全 EPS KDF EPS EEA1/2/3与与EIA/1/2/3算法算法40EPS MM程与程与HO过程中的安全过程中的安全 LTE内的状态迁移时的安全上下文的处理 LTE内TAU过程。UTMS与LTE之间的RAU,TAU过程 LTE内的X2,S1 Handover过程 LTE与UMTS之间的切换过程41Transition To EMM-DEREGISTEREDIf UE and MME have a full non-current native
50、 EPS security context and a current mapped EPS security context,then they shall make the non-current native EPS security context the current one.UE and MME shall delete any mapped or partial EPS security contexts they hold.NC-FNC-PC-MC-FEMM-DEREGISTEREDEMM-REGISTEREDC-FE-USIMMEUSIMMEC-F42To EMM-DERE