5G安全架构 - 6.1.3.2 5G AKA

Authentication procedure for 5G AKA

前言:本文来自TS 33.501 v15.2.0。仅针对和USIM卡相关的部分进行了翻译和注释。

5G AKA enhances EPS AKA [10] by providing the home network with proof of successful authentication of the UE from the visited network. The proof is sent by the visited network in an Authentication Confirmation message.

5G AKA通过给归属网络提供UE访问网络成功鉴权的证据,对EPS AKA进行了增强。

The selection of using 5G AKA is described in sub-clause 6.1.2 of the present document.

NOTE 1: 5G AKA does not support requesting multiple 5G AVs, neither the SEAF pre-fetching 5G AVs from the home network for future use.

The authentication procedure for 5G AKA works as follows, cf. also Figure 6.1.3.2-1:

For each Nudm_Authenticate_Get Request, the UDM/ARPF shall create a 5G HE AV. The UDM/ARPF does this by generating an AV with the Authentication Management Field (AMF) separation bit set to "1"as defined in TS 33.102 [9] . The UDM/ARPF shall then derive KAUSF as per Annex A.2, and calculate XRES* as per Annex A.4. Finally, the UDM/ARPF shall create a 5G HE AV from RAND, AUTN, XRES*, and KAUSF.

针对每一个Nudm_Authenticate_Get Request请求,UDM/ARPF都会创建一个5G HE AV。AV的AMF分割位需要置为1。然后UDM/ARPF派生出KAUSF,并算出XRES。最后,5G HE AV由RAND, AUTN, XRES和KAUSF产生出来。

注:按照附录A的说明,在5GC中所有的派生算法都遵循TS33.220附录B中定义的KDF。简单描述就是derived key = HMAC-SHA-256 ( Key , S )。几个密钥,都可以用鉴权五元组+SN算出来。具体算法参看本规范附录A。

The UDM shall then return the 5G HE AV to the AUSF together with an indication that the 5G HE AV is to be used for 5G-AKA in a Nudm_UEAuthentication_Get Response. In case SUCI was included in the Nudm_UEAuthentication_Get Request, UDM will include the SUPI in the Nudm_UEAuthentication_Get Response.

UDM把5G HE AV返回给AUSF。如果SUCI包含在请求中,则把SUPI一起带回。

The AUSF shall store the XRES* temporarily together with the received SUCI or SUPI. The AUSF may store the KAUSF.

AUSF临时存储XRES*以及收到的SUCI或者SUPI。有可能存储KAUSF。

The AUSF shall then generate the 5G AV from the 5G HE AV received from the UDM/ARPF by computing the HXRES* from XRES* according to Normative Annex A.5 and KSEAF from KAUSF according to Annex A.6, and replacing the XRES* with the HXRES* and KAUSF with KSEAF in the 5G HE AV.

AUSF使用5G HE AV,从XRES计算出HXRES;根据KAUSF算出KSEAF。并进行相应的替换,从而得到5G AV。

The AUSF shall then remove the KSEAF return the 5G SE AV (RAND, AUTN, HXRES*) to the SEAF in a Nausf_UEAuthentication_Authenticate Response.

AUSF移除KSEAF,得到5G SE AV并发回SEAF。

The SEAF shall send RAND, AUTN to the UE in a NAS message Authentication Request. This message shall also include the ngKSI that will be used by the UE and AMF to identify the KAMF and the partial native security context that is created if the authentication is successful. This message shall also include the ABBA parameter.

SEAF发送RAND和AUTN给UE,要求进行鉴权。

The SEAF shall set the ABBA paremeter as defined in Annex A.7.1. The ME shall forward the RAND and AUTN received in NAS message Authentication Request to the USIM.

NOTE 2: The ABBA parameter is included to enable the bidding down protection of security features that may be introduced later.

