D2D communication authentication method, device, system, electronic device and medium

By authenticating the relay UE and the remote UE in D2D communication and generating the session key, the problem of security risks of D2D communication in PRAN scenarios is solved, and the security and reliability of communication are improved.

CN115022850BActive Publication Date: 2024-11-19CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210592591.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-11-19
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

In PRAN scenarios, D2D communication has security risks, because the remote UE and the relay UE may be malicious devices, resulting in poor communication security.

Method used

The relay UE sends a connection request verification message to the near-domain service security management platform, authenticates the remote UE and the relay UE, generates a session key, and uses the key for D2D communication to ensure the confidentiality and integrity of the communication. .

Benefits of technology

Improve the security of D2D communication, prevent the access of malicious devices, and enhance the reliability and security of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115022850B_ABST
    Figure CN115022850B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide an authentication method, device, system, electronic device and medium for D2D communication, which relates to the field of communication technology and can improve the security of D2D communication. The technical solution of the embodiments of the present disclosure includes: the relay UE receives a connection establishment request message sent by a remote UE, and then sends a connection request verification message to a near-domain service security management platform, so that the near-domain service security management platform authenticates the relay UE and the remote UE. Afterwards, the relay UE receives a connection request verification response message sent by the near-domain service security management platform, wherein the connection request verification response message is a message sent when the authentication is successful, and the connection request verification response message includes a session key and a parameter for generating a session key. The relay UE then sends a connection establishment verification message to the remote UE, wherein the connection establishment verification message includes the parameter, so that the remote UE and the relay UE use the session key for D2D communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to an authentication method, device, system, electronic device and medium for D2D communication. Background Art

[0002] Multi-hop relay communication based on WiFi direct connection is a new proximity based service scenario, which can also be called proximity based service Radio Access Network (PRAN) scenario. In the PRAN scenario, a remote user equipment (UE) without network status establishes a proximity device to device (D2D) connection with the relay UE through WiFi direct connection, and accesses the network through the multi-hop relay UE.

[0003] However, in the PRAN scenario, after the remote UE initiates a connection request to the relay UE, the relay UE directly performs D2D communication with the remote UE, and both the remote UE and the relay UE may be malicious devices, resulting in security risks in the current D2D communication. Summary of the invention

[0004] The purpose of the embodiments of the present disclosure is to provide a D2D communication authentication method, device, system, electronic device and medium to improve the security of D2D communication. The specific technical solution is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a D2D communication authentication method is provided, which is applied to a relay UE. The method includes:

[0006] Receiving a connection establishment request message sent by a remote UE;

[0007] In response to the connection establishment request message, sending a connection request verification message to a local area service security management platform, so that the local area service security management platform authenticates the relay UE and the remote UE;

[0008] Receiving a connection request verification response message sent by the near-domain service security management platform, where the connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated successfully, and the connection request verification response message includes a session key and a parameter for generating the session key;

[0009] A connection establishment verification message is sent to the remote UE, where the connection establishment verification message includes a parameter for generating the session key, so that the remote UE and the relay UE use the session key to perform device-to-device D2D communication.

[0010] In some embodiments, the parameter used to generate the session key is a root random number; before sending a connection establishment verification message to the remote UE, the method further includes:

[0011] Generate a relay random number, and generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key;

[0012] The connection establishment verification message is generated, wherein the connection establishment verification message includes the root random number and the relay random number.

[0013] In some embodiments, the connection establishment verification message further includes encrypted information to be verified; before sending the connection establishment verification message to the remote UE, the method further includes:

[0014] Using the integrity protection key, encrypting the root random number and the relay random number to obtain the encrypted information to be verified;

[0015] After sending the connection establishment verification message to the remote UE, the method further includes:

[0016] receiving a connection establishment verification response message sent by the remote UE, where the connection establishment response message is a message sent by the remote UE after successfully authenticating the relay UE based on the encrypted information to be verified;

[0017] authenticating the remote UE in response to the connection establishment verification response message;

[0018] If the remote UE is authenticated successfully, a connection establishment request acceptance message is sent to the remote UE, wherein the connection establishment request acceptance message is used to indicate that the remote UE is authenticated successfully by the relay UE, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

[0019] In some embodiments, the connection establishment verification response message includes confidentiality encryption information and integrity encryption information; the confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information; the integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information;

[0020] The step of authenticating the remote UE in response to the connection establishment verification response message includes:

[0021] Decrypting the confidentiality encrypted information using the generated confidentiality protection key to obtain a decryption result;

[0022] Using the generated integrity protection key, encrypting the decryption result to obtain an encryption result;

[0023] If the encryption result is the same as the integrity encryption information, determining that the remote UE is authenticated;

[0024] If the encryption result is different from the integrity encryption information, it is determined that the remote UE authentication fails.

[0025] A second aspect of the embodiments of the present disclosure provides a D2D communication authentication method, which is applied to a near-field service security management platform. The method includes:

[0026] Receiving a connection request verification message sent by the relay UE, where the connection request verification message is a message sent by the relay UE after receiving a connection establishment request message sent by the remote UE;

[0027] In response to the connection request verification message, authenticating the relay UE and the remote UE;

[0028] If the relay UE and the remote UE are authenticated successfully, a session key is generated;

[0029] Sending a connection request verification response message to the relay UE, wherein the connection request verification response message includes a session key and a parameter for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, wherein the connection establishment verification message includes the parameter for generating the session key.

[0030] In some embodiments, the connection request verification message includes a remote user name of the remote UE, a relay user name of the relay UE, verification information and a hash value, the verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the identity token of the remote UE and the verification information;

[0031] The authenticating the relay UE and the remote UE includes:

[0032] Check whether the relay user name exists in the authorized user names, and if so, determine that the relay UE is authenticated;

[0033] If the relay UE is authenticated, a hash operation is performed on the remote user name, the verification information and the pre-recorded identity token of the remote UE, and the operation result is compared with the hash value;

[0034] If the comparison result is the same, check whether the remote user name exists in the authorized user names;

[0035] If so, it is determined that the remote UE is authenticated successfully.

[0036] In some embodiments, generating a session key includes:

[0037] Generate root random numbers;

[0038] According to the session key generation function, the root random number, the pre-stored root key and identity token of the remote UE are calculated to obtain the session key.

[0039] A third aspect of the embodiments of the present disclosure provides a D2D communication authentication method, which is applied to a remote UE. The method includes:

[0040] Sending a connection establishment request message to the relay UE, so that the relay UE requests the near-domain service security management platform to authenticate the remote UE and the relay UE;

[0041] Receive a connection establishment verification message sent by the relay UE, where the connection establishment verification message is sent by the relay UE after receiving a connection request verification response message sent by the near-domain service security management platform, where the connection request verification response message includes a session key and a parameter for generating the session key, and the connection establishment verification message includes a parameter for generating the session key.

[0042] In some embodiments, the connection establishment verification message includes a root random number and a relay random number; after receiving the connection establishment verification message sent by the relay UE, the method further includes:

[0043] Calculate the root random number, the root key of the remote UE and the identity token according to a session key generation function to obtain the session key;

[0044] Generate a confidentiality protection key and an integrity protection key based on the session key and the relay random number;

[0045] The generated confidentiality protection key and integrity protection key are used to perform D2D communication with the relay UE.

[0046] In some embodiments, the connection establishment verification message further includes encrypted information to be verified, where the encrypted information to be verified is information obtained by the relay UE generating an integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key;

[0047] Before using the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, the method further includes:

[0048] Encrypting the root random number and the relay random number using the determined integrity protection key, and comparing the encryption result with the encrypted information to be verified;

[0049] If the comparison result is the same, determining that the relay UE is authenticated, and sending a connection establishment verification response message to the relay UE, so that the relay UE authenticates the remote UE;

[0050] A connection establishment request acceptance message sent by the relay UE is received, where the connection establishment request acceptance message is a message sent by the relay UE to indicate that the relay UE has successfully authenticated the remote UE when the relay UE has successfully authenticated the remote UE.

[0051] In some embodiments, before sending a connection establishment verification response message to the relay UE, the method further includes:

[0052] Encrypt the specified information using the generated confidentiality protection key to obtain confidentiality encrypted information;

[0053] Encrypt the specified information using the generated integrity protection key to obtain integrity encrypted information;

[0054] A connection establishment verification response message including the confidentiality encryption information and the integrity encryption information is generated, so that the relay UE authenticates the remote UE based on the confidentiality encryption information and the integrity encryption information.

[0055] According to a fourth aspect of the embodiments of the present disclosure, there is provided a D2D communication authentication device, which is applied to a relay UE. The device includes:

