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

拭目以待