At receipt of the RAND and AUTN, the USIM shall verify the freshness of the 5G AV by checking whether AUTN can be accepted as described in TS 33.102[4]. If so, the USIM computes a response RES. The USIM shall return RES, CK, IK to the ME. If the USIM computes a Kc (i.e. GPRS Kc) from CK and IK using conversion function c3 as described in TS 33.102 [4], and sends it to the ME, then the ME shall ignore such GPRS Kc and not store the GPRS Kc on USIM or in ME. The ME then shall compute RES* from RES according to Annex A.4. The ME shall calculate KAUSF from CK||IK according to clause A.2. The ME shall calculate KSEAF from KAUSF according to clause A.6. An ME accessing 5G shall check during authentication that the "separation bit" in the AMF field of AUTN is set to 1. The "separation bit" is bit 0 of the AMF field of AUTN.

收到RAND和AUTN后,USIM(按照3G/EPS AKA相同流程)计算出RES,CK和IK返回给ME。ME根据RES算出RES*,根据CK和IK算出KAUSF,进而算出KSEAF。

NOTE: This separation bit in the AMF field of AUTN can not be used anymore for operator specific purposes as described by TS 33.102 [9], Annex F.

The UE shall return RES* to the SEAF in a NAS message Authentication Response.

UE把RES*返回给SEAF。

The SEAF shall then compute HRES* from RES* according to Annex A.5, and the SEAF shall compare HRES* and HXRES. If they coincide, the SEAF shall consider the authentication successful from the serving network point of view. If not, the SEAF proceed as described in sub-clause 6.1.3.2.1. If the UE is not reached, and the RES is never received by the SEAF, the SEAF shall consider authentication as failed, and indicate a failure to the AUSF.

SEAF根据RES计算HRES并与HXRES*进行比较;如果相同则认为鉴权成功。

The SEAF shall send RES* together with the corresponding SUCI or SUPI, as received from the UE, in a Nausf_UEAuthentication_Authenticate Request message to the AUSF.

SEAF发送RES*以及对应的SUCI或者SUPI给AUSF。

When the AUSF receives the Nausf_UEAuthentication_Authenticate Request message including a RES* it may verify whether the AV has expired. If the AV has expired the AUSF may consider the authentication as unsuccessful from the home network point of view. AUSF shall compare the received RES* with the stored XRES. If the RES and XRES* are equal, the AUSF shall consider the authentication as successful from the home network point of view.

AUSF收到带有RES的消息后,可能会检查AV是否过期,如果过期则从归属网视为鉴权失败。AUSF会比较收到的RES和XRES*,相同则视为鉴权成功。

The AUSF shall indicate to the SEAF in the Nausf_UEAuthentication_Authenticate Response whether the authentication was successful or not from the home network point of view. If the authentication was successful, the KSAEF shall be sent to the SEAF in the Nausf_UEAuthentication_Authenticate Response. In case the AUSF received a SUCI from the SEAF when the authentication was initiated (see sub-clause 6.1.2 of the present document), and if the authentication was successful, then the AUSF shall also include the SUPI in Nausf_UEAuthentication_ Authenticate Response.

AUSF在响应值中指示从归属网角度认为鉴权是否成功并返回给SEAF。如果鉴权成功,KSEAF和SUPI会被发给SEAF。

If the authentication was successful, the key KSEAF received in the Nausf_UEAuthentication_Authenticate Response message shall become the anchor key in the sense of the key hierarchy in sub-clause 6.2 of the present document. Then the SEAF shall derive the KAMF from the KSEAF, the ABBA parameter and the SUPI according to Annex A.7, and shall provide the ngKSI and the KAMF to the AMF.

If a SUCI was used for this authentication, then the SEAF shall only provide ngKSI and KAMF to the AMF after it receives the Nausf_UEAuthentication_ Authenticate Response message containing SUPI; no communication services will be provided to the UE until the SUPI is known to the serving network.