[0056] A receiving module, used to receive a connection establishment request message sent by a remote UE;

[0057] A sending module, configured to send a connection request verification message to a near-domain service security management platform in response to the connection establishment request message, so that the near-domain service security management platform authenticates the relay UE and the remote UE;

[0058] The receiving module is further used to receive a connection request verification response message sent by the near-domain service security management platform, where the connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated successfully, and the connection request verification response message includes a session key and a parameter for generating the session key;

[0059] The sending module is further used to send a connection establishment verification message to the remote UE, where the connection establishment verification message includes a parameter for generating the session key, so that the remote UE and the relay UE use the session key to perform device-to-device D2D communication.

[0060] In some embodiments, the parameter used to generate the session key is a root random number; the apparatus further includes a generation module; the generation module is used to:

[0061] Before sending a connection establishment verification message to the remote UE, generate a relay random number, and generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key;

[0062] The connection establishment verification message is generated, wherein the connection establishment verification message includes the root random number and the relay random number.

[0063] In some embodiments, the connection establishment verification message further includes encrypted information to be verified; and the device further includes:

[0064] An encryption module, used to encrypt the root random number and the relay random number using the integrity protection key before sending the connection establishment verification message to the remote UE to obtain the encrypted information to be verified;

[0065] The device also includes:

[0066] The receiving module is further configured to receive a connection establishment verification response message sent by the remote UE after the connection establishment verification message is sent to the remote UE, wherein the connection establishment response message is a message sent by the remote UE after the relay UE is authenticated based on the encrypted information to be verified;

[0067] an authentication module, configured to authenticate the remote UE in response to the connection establishment verification response message;

[0068] The sending module is also used to send a connection establishment request acceptance message to the remote UE if the remote UE is authenticated successfully. The connection establishment request acceptance message is used to indicate that the relay UE has authenticated the remote UE successfully, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

[0069] In some embodiments, the connection establishment verification response message includes confidentiality encryption information and integrity encryption information; the confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information; the integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information;

[0070] The authentication module is specifically used for:

[0071] Decrypting the confidentiality encrypted information using the generated confidentiality protection key to obtain a decryption result;

[0072] Using the generated integrity protection key, encrypting the decryption result to obtain an encryption result;

[0073] If the encryption result is the same as the integrity encryption information, determining that the remote UE is authenticated;

[0074] If the encryption result is different from the integrity encryption information, it is determined that the remote UE authentication fails.

[0075] In a fifth aspect of the embodiments of the present disclosure, there is provided an authentication device for D2D communication, which is applied to a near-field service security management platform, and the device includes:

[0076] A receiving module, configured to receive a connection request verification message sent by a relay UE, wherein the connection request verification message is a message sent by the relay UE after receiving a connection establishment request message sent by the remote UE;

[0077] an authentication module, configured to authenticate the relay UE and the remote UE in response to the connection request verification message received by the receiving module;

[0078] A generating module, configured to generate a session key if the authentication module successfully authenticates the relay UE and the remote UE;

[0079] A sending module is used to send a connection request verification response message to the relay UE, wherein the connection request verification response message includes a session key and a parameter for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, wherein the connection establishment verification message includes the parameter for generating the session key.

[0080] In some embodiments, the connection request verification message includes a remote user name of the remote UE, a relay user name of the relay UE, verification information and a hash value, the verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the identity token of the remote UE and the verification information;

[0081] The authentication module is specifically used for:

[0082] Check whether the relay user name exists in the authorized user names, and if so, determine that the relay UE is authenticated;

[0083] If the relay UE is authenticated, a hash operation is performed on the remote user name, the verification information and the pre-recorded identity token of the remote UE, and the operation result is compared with the hash value;

[0084] If the comparison result is the same, check whether the remote user name exists in the authorized user names;

[0085] If so, it is determined that the remote UE is authenticated successfully.

[0086] In some embodiments, the generating module is specifically used to:

[0087] Generate root random numbers;

[0088] According to the session key generation function, the root random number, the pre-stored root key and identity token of the remote UE are calculated to obtain the session key.

[0089] In a sixth aspect of the embodiments of the present disclosure, a D2D communication authentication device is provided, which is applied to a remote UE, and the device includes:

[0090] A sending module, configured to send a connection establishment request message to the relay UE, so that the relay UE requests the near-domain service security management platform to authenticate the remote UE and the relay UE;

[0091] A receiving module is used to receive a connection establishment verification message sent by the relay UE, wherein the connection establishment verification message is sent by the relay UE after receiving a connection request verification response message sent by the near-domain service security management platform, wherein the connection request verification response message includes a session key and a parameter for generating the session key, and the connection establishment verification message includes a parameter for generating the session key.

[0092] In some embodiments, the connection establishment verification message includes a root random number and a relay random number; and the apparatus further includes:

[0093] A calculation module, configured to calculate the root random number, the root key and the identity token of the remote UE according to a session key generation function to obtain the session key after receiving the connection establishment verification message sent by the relay UE;

[0094] A generating module, configured to generate a confidentiality protection key and an integrity protection key based on the session key and the relay random number;

[0095] The communication module is used to perform D2D communication with the relay UE using the generated confidentiality protection key and integrity protection key.

[0096] In some embodiments, the connection establishment verification message further includes encrypted information to be verified, where the encrypted information to be verified is information obtained by the relay UE generating an integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key;

[0097] The device also includes:

[0098] A comparison module, configured to encrypt the root random number and the relay random number using the determined integrity protection key before using the determined confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, and compare the encryption result with the encrypted information to be verified;

[0099] The sending module is further configured to determine that the relay UE is authenticated if the comparison result of the comparison module is the same, and send a connection establishment verification response message to the relay UE, so that the relay UE authenticates the remote UE;

[0100] The receiving module is further used to receive a connection establishment request acceptance message sent by the relay UE. The connection establishment request acceptance message is a message sent when the relay UE successfully authenticates the remote UE and is used to indicate that the relay UE successfully authenticates the remote UE.

[0101] In some embodiments, the apparatus further comprises:

[0102] An encryption module, used to encrypt the specified information using the generated confidentiality protection key to obtain confidentiality encrypted information before sending the connection establishment verification response message to the relay UE;

[0103] The encryption module is further used to encrypt the specified information using the generated integrity protection key to obtain integrity encrypted information;

[0104] The generating module is further used to generate a connection establishment verification response message including the confidentiality encryption information and the integrity encryption information, so that the relay UE authenticates the remote UE based on the confidentiality encryption information and the integrity encryption information.

[0105] A seventh aspect of the embodiments of the present disclosure provides an authentication system for D2D communication, including a remote UE, a relay UE, and a near-domain service security management platform;

[0106] The remote UE is used to execute the method according to any one of the third aspects;

[0107] The relay UE is used to execute the method according to any one of the first aspects;

[0108] The near-domain service security management platform is used to execute the method described in any one of the second aspects.

[0109] According to an eighth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0110] Memory, used to store computer programs;

[0111] The processor is used to implement the D2D communication authentication method steps described in any one of the first aspect, the second aspect or the third aspect of the claim when executing the program stored in the memory.

[0112] A ninth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the D2D communication authentication method described in any one of the first aspect, the second aspect or the third aspect of the claim are implemented.

[0113] According to a tenth aspect of the embodiments of the present disclosure, the embodiments of the present disclosure also provide a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the D2D communication authentication method described in any one of the first aspect, the second aspect or the third aspect.

[0114] Beneficial effects of the embodiments of the present disclosure:

[0115] In the authentication method, device, system, electronic device and medium for D2D communication provided by the embodiments of the present disclosure, before the remote UE performs D2D communication with the relay UE, the relay UE sends a connection request verification message to the near-domain service security management platform to request the near-domain service security management platform to verify the remote UE and the relay UE. After the verification is passed, the remote UE and the relay UE can perform D2D communication based on the session key issued by the near-domain service security management platform. That is, the authentication of the remote UE and the relay UE is added in the embodiments of the present disclosure, thereby improving the security of D2D communication.

[0116] Of course, it is not necessary to achieve all the advantages described above at the same time to implement any product or method of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0118] Figure 1 A schematic diagram of the structure of a D2D communication authentication system provided by an embodiment of the present disclosure;

[0119] Figure 2 A flowchart of a D2D communication authentication method provided by an embodiment of the present disclosure;

[0120] Figure 3 A flowchart of a remote UE authentication method provided in an embodiment of the present disclosure;

[0121] Figure 4 A flowchart of another D2D communication authentication method provided by an embodiment of the present disclosure;

