An authentication method, wherein the method comprises: sending, by first user equipment, a first random parameter to second user equipment; obtaining, by the second user equipment, a first user identifier, a second user identifier, and a second random parameter, generating a second authentication feature based on the first user identifier, the second user identifier, the first random parameter, and the second random parameter, and sending the second authentication feature to the first user equipment; attempting to authenticate, by the first user equipment, correctness of the second authentication feature, generating a first authentication feature, and sending the first authentication feature to the second user equipment; and attempting to authenticate, by the second user equipment, correctness of the first authentication feature, wherein the authentication feature is a message authentication code, MAC, and after a second MAC is generated, the method further comprises: sending, by the second user equipment, the first random parameter and the second random parameter to the first user equipment; and the generating, by the first user equipment, a first authentication feature comprises: generating, by the first user equipment, the first MAC based on the first random parameter and the second random parameter, wherein the generating a second MAC comprises: generating a communication shared key K_com and/or a session key K_session based on the first user identifier and the second user identifier; and generating the second MAC based on the communication shared key K_com or the session key K_session, the first random parameter, and the second random parameter. sending, by first user equipment, a first random parameter to second user equipment; obtaining, by the second user equipment, a first user identifier, a second user identifier, and a second random parameter, generating a second authentication feature based on the first user identifier, the second user identifier, the first random parameter, and the second random parameter, and sending the second authentication feature to the first user equipment; attempting to authenticate, by the first user equipment, correctness of the second authentication feature, generating a first authentication feature, and sending the first authentication feature to the second user equipment; and attempting to authenticate, by the second user equipment, correctness of the first authentication feature, wherein the authentication feature is a message authentication code, MAC, and after a second MAC is generated, the method further comprises: sending, by the second user equipment, the first random parameter and the second random parameter to the first user equipment; and the generating, by the first user equipment, a first authentication feature comprises: generating, by the first user equipment, the first MAC based on the first random parameter and the second random parameter, wherein the generating a second MAC comprises: generating a communication shared key K_com and/or a session key K_session based on the first user identifier and the second user identifier; and generating the second MAC based on the communication shared key K_com or the session key K_session, the first random parameter, and the second random parameter. sending, by the second user equipment, the first random parameter and the second random parameter to the first user equipment; and the generating, by the first user equipment, a first authentication feature comprises: generating, by the first user equipment, the first MAC based on the first random parameter and the second random parameter, wherein the generating a second MAC comprises: generating a communication shared key K_com and/or a session key K_session based on the first user identifier and the second user identifier; and generating the second MAC based on the communication shared key K_com or the session key K_session, the first random parameter, and the second random parameter. generating a communication shared key K_com and/or a session key K_session based on the first user identifier and the second user identifier; and generating the second MAC based on the communication shared key K_com or the session key K_session, the first random parameter, and the second random parameter.