如果在鉴权中用到了SUCI,那么SEAF仅仅在收到包含了SUPI的Nausf_UEAuthentication_ Authenticate Response消息之后,才会向AMF提供ngKSI和KAMF。直到服务网络识别SUPI,UE不会获得任何的通信服务。

The further steps taken by the AUSF after the authentication procedure are described in sub-clause 6.1.4 of the present document.

孟子 · 离娄下 · 第三章

孟子告齐宣王曰:“君之视臣如手足,则臣视君如腹心;君之视臣如犬马,则臣视君如国人;君之视臣如土芥,则臣视君如寇仇。”

王曰:“礼为旧君有腹,何如斯可为服矣?”

曰:“谏行言听,膏泽下于民;有故而去,则君使人导之出疆,又先于其所往;去三年不反,然后收其田里:此之位三有礼焉;如此则为之服矣。今也为臣,谏则不行,言则不听,膏泽不下于民;有故而去,则君搏执之,又极之于其所往;去之日,遂收其田里:此之谓寇雠,寇仇,何服之有?”

2000多年前的先贤讲得清清楚楚,奈何人类就是复读机,不停重复以前的故事。被单一声音包围的人更是如此,可能是觉得你们离开我就不能活,我想怎么搞就怎么搞。

2024.05.31 update

拭目以待

 

魔幻2020大事记

2020年开篇就是澳洲大火,当时各种吃瓜。没想到后面各种前所未见的事情一件接一件的冲击,到现在才刚刚过了五个月,开年的事情都没什么印象了。决定做个记录,

时间事件
1月澳洲大火持续数月
 新冠肺炎爆发,武汉封城;全国逐步启动封锁
 科比直升机坠亡
 英国脱欧
 伊朗将军在伊拉克机场被美国人干掉,逼逼了一段时间后朝美军基地发射几枚火箭弹完事
 非洲蝗灾
2月李文亮医生病逝
3月中国向意大利派出专家组;美帝和德国到处截停医疗物资
 美股连续四次熔断,段子手已经被榨干
 英国针对新冠,提出群体免疫(herd immunity),大跌眼镜
 东京奥运会推迟举办;高考延期一个月
4月原油期货价格为负数,吃瓜中发现中国银行是傻鸟之一
 武汉解封
5月美帝进一步收紧华为禁令,启动无限追溯
 视频记录美帝黑人被警察膝压窒息死亡,明州暴乱。国内网民刷“It's a beautiful sight”,原文引用自佩洛西
  
  
  
  

 

华为禁令之续篇

一晃眼,一年过去了。整整一整年没写任何东西,然后看到美帝又出了针对华为的新规。链接如下:https://www.federalregister.gov/documents/2020/05/19/2020-10856/export-administration-regulations-amendments-to-general-prohibition-three-foreign-produced-direct

简单来说,就是只要使用了美国技术,要和华为做生意,就需要向美国报备,申请批准。

华为,可以说是中国企业中,最具有国际视野,也最遵守国际规则的企业。完全靠着华为人的996甚至007,才一步步打到现在的地位。这样的一个企业,在美帝没有市场,也没有对手(除了消费者终端跟高通是对手,但是华为的麒麟并不外卖),反而有众多的合作伙伴,给美国的科技企业带来巨大的利益。

在这种情况下,美帝还是要彻底撕破脸进行彻底打压。情况已经很明显,就是划了条线出来:中国人,你们就停在这里,不准再往产业链上面爬,爬上来一个我搞死一个。

所以,守住华为,就是守住我们的上甘岭,守住我们的标杆。

华为不倒,其他科技企业就知道,我们可以继续往产业链上游攀爬;华为倒了,大家就洗洗睡,不要投钱搞研发,毕竟发展得越好,死得越早。

尽管我很不喜欢华为的终端产品,因为各种黑点一大堆,从UI审美,到PPT鸿蒙OS,到神奇的拍月亮……但是,企业级没法支持,也只能在消费级尽量支持他们一把了。