[0122] Figure 5 A flowchart of a method for authenticating a remote UE and a relay UE provided in an embodiment of the present disclosure;

[0123] Figure 6 A flowchart of another D2D communication authentication method provided by an embodiment of the present disclosure;

[0124] Figure 7 A flowchart of a method for authenticating a relay UE provided in an embodiment of the present disclosure;

[0125] Figure 8 An exemplary schematic diagram of the relationship between various keys provided in an embodiment of the present disclosure;

[0126] Fig. 9 An exemplary schematic diagram of a key generation process provided by an embodiment of the present disclosure;

[0127] Fig.10 A signaling diagram of a process of establishing a D2D connection between a remote UE and a relay UE in a conventional method;

[0128] Fig.11 A signaling diagram of an authentication process for D2D communication provided by an embodiment of the present disclosure;

[0129] Fig.12 A schematic diagram of the structure of a D2D communication authentication device provided by an embodiment of the present disclosure;

[0130] Fig.13 A schematic diagram of the structure of a D2D communication authentication device provided by an embodiment of the present disclosure;

[0131] Fig.14 A schematic diagram of the structure of a D2D communication authentication device provided by an embodiment of the present disclosure;

[0132] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0133] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field based on the present disclosure belong to the scope of protection of the present disclosure.

[0134] In order to improve the security of D2D communication, the present disclosure provides an authentication method for D2D communication, which is applied to an authentication system for D2D communication. Figure 1As shown, the system includes: a remote UE 101, a relay UE 102 and a near-domain service security management platform 103. For example, the remote UE 101 is an electronic device capable of D2D communication, such as a mobile phone or a tablet computer, and the relay UE 102 can be a device capable of D2D communication, such as a mobile phone, a tablet computer or a router. The near-domain service security management platform 103 can be a device with data processing and message receiving and sending functions, such as a server or a computer.

[0135] The near-field service security management platform 103 is in communication connection with each relay UE 102. The remote UE 101 may be in communication connection with the relay UE 102, for example, the remote UE 101 and the relay UE 102 are in communication connection with each other via a wireless communication technology (WiFi) direct connection.

[0136] The remote UE 101 is used to request D2D communication with the relay UE 102.

[0137] The relay UE 102 is used to perform D2D communication with the remote UE 101 and serve as a relay device for the remote UE 101 to access the network.

[0138] The near-field service security management platform 103 is used to authenticate the remote UE 101 and the relay UE 102 before the remote UE 101 and the relay UE 102 perform D2D communication.

[0139] The specific communication process between the remote UE 101, the relay UE 102 and the near-domain service security management platform 103 may be referred to the description below.

[0140] like Figure 1 As shown, each relay UE 102 may also be connected to a gateway 104 so as to perform data transmission through the gateway 104 .

[0141] Figure 1 This is an example provided in the embodiment of the present disclosure, and the number of devices included in the D2D communication authentication system in the embodiment of the present disclosure is not limited thereto. Moreover, other relay UEs 102 may be connected between the relay UE 102 and the gateway 104 .

[0142] The present disclosure provides a D2D communication authentication method, which can be applied to Figure 1 The relay UE in Figure 2 As shown, the method comprises the following steps:

[0143] S201. Receive a connection establishment request message sent by a remote UE.

[0144] In the disclosed embodiment, the relay UE may broadcast its own node service information in the air interface, for example, the node service information includes a service set identifier (SSID), a password (PASSWORD), power and rate, etc. The air interface refers to the air interface, that is, the specified wireless transmission range, including the frequency range and bandwidth range, etc. After receiving the node service information broadcast by the relay UE, the remote UE may select a relay UE and send a connection establishment request message to the relay UE.

[0145] The connection establishment request message sent by the remote UE includes the remote user name of the remote UE. In addition, the connection establishment request message may also include the PASSWORD of the relay UE. In the conventional method, when the remote UE and the relay UE establish a D2D connection, the remote UE carries the PASSWORD in the connection establishment request message. After the relay UE connects to the establishment request message, it directly establishes a D2D connection with the remote UE based on the PASSWORD. However, since the PASSWORD is information broadcast by the relay UE, any remote UE can obtain it, that is, a malicious remote UE can also receive the broadcasted SSID and PASSWORD, thereby establishing a D2D connection with the relay UE, making the communication security poor. In the embodiment of the present disclosure, after the relay UE receives the connection establishment request message, even if the connection establishment request message includes the PASSWORD of the relay UE, the relay UE does not directly communicate with the remote UE in D2D, but also goes through the following authentication process of the embodiment of the present disclosure. Only after the authentication is passed, will it communicate with the remote UE in D2D. Therefore, the embodiment of the present disclosure improves the communication security and reduces the situation where malicious remote UEs access the network.

[0146] S202: In response to the connection establishment request message, a connection request verification message is sent to the local area service security management platform, so that the local area service security management platform authenticates the relay UE and the remote UE.

[0147] The connection request verification message includes a remote user name (UNremote) of the remote UE and a relay user name (UNrelay) of the relay UE.

[0148] The method by which the near-domain service security management platform authenticates the relay UE and the remote UE may be referred to the description below.

[0149] S203: Receive a connection request verification response message sent by the near-domain service security management platform.

[0150] Among them, the connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated. The connection request verification response message includes a session key (Ksess) and parameters for generating the session key.

[0151] In the embodiment of the present disclosure, the connection request verification response message also includes verification pass information, and the verification pass information indicates that the authentication of the near-domain service security management platform relay UE and the remote UE is successful.

[0152] Optionally, the relay UE and the near-domain service security management platform can communicate through an application layer encryption channel, that is, use a pre-agreed key to encrypt the information to be transmitted. For example, the relay UE uses the key to encrypt the connection request verification message and sends it to the near-domain service security management platform, and then the near-domain service security management platform uses the key to encrypt the connection request verification response message and sends it to the relay UE.

[0153] S204: Send a connection establishment verification message to the remote UE.

[0154] The connection establishment verification message includes parameters for generating a session key so that the remote UE and the relay UE can perform D2D communication using the session key.

[0155] In the D2D communication authentication method provided in the embodiment of the present disclosure, before the remote UE performs D2D communication with the relay UE, the relay UE sends a connection request verification message to the near-domain service security management platform to request the near-domain service security management platform to verify the remote UE and the relay UE. After the verification is passed, the remote UE and the relay UE can perform D2D communication based on the session key issued by the near-domain service security management platform. That is, the authentication of the remote UE and the relay UE is added in the embodiment of the present disclosure, thereby improving the security of D2D communication.

[0156] In some embodiments of the present disclosure, the parameters used to generate the session key involved in the above S204 may be a root random number. The root random number is a random number generated in real time after the near-domain service security management platform authenticates the remote UE and the relay UE. When the relay UE performs D2D communication with the remote UE, the session key may be used directly for security protection, or a confidentiality protection key and an integrity protection key generated based on the session key may be used for security protection. In the case of using a confidentiality protection key and an integrity protection key for security protection, the connection establishment verification message sent by the relay UE to the remote UE needs to include not only the root random number used to generate the session key, but also the parameters used to generate the confidentiality protection key and the integrity protection key.

[0157] Before sending the connection establishment verification message to the remote UE in S204, the relay UE may also generate a connection establishment verification message.

[0158] The method of the relay UE generating the connection establishment verification message can be implemented as follows: generating a relay random number, and based on the relay random number and the session key, generating a confidentiality protection key (Kenc) and an integrity protection key (Kint), and then generating a connection establishment verification message, wherein the connection establishment verification message includes a root random number and a relay random number. The relay random number is the parameter for generating the confidentiality protection key and the integrity protection key.

[0159] In the embodiment of the present disclosure, the relay UE may generate a confidentiality protection key by using formula (1) and generate an integrity protection key by using formula (2):

[0160] Kenc=Genc(Ksess,R1) (1)

[0161] Kint=Gint(Ksess,R1) (2)

[0162] Among them, Kenc is the confidentiality protection key, Genc is the confidentiality protection key generation function, Ksess is the session key, R1 is the root random number; Kint is the integrity protection key, and Gint is the integrity protection key generation function. The confidentiality protection key generation function and the integrity protection key generation function can be preset according to actual conditions.

[0163] Through the above method, the relay UE can send the root random number and the relay random number to the remote UE, so that the remote UE derives the session key based on the root random number, and derives the confidentiality protection key and the integrity protection key based on the relay random number and the session key, thereby using the confidentiality protection key and the integrity protection key to perform D2D communication with the relay UE.

