Correspondingly, the NG-RG receives the NAS SMC request message from the 5G-AGF network element.
S513: Optionally, if the NAS SMC request message in step S512 includes the first virtual interface information, the NG-RG verifies whether the first virtual interface information is modified on an air interface.
For example, if the first virtual interface information included in the NAS SMC request message is the same as the first virtual interface information stored on the NG-RG, it may be determined that the first virtual interface information is not modified on the air interface; or, if the first virtual interface information included in the NAS SMC request message is different from the first virtual interface information stored on the NG-RG, it may be determined that the first virtual interface information is modified on the air interface.
Further, if the NG-RG verifies that the first virtual interface information is not modified on the air interface, the authentication method provided in the embodiment of this application further includes the following step.
S514: The NG-RG sends a NAS SMC complete message to the 5G-AGF network element.
Correspondingly, the 5G-AGF network element receives the NAS SMC complete message from the NG-RG.
S515: The 5G-AGF network element sends the NAS SMC complete message to the AMF network element.
Correspondingly, the AMF network element receives the NAS SMC complete message from the 5G-AGF network element.
S516: The AMF network element determines a second key based on a first key.