Section: 5.5.4.4 UE-initiated authentication and key agreement procedure accepted by the network
Content: Upon receiving the RELAY KEY REQUEST message, the AMF processes the message and interacts with the AUSF of the 5G ProSe remote UE or the 5G ProSe end UE as specified in 3GPP TS 33.503[ Security Aspects of Proximity based Services (ProSe) in the 5G System (5GS) ]  [56]. If EAP-AKA' authentication for the 5G ProSe remote UE or the 5G ProSe end UE is initiated by the network, the AMF shall: a) create a RELAY AUTHENTICATION REQUEST message; b) set the PRTI IE of the RELAY AUTHENTICATION REQUEST message to the PRTI value of the received RELAY KEY REQUEST message; c) set the EAP message IE of the RELAY AUTHENTICATION REQUEST message to EAP request message received from the AUSF; and d) send the RELAY AUTHENTICATION REQUEST message to the UE. Upon receiving the RELAY AUTHENTICATION REQUEST message, the UE stops the timer T3527 and forwards the EAP message to the 5G ProSe remote UE or the 5G ProSe end UE as specified in 3GPP TS 24.554[ Proximity-services (ProSe) in 5G System (5GS) protocol aspects; Stage 3 ]  [19E]. Upon receiving the EAP response message from the 5G ProSe remote UE or the 5G ProSe end UE as specified in 3GPP TS 24.554[ Proximity-services (ProSe) in 5G System (5GS) protocol aspects; Stage 3 ]  [19E], the UE shall: a) create a RELAY AUTHENTICATION RESPONSE message; b) set the PRTI IE of the RELAY AUTHENTICATION RESPONSE message to the PRTI value of the received RELAY AUTHENTICATION REQUEST message; c) set the EAP message IE of the RELAY AUTHENTICATION RESPONSE message to EAP response message received from the 5G ProSe remote UE or the 5G ProSe end UE; and d) start a timer T3527 upon sending the RELAY AUTHENTICATION RESPONSE message to the AMF. After receiving the RELAY AUTHENTICATION RESPONSE message, the AMF may send a new RELAY AUTHENTICATION REQUEST message carrying EAP request message according to further handling of EAP-AKA' authentication from the AUSF as specified in 3GPP TS 33.503[ Security Aspects of Proximity based Services (ProSe) in the 5G System (5GS) ]  [56]. The UE repeats the handling of the RELAY AUTHENTICATION REQUEST message as described above. Upon receiving the message from the AUSF that the authentication is successful, the AMF shall: a) create a RELAY KEY ACCEPT message; b) set the PRTI IE of the RELAY KEY ACCEPT message to the PRTI value of the RELAY KEY REQUEST message; c) include the EAP message IE of the RELAY KEY ACCEPT message set to EAP-success message received from the AUSF, if any; d) include the relay key response parameters IE of the RELAY KEY ACCEPT message set to KNR_ProSe and nonce_2 received from AUSF; and e) include the CP-PRUK ID in the relay key response parameters IE of the RELAY KEY ACCEPT message. Upon receiving the RELAY KEY ACCEPT message, the UE shall forward the EAP-success message, if any, and nonce_2 to the 5G ProSe remote UE or the 5G ProSe end UE as specified in 3GPP TS 24.554[ Proximity-services (ProSe) in 5G System (5GS) protocol aspects; Stage 3 ]  [19E], and consider the authentication as completed successfully. The UE shall store the CP-PRUK ID to be used in the remote UE report procedure as specified in subclause 6.6.2.2.