[0164] In some embodiments of the present disclosure, in order to further improve communication security, the remote UE and the relay UE may also perform mutual authentication, and perform D2D communication after the mutual authentication is passed.

[0165] In order for the remote UE to authenticate the relay UE, the connection establishment verification message sent by the relay UE to the remote UE may also include the encrypted information to be verified. Before the relay UE sends the connection establishment verification message to the remote UE in S204, the relay UE may encrypt the root random number and the relay random number using the integrity protection key to obtain the encrypted information to be verified. The specific manner in which the remote UE authenticates the relay UE using the encrypted information to be verified may be referred to in the following description.

[0166] See also Figure 3After the relay UE sends a connection establishment verification message to the remote UE, the authentication process of the remote UE includes the following steps:

[0167] S301: Receive a connection establishment verification response message sent by a remote UE.

[0168] The connection establishment response message is a message sent by the remote UE after successfully authenticating the relay UE based on the encrypted information to be verified.

[0169] In the embodiment of the present disclosure, the connection establishment verification response message includes confidentiality encryption information and integrity encryption information. The confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information. The integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information.

[0170] S302: In response to the connection establishment verification response message, authenticate the remote UE.

[0171] In the disclosed embodiment, the remote UE and the relay UE generate confidentiality protection keys and integrity protection keys in the same way, that is, use the same confidentiality protection key generation function and the same integrity protection key generation function, and both are generated using the session key and the relay random number. Therefore, the encryption result of the remote UE using the integrity protection key generated by itself to encrypt data should be the same as the encryption result of the relay UE using the integrity protection key generated by itself to encrypt the same data. Similarly, after the remote UE encrypts data using the confidentiality protection key generated by itself, the decryption result of the encrypted data by the relay UE using the confidentiality protection key generated by itself should be the same as the result before encryption by the remote UE.

[0172] However, when the remote UE is a malicious device, it may use an incorrect confidentiality protection key generation function to generate an incorrect confidentiality protection key. Similarly, it may use an incorrect integrity protection key generation function to generate an incorrect integrity protection key. The relay UE can verify whether the remote UE uses the correct confidentiality protection key and integrity protection key by using the confidentiality encryption information and integrity encryption information included in the connection establishment verification response message.

[0173] The authentication method includes: the relay UE uses the confidentiality protection key generated by itself to decrypt the confidentiality encryption information included in the connection establishment verification response message to obtain a decryption result, and the decryption result is the specified information. The relay UE uses the integrity protection key generated by itself to encrypt the decryption result to obtain an encryption result. Since the integrity encryption information is also the information obtained by encrypting the specified information, if the remote UE and the relay UE use the same key, the encryption result should be the same as the integrity encryption information. Therefore, if the encryption result is the same as the integrity encryption information, the relay UE determines that the remote UE is authenticated. If the encryption result is different from the integrity encryption information, the relay UE determines that the remote UE is not authenticated. The specified information can be pre-set according to actual conditions, for example, the specified information is a relay random number.

[0174] S303: If the remote UE is authenticated, a connection establishment request acceptance message is sent to the remote UE.

[0175] The connection establishment request acceptance message is used to indicate that the relay UE has successfully authenticated the remote UE. At this time, the secure transmission protection mechanism is activated so that the remote UE can use the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

[0176] If the relay UE fails to authenticate the remote UE, a message indicating that the relay UE fails to authenticate the remote UE may be sent to the remote UE.

[0177] By adopting the above method, after the relay UE sends a connection establishment verification message to the remote UE, it can also perform mutual authentication with the remote UE, thereby further improving the communication security between the remote UE and the relay UE.

[0178] Based on the same inventive concept, the present disclosure provides a D2D communication authentication method, which is applied to Figure 1 The near-domain business security management platform shown in Figure 1 is shown in Figure 1. Figure 4 As shown, the method comprises the following steps:

[0179] S401: Receive a connection request verification message sent by a relay UE.

[0180] The connection request verification message is a message sent by the relay UE after receiving the connection establishment request message sent by the remote UE.

[0181] The connection request verification message includes the remote user name of the remote UE and the relay user name of the relay UE.

[0182] S402: In response to the connection request verification message, authenticate the relay UE and the remote UE.

[0183] In the disclosed embodiment, the near-domain service security management platform can verify whether the remote user name and the relay user name belong to the pre-recorded authorized user name. If so, it is determined that the relay UE and the remote UE are authenticated. Otherwise, it is determined that the relay UE and the remote UE are not authenticated.

[0184] Alternatively, other authentication methods may be used, as described below for details.

[0185] S403: If the relay UE and the remote UE are authenticated, a session key is generated.

[0186] In the disclosed embodiment, the near-domain service security management platform can generate a root random number, and then calculate the root random number, the pre-stored root key of the remote UE and the identity token according to the session key generation function to obtain the session key. That is, the session key is obtained using formula (3):

[0187] Ksess=H(Kroot,Rroot,Tremote) (3)

[0188] Among them, Ksess is the session key, H is the session key generation function, Kroot is the root key, Rroot is the root random number, and Tremote is the identity token. The session key generation function can be pre-set according to actual conditions.

[0189] The root key and identity token of the remote UE are allocated by the near-domain service security management platform to the remote UE during the process of the remote UE registering with the near-domain service security management platform. At the same time, the near-domain service security management platform also records the root key and identity token allocated to the remote UE.

[0190] S404: Send a connection request verification response message to the relay UE.

[0191] The connection request verification response message includes a session key and a parameter for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, and the connection establishment verification message includes the parameter for generating the session key. The parameter for generating the session key can be the root random number.

[0192] In an embodiment of the present disclosure, if the near-domain service security management platform fails to authenticate the relay UE and / or the remote UE, a message indicating that the authentication failed may be returned to the remote UE.

[0193] In the D2D communication authentication method provided in the embodiment of the present disclosure, before the remote UE performs D2D communication with the relay UE, the relay UE sends a connection request verification message to the near-domain service security management platform to request the near-domain service security management platform to verify the remote UE and the relay UE. After the verification is passed, the remote UE and the relay UE can perform D2D communication based on the session key issued by the near-domain service security management platform. That is, the authentication of the remote UE and the relay UE is added in the embodiment of the present disclosure, thereby improving the security of D2D communication.

[0194] In some embodiments of the present disclosure, the connection request verification message sent by the relay UE to the remote UE includes the remote user name of the remote UE, the relay user name of the relay UE, verification information and a hash value.

[0195] The verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the remote UE's identity token and the verification information. The relay UE can obtain the remote user name, verification information and hash value from the connection establishment request message sent by the remote UE, and carry them together with its own relay user name in the connection request verification message, and send it to the near-domain service security management platform.

[0196] The near-field service security management platform can use the parameters included in the connection establishment request message sent by the relay UE to authenticate the relay UE and the remote UE. Figure 5 The method in which the near-domain service security management platform authenticates the relay UE and the remote UE in S402 includes the following steps:

[0197] S501, check whether there is a relay user name in the authorized user names. If yes, execute S502; if no, execute S503.

[0198] The near-field service security management platform may record the user name of each authorized relay UE, so that it is possible to determine whether the relay UE is authorized through the relay user name included in the connection establishment request message.

[0199] S502: Determine whether the relay UE is authenticated and execute S504.

[0200] S503: Determine that the relay UE authentication fails.

[0201] S504: Perform a hash operation on the remote user name, verification information and the pre-recorded remote UE identity token, and compare the operation result with the hash value to see if they are the same. If the comparison result is the same, execute S505; if the comparison result is not the same, execute S506.

[0202] The hash algorithm used by the remote UE and the near-domain service security management platform for hash operations is the same, so the results of hashing the verification information should be the same. However, when the remote UE is a malicious terminal, the wrong hash algorithm may be used, resulting in the result of the hash operation of the verification information by the remote UE being different from the result of the hash operation of the verification information by the near-domain service security management platform. Therefore, in the embodiment of the present disclosure, the near-domain service security management platform can determine whether the remote UE uses the correct hash algorithm by comparing the result of its own hash operation on the verification information with the hash value obtained by the remote UE when the verification information is hashed, thereby determining whether the remote UE is a legitimate device.

[0203] For example, the hash operation method is formula (4):

[0204] Hremote=F(UNremote,TTremote,Rremote,Tremote) (4)

[0205] Among them, Hremote is the hash operation result, F is the hash function, that is, the hash algorithm, Unremote is the remote user name, Tremote is the timestamp, Rremote is the remote random number, and Tremote is the identity token of the remote UE.

[0206] S505: Check whether the remote user name exists in the authorized user names. If yes, execute S507; if not, execute S506.

