In a non-roaming scenario, the LMF may send the first message authentication code, the first freshness parameter, and the first location privacy setting data to a GMLC, and then the GMLC sends the first message authentication code, the first freshness parameter, and the first location privacy setting data to the UDM. In a non-roaming scenario, a process in which the UE reports the first message authentication code, the first freshness parameter, and the first location privacy setting data to the UDM may be: UE→AMF→UDM, UE→AMF→LMF→UDM, or UE→AMF→LMF→GMLC→UDM.
In this embodiment of this application, a manner of reporting data to the UDM by the UE is not limited, and a manner of delivering data to the UE by the UDM is not limited either.
The first freshness parameter includes the first counter value and the first FC value. Because the first FC value is fixed, the network element in the core network may learn that the first freshness parameter transmitted in step S103 to step S107 may be the first counter value.
Step S108: The UDM sends the first location privacy setting data and the first freshness parameter to the AUSF. Correspondingly, the AUSF receives the first location privacy setting data and the first freshness parameter from the UDM.
When sending the first location privacy setting data and the first freshness parameter to the AUSF, the UDM may add the first location privacy setting data and the first freshness parameter to one message, and the message, for example, may be a Nausf_protection request.
Step S109: The AUSF calculates a second message authentication code and a third message authentication code of the first location privacy setting data.