[0207] The remote UE may send the remote user name to the local service security management platform when registering, so that the local service security management platform records the remote user name of the remote UE after authorizing the remote UE. When the local service security management platform executes S505, it can determine whether the remote user name included in the connection establishment request message sent by the relay UE has been authorized.

[0208] S506: Determine that the remote UE authentication fails.

[0209] S507: Determine whether the remote UE is authenticated successfully.

[0210] By adopting the above method, the near-domain service security management platform can authenticate the relay UE first, and then authenticate the remote UE after the relay UE is authenticated. Since the authentication of the relay UE only needs to compare the user name of the relay UE, the authentication speed is fast, and if the relay UE fails to be authenticated, there is no need to verify the remote UE, thereby improving the authentication efficiency.

[0211] Based on the same inventive concept, the present disclosure provides a D2D communication authentication method, which is applied to Figure 1 The remote UE in Figure 6 As shown, the method comprises the following steps:

[0212] S601, send a connection establishment request message to the relay UE, so that the relay UE requests the local service security management platform to authenticate the remote UE and the relay UE. The specific manner in which the relay UE requests the local service security management platform to authenticate the remote UE and the relay UE can be referred to the above description, which will not be repeated here.

[0213] The connection establishment request message includes the remote user name of the remote UE.

[0214] The connection establishment request message may also include verification information and a hash value. The verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the remote UE identity token and the verification information.

[0215] S602: Receive a connection establishment verification message sent by the relay UE.

[0216] Among them, the connection establishment verification message is sent after the relay UE receives the connection request verification response message sent by the near-domain service security management platform. The connection request verification response message includes the session key. The connection establishment verification message includes parameters for generating the session key. The remote UE can generate the session key based on the parameters used to generate the session key.

[0217] When there is a network, the remote UE can communicate directly with the near-domain business security management platform. For example, the remote UE can use the 4th generation mobile communication technology (4G) or the 5th generation mobile communication technology (5G) to communicate with the near-domain business security management platform. And request registration with the near-domain business security management platform, so as to obtain the identity token and root key from the near-domain business security management platform. Among them, the communication between the remote UE and the near-domain business security management platform can be through the application layer encryption channel, that is, the information to be transmitted is encrypted and transmitted using the agreed key.

[0218] In the D2D communication authentication method provided in the embodiment of the present disclosure, before the remote UE performs D2D communication with the relay UE, the relay UE sends a connection request verification message to the near-domain service security management platform to request the near-domain service security management platform to verify the remote UE and the relay UE. After the verification is passed, the remote UE and the relay UE can perform D2D communication based on the session key issued by the near-domain service security management platform. That is, the authentication of the remote UE and the relay UE is added in the embodiment of the present disclosure, thereby improving the security of D2D communication.

[0219] In some embodiments of the present disclosure, the connection establishment verification message sent by the relay UE to the remote UE includes: a root random number and a relay random number. After receiving the connection establishment verification message sent by the relay UE, the remote UE can use the root random number and the relay random number to generate a key used to communicate with the relay UE. The specific method includes: according to the session key generation function, the root random number, the root key of the remote UE and the identity token are calculated to obtain the session key. Then, based on the session key and the relay random number, a confidentiality protection key and an integrity protection key are generated. The generated confidentiality protection key and integrity protection key are used to perform D2D communication with the relay UE.

[0220] The remote UE generates a session key in the same manner as the above-mentioned near-domain service security management platform generates a session key. The remote UE generates a confidentiality protection key in the same manner as the above-mentioned relay UE generates a confidentiality protection key. The remote UE generates an integrity protection key in the same manner as the above-mentioned relay UE generates an integrity protection key.

[0221] In the disclosed embodiment, the connection establishment verification message sent by the relay UE to the remote UE includes a root random number and a relay random number, so that the remote UE generates a confidentiality protection key and an integrity protection key according to the root random number and the relay random number. Compared with the method of directly sending the confidentiality protection key and the integrity protection key to the remote UE, sending the root random number and the relay random number can allow the remote UE to obtain the confidentiality protection key and the integrity protection key while avoiding the risk of the confidentiality protection key and the integrity protection key being leaked due to malicious acquisition of the connection establishment verification message.

[0222] In some embodiments of the present disclosure, in order to further ensure the security of communication, before the remote UE uses the determined confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, the remote UE and the relay UE may also perform mutual authentication. In order for the remote UE to authenticate the relay UE, the connection establishment verification message sent by the relay UE to the remote UE also includes encrypted information to be verified. Among them. The encrypted information to be verified is the information obtained by the relay UE after generating the integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key.

[0223] See also Figure 7 , the method in which the remote UE verifies the relay UE includes the following steps:

[0224] S701. Use the generated integrity protection key to encrypt the root random number and the relay random number.

[0225] S702: Compare the encryption result with the encrypted information to be verified to see if they are the same. If the comparison result is the same, execute S703; if the comparison result is not the same, execute S705.

[0226] Since the remote UE and the relay UE generate the same integrity protection key and both encrypt the root random number and the relay random number, the encryption results of the remote UE and the relay UE should be the same, that is, the encryption result and the encrypted information to be verified should be the same. However, if the relay UE is a malicious device, it may use the wrong integrity protection key, resulting in the encryption result being different from the encryption result of the remote UE. Therefore, the remote UE can verify whether the relay UE uses the correct integrity protection key by comparing the encryption result with the encrypted information to be verified.

[0227] S703: Determine that the relay UE is authenticated, and send a connection establishment verification response message to the relay UE, so that the relay UE authenticates the remote UE.

[0228] The specific manner in which the relay UE authenticates the remote UE can be referred to the above description and will not be repeated here.

[0229] S704: Receive a connection establishment request acceptance message sent by the relay UE.

[0230] The connection establishment request acceptance message is a message sent when the relay UE successfully authenticates the remote UE and is used to indicate that the relay UE successfully authenticates the remote UE.

[0231] S705: Determine that the relay UE authentication fails.

[0232] After the remote UE determines that the relay UE authentication fails, the remote UE may also send a message to the remote UE indicating that the remote UE determines that the relay UE authentication fails.

[0233] By adopting the above method, before the remote UE performs D2D communication with the relay UE, the remote UE can authenticate the relay UE to ensure that the relay UE is a legitimate user, thereby further ensuring communication security.

[0234] In order for the relay UE to authenticate the remote UE, the connection establishment verification response message sent by the remote UE to the relay UE in the above S703 may carry integrity encryption information and confidentiality encryption information.

[0235] Before the remote UE sends the connection establishment verification response message to the relay UE in the above S703, it can also generate connection establishment verification response information, and the generation method includes: using the generated confidentiality protection key to encrypt the specified information to obtain confidentiality encryption information, and using the generated integrity protection key to encrypt the specified information to obtain integrity encryption information. Generate a connection establishment verification response message including confidentiality encryption information and integrity encryption information, so that the relay UE authenticates the remote UE based on the confidentiality encryption information and the integrity encryption information. The specific authentication method of the relay UE for the remote UE can be referred to the above description, which will not be repeated here.

[0236] By adopting the above method, the remote UE can send integrity encryption information and confidentiality encryption information to the relay UE, so that the relay UE can authenticate the remote UE, thereby further ensuring communication security.

[0237] See also Figure 8 , the relationship between the various keys involved in the embodiment of the present disclosure is described below:

[0238] A session key can be generated based on the root random number, the remote UE's identity token and the remote UE's root key.

[0239] Based on the session key and the relay random number, the confidentiality protection key and the integrity protection key can be generated.

[0240] See also Fig. 9The following describes the process of generating secret keys for the near-domain service security management platform, relay UE, and remote UE:

[0241] First, the near-domain service security management platform generates a root random number, performs hash calculation on the root random number and the identity token of the remote UE to obtain a root hash value, and then uses the root hash value and the root key of the remote UE to generate a session key. After that, the session key and the root random number are transmitted to the relay UE.

[0242] The relay UE generates a relay random number, and uses the confidentiality protection key generation function to calculate the session key and the relay random number to obtain the confidentiality protection key. It also uses the integrity protection key generation function to calculate the session key and the relay random number to obtain the integrity protection key. The root random number and the relay random number are then transmitted to the remote UE.

[0243] The remote UE performs hash calculation on the root random number and the remote UE's identity token to obtain a root hash value, and then uses the root hash value and the remote UE's root key to generate a session key. The confidentiality protection key generation function is used to operate the session key and the relay random number to obtain a confidentiality protection key. The integrity protection key generation function is used to operate the session key and the relay random number to obtain an integrity protection key.

[0244] In the following, in combination with specific application scenarios, a method for establishing D2D communication between a traditional remote UE and a relay UE and a method for implementing D2D communication between a relay UE and a remote UE in an embodiment of the present disclosure are compared and described:

[0245] like Fig.10 As shown, in the traditional method, the relay UE broadcasts its own node service information over the air interface.

[0246] After receiving the node service information, the remote UE sends a connection request message to the relay UE. The relay UE and the remote UE establish a connection based on the WiFi Protected Setup-Personal Information Number (WPS-PIN) or WPS-Push Button Configuration (PBC). After the connection is established, the remote UE and the relay UE can perform D2D communication, so that the remote UE can access the network through the relay UE.

[0247] It can be seen that the method lacks a reliable identity authentication mechanism, a secure connection establishment mechanism and a transmission protection mechanism between the remote UE and the relay UE, which makes the remote UE and the relay UE have security risks such as information theft and tampering by middlemen when transmitting signaling messages and data traffic. For example, a malicious remote UE may intercept node service information at the air interface to establish a D2D connection with the relay UE. For another example, a malicious relay UE may steal messages sent by the remote UE, thereby stealing the privacy information of the remote UE; and a malicious relay UE may also steal and tamper with messages sent by other relay UEs, thereby establishing a D2D connection with the remote UE. This method seriously affects the business security of the PRAN system in the commercial process. In addition, the WPS-PIN or WPS-PBC method used by WiFi direct connection technology to establish a connection has limited security, is not suitable for multi-hop relay communication scenarios, and cannot meet commercial-level security requirements.

[0248] See also Fig.11 The D2D communication authentication process provided by the embodiment of the present disclosure includes the following steps:

[0249] S1101. The relay UE broadcasts its own node service information over the air interface.

[0250] S1102. The remote UE sends a connection establishment request message to the relay UE.

[0251] S1103. The relay UE sends a connection request verification message to the near-domain service security management platform.

[0252] S1104. The near-domain service security management platform authenticates the relay UE and the remote UE.

[0253] S1105. If the near-domain service security management platform authenticates the relay UE and the remote UE, it generates a session key.

[0254] S1106: The near-domain service security management platform sends a connection request verification response message to the relay UE, wherein the connection request verification response message includes a session key and a root random number.

[0255] S1107. The relay UE generates a confidentiality protection key and an integrity protection key according to the session key and the relay random number.

[0256] S1108. The relay UE sends a connection establishment verification message to the remote UE.

[0257] The connection establishment verification message includes a root random number and a relay random number. The remote UE can generate a session key based on the root random number, and generate a confidentiality protection key and an integrity protection key based on the session key and the relay random number.

[0258] S1109: The remote UE authenticates the relay UE.

[0259] S1110. If the remote UE successfully authenticates the relay UE, it sends a connection establishment verification response message to the relay UE.

[0260] S1111. The relay UE authenticates the remote UE.

[0261] S1112: If the relay UE successfully authenticates the remote UE, it sends a connection establishment request acceptance message to the remote UE.

[0262] It can be seen that in the authentication process of D2D communication provided by the embodiment of the present disclosure, the near-domain service security management platform can perform security authentication on the relay UE and the remote UE, and security verification can also be performed between the relay UE and the remote UE. Therefore, in the embodiment of the present disclosure, a security authentication mechanism, key derivation and distribution mechanism for D2D communication are established, the secure activation of the D2D connection is achieved, malicious device attacks are avoided, the security of D2D communication is improved, and commercial security requirements can be met.

[0263] Based on the same inventive concept, corresponding to the above method embodiment, the embodiment of the present disclosure provides an authentication device for D2D communication, which is applied to a relay UE, such as Fig.12 As shown, the device includes: a receiving module 1201 and a sending module 1202;

[0264] The receiving module 1201 is used to receive a connection establishment request message sent by a remote UE;

[0265] The sending module 1202 is used to send a connection request verification message to the local area service security management platform in response to the connection establishment request message, so that the local area service security management platform authenticates the relay UE and the remote UE;

[0266] The receiving module 1201 is further used to receive a connection request verification response message sent by the near-domain service security management platform. The connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated. The connection request verification response message includes a session key and a parameter for generating the session key;

[0267] The sending module 1202 is further configured to send a connection establishment verification message to the remote UE, where the connection establishment verification message includes parameters for generating a session key, so that the remote UE and the relay UE use the session key for device-to-device D2D communication.

[0268] In some embodiments, the parameter used to generate the session key is a root random number; the apparatus further comprises a generation module; the generation module is configured to:

[0269] Before sending a connection establishment verification message to the remote UE, generate a relay random number, and generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key;

[0270] A connection establishment verification message is generated, where the connection establishment verification message includes a root random number and a relay random number.

[0271] In some embodiments, the connection establishment verification message further includes encrypted information to be verified; and the apparatus further includes:

[0272] The encryption module is used to encrypt the root random number and the relay random number using the integrity protection key before sending the connection establishment verification message to the remote UE to obtain the encrypted information to be verified;

[0273] The device also includes:

[0274] The receiving module 1201 is further configured to receive a connection establishment verification response message sent by the remote UE after sending the connection establishment verification message to the remote UE, where the connection establishment response message is a message sent by the remote UE after authenticating the relay UE based on the encrypted information to be verified;

[0275] An authentication module, configured to authenticate the remote UE in response to a connection establishment verification response message;

[0276] The sending module 1202 is also used to send a connection establishment request acceptance message to the remote UE if the remote UE is authenticated successfully. The connection establishment request acceptance message is used to indicate that the relay UE has authenticated the remote UE successfully, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

[0277] In some embodiments, the connection establishment verification response message includes confidentiality encryption information and integrity encryption information; the confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information; the integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information;

[0278] Authentication module, specifically used for:

[0279] Decrypt the confidentiality encrypted information using the generated confidentiality protection key to obtain a decryption result;

[0280] Use the generated integrity protection key to encrypt the decryption result to obtain an encrypted result;

[0281] If the encryption result is the same as the integrity encryption information, it is determined that the remote UE is authenticated;

[0282] If the encryption result is different from the integrity encryption information, it is determined that the remote UE authentication fails.

[0283] Based on the same inventive concept, corresponding to the above method embodiment, the present disclosure embodiment provides an authentication device for D2D communication, which is applied to a near-field service security management platform, such as Fig.13 As shown, the device includes: a receiving module 1301, an authentication module 1302, a generating module 1303 and a sending module 1304;

[0284] The receiving module 1301 is used to receive a connection request verification message sent by the relay UE, where the connection request verification message is a message sent by the relay UE after receiving a connection establishment request message sent by the remote UE;

[0285] An authentication module 1302, configured to authenticate the relay UE and the remote UE in response to the connection request verification message received by the receiving module;

[0286] The generating module 1303 is used to generate a session key if the authentication module successfully authenticates the relay UE and the remote UE;

[0287] The sending module 1304 is used to send a connection request verification response message to the relay UE, where the connection request verification response message includes a session key and parameters for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, where the connection establishment verification message includes parameters for generating the session key.

[0288] In some embodiments, the connection request verification message includes a remote user name of the remote UE, a relay user name of the relay UE, verification information and a hash value, the verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the identity token of the remote UE and the verification information;

[0289] The authentication module 1302 is specifically used for:

[0290] Check whether the relay user name exists in the authorized user names, and if so, determine that the relay UE is authenticated;

[0291] If the relay UE is authenticated, a hash operation is performed on the remote user name, verification information, and the pre-recorded remote UE identity token, and the operation result is compared with the hash value;

[0292] If the comparison result is the same, check whether the remote user name exists in the authorized user names;

[0293] If so, it is determined that the remote UE is authenticated successfully.

[0294] In some embodiments, the generating module 1303 is specifically configured to:

[0295] Generate root random numbers;

[0296] According to the session key generation function, the root random number, the pre-stored root key of the remote UE and the identity token are calculated to obtain the session key.

[0297] Based on the same inventive concept, corresponding to the above method embodiment, the present disclosure embodiment provides an authentication device for D2D communication, which is applied to a remote UE, such as Fig.14 As shown, the device includes: a sending module 1401 and a receiving module 1402;

[0298] The sending module 1401 is used to send a connection establishment request message to the relay UE, so that the relay UE requests the near-domain service security management platform to authenticate the remote UE and the relay UE;

[0299] The receiving module 1402 is used to receive a connection establishment verification message sent by the relay UE. The connection establishment verification message is sent by the relay UE after receiving a connection request verification response message sent by the near-domain service security management platform. The connection request verification response message includes a session key and parameters for generating a session key. The connection establishment verification message includes parameters for generating a session key.

[0300] In some embodiments, the apparatus further comprises:

[0301] A calculation module, which is used for connection establishment verification message including root random number and relay random number; after receiving the connection establishment verification message sent by the relay UE, the root random number, the root key of the remote UE and the identity token are calculated according to the session key generation function to obtain the session key;

[0302] A generation module, used for generating a confidentiality protection key and an integrity protection key based on a session key and a relay random number;

[0303] The communication module is used to perform D2D communication with the relay UE using the generated confidentiality protection key and integrity protection key.

[0304] In some embodiments, the connection establishment verification message also includes encrypted information to be verified, where the encrypted information to be verified is information obtained by the relay UE generating an integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key;

[0305] The device also includes:

[0306] A comparison module, used for encrypting the root random number and the relay random number using the determined integrity protection key before using the determined confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, and comparing the encryption result with the encrypted information to be verified;

[0307] The sending module 1401 is further configured to determine that the relay UE is authenticated if the comparison result of the comparison module is the same, and send a connection establishment verification response message to the relay UE, so that the relay UE authenticates the remote UE;

[0308] The receiving module 1402 is further used to receive a connection establishment request acceptance message sent by the relay UE. The connection establishment request acceptance message is a message sent by the relay UE to indicate that the relay UE has successfully authenticated the remote UE.

[0309] In some embodiments, the apparatus further comprises:

[0310] An encryption module, used to encrypt the specified information using the generated confidentiality protection key before sending the connection establishment verification response message to the relay UE to obtain confidentiality encrypted information;

[0311] The encryption module is further used to encrypt the specified information using the generated integrity protection key to obtain integrity encrypted information;

[0312] The generating module is further used to generate a connection establishment verification response message including confidentiality encryption information and integrity encryption information, so that the relay UE can authenticate the remote UE based on the confidentiality encryption information and the integrity encryption information.

[0313] The present disclosure also provides an electronic device, such as Fig.15 As shown, it includes a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0314] Memory 1503, used for storing computer programs;

[0315] The processor 1501 is used to implement the method executed by the remote UE, relay UE or near-domain service security management platform in the above method embodiment when executing the program stored in the memory 1503.

[0316] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0317] The communication interface is used for communication between the above electronic device and other devices.

[0318] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0319] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0320] In another embodiment provided by the present disclosure, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned D2D communication authentication methods are implemented.

[0321] In another embodiment provided by the present disclosure, a computer program product including instructions is further provided. When the computer program product is executed on a computer, the computer executes any one of the D2D communication authentication methods in the above embodiments.

[0322] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0323] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0324] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0325] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure are included in the protection scope of the present disclosure.

Claims

1. A D2D communication authentication method, It is characterized in that Applied to a relay UE, the method includes: Receiving a connection establishment request message sent by a remote UE; In response to the connection establishment request message, sending a connection request verification message to a local area service security management platform, so that the local area service security management platform authenticates the relay UE and the remote UE; Receiving a connection request verification response message sent by the near-domain service security management platform, where the connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated successfully, and the connection request verification response message includes a session key and a parameter for generating the session key; Sending a connection establishment verification message to the remote UE, wherein the connection establishment verification message includes a parameter for generating the session key, so that the remote UE and the relay UE use the session key to perform device-to-device D2D communication; The parameter used to generate the session key is a root random number; the connection establishment verification message includes a root random number, a relay random number and encrypted information to be verified; Before sending the connection establishment verification message to the remote UE, the method further includes: generating a confidentiality protection key and an integrity protection key based on the relay random number and the session key; encrypting the root random number and the relay random number using the integrity protection key to obtain the encrypted information to be verified; Among them, after sending a connection establishment verification message to the remote UE, the method also includes: receiving a connection establishment verification response message sent by the remote UE, the connection establishment verification response message being a message sent by the remote UE after the remote UE successfully authenticates the relay UE based on the encrypted information to be verified; authenticating the remote UE in response to the connection establishment verification response message; if the remote UE is successfully authenticated, sending a connection establishment request acceptance message to the remote UE, the connection establishment request acceptance message being used to indicate that the relay UE successfully authenticates the remote UE, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

2. The method according to claim 1, It is characterized in that The connection establishment verification response message includes confidentiality encryption information and integrity encryption information; the confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information; the integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information; The authenticating the remote UE in response to the connection establishment verification response message includes: Decrypting the confidentiality encrypted information using the generated confidentiality protection key to obtain a decryption result; Using the generated integrity protection key, encrypting the decryption result to obtain an encryption result; If the encryption result is the same as the integrity encryption information, determining that the remote UE is authenticated; If the encryption result is different from the integrity encryption information, it is determined that the remote UE authentication fails.

3. A D2D communication authentication method, It is characterized in that Applied to a near-domain business security management platform, the method includes: Receiving a connection request verification message sent by a relay UE, where the connection request verification message is a message sent by the relay UE after receiving a connection establishment request message sent by a remote UE; In response to the connection request verification message, authenticating the relay UE and the remote UE; If the relay UE and the remote UE are authenticated successfully, a session key is generated; Sending a connection request verification response message to the relay UE, the connection request verification response message including a session key and a parameter for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, the connection establishment verification message including the parameter for generating the session key; The parameter used to generate the session key is a root random number; the connection request verification message includes a remote user name of the remote UE, a relay user name of the relay UE, verification information and a hash value, the verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the identity token of the remote UE and the verification information; Among them, the authentication of the relay UE and the remote UE includes: checking whether the relay user name exists in the authorized user name, and if so, determining that the relay UE is authenticated; if the relay UE is authenticated, performing a hash operation on the remote user name, the verification information and the pre-recorded identity token of the remote UE, and comparing the operation result with the hash value; if the comparison result is the same, checking whether the remote user name exists in the authorized user name; if so, determining that the remote UE is authenticated.

4. The method according to claim 3, It is characterized in that The generating of the session key comprises: Generate root random numbers; According to the session key generation function, the root random number, the pre-stored root key and the identity token of the remote UE are calculated to obtain the session key.

5. A D2D communication authentication method, It is characterized in that Applied to a remote UE, the method includes: Sending a connection establishment request message to the relay UE, so that the relay UE requests the near-domain service security management platform to authenticate the remote UE and the relay UE; receiving a connection establishment verification message sent by the relay UE, where the connection establishment verification message is sent by the relay UE after receiving a connection request verification response message sent by the near-field service security management platform, where the connection request verification response message includes a session key and a parameter for generating the session key, and the connection establishment verification message includes the parameter for generating the session key; The connection establishment verification message includes a root random number, a relay random number and encrypted information to be verified; Before receiving the connection establishment verification message sent by the relay UE, the relay UE is further used to: generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key; use the integrity protection key to encrypt the root random number and the relay random number to obtain the encrypted information to be verified; Wherein, after receiving the connection establishment verification message sent by the relay UE, the method further includes: sending a connection establishment verification response message to the relay UE, the connection establishment verification response message being a message sent by the remote UE after the relay UE is authenticated based on the encrypted information to be verified; receiving a connection establishment request acceptance message sent by the relay UE, the connection establishment request acceptance message being a message sent by the relay UE to indicate that the relay UE has authenticated the remote UE when the relay UE has authenticated the remote UE; Among them, the relay UE is also used to: authenticate the remote UE in response to the connection establishment verification response message; if the remote UE is authenticated, send a connection establishment request acceptance message to the remote UE, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

6. The method according to claim 5, It is characterized in that The connection establishment verification message includes a root random number and a relay random number; after receiving the connection establishment verification message sent by the relay UE, the method further includes: Calculate the root random number, the root key of the remote UE and the identity token according to a session key generation function to obtain the session key; Generate a confidentiality protection key and an integrity protection key based on the session key and the relay random number; The generated confidentiality protection key and integrity protection key are used to perform D2D communication with the relay UE.

7. The method according to claim 6, It is characterized in that The connection establishment verification message also includes encrypted information to be verified, where the encrypted information to be verified is information obtained by the relay UE generating an integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key; Before using the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, the method further includes: Encrypting the root random number and the relay random number using the determined integrity protection key, and comparing the encryption result with the encrypted information to be verified; If the comparison result is the same, it is determined that the relay UE is authenticated, and a connection establishment verification response message is sent to the relay UE, so that the relay UE authenticates the remote UE.

8. The method according to claim 7, It is characterized in that Before sending a connection establishment verification response message to the relay UE, the method further includes: Encrypt the specified information using the generated confidentiality protection key to obtain confidentiality encrypted information; Encrypt the specified information using the generated integrity protection key to obtain integrity encrypted information; A connection establishment verification response message including the confidentiality encryption information and the integrity encryption information is generated, so that the relay UE authenticates the remote UE based on the confidentiality encryption information and the integrity encryption information.

9. An authentication device for D2D communication, It is characterized in that Applied to a relay UE, the device includes: A receiving module, used to receive a connection establishment request message sent by a remote UE; A sending module, configured to send a connection request verification message to a near-domain service security management platform in response to the connection establishment request message, so that the near-domain service security management platform authenticates the relay UE and the remote UE; The receiving module is further used to receive a connection request verification response message sent by the near-domain service security management platform, where the connection request verification response message is a message sent by the near-domain service security management platform when the relay UE and the remote UE are authenticated successfully, and the connection request verification response message includes a session key and a parameter for generating the session key; The sending module is further used to send a connection establishment verification message to the remote UE, where the connection establishment verification message includes a parameter for generating the session key, so that the remote UE and the relay UE use the session key to perform device-to-device D2D communication; The parameter used to generate the session key is a root random number; the connection establishment verification message includes a root random number, a relay random number and encrypted information to be verified; Wherein, the device further comprises: A generating module, configured to: generate a relay random number before sending a connection establishment verification message to the remote UE, and generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key; generate the connection establishment verification message, wherein the connection establishment verification message includes the root random number and the relay random number; An encryption module, used to encrypt the root random number and the relay random number using the integrity protection key before sending the connection establishment verification message to the remote UE to obtain the encrypted information to be verified; The receiving module is further configured to receive a connection establishment verification response message sent by the remote UE after sending the connection establishment verification message to the remote UE, wherein the connection establishment verification response message is a message sent by the remote UE after the relay UE is authenticated based on the encrypted information to be verified; the sending module is further configured to send a connection establishment request acceptance message to the remote UE if the remote UE is authenticated, wherein the connection establishment request acceptance message is used to indicate that the relay UE has authenticated the remote UE, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE; The authentication module is used to authenticate the remote UE in response to the connection establishment verification response message.

10. The device according to claim 9, It is characterized in that The connection establishment verification response message includes confidentiality encryption information and integrity encryption information; the confidentiality encryption information is information obtained after the remote UE generates a confidentiality protection key based on the root random number and the relay random number, and uses the generated confidentiality protection key to encrypt the specified information; the integrity encryption information is information obtained after the remote UE generates an integrity protection key based on the root random number and the relay random number, and uses the generated integrity protection key to encrypt the specified information; The authentication module is specifically used for: Decrypting the confidentiality encrypted information using the generated confidentiality protection key to obtain a decryption result; Using the generated integrity protection key, encrypting the decryption result to obtain an encryption result; If the encryption result is the same as the integrity encryption information, determining that the remote UE is authenticated; If the encryption result is different from the integrity encryption information, it is determined that the remote UE authentication fails.

11. An authentication device for D2D communication, It is characterized in that Applied to a near-domain business security management platform, the device comprises: A receiving module, configured to receive a connection request verification message sent by a relay UE, wherein the connection request verification message is a message sent by the relay UE after receiving a connection establishment request message sent by a remote UE; an authentication module, configured to authenticate the relay UE and the remote UE in response to the connection request verification message received by the receiving module; A generating module, configured to generate a session key if the authentication module successfully authenticates the relay UE and the remote UE; a sending module, configured to send a connection request verification response message to the relay UE, wherein the connection request verification response message includes a session key and a parameter for generating the session key, so that the relay UE sends a connection establishment verification message to the remote UE, wherein the connection establishment verification message includes the parameter for generating the session key; The parameter used to generate the session key is a root random number; the connection request verification message includes a remote user name of the remote UE, a relay user name of the relay UE, verification information and a hash value, the verification information includes a timestamp, or the verification information includes a timestamp and a remote random number, the timestamp is the time when the remote UE sends the connection establishment request message, the remote random number is a random number generated by the remote UE, and the hash value is obtained by the remote UE performing a hash operation on the remote user name, the identity token of the remote UE and the verification information; Among them, the authentication module is specifically used to: check whether the relay user name exists in the authorized user name, and if so, determine that the relay UE is authenticated; if the relay UE is authenticated, perform a hash operation on the remote user name, the verification information and the pre-recorded identity token of the remote UE, and compare the operation result with the hash value; if the comparison result is the same, check whether the remote user name exists in the authorized user name; if so, determine that the remote UE is authenticated.

12. The device according to claim 11, It is characterized in that The generating module is specifically used for: Generate root random numbers; According to the session key generation function, the root random number, the pre-stored root key and the identity token of the remote UE are calculated to obtain the session key.

13. An authentication device for D2D communication, It is characterized in that Applied to a remote UE, the device comprises: A sending module, configured to send a connection establishment request message to the relay UE, so that the relay UE requests the near-domain service security management platform to authenticate the remote UE and the relay UE; A receiving module, configured to receive a connection establishment verification message sent by the relay UE, wherein the connection establishment verification message is sent by the relay UE after receiving a connection request verification response message sent by the near-domain service security management platform, wherein the connection request verification response message includes a session key and a parameter for generating the session key, and the connection establishment verification message includes a parameter for generating the session key; The connection establishment verification message includes a root random number, a relay random number and encrypted information to be verified; The relay UE is further used to: generate a confidentiality protection key and an integrity protection key based on the relay random number and the session key; and encrypt the root random number and the relay random number using the integrity protection key to obtain the encrypted information to be verified; The sending module is further used to: after receiving the connection establishment verification message sent by the relay UE, send a connection establishment verification response message to the relay UE, the connection establishment verification response message being a message sent by the remote UE after the relay UE is authenticated based on the encrypted information to be verified; the receiving module is further used to: receive a connection establishment request acceptance message sent by the relay UE, the connection establishment request acceptance message being a message sent by the relay UE to indicate that the relay UE has authenticated the remote UE when the relay UE has authenticated the remote UE; Among them, the relay UE is also used to: authenticate the remote UE in response to the connection establishment verification response message; if the remote UE is authenticated, send a connection establishment request acceptance message to the remote UE, so that the remote UE uses the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE.

14. The device according to claim 13, It is characterized in that The connection establishment verification message includes a root random number and a relay random number; the device also includes: A calculation module, configured to calculate the root random number, the root key and the identity token of the remote UE according to a session key generation function to obtain the session key after receiving the connection establishment verification message sent by the relay UE; A generating module, configured to generate a confidentiality protection key and an integrity protection key based on the session key and the relay random number; The communication module is used to perform D2D communication with the relay UE using the generated confidentiality protection key and integrity protection key.

15. The device according to claim 14, It is characterized in that The connection establishment verification message also includes encrypted information to be verified, where the encrypted information to be verified is information obtained by the relay UE generating an integrity protection key based on the relay random number and the session key, and then encrypting the root random number and the relay random number using the generated integrity protection key; The device also includes: A comparison module, configured to encrypt the root random number and the relay random number using the determined integrity protection key before using the generated confidentiality protection key and integrity protection key to perform D2D communication with the relay UE, and compare the encryption result with the encrypted information to be verified; The sending module is further configured to determine that the relay UE is authenticated if the comparison result of the comparison module is the same, and send a connection establishment verification response message to the relay UE, so that the relay UE authenticates the remote UE; The receiving module is further used to receive a connection establishment request acceptance message sent by the relay UE. The connection establishment request acceptance message is a message sent when the relay UE successfully authenticates the remote UE and is used to indicate that the relay UE successfully authenticates the remote UE.

16. The device according to claim 15, It is characterized in that The device also includes: An encryption module, used to encrypt the specified information using the generated confidentiality protection key to obtain confidentiality encrypted information before sending the connection establishment verification response message to the relay UE; The encryption module is further used to encrypt the specified information using the generated integrity protection key to obtain integrity encrypted information; The generating module is further used to generate a connection establishment verification response message including the confidentiality encryption information and the integrity encryption information, so that the relay UE authenticates the remote UE based on the confidentiality encryption information and the integrity encryption information.

17. A D2D communication authentication system, comprising a remote UE, a relay UE and a near-domain service security management platform; The remote UE is used to perform the method according to any one of claims 5 to 8; The relay UE is used to execute the method according to any one of claims 1-2; The near-domain business security management platform is used to execute the method described in any one of claims 3-4.

18. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1-2, 3-4 or 5-8 when executing a program stored in a memory.

19. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2, 3 to 4 or 5 to 8 is implemented.