Security establishment method and related apparatus

By selecting a suitable security establishment solution between the end-side UE and U2U Relay, the problem of out-of-signal coverage or weak signal is solved, secure connection under different network conditions is realized, resource waste and failure risk are reduced, and ensuring Communication security.

WO2024199060A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/082865
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-27
Filing Date
2024-03-21
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In the existing technology, during the security establishment process between the end-side UE and the U2U Relay, if there is a situation where the signal coverage is outside or the signal is weak, communication security is difficult to ensure, and dependence on the network side leads to resource waste and security establishment failure. The risk is high.

Method used

Provide a security establishment method by selecting a target solution from multiple solutions, including solutions that rely on the network side and those that do not rely on the network side, and send a request message to negotiate security establishment, ensuring that the solution supported by both parties is used for secure connection, adapting to different networks situation.

Benefits of technology

It achieves the successful establishment of secure connections under different network conditions, avoids over-reliance on the network side, reduces resource waste and the risk of security establishment failure, and ensures communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082865_03102024_PF_FP_ABST
    Figure CN2024082865_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a security establishment method and a related apparatus. A suitable security establishment scheme is selected for a communication apparatus, thereby ensuring the communication security. In the method, a first communication apparatus that initiates proximity-based service communication determines, for example, on the basis of a scheme selection rule, a target scheme from among a plurality of schemes, and sends a request message, so as to request that a receiver uses the target scheme to perform security establishment with the first communication apparatus; and a second communication apparatus that receives the request message sends a first message to the first communication apparatus on the basis of an online state, so as to indicate whether the use of the target scheme to perform security establishment with the first communication apparatus is approved. When located within a network coverage range, the second communication apparatus can approve the use of a security establishment scheme that does not depend on a network side or depends on the network side; and when not located within the network coverage range, the second communication apparatus can approve the use of the security establishment scheme that does not depend on the network side. By means of negotiation between the first communication apparatus and the second communication apparatus, the first communication apparatus and the second communication apparatus can use a security establishment scheme jointly supported thereby to establish a secure connection.
Need to check novelty before this filing date? Find Prior Art

Description

A security establishment method and related device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 27, 2023, with application number 202310313402.6 and application name “A Security Establishment Method and Related Devices”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of wireless communications, and in particular to a security establishment method and related devices. Background Art

[0003] With the development of mobile communications, device-to-device (D2D) communication allows direct communication between user equipment (UE). Under the control of the cell network, UEs can share spectrum resources with other UEs in the cell, thereby improving spectrum resource utilization. Proximity-based service (ProSe) communication is a type of D2D communication. User equipment with ProSe communication capabilities can communicate with each other through the PC5 interface.

[0004] When two UEs need to conduct ProSe communication, if the other UE is outside the signal coverage of the initiating UE or the signal is weak, a relay UE can assist in communication. This relay UE can also be called a UE-to-UE relay (U2U Relay). To distinguish it from the relay UE, the UE conducting ProSe communication is referred to as the end UE (end UE).

[0005] The security establishment between the terminal side UE and the U2U Relay is an important step in ensuring communication security. Therefore, it is desirable to provide a solution that can be used for the security establishment between the terminal side UE and the U2U Relay.

[0006] Summary of the Invention

[0007] The present application provides a secure establishment method that can be used for secure establishment between a terminal-side UE and a U2U relay, thereby ensuring communication security.

[0008] In the first aspect, a security establishment method is provided, which can be applied to a first communication device of ProSe communication. The first communication device can be a UE, or a component configured in the UE (such as a chip, a chip system, a processor, etc.), or a logical module or software that can implement all or part of the functions of the first communication device.

[0009] Exemplarily, the method includes: determining a target scheme from a plurality of schemes, the plurality of target schemes including: a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; sending a request message, the request message being used to request a second communication device that receives the request message to use the target scheme to establish security with the first communication device; receiving a first message from the second communication device, the first message being used to indicate whether to agree to use the target scheme to establish security with the first communication device.

[0010] The request message may be used to indicate a target solution.

[0011] Based on the above solution, the first communication device initiating ProSe communication can select a target solution from multiple solutions and negotiate with the second communication device that received the request message by sending a request message indicating the target solution. For example, if the second communication device agrees to use the target solution, the target solution can be directly used to establish a secure connection with the second communication device. If the second communication device disagrees with the target solution, another solution can be selected as the target solution and a request message can be sent to negotiate with the second communication device. In this way, a solution supported by both the first and second communication devices can be determined for secure connection establishment, thereby facilitating the successful establishment of a secure connection.

[0012] In addition, the multiple solutions include solutions that rely on the network side for security establishment and solutions that do not rely on the network side for security establishment, taking into account different situations. On the one hand, a solution that does not rely on the network side is provided for the situation where the second communication device is not within the network coverage, so that the second communication device that is not within the network coverage can also establish a secure connection with the first communication device without being connected to the network, thus getting rid of the dependence on the network side; on the other hand, a solution that relies on the network side is provided for the situation where the second communication device is within the network coverage, so that the security establishment between the second communication device and the first network device can be implemented based on the most recent contract information, avoiding the possibility of security establishment failure caused by problems such as changes in the permissions of the first communication device or the second communication device, thereby avoiding the waste of resources that may be caused by the security establishment process.

[0013] It should be understood that when the first message is used to indicate whether to agree to use the target scheme to establish security with the first communication device, it can be indicated in an explicit way or in an implicit way. For example, when the first message is used to indicate the use of the target scheme to establish security with the first communication device, the agreement to use the target scheme can be implicitly indicated by a message in the security process establishment process corresponding to the target scheme (such as the direct security mode command message or security mode command message or direct authentication and key establishment message described later). In this case, it can be regarded as the second communication device directly using the target scheme to establish security with the first communication device.

[0014] Therefore, another possible implementation method of the above method is: determine a target scheme from multiple schemes, and the multiple target schemes include: a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; send a request message, which is used to request the second communication device that receives the request message to use the target scheme to establish security with the first communication device; and use the target scheme to establish security with the second communication device.

[0015] In combination with the first aspect, in some possible implementations of the first aspect, determining the target solution from multiple solutions includes: determining the target solution from multiple solutions based on a solution selection rule.

[0016] The solution selection rule may indicate a rule for determining a target solution. The first communication device may determine a target solution from multiple solutions based on the solution selection rule, or may determine the target solution from multiple solutions randomly, which is not limited in this application.

[0017] Optionally, the scheme selection rule includes: a correspondence between the first RSC corresponding to the ProSe communication and the first scheme indication, the first scheme indication being used to indicate the first scheme among multiple schemes; the above-mentioned determination of the target scheme from multiple schemes based on the scheme selection rule includes: based on the correspondence, determining the first scheme corresponding to the first scheme indication as the target scheme.

[0018] That is, associate the RSC with the scheme indication. Different RSCs can be associated with different scheme indications, and each RSC can be associated with one or more scheme indications, and then determine one or more schemes based on the one or more scheme indications. The above scheme selection rules are not limited to the correspondence between the first RSC and the first scheme indication, but may also include the correspondence between other RSCs and one or more scheme indications. The first communication device can select the corresponding RSC to determine the target scheme based on the type of service currently to be carried out. For example, if the first communication device wants to initiate ProSe communication, it can use the first RSC corresponding to the ProSe communication to determine the target scheme, determine the first scheme indication based on the first RSC and the corresponding relationship, and then determine it as the target scheme based on the first scheme indication.

[0019] Optionally, the scheme selection rule includes priority information, which is used to indicate the priority order of each scheme among multiple schemes; the above-mentioned determining the target scheme from multiple schemes based on the scheme selection rule includes: determining the target scheme from multiple schemes based on the priority order of multiple schemes.

[0020] For example, a solution with a higher priority is preferably selected as the target solution.

[0021] In one possible design, the solution selection rule is a correspondence between at least one RSC and at least one solution indication. In another possible design, the solution selection rule is priority information. In yet another possible design, the solution selection rule includes, but is not limited to, a correspondence between at least one RSC and at least one solution indication, and priority information. This application does not limit the specific content of the solution selection rule.

[0022] The above solution selection rules may be pre-configured, or may be obtained from the network side.

[0023] As previously described, the first communication device may be a UE, a component configured in the UE, or other logical modules or software that can be used to implement some or all of its functions. If the solution selection rule is preconfigured, one possible scenario is that the solution selection rule may be pre-stored in the first communication device, and another possible scenario is that the solution selection rule is pre-stored in a memory coupled to the first communication device.

[0024] If the solution selection rule is obtained from the network side, optionally, the method further includes: receiving the solution selection rule from a policy control function (PCF). In other words, the solution selection rule may be obtained from the PCF.

[0025] Optionally, the solution selection rule is determined based on service specific information of ProSe corresponding to the first communication device.

[0026] That is, the ProSe service-specific information corresponding to the first communication device includes information for determining the solution selection rule, or includes the solution selection rule. The PCF may determine the solution selection rule based on the acquired ProSe service-specific information and send the determined solution selection rule to the first communication device. Since the ProSe service-specific information is derived from the subscription information, the solution selection rule is determined based on the subscription information of the first communication device, and the solution selection rule thus determined is a rule applicable to the first communication device.

[0027] The first message received by the first communication device may vary depending on whether the second communication device agrees or disagrees to use the target solution, or may vary depending on the target solution. For example, the first message is the first message received by the first communication device after sending the request message. In other words, the first communication device did not receive any other messages after sending the request message and before receiving the first message.

[0028] Optionally, the target solution is a solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use a solution that does not rely on the network side for security establishment to establish security with the first communication device.

[0029] Optionally, the target solution is a solution that does not rely on the network side for security establishment, and the first message is a direct connection security mode command) message, which is used to indicate agreement to use the solution that relies on the network side for security establishment to establish security with the first communication device.

[0030] Optionally, the first message is a rejection message, which is used to indicate that the target solution is not used to establish security with the first communication device.

[0031] Furthermore, the rejection message is also used to indicate one or more of the following: the reason for not agreeing to use the target solution to establish security with the first communication device, the solution for security establishment supported by the second communication device, or the solution for security establishment not supported by the second communication device.

[0032] It can be seen that when the second communication device does not agree to use the target solution, the first message is a rejection message, and may further indicate the reason for the second communication device's rejection, one or more of the supported solutions or unsupported solutions, so that the first communication device can determine the solution supported by the second communication device when determining the target solution next time.

[0033] In a second aspect, a security establishment method is provided. The method can be applied to a second communication device, which can be a communication device that receives a request message from a first communication device. The second communication device can be a UE, or a component configured in the UE (e.g., a chip, a chip system, a processor, etc.), or a logic module or software capable of implementing all or part of the functions of the second communication device.

[0034] Exemplarily, the method includes: receiving a request message from a first communication device, the request message being used to request a second communication device to establish a security connection with the first communication device based on a target solution, the target solution being: a solution that relies on the network side for security connection or a solution that does not rely on the network side for security connection; based on an online status, sending a first message to the first communication device, the first message being used to indicate whether to agree to use the target solution to establish a security connection with the first communication device, the online status including: being within the network coverage or not being within the network coverage.

[0035] The request message may be used to instruct the second communication device to determine the target solution. In other words, the request message may be used to determine the target solution.

[0036] Being within network coverage may mean being within the coverage of a base station and being able to successfully establish a connection with the network. Correspondingly, being out of network coverage may mean being unable to successfully establish a connection with the network. For example, being outside the coverage of a base station, or being within the coverage of a base station but unable to successfully establish a connection due to factors such as a large number of users accessing the network and weak signal quality. In other words, the network status can be used to determine whether the UE can successfully establish a connection with the network.

[0037] Based on the above scheme, the second communication device that receives the request message can determine the target scheme requested by the first communication device based on the request message, and then determine whether to support the target scheme in combination with its own network status. The result determined in this way can be adapted to the network status of the second communication device. Since the second communication device can give different feedback to different target schemes based on different network statuses. The first communication device can make different responses based on different feedback. For example, when the first message indicates that the target scheme is agreed to be used, the target scheme is used to establish a security connection with the second communication device. For example, when the first message indicates that the target scheme is rejected, the target scheme is re-determined and negotiated with the second communication device. In this way, the first communication device and the second communication device can negotiate a solution that both parties support, which is conducive to the successful establishment of a secure connection.

[0038] It should be understood that when the first message is used to indicate whether to agree to use the target solution to establish security with the first communication device, it can be indicated in an explicit way or in an implicit way. For example, when the first message is used to indicate the use of the target solution to establish security with the first communication device, the agreement to use the target solution can be implicitly indicated by a message in the security process establishment process corresponding to the target solution (such as the direct connection security mode command message or direct connection authentication and key establishment described later). In this case, it can be regarded as the second communication device directly using the target solution to establish security with the first communication device.

[0039] Therefore, another possible implementation of the above method is: receiving a request message from a first communication device, the request message being used to request the second communication device to securely establish a connection with the first communication device based on a target solution, where the target solution is either a solution that relies on the network for security establishment or a solution that does not rely on the network for security establishment; and securely establishing a connection with the first communication device using the target solution based on a network status, where the network status includes being within network coverage or not within network coverage. The following lists the different contents indicated by the first message under different network statuses.

[0040] Optionally, if the online status is within the network coverage, the first message is used to indicate agreement to use the target solution to establish security with the first communication device.

[0041] Correspondingly, the above-mentioned use of the target solution to establish security with the first communication device based on the network status includes: if the network status is within the network coverage, use the target solution to establish security with the first communication device.

[0042] If the second communication device is within the network coverage, the second communication device may support both the network-dependent solution and the network-independent solution, and thus may perform security establishment according to the target solution used by the first communication device.

[0043] Optionally, if the target solution is a solution that relies on the network side for security establishment, and the network status is not within the network coverage, the first message is used to indicate that the target solution is not agreed to be used for security establishment with the first communication device.

[0044] If the second communication device is not within network coverage, the second communication device may support a solution that does not rely on the network side, but not a solution that relies on the network side. If the target solution is a solution that relies on the network side, the second communication device may reject the target solution, thereby avoiding the possibility that the first communication device uses the target solution to establish a security connection with the second communication device, but the connection fails due to the second communication device not supporting it, thereby avoiding the waste of resources that may be caused by the security establishment process.

[0045] Optionally, if the target solution is a solution that does not rely on the network side for security establishment, and the online status is not within the network coverage, the first message is used to indicate agreement to use the target solution to establish security with the first communication device.

[0046] Correspondingly, if the target solution is a solution that does not rely on the network side for security establishment, the above-mentioned network-based status uses the target solution to establish security with the first communication device, including: if the network status is not within the network coverage, use the target solution to establish security with the first communication device.

[0047] If the second communication device is not within network coverage, the second communication device may support a solution that is independent of the network side, rather than a solution that is dependent on the network side. If the target solution is a solution that is independent of the network side, the second communication device may agree to use the target solution. In this way, the first communication device can establish a secure connection with the second communication device without having to repeatedly determine the target solution and negotiate with the second communication device. This reduces the signaling overhead and time associated with negotiating with the second communication device.

[0048] As can be seen from the above, the second communication device can agree to use different schemes to establish a secure connection with the first communication device depending on its online status. This eliminates the need to restrict the security establishment scheme to a single scheme and allows for flexible adjustments based on the second communication device's online status, thereby facilitating the successful establishment of a secure connection between the first and second communication devices.

[0049] The first message sent by the second communication device may be different depending on whether the second communication device agrees or disagrees to use the target solution, and may also be different depending on the target solution.

[0050] Optionally, the target solution is a solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use a solution that does not rely on the network side for security establishment to establish security with the first communication device.

[0051] Optionally, the target solution is a solution that relies on the network side for security establishment, and the first message is a direct connection security mode command message, which is used to indicate consent to use the solution that relies on the network side for security establishment.

[0052] Optionally, in a case where the second communication device does not agree to use the target solution to establish security with the first communication device, the first message is a rejection message, and the rejection message is used to indicate that the second communication device does not agree to use the target solution to establish security with the first communication device.

[0053] Furthermore, the rejection message is also used to indicate one or more of the following: the reason for not agreeing to use the target solution to establish security with the first communication device, the solution for security establishment supported by the second communication device, or the solution for security establishment not supported by the second communication device.

[0054] It can be seen that when the second communication device does not agree to use the target solution, the first message is a rejection message, and may further indicate the reason for the second communication device's rejection, one or more of the supported solutions or unsupported solutions, so that the first communication device can determine the solution supported by the second communication device when determining the target solution next time.

[0055] In conjunction with the first aspect or the second aspect, in some possible implementations, the request message is a direct communication request (DCR) message. In other words, the DCR message can be used to indicate a target solution, or to determine a target solution.

[0056] It should be understood that the DCR message is an example of a request message and should not constitute any limitation to the present application.

[0057] One possible situation is that the target solution is a solution that does not rely on the network side for security establishment, and the request message includes key establishment information (key_est_info).

[0058] Another possible scenario is that the target solution is a solution that relies on the network side for security establishment, and the request message includes at least one of the following: a control plane ProSe remote user key (CP-PRUK) identifier (CP-PRUK ID), a user plane ProSe remote user key (UP-PRUK) ID, or a subscription concealed identifier (SUCI).

[0059] A comparison reveals that different target solutions include different information elements in the request message. The request message corresponding to the network-dependent solution meets the following requirements: includes at least one of the CP-PRUK ID, UP-PRUK ID, or SUCI, and / or does not include key_est_info. The request message corresponding to the network-independent solution meets the following requirements: includes key_est_info, and / or does not include CP-PRUK ID, UP-PRUK ID, and SUCI.

[0060] Therefore, by determining whether the request message includes any one of key_est_info, CP-PRUK ID, UP-PRUK ID, or SUCI, it is possible to determine which solution the request message indicates.

[0061] Optionally, the solution that relies on the network side for security establishment is: a solution for security establishment based on the control plane (CP) (which may be referred to as a CP-based solution) or a solution for security establishment based on the user plane (UP) (which may be referred to as a UP-based solution).

[0062] Both the control plane-based security establishment solution and the user plane-based security establishment solution rely on the network side for security establishment, so the corresponding request message meets: at least one of CP-PRUK ID, UP-PRUK ID or SUCI, and / or does not include key_est_info.

[0063] Optionally, the target solution is a solution that relies on the network side for security establishment. The request message also includes an RSC, and the RSC is used to determine a solution for security establishment based on the control plane or a solution for security establishment based on the user plane.

[0064] When the target solution is a solution for secure establishment based on a control plane or a solution for secure establishment based on a user plane, the corresponding RSC values ​​are different. Therefore, the second communication device that receives the request message can determine whether the target solution is a solution based on a control plane or a solution based on a user plane based on the value of the RSC.

[0065] In a third aspect, a security establishment method is provided for use with a PCF. This method can be performed by the PCF, or by components configured within the PCF (e.g., a chip, a chip system, a processor, etc.), or by a logic module or software capable of implementing all or part of the PCF's functionality.

[0066] Exemplarily, the method includes: determining a scheme selection rule, the scheme selection rule being used to determine a target scheme for secure establishment between a first communication device and a second communication device from a plurality of schemes, the plurality of schemes including schemes that rely on the network side for secure establishment and schemes that do not rely on the network side for secure establishment, the first communication device being a device that initiates proximity service communication; and sending the scheme selection rule to the first communication device.

[0067] Based on the above solution, by sending a solution selection rule to the first communication device, the first communication device can determine a target solution from multiple solutions, thereby enabling a secure connection to be established with the second communication device. These multiple solutions include solutions that rely on the network for secure connection establishment and solutions that do not rely on the network for secure connection establishment. This takes into account different situations and provides feasible solutions for communication devices both within and outside the network coverage area, thereby facilitating the successful establishment of a secure connection.

[0068] In combination with the third aspect, in some possible implementations of the third aspect, the method further includes: receiving information from uniform data management (UDM), where the information is used to determine the above-mentioned solution selection rule.

[0069] Optionally, the information is service-specific information of ProSe corresponding to the first communication device.

[0070] That is, the ProSe service-specific information corresponding to the first communication device includes information for determining the solution selection rule, or includes the solution selection rule. The PCF may send the determined solution selection rule to the first communication device. Since the ProSe service-specific information is derived from the subscription information, the solution selection rule is determined based on the subscription information of the first communication device, and the solution selection rule thus determined is a rule applicable to the first communication device.

[0071] Optionally, the solution selection rule includes: a correspondence between a first RSC corresponding to ProSe communication and a first solution indication, where the first solution indication is used to indicate a first solution among multiple solutions.

[0072] In other words, the scheme selection rule includes a correspondence between one or more RSCs and one or more scheme indications among the multiple schemes.

[0073] Optionally, the solution selection rule includes priority information, where the priority information is used to indicate a priority order of the multiple solutions.

[0074] For the description of the scheme selection rules, please refer to the relevant description in the first aspect and will not be repeated here.

[0075] In a fourth aspect, a security establishment method is provided, which can be applied to a first communication device of ProSe communication. The first communication device can be a UE, or a component configured in the UE (such as a chip, a chip system, a processor, etc.), or a logical module or software that can realize all or part of the functions of the first communication device.

[0076] Exemplarily, the method includes: sending at least one request message, which is used to indicate multiple schemes, and the multiple schemes include: a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; receiving a second message from a second communication device, which is used to indicate the use of one of the multiple schemes to establish security with the first communication device.

[0077] Based on the above solution, the first communication device can send at least one request message indicating multiple solutions, which can facilitate the second communication device that receives the at least one request message to select one of the solutions to establish a secure connection with the first communication device. The multiple solutions include solutions that rely on the network side for security establishment and solutions that do not rely on the network side for security establishment, taking into account different situations and providing feasible solutions for both situations where the second communication device is within the network coverage area and outside the network coverage area. Therefore, the second communication device can select one of the multiple solutions based on its network status and indicate it to the first communication device through a second message. In this way, both parties can establish a secure connection. This solution does not require multiple negotiations between the first and second communication devices, and therefore facilitates faster completion of the security establishment.

[0078] In combination with the fourth aspect, in some possible implementations of the fourth aspect, the method further includes: determining a scheme indicated by the second message as a target scheme; and using the target scheme to establish security with the second communication device.

[0079] By determining the scheme indicated by the second message as the target scheme, the first communication device can use the same scheme as the second communication device for secure establishment. In other words, the second communication device can indicate the target scheme to the first communication device via the second message. The indication of the target scheme can be explicit or implicit. This application does not limit this.

[0080] Exemplarily, the second message is the first message received from the second communication device after the first communication device sends at least one request message. In other words, the first communication device does not receive any other messages after sending at least one request message and before receiving the first message.

[0081] Optionally, the second message is a direct connection security mode command message, which is used to indicate a scheme that relies on the network side for security establishment; determining a scheme indicated by the second message as the target scheme includes: determining the scheme that relies on the network side for security establishment indicated by the direct connection security mode command message as the target scheme.

[0082] Optionally, the second message is a direct authentication and key establishment message, which is used to indicate a scheme that does not rely on the network side for security establishment; determining a scheme indicated by the second message as the target scheme includes: determining the scheme that does not rely on the network side for security establishment indicated by the direct authentication and key establishment message as the target scheme.

[0083] Furthermore, the receiving of a second message from a second communication device includes: receiving multiple second messages from multiple second communication devices; and determining a scheme indicated by the second message as a target scheme includes: determining a scheme indicated by a second message among the multiple second messages as a target scheme based on a scheme selection rule.

[0084] Since the first communication device may send the above-mentioned at least one request message by broadcasting, there may also be one or more second communication devices that receive the at least one request message. Therefore, the first communication device may receive multiple second messages. In this case, the first communication device can determine the target solution based on the multiple second messages.

[0085] Because the solutions indicated by the multiple second messages may be the same or different, multiple solutions may be determined based on the multiple second messages. The first communication device may determine the target solution based on a solution selection rule. The solution selection rule may include, but is not limited to, the rules described above in conjunction with the first to third aspects. For details, please refer to the above description and will not be repeated here.

[0086] In a fifth aspect, a security establishment method is provided. The method can be applied to a second communication device, where the second communication device can be a communication device that receives a request message from a first communication device. The second communication device can be a UE, or a component configured in the UE (e.g., a chip, a chip system, a processor, etc.), or a logic module or software capable of implementing all or part of the functions of the second communication device.

[0087] Exemplarily, the method includes: receiving at least one request message from a first communication device, the at least one request message being used to indicate a plurality of schemes, the plurality of schemes including a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; based on the online status, sending a second message to the first communication device, the second message being used to indicate the use of one of the plurality of schemes for security establishment with the first communication device.

[0088] Based on the above solution, the first communication device can send at least one request message indicating multiple solutions, which can facilitate the second communication device that receives the at least one request message to select one of the solutions to establish a secure connection with the first communication device. The multiple solutions include solutions that rely on the network side for security establishment and solutions that do not rely on the network side for security establishment, taking into account different situations and providing feasible solutions for both situations where the second communication device is within the network coverage area and outside the network coverage area. Therefore, the second communication device can select one of the multiple solutions based on its network status and indicate it to the first communication device through a second message. In this way, both parties can establish a secure connection. This solution does not require multiple negotiations between the first and second communication devices, and therefore facilitates faster completion of the security establishment.

[0089] In combination with the fifth aspect, in some possible implementations of the fifth aspect, the online status is within the network coverage, and the second message is used to indicate the use of the solution that relies on the network side for security establishment to establish security with the first communication device.

[0090] Optionally, the second message is a direct connection security mode command message.

[0091] In combination with the fifth aspect, in some possible implementations of the fifth aspect, the online status is not within the network coverage, and the second message is used to indicate the use of the solution that does not rely on the network side for security establishment to establish security with the first communication device.

[0092] Optionally, the first message is a direct connection authentication and key establishment message.

[0093] In combination with the fourth aspect or the fifth aspect, in some possible implementations, the at least one request message includes multiple request messages, and each request message in the multiple request messages is used to indicate one of the multiple solutions.

[0094] That is, each request message is used to indicate one solution, and multiple solutions can be indicated by multiple request messages.

[0095] In combination with the fourth aspect or the fifth aspect, in some possible implementations, the at least one request message is one request message, and the request message is used to indicate the multiple schemes.

[0096] That is, the multiple solutions can be indicated by one request message. In this case, the information elements in the request message can include both information elements corresponding to the solution that depends on the network side and information elements corresponding to the solution that does not depend on the network side.

[0097] Optionally, the request message includes: key_est_info and at least one of the following: CP-PRUK ID, UP-PRUK ID or SUCI.

[0098] As previously mentioned, the information elements in the request message corresponding to the network-dependent solution include the UTC-based counter LSB and RSC, while the information elements in the request message corresponding to the network-independent solution include the ProSe Identifier. Therefore, in this solution, when a request message indicates multiple solutions, the request message can include multiple of the above information elements simultaneously.

[0099] In combination with the above aspects, in some possible implementations, the first communication device is a first UE, the second communication device is a relay UE between the first UE and the second UE, and the second UE is a UE that performs proximity service communication with the first UE.

[0100] That is, after completing the security establishment, the second communication device can act as a relay UE between the first UE and another UE (e.g., a third UE) for proximity service communications. In other words, this solution can be applied to U2U relay service scenarios. It should be noted that before establishing a security connection with the first UE, the relay UE can be considered a potential relay.

[0101] In the U2U relay service scenario, although the relay UE may be within the network coverage or may not be within the network coverage, the present application provides multiple solutions, including solutions that rely on the network side for security establishment and solutions that do not rely on the network side for security establishment, thereby providing different security establishment solutions for relay UEs in different network conditions, which is conducive to the successful establishment of a secure connection.

[0102] In a sixth aspect, a communications device is provided that can implement the secure establishment method described in aspects 1 to 5 and any possible implementation of aspects 1 to 5. The device includes one or more corresponding functional units or modules for executing the method. The functional units or modules included in the device can be implemented in software and / or hardware.

[0103] In a seventh aspect, the present application provides a communication device comprising a processor, wherein the processor is configured to execute the security establishment method described in the first to fifth aspects and any possible implementation of the first to fifth aspects.

[0104] Optionally, the apparatus may further include a memory for storing instructions and data. The memory is coupled to the processor, and when the processor executes the instructions stored in the memory, the methods described in the above aspects may be implemented.

[0105] Optionally, the apparatus may further include a communication interface, which is used for the apparatus to communicate with other devices. Exemplarily, the communication interface may be a transceiver, a circuit, a bus, a module, or other types of communication interfaces.

[0106] In an eighth aspect, the present application provides a chip system comprising at least one processor for supporting the implementation of the functions involved in the above-mentioned first to fifth aspects and any possible implementation methods of the first to fifth aspects, for example, receiving or processing the data and / or information involved in the above-mentioned method.

[0107] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0108] The chip system can be composed of chips, or can include chips and other discrete devices.

[0109] In a ninth aspect, the present application provides a computer-readable storage medium comprising a computer program, which, when executed on a computer, enables the computer to implement the method in the first to fifth aspects and any possible implementation of the first to fifth aspects.

[0110] In the tenth aspect, the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when run, enables a computer to execute the method in the first to fifth aspects and any possible implementation of the first to fifth aspects.

[0111] In the eleventh aspect, an embodiment of the present application provides a communication system, including the aforementioned first communication device, the second communication device, the PCF and / or the aforementioned other devices (such as UDM).

[0112] It should be understood that the sixth to eleventh aspects of the present application correspond to the technical solutions of the first to fifth aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] FIG1 is a schematic diagram of a scenario applicable to the security establishment method provided in an embodiment of the present application;

[0114] FIG2 is a schematic flow chart of a security establishment method provided in an embodiment of the present application;

[0115] FIG3 is a schematic flow chart of a security establishment method provided in another embodiment of the present application;

[0116] 4 and 5 are schematic block diagrams of communication devices provided in embodiments of the present application;

[0117] FIG6 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0118] The technical solution in this application will be described below with reference to the accompanying drawings.

[0119] To facilitate understanding of the embodiments of the present application, the following points are first explained:

[0120] First, in the embodiments of this application, prefixes such as "first" and "second" are used only to distinguish and describe different things belonging to the same name category, and do not restrict the order, size, or quantity of things. For example, "first communication device" and "second communication device" are simply different communication devices, and do not limit the number of communication devices or the priority relationship between them; for another example, "first message" and "second message" are simply different messages, and there is no time sequence, size relationship, or priority relationship between the two.

[0121] Second, the messages mentioned in the embodiments of this application, such as the DCR message, the direct connection security mode command message, the direct connection authentication and key establishment message, and the information elements (IEs) included in each message, are merely examples and should not constitute any limitation on this application. This application does not exclude the possibility of using other messages to replace the above messages to achieve the same or similar functions.

[0122] Third, the "sending" and "receiving" in the embodiments of the present application indicate the direction of signal transmission. For example, "sending information to UE 2" can be understood as the destination end of the information is UE 2, which can include direct sending through the air interface, and also include indirect sending through the air interface by other units or modules. "Receiving configuration information from charging" can be understood as the source end of the configuration information is UE 2, which can include receiving directly from UE 2 through the air interface, and also include receiving indirectly from UE 2 from other units or modules through the air interface. "Sending" can also be understood as the "output" of the chip interface, and "receiving" can also be understood as the "input" of the chip interface.

[0123] In other words, sending and receiving can be performed between devices, for example, between UE 2 and UE 1; or it can be performed within a device, for example, sending or receiving between components, modules, chips, software modules or hardware modules within the device through a bus, wiring or interface.

[0124] It is understandable that information may be processed between the source and destination of information transmission, such as coding, modulation, etc., but the destination can understand the valid information from the source. Similar expressions in this application can be understood similarly and will not be repeated.

[0125] Fourth, in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship, but does not exclude the situation where the previous and next associated objects are in an "and" relationship. The specific meaning can be understood in conjunction with the context. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c; a and b; a and c; b and c; or a and b and c. Where a, b, c can be single or multiple.

[0126] Fifth, the predefined in this application can be understood as: define, predefine, store, pre-store, pre-negotiate, pre-configure, solidify, or pre-burn.

[0127] Sixth, the storage involved in this application may refer to storage in one or more memories. The one or more memories may be provided separately or integrated into an encoder or decoder, a processor, or a communication device. The one or more memories may also be provided in part separately and in part integrated into a decoder, a processor, or a communication device. The type of memory may be any form of storage medium, and this application is not limited thereto.

[0128] Seventh, in the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that the communication device (such as UE 1 or UE 2) will make corresponding processing under certain objective circumstances. It does not limit the time, and does not require the communication device (such as UE 1 or UE 2) to have a judgment action when implementing it, nor does it mean that there are other limitations.

[0129] In addition, “simultaneously” does not limit the time. In this article, “simultaneously” may mean that multiple steps can be executed synchronously, or multiple information elements can be included in the same message.

[0130] The technical solution provided in this application can be applied to various communication systems, such as: long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, sidelink (SL) communication system, universal mobile telecommunication system (UMTS), world-wide interoperability for microwave access (WiMAX) communication system, fifth generation (5G) mobile communication system or new radio (NR) access technology. Among them, the 5G mobile communication system can include non-standalone (NSA) and / or standalone (SA).

[0131] The technical solution provided in this application can also be applied to future communication systems, such as the sixth generation (6G) mobile communication system, etc. This application does not limit this.

[0132] In this application, a radio access network (RAN) device is a device with wireless transceiver capabilities. It can provide wireless communication services and connect terminals to a wireless network. It can be a node in a radio access network, referred to as a RAN node.

[0133] In one possible scenario, a RAN node can be a base station (BS), an evolved NodeB (eNodeB), a transmission reception point (TRP), a home evolved NodeB (HNB), a wireless fidelity (Wi-Fi) access point (AP), a mobile switching center, a next-generation NodeB (gNB) in a 5G mobile communication system, a next-generation NodeB in a 6G mobile communication system, or a base station in a future mobile communication system. A RAN node can also be a device that performs base station functions in device-to-device (D2D) communication systems, vehicle-to-everything (V2X) communication systems, machine-to-machine (M2M) communication systems, and Internet of Things (IoT) communication systems. A RAN node can also be a RAN node in a non-terrestrial network (NTN), meaning that the RAN node can be deployed on a high-altitude platform or satellite. A RAN node can be a macro base station, a micro base station, an indoor base station, a relay node, a donor node, or a radio controller in a cloud radio access network (CRAN) scenario, or a node in an open radio access network (O-RAN or ORAN) scenario. Alternatively, a RAN node can be a server, a wearable device, a vehicle, or an onboard device. For example, a RAN node in V2X technology can be a roadside unit (RSU). Of course, a RAN node can also be a node in the core network.

[0134] In another possible scenario, multiple RAN nodes collaborate to assist the terminal in achieving wireless access, and different RAN nodes respectively implement part of the functions of the base station. For example, the RAN node can be a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU). The CU and DU can be set separately, or they can be included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH).

[0135] In different systems, CU (or CU-CP and CU-UP), DU, or RU may have different names, but those skilled in the art will understand their meanings. For example, in the ORAN system, CU may be referred to as Open CU (O-CU), DU may be referred to as Open DU (O-DU), CU-CP may be referred to as Open CU-CP (O-CU-CP), CU-UP may be referred to as Open CU-UP (O-CU-UP), and RU may be referred to as Open RU (O-RU).

[0136] Among them, any unit among CU (or CU-CP, CU-UP), DU and RU can be implemented through a software module, a hardware module, or a combination of a software module and a hardware module.

[0137] The user equipment (UE) in this application may also be referred to as terminal equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile equipment (ME), user terminal, terminal, wireless communication equipment, user agent or user device.

[0138] A UE may be a device that provides voice / data connectivity to a user, such as a handheld device or vehicle-mounted device with wireless connection capabilities. Currently, some examples of UEs include: mobile phones, tablet computers, computers with wireless transceiver capabilities (such as laptops, PDAs, etc.), mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, uncrewed aerial vehicles (UAVs), wireless terminals in V2X, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), and so on. assistant, PDA), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, vehicle-mounted devices, wearable devices, terminal devices in 5G networks, or terminal devices in future evolved public land mobile networks (PLMN), etc.

[0139] Wearable devices, also known as wearable smart devices, are a general term for wearable devices that use wearable technology to intelligently design and develop wearable devices for daily wear, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include those that are fully functional, large in size, and can achieve full or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0140] UEs can also include terminal devices in IoT systems, also known as IoT nodes. IoT is a crucial component of future information technology development. Its primary technical feature is connecting objects to the Internet through communication technologies, thereby enabling intelligent networks that interconnect humans and machines, and objects and things. IoT technology, for example, utilizes narrowband (NB) technology to achieve massive connectivity, deep coverage, and power-saving terminals.

[0141] UE can also include sensors such as smart printers, train detectors, and gas stations. Its main functions include collecting data (part of the terminal equipment), receiving control information and downlink data from network equipment, and sending electromagnetic waves to transmit uplink data to network equipment.

[0142] It should be understood that this application does not limit the specific forms of the network device and UE.

[0143] To facilitate understanding of the embodiments of the present application, the following first briefly explains the terms involved in this article.

[0144] 1. D2D communication: Under the control of the cell network, each communication device (such as UE) can share spectrum resources and conduct D2D communication to improve the utilization of spectrum resources. It can also use unauthorized spectrum resources for communication without being controlled by the cell network. In D2D communication, communication devices can communicate through the PC5 port, and UEs can transmit control plane and user plane information through the PC5 port. This information includes signaling and / or data. The link that the UE directly communicates through the PC5 port can be called a sidelink (SL). It can include one-to-one communication and one-to-many communication. One-to-one communication can correspond to unicast communication, and one-to-many communication can correspond to multicast communication and broadcast communication. In one-to-one communication, if the initiator and the receiver are in close range, they can communicate directly after mutual discovery.

[0145] 2. ProSe communication: D2D communication has been widely discussed in LTE and 5G network standards and is collectively referred to as ProSe communication. For example, in 5G, 5G ProSe direct communication is defined as communication between two or more nearby ProSe-enabled UEs using user plane transmission using NR technology without traversing any network nodes.

[0146] UEs performing ProSe communication can communicate with each other through the PC5 port. UEs can transmit control plane and user plane information through the PC5 port, including signaling and / or data. The link through which the UE directly communicates through the PC5 port can also be called a sidelink, or a PC5 link. Unicast communication performed through the PC5 link can also be called PC5 unicast communication, and the PC5 link used for unicast communication can also be called a PC5 unicast link.

[0147] Compared with traditional cellular network communications, UEs used for ProSe communication need to have ProSe functionality, and UEs with ProSe functionality communicate with each other through the PC5 port. In 5G, UEs with ProSe functionality and performing ProSe communication can be called source UEs (source UE) and target UEs (target UE), or they can be collectively referred to as end-side UEs (end UE). The source UE and the target UE can communicate with the assistance of U2U Relay. U2U Relay can be understood as a UE that provides support for the connection function between the source UE and the target UE. In this article, the service in which the end-side UE performs ProSe communication through U2U Relay can be called U2U Relay service.

[0148] It should be noted that in the process of establishing a PC5 link for ProSe communication, a UE with ProSe functionality needs to initiate PC5 link establishment to another UE with ProSe functionality. At this time, the roles of the two UEs can be divided into an initiating UE and a receiving UE. For example, if an end UE initiates PC5 link establishment to a U2U Relay, the end UE and the U2U Relay are the initiating UE and the receiving UE, respectively. If an end UE initiates PC5 link establishment to another end UE, the end UE and the other end UE are the initiating UE and the receiving UE, respectively.

[0149] 3. Network status: For ease of description, this document introduces the network status to distinguish different UE states. The network status can include: in-coverage and out-of-coverage.

[0150] Here, being within network coverage may mean being within the coverage of a base station and being able to successfully establish a connection with the network. Correspondingly, not being within network coverage may mean being unable to successfully establish a connection with the network. For example, being outside the coverage of a base station, or being within the coverage of a base station but unable to successfully establish a connection with the network due to factors such as an excessive number of users accessing the network and weak signal quality. In other words, the network status can be used to determine whether the UE can successfully establish a connection with the network.

[0151] 4. RSC: can be used to identify different services. In other words, different RSCs can correspond to different services. For example, ProSe communication service A can correspond to one RSC. Exemplarily, if a device (for example, denoted as device A) wishes to conduct ProSe communication service A1 through the UE-to-network U2U Relay, it can correspond to one RSC (for example, denoted as RSC#1); if device A wishes to conduct ProSe communication service A2 through U2U Relay, it can correspond to another RSC (for example, denoted as RSC#2). Device A can broadcast the RSC (for example, RSC#2) corresponding to the service it wishes to initiate during the discovery process, and the device (for example, denoted as device B) that receives RSC#2 can determine that device A wishes to conduct ProSe communication through U2U Relay.

[0152] 5. Security establishment: The purpose of security establishment is to establish a secure connection between communication devices to ensure communication security. The security establishment process is briefly described as follows:

[0153] In PC5 unicast communication, the initiating UE and the receiving UE perform security establishment during the PC5 link establishment process, including determining through negotiation whether the security of the PC5 link is enabled (i.e., determining the security protection method between the two ends), and further performing mutual authentication and key establishment. It should be noted that the initiating UE and the receiving UE can negotiate through control plane messages (or signaling messages). For example, the initiating UE can send a direct communication request (DCR) message to the receiving UE to trigger the establishment of a PC5 unicast link. After the receiving UE receives the direct communication request message from the initiating UE, it can trigger the security establishment process for the PC5 unicast link. The process is used for mutual authentication, mutual authorization and establishment of a shared key for the PC5 unicast link between the initiating UE and the receiving UE. The security establishment method provided in the present application may include: a method for security establishment that relies on the network side and a method for security establishment that does not rely on the network side. The solution that relies on the network side for security establishment can also be called an on-line solution, and the method that does not rely on the network side for security establishment can also be called an off-line solution.

[0154] 6. Solutions that rely on the network for security establishment: This is a solution that uses the network for security authentication, authorization, and key establishment. In the process of relying on the network for security establishment, interaction with the network is required to complete the security establishment.

[0155] Solutions that rely on the network side for security establishment may further include user plane-based solutions (UP-based solutions) and control plane-based solutions (CP-based solutions). The user plane-based solution may be referred to as the user plane solution or UP solution, and the control plane-based solution may be referred to as the control plane solution or CP solution. Furthermore, the UE is configured with a correspondence between an RSC and a control plane security solution indication (Control Plane Security Indicator), which may be used to indicate whether security establishment is performed through the control plane solution. That is, the UE may further determine, based on the RSC and the correspondence, whether the RSC corresponds to the control plane solution or the user plane solution.

[0156] The CP scheme is a scheme for obtaining the relay connection key through the control plane of the network. For example, when the initiating UE needs to establish a PC5 link with the receiving UE, the initiating UE can perform ProSe discovery to discover the receiving UE. The initiating UE can send a direct communication request message to the receiving UE to initiate the establishment of the PC5 link. Under the CP scheme, the direct communication request message may include: the SUCI of the initiating UE, and the relay service code (RSC) of the service corresponding to the PC5 communication link. The receiving UE can send a key acquisition request message to the access and mobility management function (AMF) based on the direct communication request message, so that the AMF can verify that the receiving UE has the authority to use the ProSe service. After verifying that the receiving UE has the authority to use the service, the AMF can send an authentication request message to the AUSF. The authentication server function (AUSF) can obtain an authentication vector from the uniform data management (UDM) based on the authentication request message to perform ProSe authentication on the initiating UE. When ProSe authentication is passed, the initiator UE and AUSF generate CP-PRUK and CP-PRUK ID respectively. CP-PRUK is the root key of PC5 link under CP scheme, and CP-PRUK ID is the identifier of the root key. AUSF can generate K based on CP-PRUK. NR_ProSe and sends K to the receiving UENR_ProSe Among them, K NR_ProSe It can be the key of PC5 link under CP solution. The initiating UE can generate K by itself based on CP-PRUK. NR_ProSe At this point, both the initiating UE and the receiving UE have obtained K NR_ProSe , both parties can use K NR_ProSe Establish a secure connection to PC5.

[0157] AUSF can also store the CP-PRUK, CP-PRUK ID, the RSC of the service corresponding to the PC5 link, and the subscription permanent identifier (SUPI) of the initiating UE to the ProSe anchor function (PAnF). The initiating UE can also send a direct communication request message to other receiving UEs again. At this time, under the CP scheme, the direct communication request message may also include a CP-PRUK ID to indicate that the initiating UE has previously performed the ProSe authentication process. AUSF can obtain the corresponding CP-PRUK directly from PAnF based on the CP-PRUK ID and the RSC of the service without having to perform the ProSe authentication process again.

[0158] It is understandable that the specific process of the CP solution can also refer to the relevant introduction of the third generation partnership project (3rd generation partnership project, 3GPP) technical specification (technical specification, TS) 33.503, which will not be repeated here.

[0159] The UP scheme is a scheme for obtaining the relay connection key through the user plane of the network. For example, the initiating UE and the receiving UE are pre-configured with the ProSe key management function (PKMF) of the initiating UE and the PKMF address of the receiving UE, respectively. The initiating UE can obtain the UP-PRUK and UP-PRUK ID from the PKMF of the initiating UE through UP signaling. Among them, UP-PRUK is the root key of the PC5 link under the UP scheme, and the UP-PRUK ID is the identifier of the root key. When the initiating UE needs to access the network through the relay, the initiating UE can perform ProSe discovery to discover the receiving UE. The initiating UE can send a direct communication request message to the receiving UE to initiate the establishment of a PC5 link. Under the UP scheme, the direct communication request message may include: the identifier of the home public land mobile network (HPLMN) of the initiating UE, such as the HPLMN ID, and the SUCI of the initiating UE (the SUCI of the initiating UE can also be replaced by the UP-PRUK ID). The receiving UE can send a key acquisition request message to the PKMF of the receiving UE according to the direct communication request message, so that the PKMF of the receiving UE can verify that the receiving UE has the authority to use the service. At this time, the PKMF of the receiving UE can determine the PKMF of the initiating UE according to the HPLMN ID of the initiating UE and the SUCI of the initiating UE (the SUCI of the initiating UE can also be replaced by the UP-PRUK ID), and obtain the K NRP (new radio PC5, NRP) and K NRP Calculation parameters (K NRP freshness parameter). The PKMF of the receiving UE sends K NRP and K NRP Calculation parameter. K NRP It can be the key of PC5 link under UP solution. The receiving UE obtains K NRP Then, K is sent to the initiating UE. NRP Calculation parameters are calculated by the initiating UE based on UP-PRUK and K NRP Calculation parameters to determine K NRP At this point, both the initiating UE and the receiving UE have obtained K NRP , both parties can use K NRP Establish a secure connection to PC5.

[0160] It is understood that the specific process of the UP solution can also refer to the relevant introduction of 3GPP TS 33.503, which will not be repeated here.

[0161] Since the network side can know in real time whether the communication device that needs to be securely established is a contracted user and whether it has the authority to use the service, it can prevent unauthorized users or users with expired authorization from obtaining authorization. Since the network side participates in the security establishment, each time the security is established, the network equipment can determine whether the communication device is authorized based on the most recent contract information. Therefore, the authorization can change with the update of the contract information. This authorization can be regarded as a dynamic authorization. On the other hand, since the network side participates in the security establishment, there is a lot of interactive signaling between the communication device and the network equipment. In particular, the user-plane-based solution also needs to establish a protocol data unit (PDU) session, and the authorization is relatively time-consuming.

[0162] 7. Solutions that do not rely on the network for security establishment: In contrast to solutions that rely on the network for security establishment, solutions that do not rely on the network for security establishment do not require the network to perform authentication, authorization, and key establishment. Devices can perform mutual authentication and key establishment.

[0163] In a solution that does not rely on the network side for security establishment, long-term credential information is pre-configured in the initiating UE and the receiving UE, which is used as the root credential for a specific PC5 unicast communication service, and is used as the root credential in the security establishment process of the PC5 unicast establishment process to further generate the root key of the PC5 unicast link. When the initiating UE determines that a PC5 unicast link needs to be established for a specific service, the initiating UE sends a direct communication request message to the receiving UE. Correspondingly, the receiving UE2 receives the direct communication request message from the sending UE1. The direct communication request message may include the information required for key establishment (Key_Est_Info). For example, the information required for key establishment may be an information container for carrying the information required for key establishment. The initiating UE and the receiving UE can complete the mutual authentication and key establishment process by exchanging Key_Est_Info multiple times to obtain the root key K of the PC5 unicast link. NRP .

[0164] Optionally, the direct communication request message may further include a root key identifier (K NRP ID), K NRP ID is used to identify the root key K NRP , K NRP It can be the shared key established by the mutual authentication process and key establishment process between the initiating UE and the receiving UE. If the initiating UE can perceive the identity of the receiving UE and the initiating UE has saved some context information between it and the receiving UE, the direct communication request message can also include KNRP ID, and then the previously obtained key can be directly used without using Key_Est_Info to negotiate the key again.

[0165] When establishing security independently of the network, a communication device must mutually authenticate with the peer device to obtain authorization. However, since security establishment can be completed without network involvement, signaling interaction is minimal and flexibility is enhanced. Furthermore, once mutual authentication and authorization are complete, the peer device can be considered trustworthy. Since no network interaction is involved, the communication device may not be able to obtain the most recent contract information, and authorization may not change for a long period of time after obtaining it. Therefore, this authorization can be considered static.

[0166] 1 is a diagram of a ProSe communication scenario applicable to the security establishment method provided in this application, which shows an access network device 110 , multiple UEs 121 to 125 , and a core network 130 .

[0167] The core network 130 may include multiple network elements with different functions to implement different functions. For example, the core network 110 may include, but is not limited to, network elements such as the access and mobility management function (AMF), session management function (SMF), user plane function (UPF), policy control function (PCF), and uniform data management (UDM). Each network element may be used to implement its own function. For example, the AMF may be used for mobility management and access management. The SMF may be used for session management, allocation and management of Internet Protocol (IP) addresses for terminal devices, selection and management of user plane functions, policy control, or termination points of charging function interfaces, as well as downlink data notification. The UPF may be used for packet routing and forwarding, or quality of service (QoS) processing for user plane data. The PCF may be used to provide a unified policy framework for guiding network behavior and to provide policy rule information to network elements of control plane functions (e.g., AMF, SMF, etc.). The UDM may be used to store user data, such as subscription information, authentication / authorization information, etc. This application does not limit the specific network elements included in the core network 120 and their functions, quantity and form.

[0168] Access network device 110 is connected to core network 130 and can be used to provide network access for authorized terminals within its coverage area, manage radio resources, and forward control signals and user data between terminal devices and core network 130. As shown in the figure, it is assumed that authorized terminals UE 121 and UE 122 are within the coverage area of ​​access network device 110 and can successfully establish a connection with the network. UE 123 through UE 125 are outside the coverage area of ​​access network device 110 and cannot successfully establish a connection with the network.

[0169] UE 121 and UE 122, UE 121 and UE 124, UE 122 and UE 123, and UE 124 and UE 125 can all communicate via the PC5 port. If UE 121 wishes to communicate with UE 123 via the PC5 port, but UE 121 and UE 123 are far apart, UE 123 is outside the signal coverage of UE 121, or the communication quality is poor, UE 121 can use UE 122 to assist in communication. In this case, UE 122 is a relay UE between UE 121 and UE 123, i.e., an example of the aforementioned U2U Relay, UE 121 is an example of a source UE, and UE 123 is an example of a target UE. If UE 121 wishes to communicate with UE 125 via the PC5 port, but UE 121 and UE 125 are far apart, UE 125 is outside the signal coverage of UE 121, or the communication quality is poor, UE 121 may use UE 124 to assist in communication. In this case, UE 124 is a relay UE between UE 121 and UE 125, i.e., another example of the aforementioned U2U Relay, UE 121 is an example of a source UE, and UE 125 is another example of a target UE.

[0170] UE 122 is within the coverage of access network device 110 and can successfully establish a connection with the network; UE 124 is outside the coverage of access network device 110 and cannot successfully establish a connection with the network. The security establishment schemes supported by relay UEs vary depending on their network status.

[0171] To ensure communication security, secure connections must be established between UE 121 and UE 122, between UE 122 and UE 123, between UE 121 and UE 124, and between UE 124 and UE 125. However, in U2U Relay scenarios, how to securely establish connections between the end-side UE and the relay UE remains a pressing technical issue.

[0172] In view of this, the present application provides a method for providing multiple optional security establishment solutions for end-side UEs using ProSe communication, adapting to the different network states of relay UEs. In this way, regardless of whether the relay UE is within or outside the network coverage, it can adapt to a security establishment solution, thereby completing the security establishment between the relay UE and the end-side UE, ensuring the security of ProSe communication.

[0173] It is understandable that although the method provided in this application is proposed for the secure establishment between the source UE and the relay UE of ProSe communication in the U2U relay service, this does not constitute any limitation on the scope of application of the method. For example, after the secure establishment between the source UE and the relay UE of ProSe communication is completed, the relay UE can further establish a secure connection with the target UE of ProSe communication. At this time, the relay UE can also use the method provided below to establish a secure connection with the target UE. The following is only for the convenience of understanding and explanation, and takes the secure establishment between the source UE and the relay UE of ProSe communication as an example to describe the method provided in this application.

[0174] The following will describe in detail the security establishment method provided by this application with reference to the accompanying drawings.

[0175] It should be noted that the following multiple embodiments describe each process from the perspective of device interaction. Each device therein is only an example and should not constitute any limitation to this application. For example, UE 1 can be an example of a first communication device, and the components configured in UE 1 (such as a chip, a chip system, a processor, or other logical modules or software that can be used to implement part or all of the functions of UE 1, etc.) can be another example of the first communication device; UE 2 can be an example of a second communication device, and the components configured in UE 2 (such as a chip, a chip system, a processor, or other logical modules or software that can be used to implement part or all of the functions of UE 2, etc.) can be another example of the second communication device.

[0176] UE 1 may be the first UE initiating ProSe communication, for example, corresponding to UE 121 in FIG. 1 , and UE 2 may be a potential relay UE determined by UE 1, for example, corresponding to UE 122 or UE 124 in FIG. 1 . In other words, UE 1 wishes to establish a secure connection with UE 2, thereby assisting UE 1 in conducting ProSe communication with a second UE (e.g., UE 3), for example, corresponding to UE 123 or UE 125 in FIG. 1 , through UE 2.

[0177] 2 is a schematic flow chart of a security establishment method provided by an embodiment of the present application. The process shown in FIG2 describes that the terminal UE actively selects a solution and then negotiates with the relay UE to determine the solution for security establishment between the two.

[0178] As shown in Figure 2, the method 200 includes steps 210 to 250. Each step in the method 200 is described in detail below.

[0179] In step 210, UE 1 determines a target solution from a plurality of solutions, where the plurality of solutions include: a solution that relies on the network side for security establishment and a solution that does not rely on the network side for security establishment.

[0180] When UE 1 determines that it needs to perform ProSe communication with UE 3 with the assistance of a relay UE (ie, U2U Relay), UE 1 may determine a target solution from multiple solutions. The relay UE is denoted as UE 2.

[0181] For the description of the solution that relies on the network side for security establishment (or, the on-line solution) and the solution that does not rely on the network side for security establishment (or, the off-line solution), please refer to the relevant description above and will not be repeated here. It should be understood that the solution that relies on the network side for security establishment and the solution that does not rely on the network side for security establishment are only two examples of solutions for security establishment and should not constitute any limitation to this application. This application does not exclude the possibility that the above-mentioned multiple solutions also include other solutions that can be used for security establishment, nor does it exclude the possibility of defining other solutions that can be used to implement the same or similar solutions in future technical specifications.

[0182] In this embodiment, the solution determined by UE 1 is recorded as the target solution. UE 1 can determine, through negotiation with other communication devices (such as UE 2), that both parties support the target solution, and then use the target solution for secure establishment. Therefore, during the negotiation process, the target solution may change. For the sake of distinction and explanation below, the target solution determined by UE 1 this time is recorded as Solution 1. Solution 1 can be an online solution, an offline solution, or other solution that can be used for secure establishment, and this application does not limit this.

[0183] It is understandable that, when determining the target solution, UE 1 may determine the target solution based on information such as its own capabilities, so the target solution is a solution supported by UE 1.

[0184] Optionally, step 210 includes: UE 1 determines a target solution from multiple solutions based on a solution selection rule.

[0185] The solution selection rule indicates the rules for selecting a target solution from multiple solutions. It should be understood that the solution selection rule is just a name, and can also be called a solution selection instruction, selection rule, selection instruction, preset rule, etc. This application does not limit the naming of the solution selection rule. As long as it can achieve the same or similar functions as the solution selection rule, it should fall within the scope of protection of this application.

[0186] In one possible design, the scheme selection rule is a correspondence between a ProSe code and a scheme indication. In another possible design, the scheme selection rule is priority information, which indicates the priority order of each scheme among multiple schemes. In yet another possible design, the scheme selection rule includes the aforementioned correspondence between the RSC and the scheme indication, as well as the priority information. The correspondence between the RSC and the scheme indication, as well as the priority information, will be described in detail below.

[0187] The correspondence between ProSe codes and scheme indications:

[0188] The scheme indication can be an indication for determining a specific scheme, that is, the scheme indication can be used to determine a specific scheme, or it can be used to directly correspond to a specific scheme. For example, the scheme indication can be an identifier of a scheme, and each scheme can be indicated by an identifier. The UE can index to a specific scheme based on the scheme identifier. Of course, the scheme indication is not limited to the scheme identifier and can also be other information that can be used to indicate or determine a scheme. This embodiment is subsequently described using the example of a scheme indication being used to further determine a specific scheme.

[0189] Exemplarily, the ProSe code may be an RSC, a ProSe application code, a ProSe discovery code, a ProSe query code, or a ProSe response code, etc., and the present application includes but is not limited to the same. For ease of explanation, this embodiment is subsequently described using RSC as an example, that is, one possible form of the correspondence between the ProSe code and the scheme indication is the correspondence between the RSC and the scheme indication.

[0190] Each RSC can correspond to one or more scheme indicators. The scheme indicators corresponding to different RSCs can be the same or different. In other words, the scheme selection rule is a correspondence between one or more RSCs and one or more scheme indicators, with each scheme indicator used to indicate or determine one of multiple schemes. An RSC can also correspond to a U2U Relay service. Different RSCs can correspond to different U2U Relay services, and different RSCs can also correspond to the same U2U Relay service.

[0191] In this embodiment, UE 1 determines to perform ProSe communication with UE 3 through the assistance of the relay UE, and UE 1 determines the RSC corresponding to the ProSe communication (for ease of distinction, recorded as the first RSC), and then UE 1 determines the first scheme indication corresponding to the first RSC according to the correspondence between the RSC and the scheme indication. Since the first scheme indication is used to indicate the first scheme among the above-mentioned multiple schemes, UE 1 can further determine the corresponding first scheme according to the first scheme indication. Assuming that the correspondence between the RSC and the scheme indication includes the correspondence between the first RSC and the first scheme indication, and the first scheme indication is used to determine the first scheme, UE 1 can determine the first scheme as the target scheme. It should be noted that UE 1 can further determine the first RSC corresponding to the U2U Relay service after locally determining to use the U2U Relay service, and UE 1 can also obtain the first RSC from UE 2 in the discovery process of U2U Relay.

[0192] It should be noted that the correspondence between the ProSe code and the scheme indication in this scheme may include the correspondence between the RSC and the control plane security scheme indication mentioned above, or in other words, the correspondence between the RSC and the control plane security scheme indication may be reused, that is, the control plane security scheme indication is used to simultaneously indicate whether to establish security through the control plane scheme and use a scheme that relies on the network side for security establishment. Specifically, if the RSC has a corresponding control plane security scheme indication and determines to use the control plane scheme according to the control plane security scheme indication, it means that the control plane scheme in the scheme that relies on the network side for security establishment needs to be used. If the RSC has a corresponding control plane security scheme indication and determines to use the user plane scheme according to the control plane security scheme indication, it means that the user plane scheme in the scheme that relies on the network side for security establishment needs to be used. Optionally, if the RSC does not have a corresponding control plane security scheme indication, it means that a scheme that does not rely on the network side for security establishment needs to be used; the correspondence between the ProSe code and the scheme indication may not include the above-mentioned correspondence between the RSC and the control plane security scheme indication. The two exist independently of each other, and this application does not limit this.

[0193] Optionally, in one implementation, in the correspondence between the ProSe code and the scheme indication in this solution, the scheme indication may be an on-network indication, used to indicate that a solution that relies on the network side for security establishment needs to be used. Specifically, if the RSC has a corresponding on-network indication, it means that a solution that relies on the network side for security establishment needs to be used; if the RSC does not have a corresponding on-network indication, it means that a solution that does not rely on the network side for security establishment needs to be used.

[0194] Optionally, in another implementation, in the correspondence between the ProSe code and the scheme indication in this solution, the scheme indication may be an off-network indication, which is used to indicate that a solution that does not rely on the network side for security establishment needs to be used. Specifically, if the RSC has a corresponding off-network indication, it means that a solution that does not rely on the network side for security establishment needs to be used; if the RSC does not have a corresponding off-network indication, it means that a solution that does not rely on the network side for security establishment needs to be used.

[0195] Priority information: The above-mentioned various solutions may correspond to different priorities. For example, the priority of the online solution is higher than that of the offline solution; for another example, the priority of the offline solution is higher than that of the online solution. This application does not limit this.

[0196] In one possible implementation, the priority information may include, for example, an indication of the priority of each solution. For example, the priority of each solution may be represented by different priority values, such as a higher priority value indicates a higher priority, or a lower priority value indicates a higher priority. In one example, the priority information may be a priority value table, which records the priority values ​​of each solution.

[0197] In another possible implementation, the priority order of each solution can be reflected by the order of each solution among the multiple solutions, for example, the earlier solution has a higher priority, or the later solution has a higher priority. In one example, the priority information can be a priority ranking table, and the multiple solutions can be sorted in the table in order of priority.

[0198] In another possible implementation, the priority information may include an indication of a default solution. The default solution is the solution that is selected first. Therefore, indicating the default solution is equivalent to implicitly indicating the solution with the highest priority. In the case where the multiple solutions include the aforementioned online solution and offline solution, indicating the default solution also indicates the priority order of the two solutions. If the multiple solutions also include more other solutions, indicating the default solution also indicates the solution with the highest priority, and the other solutions can be regarded as solutions with the same priority.

[0199] UE 1 may select a solution with the highest priority among multiple solutions as a target solution based on the priority information.

[0200] The aforementioned correspondence between the RSC and the scheme indication and the priority information can be used separately or in combination. For example, a first RSC corresponding to ProSe communication can correspond to multiple scheme indications, that is, the first RSC corresponds to multiple scheme indications, and the multiple scheme indications are used to determine multiple first schemes. In this case, UE 1 can further combine the priority information to determine one scheme from the multiple first schemes as the target scheme.

[0201] In another possible implementation, UE 1 determines the target solution according to preconfiguration information, where the preconfiguration information is used to indicate the target solution used by UE 1 by default. It is understandable that the target solutions indicated by preconfiguration information on different UEs may be different solutions or the same solution.

[0202] Optionally, before step 210, the method further includes step 220: UE 1 obtains a solution selection rule.

[0203] Step 220 may further include the following steps:

[0204] Step 220a, UE 1 obtains solution selection rules locally; and / or

[0205] In step 220b, UE 1 obtains a solution selection rule from the core network. For example, UE 1 obtains the solution selection rule from the PCF. The following description will take the PCF as an example.

[0206] In step 220a, the solution selection rule obtained locally by UE 1 may be pre-stored in a subscriber identity module (SIM) of UE 1, or may be preset in the device when the device leaves the factory.

[0207] In step 220b, UE 1 may obtain the solution selection rule while obtaining the ProSe parameters from the PCF.

[0208] Exemplarily, the solution selection rule may be determined by the PCF based on an indication of the solution selection rule. The indication of the solution selection rule may be understood as information used to determine the solution selection rule. This information may be, for example, the aforementioned correspondence between the RSC and the solution indication and / or priority information, or other information used to determine the aforementioned correspondence between the RSC and the solution indication and / or priority information, which is not limited in this application.

[0209] One possible design is that the indication of the solution selection rule is included in the service-specific information of the ProSe of UE 1. The PCF can obtain the indication of the solution selection rule by obtaining the service-specific information of the ProSe, and then determine the solution selection rule. The figure exemplarily illustrates the process of UE 1 obtaining the solution selection rule from the PCF. As shown in the figure, UE 1 can send a ProSe parameter acquisition request to the PCF through the AMF. The PCF can obtain the service-specific information of the ProSe of UE 1 from the UDM based on the request. Optionally, the ProSe parameter acquisition request sent by the AMF to the PCF carries the SUPI of UE 1. The PCF can obtain the service-specific information of the ProSe of UE 1 from the UDM based on the SUPI of UE 1. After obtaining the service-specific information of the ProSe, the PCF can determine the solution selection rule based on the information used to determine the solution selection rule and send the solution selection rule to UE 1. As shown in the figure, the PCF can send the solution selection rule to UE 1 through the UE configuration update (UCU) process. In other words, the solution selection rule can be carried in the UCU message.

[0210] Optionally, before the AMF sends the ProSe parameter acquisition request to the PCF, the method further includes: the AMF determines that UE 1 can perform ProSe communication, for example, U2U Relay can assist UE 1 in performing ProSe communication, or in other words, U2U Relay service can be used.

[0211] Optionally, before the PCF sends the solution selection rule to UE 1, the method further includes: the PCF determines that UE 1 can perform ProSe communication, for example, U2U Relay can assist UE 1 in performing ProSe communication, or in other words, U2U Relay service can be used.

[0212] Since the UDM stores the subscription information of each contracted UE, such as the subscription information of UE 1, the subscription information of UE 1 records whether UE 1 is a ProSe subscriber. It should be understood that whether the UE is a ProSe subscriber can be understood as whether the UE has ProSe functionality. If it is a ProSe subscriber, it has ProSe functionality and can obtain ProSe authorization; if it is not a ProSe subscriber, it does not have ProSe functionality and cannot obtain ProSe authorization. Furthermore, if UE 1 is a ProSe subscriber, the subscription information also includes the aforementioned ProSe service-specific information. If UE 1 is not a ProSe subscriber, the UDM can reply to the PCF with a message indicating that UE 1 does not have ProSe functionality. In this case, UE 1 cannot obtain the solution selection rule from the PCF.

[0213] It should be understood that the example described above in conjunction with FIG2 is only one possible design and does not constitute any limitation to the present application. The indication of the solution selection rule may not be included in the service-specific information of ProSe, for example, it may be included in other information of the subscription information of UE 1, or it may not be included in the subscription information of UE 1. The PCF may also send the solution selection rule to UE 1 through other procedures or messages.

[0214] UE 1 may execute step 220a without executing step 220b, execute step 220b without executing step 220a, or execute both step 220a and step 220b. When UE 1 executes steps 220a and 220b, UE 1 may obtain multiple solution selection rules. UE 1 may use the solution selection rules according to a preset priority order. The preset priority order may be, for example, that the solution selection rule obtained from the PCF has a higher priority than the solution selection rule obtained locally by UE 1, and the solution selection rule obtained by UE 1 from the SIM card has a higher priority than the solution selection rule preset by UE 1 when the device leaves the factory.

[0215] In step 230, UE 1 sends a request message, where the request message is used to request the communication device that receives the request message to use the target solution to perform a security establishment with UE 1.

[0216] A possible implementation of step 230 is that UE 1 sends a request message to UE 2, that is, UE 1 sends the request message to UE 2 in a unicast manner.

[0217] For example, UE 1 and UE 2 can each discover each other through a discovery process. Since UE 1 wishes to use a relay UE to assist UE 1 in ProSe communication with UE 3, UE 1 can send the aforementioned request message to UE 2 after discovering UE 2. This request message can be used to request UE 2 to use the target solution to establish security with UE 1. Accordingly, in step 220, UE 2 receives the request message.

[0218] Another possible implementation of step 230 is for UE 1 to send the request message via broadcast. In other words, UE 1 does not foreknow the recipient of the request message. The communication device that receives the request message may be one or more. Accordingly, in step 220, one or more communication devices receive the request message. In this embodiment, the one or more communication devices may include UE 2.

[0219] Optionally, before step 230, the method further includes: UE 1 and UE 2 performing a discovery process.

[0220] An example of UE 1 and UE 2 performing a discovery process is as follows: UE 1 and UE 2 may each send a broadcast message on port PC5, and the broadcast message may carry a first RSC. The first RSC may be a parameter obtained by UE 1 and UE 2 during the ProSe parameter configuration phase. The ProSe parameter configuration process for UE 1 and UE 2 may be performed during or after registration with the network, respectively. Alternatively, the ProSe parameters may be default parameters preconfigured in the device. Since both UE 1 and UE 2's broadcast messages carry the first RSC, this indicates that UE 1 and UE 2 have ProSe functionality and that UE 2 can provide U2U Relay services for UE 1. Therefore, UE 1 may identify UE 2 as a potential relay UE. It is called a potential relay UE because, at this point, UE 1 has not yet established a secure connection with UE 2, and UE 1 cannot yet assist UE 1 in communicating with other UEs (such as UE 3) through UE 2.

[0221] The specific process of UE 1 and UE 2 performing the discovery process can be found in the relevant description in the 3GPP technical specifications, which will not be described in detail in this article.

[0222] It should be understood that UE 1 and UE 2 performing the discovery process is only one possible implementation method for UE 1 and UE 2 to discover each other. UE 1 may also discover UE 2 by directly sending the aforementioned request message without performing the discovery process.

[0223] Optionally, before step 230, the method further includes: UE 1 and UE 2 performing ProSe parameter configuration to obtain ProSe parameters. The ProSe parameters include the aforementioned correspondence between the ProSe code and the scheme indication, and the correspondence between the ProSe code and the scheme may include a correspondence between the first RSC and the first scheme indication. Optionally, the correspondence between the ProSe code and the scheme indication includes a correspondence between the RSC and the control plane security scheme indication. Alternatively, in another design, the ProSe parameters include the correspondence between the ProSe code and the scheme indication, and the correspondence between the RSC and the control plane security scheme indication. For the correspondence between the RSC and the control plane security scheme indication, reference may be made to the description of "a scheme that relies on the network side for security establishment" in the above terminology description, and will not be repeated here. The ProSe parameter configuration process for UE 1 and UE 2 may be performed during the process of UE 1 and UE 2 registering with the network, or may be performed separately after registration with the network. Alternatively, the ProSe parameters may be default parameters preconfigured in the device (in this case, the preconfiguration process may be considered a ProSe parameter configuration process).

[0224] In an embodiment of the present application, the request message may be used to indicate a target solution, or in other words, may be used to determine a target solution.

[0225] One possible design is that the request message is a DCR message, and the information element in the DCR corresponds to the target solution. In other words, the DCR message can be used to indicate the target solution.

[0226] Table 1 below shows examples of each element in the DCR message corresponding to the on-line and off-line scenarios, respectively. Table 2 further shows examples of each element in the DCR message corresponding to the control plane and user plane scenarios, respectively. The first column lists the elements currently defined in the DCR message, listing the elements included in the DCR message for the off-line scenario and the elements included in the DCR message for the on-line scenario. Elements marked "optional" indicate that the element is optional in the DCR message, while elements not marked "optional" indicate that the element is mandatory in the DCR message. Combining the second and third columns, "no" in each row indicates that the DCR message corresponding to the different scenarios does not include the element corresponding to that row, while "yes" in each row indicates that the DCR message corresponding to the different scenarios does include the element corresponding to that row. The content in each row indicates that the DCR message corresponding to the different scenarios includes the element corresponding to that row, and that different types are defined.

[0227] Table 1

[0228] Table 2

[0229] In Tables 1 and 2, source user information refers to source user information. The source user may refer to user information of the source UE (for example, UE 1 in this embodiment), specifically, the application layer (app layer) identity (ID) of the initiating UE (initiating UE's app layer ID); ProSe Indentifier refers to the ProSe identity. The ProSe identity may be the identifier of the ProSe application corresponding to the U2U Relay service (for example, in this embodiment, UE 1 uses the relay service of UE 2 to establish a subsequent unicast link); target user information refers to the target user information. The target user may refer to the target UE (for example, UE 3 with which UE 1 in this embodiment wishes to conduct ProSe communication, or UE 2 in this embodiment); target UE's app layer ID refers to the application layer ID of the target user; user info ID refers to the user information ID; key_est_info refers to key establishment information (key_est_info), for example, it may be an information container used for mutual authentication and establishing a unicast key; Nonce_1 and K NRP Freshness parameter 1 is a random number. Specifically, it can be the random number provided by the initiator for generating the PC5 key. It is just defined with different names in the DCR message corresponding to different schemes. K NRP ID is the root key K of the link NRP ID, which is only carried when the root key exists; UE security capabilities are UE security capabilities, which may include the PC5 security algorithm supported by the UE; MSB of K NRP-sess ID is the session key K NRP-sessThe most significant bit (MSB) of the ID is as follows: UE PC5 signaling security policy is the UE PC5 signaling plane security policy; UE ID is the UE identifier. If the DCR message corresponding to the on-network solution does not carry the UP-PRUK ID and CP-PRUK ID (that is, the DCR message does not include the User security key ID), the SUCI of the UE sending the DCR message needs to be carried in this information element; User security key ID is the user security key ID, which can specifically refer to the security key ID of the initiating UE. Based on the difference between the user plane solution and the control plane solution in the on-network solution, it is divided into UP-PRUK ID and CP-PRUK ID; HPLMN ID is the ID of the home public land mobile network (HPLMN), which can specifically refer to the HPLMN ID of the initiating UE; MIC is the message integrity check code (MIC); source L2 ID is the source layer 2 (Layer 2, L2) ID. The source end can refer to the device from which the DCR message comes (for example, UE 1 in this embodiment); destination The L2 ID is the ID of the peer layer 2. The peer may refer to the device to which the DCR message is to be sent. For unicast, the destination L2 ID may be, for example, the L2 ID of the device unicasting with UE 1 (e.g., UE 2 in this embodiment). For broadcast or multicast, the destination L2 ID may be a dedicated default ID for broadcast or multicast.

[0230] As can be seen from Table 1 and Table 2, the information elements included in the DCR message corresponding to the network solution and the offline solution are not exactly the same. For example, the DCR message corresponding to the offline solution includes one or more of the following information elements: source user information, ProSe Indentifier, target user information, key_est_info, Nonce_1, UE security capabilities, MSB of K NRP- sess ID, K NRPID, UE PC5 signaling security policy, source L2 ID or destination L2 ID. The DCR message corresponding to the network solution includes one or more of the following information elements: source user information, target user information, Nonce_1, UE security capabilities, MSB of K NRP-sess ID, UE PC5 signaling security policy, RSC, UTC-based counter LSB, UE ID, user security key ID, HPLMN ID, MIC, source L2 ID or destination L2 ID.

[0231] By comparison, it can be found that the DCR message corresponding to the offline solution includes the cell key_est_info and, optionally, the cell ProSe Identifier; the DCR message corresponding to the online solution includes one of the cells UE ID or user security key ID and, optionally, the cells UTC-based counter LSB and RSC. In other words, the DCR message corresponding to the offline solution does not include the cells UE ID and user security key ID and, optionally, the cells UTC-based counter LSB and RSC; the DCR message corresponding to the online solution does not include the cell key_est_info and, optionally, the cell Prose Identifier.

[0232] In other words, the DCR message corresponding to the offline solution meets the following requirements: includes at least one of the information elements Prose Identifier or key_est_info, and / or does not include the information elements UE ID and User security key ID. The DCR message corresponding to the online solution meets the following requirements: includes at least one of the information elements UE ID, User security key ID, UTC-based counter LSB or RSC, and / or does not include the information element key_est_info.

[0233] In another implementation, the information element UE ID may be named SUCI, and the information element user security key ID may be distinguished and named CP-PRUK ID and UP-PRUK ID based on different schemes. Therefore, the information element UE ID mentioned above may be replaced by SUCI, and the information element user security key ID may be replaced by CP-PRUK ID or UP-PRUK ID. For example, the DCR message corresponding to the in-network scheme includes one of the information element UE ID or user security key ID, which may be replaced by the DCR message corresponding to the in-network scheme including one of the information element SUCI, CP-PRUK ID, and UP-PRUK ID.

[0234] If UE 1 requires an off-network solution for security establishment, the DCR message typically carries the key_est_info information element. In other words, the key_est_info information element distinguishes the off-network solution from the on-network solution. Therefore, whether the DCR message includes key_est_info can be used to determine whether it indicates an off-network solution. Alternatively, the Prose Identifier information element is mandatory for an off-network solution. Therefore, whether the DCR message includes the Prose Identifier can be used to determine whether it indicates an off-network solution.

[0235] If UE 1 requires an on-network solution for security establishment, the DCR message typically carries one of the information elements UE ID or user security key ID. In other words, for an on-network solution, the information elements UE ID or user security key ID can distinguish it from an off-network solution. Therefore, whether the DCR message contains the UE ID or user security key ID can be used to determine whether the DCR message indicates an on-network solution.

[0236] Optionally, for the in-network solution, the information elements UTC-based counter LSB and RSC are mandatory information elements, so whether the DCR message contains UTC-based counter LSB and RSC can be used to determine whether the DCR message is used to indicate the in-network solution. In the DCR message corresponding to the control plane solution and the DCR message corresponding to the user plane solution, although both include the information element RSC, the RSC values ​​corresponding to different solutions are different. Since RSC is a mandatory information element in the DCR message corresponding to the in-network solution, the RSC in the DCR message can be used to facilitate the receiving end to determine whether the target solution is the control plane solution or the user plane solution. As mentioned above, UE 1 may obtain the correspondence between RSC and the solution before step 230. Therefore, UE 1 can determine the target solution based on the correspondence and the first RSC corresponding to the ProSe communication. Accordingly, UE 2 can determine whether to use the control plane solution or the user plane solution based on the correspondence and the RSC in the DCR message.

[0237] Since the DCR message corresponding to the user plane solution optionally includes the HPLMN ID, when the DCR message includes the HPLMN ID, it may indicate that the target solution is the user plane solution.

[0238] In addition, although some information elements are included in the DCR messages corresponding to different solutions, the types of the information elements are not necessarily the same. For example, in the DCR message corresponding to the offline solution, the type of the information element target user information is target UE's app layer ID; in the DCR message corresponding to the online solution, the type of the information element target user information is User info ID. In the DCR message, this information element includes a type-length-value (TLV) field. The target UE's app layer ID corresponding to the offline solution and the User info ID corresponding to the online solution can be distinguished by the type (type) in this field. Therefore, the information element target user information can indicate whether the target solution is an online solution or an offline solution.

[0239] For another example, the DCR message corresponding to the network solution optionally includes a user security key ID. In the DCR message corresponding to the control plane solution, the user security key ID type is CP-PRUK ID; in the DCR message corresponding to the user plane solution, the user security key ID type is UP-PRUK ID. In the DCR message, the information element may also include a TLV field. The CP-PRUK ID corresponding to the control plane solution and the UP-PRUK ID corresponding to the user plane solution can be distinguished by the type in this field. Therefore, the user security key ID can also indicate whether the target solution is a control plane solution or a user plane solution.

[0240] The above uses the DCR message as an example of a request message to detail the request messages corresponding to different solutions and how to determine the target solution based on the request message. These examples are provided for ease of understanding only. This application does not preclude the possibility of defining other request messages in future protocols to implement requests with the same or similar functionality as the DCR message, nor does it preclude the possibility of defining more or fewer information elements in the request message and using other information elements to distinguish different solutions.

[0241] In step 240, UE 2 sends a first message to UE 1 based on the online status, where the first message is used to indicate whether to agree to use the target solution to establish security with UE 1. Accordingly, UE 1 receives the first message.

[0242] In this embodiment, the communication device that receives the request message may include UE 2. In the following, without loss of generality, UE 2 is taken as an example of the communication device that receives the request message to describe the subsequent process.

[0243] The previous article used the DCR message as an example of a request message to describe how the request message is used to indicate the target solution. Based on the same principle, UE 2 can determine the target solution based on the received request message, and then further determine whether to agree to use the target solution to establish security with UE 1.

[0244] As previously described, UE 2, which is determined to be a potential relay UE, may be within network coverage, such as UE 122 in FIG1 , or may not be within network coverage, such as UE 124 in FIG1 . UE 2 may determine whether to agree to use the target solution requested by UE 1 for security establishment based on its network status.

[0245] One possible scenario is that UE 2's online status indicates it is within network coverage. UE 2 can use either the online solution or the offline solution for security establishment. Therefore, regardless of whether the target solution requested by UE 1 is an online solution or an offline solution, UE 2 can agree to use the target solution for security establishment. In this case, the first message sent by UE 2 can indicate agreement to use the target solution for security establishment with UE 1.

[0246] Another possible scenario is that when UE 2's online status is within network coverage, UE 2 defaults to using the online solution for security establishment, rather than the offline solution. Therefore, if the target solution requested by UE 1 is the offline solution, UE 2 may not agree to use the target solution for security establishment. In this case, the first message sent by UE 2 can be used to indicate that it does not agree to use the target solution for security establishment with UE 1. If the target solution requested by UE 1 is the online solution, UE 2 may agree to use the target solution for security establishment. In this case, the first message sent by UE 2 can be used to indicate that it agrees to use the target solution for security establishment with UE 1.

[0247] Another possible scenario is that UE 2's online status indicates that it is not within network coverage. UE 2 can use the offline solution for security establishment, but cannot use the online solution for security establishment. Therefore, if UE 1 requests the offline solution as the target solution, UE 2 may agree to use the target solution for security establishment; if UE 1 requests the online solution as the target solution, UE 2 may not agree to use the target solution for security establishment.

[0248] UE 2 may indicate its agreement or disagreement to establish security with UE 1 using the target solution through different messages.

[0249] For example, if the target solution is an off-network solution, the first message may be a direct authentication and key establishment message, which is used to indicate agreement to use the off-network solution for secure establishment with UE 1, as shown in 240a in the figure. Since the direct authentication and key establishment message is an existing message used in the off-network solution, it can implicitly indicate agreement to use the off-network solution for secure establishment with UE 1.

[0250] For another example, if the target solution is the on-network solution, the first message may be a direct security mode command message, which is used to indicate agreement to use the on-network solution for security establishment with UE 1, as shown in 240b of the figure. Because the direct security mode command message is an existing message applied to the on-network solution, the direct security mode command message can implicitly indicate agreement to use the on-network solution for security establishment with UE 1.

[0251] It should be noted that in both the current on-line solution process and the off-line solution process, UE 2 will send a direct connection security mode command message to UE 1. Therefore, in this embodiment, when UE 2 agrees to use the on-line solution or the off-line solution, it will also send a direct connection security mode command message to UE 1. UE 1 can determine whether UE 2 agrees to use the on-line solution or the off-line solution to establish security with UE 1 based on the first message received from UE 2 after the request message sent in step 210. Therefore, if the target solution is the on-line solution and UE 2 agrees to use the on-line solution, the first message can be a direct connection security mode command message. Before sending the first message to UE 1, UE 2 did not send a direct connection authentication and key establishment message to UE 1. In this case, the direct connection security mode command message can implicitly indicate that UE 2 agrees to use the on-line solution to establish security with UE 1. For another example, UE 2 determines based on the network status that it does not agree to use the target solution for security establishment. The first message may be a reject message, which is used to indicate that it does not agree to use the target solution, as shown in 240c in the figure.

[0252] Furthermore, the rejection message may be used to indicate one or more of the following: a reason for not agreeing to use the target solution, a solution for security establishment supported by UE 2, or a solution for security establishment not supported by UE 2.

[0253] For example, the reason why UE 2 disagrees with the use of the target solution can be indicated by a cause value. The correspondence between each cause value and the cause it indicates can be predefined and pre-stored in UE 1 and UE 2. For example, a cause value of 1 can indicate that the target solution is not supported; or a cause value of 2 can indicate that the network is out of coverage, etc.

[0254] It is understandable that if the rejection message indicates that UE 2 does not support the target solution, UE 1 can try another target solution to negotiate with UE 2; if the rejection message indicates that UE 2 is not within the network coverage, UE 1 can select an off-network solution to establish PC5 link security; if the rejection message indicates that UE 2 is not within the network coverage and UE 1 needs to use an on-network solution to establish PC5 link security, UE 1 can select other potential relay UEs.

[0255] For example, if UE 2's network status is "out of network coverage" and the target solution is "in network coverage," UE 2 may include a reason value of 2 in the rejection message to indicate that the reason for disagreeing with the target solution is "out of network coverage." For another example, if UE 2 does not support the "in network coverage" solution and the target solution is "in network coverage," UE 2 may include a reason value of 1 in the rejection message to indicate that the reason for disagreeing with the target solution is "not supporting the target solution."

[0256] It should be understood that the above examples of reasons for not agreeing to use the target solution and the reason values ​​are only shown for ease of understanding, and this application does not limit the reasons, reason values ​​and the corresponding relationship between the two.

[0257] UE 2 may also indicate through the rejection message that the solutions supported by UE 2 include an offline solution.

[0258] By indicating the scheme supported by UE 2 in the rejection message, UE 1 can select the scheme supported by UE 2 when selecting the target scheme for negotiation with UE 2 next time, thereby facilitating both parties to complete the security establishment as soon as possible. In this way, UE 1 can conduct ProSe communication with UE 3 as soon as possible.

[0259] It is understood that the solutions supported by UE 2 can also be implicitly indicated by solutions not supported by UE 2. Multiple solutions for security establishment are predefined, such as the aforementioned on-network solution and off-network solution. For UE 2, the solutions it supports and the solutions it does not support constitute the full set of the aforementioned multiple solutions. In other words, the solutions supported and not supported by UE 2 are complementary. Therefore, the solutions supported by UE 2 can be inferred from the solutions it does not support.

[0260] Optionally, the rejection message is a security-protected message.

[0261] For example, the information carried in the rejection message may be confidentiality-protected and / or integrity-protected information, or the rejection message may be a message that has been confidentiality-protected and / or integrity-protected. The key used for confidentiality protection and / or integrity protection may be the key obtained by UE 2 and UE 1 during the discovery process. Optionally, the key used for confidentiality protection and / or integrity protection is determined based on long-term credentials preconfigured in UE 2.

[0262] Accordingly, after receiving the securely protected message, UE 1 may first perform confidentiality protection removal and / or integrity verification before obtaining valid information. It is understood that the key used by UE 1 for confidentiality protection removal and / or integrity verification may also be the key obtained by UE 1 and UE 2 during the discovery process. Alternatively, the key used for confidentiality protection removal and / or integrity verification may be determined based on long-term credentials preconfigured in UE 1.

[0263] Whether UE 2 performs confidentiality protection and / or integrity protection on each information in the rejection message or performs confidentiality protection and / or integrity protection on the rejection message may be predefined by the protocol, and UE 2 may decrypt and / or integrity check the received message based on the same rules.

[0264] Through confidentiality protection and / or integrity protection, the information in the rejection message can be protected to avoid being monitored by a third party, thereby preventing the secure connection established between UE 1 and UE 2 from being monitored by a third party, thereby ensuring communication security to a greater extent.

[0265] By indicating one or more of the above, the rejection message can facilitate UE 1 to reselect a target solution based on the rejection message and continue to negotiate with UE 2 to determine a solution for security establishment. For example, UE 1 can select a target solution by repeatedly performing step 210, and can negotiate with UE 2 for a solution for security establishment by repeatedly performing steps 230 and 240. It is understood that when UE 1 repeats step 210, it can exclude the target solution used previously and select a solution from other solutions as the target solution. For example, the target solution determined previously was Solution 1, and the target solution determined this time is Solution 2. When UE 1 repeats step 230, the target solution requested for use is the newly selected target solution, such as Solution 2. When UE 1 repeats step 240, the message received from UE 2 may also be different from the previous one. For example, it may receive a direct authentication and key establishment message or a direct security mode command message instead of a rejection message previously. Alternatively, it may receive a rejection message. For the sake of convenience, it is assumed that a direct connection authentication and key establishment message or a direct connection security mode command message is received but no rejection message is received. In other words, UE 2 agrees to use solution 2 to establish security with UE 1.

[0266] It should be understood that the first message listed above is only an example and should not constitute any limitation to the present application. The first message may also indicate whether to agree to use the target solution to establish security with UE 1 in other ways. For example, a certain indication field in the first message may be used to indicate whether to agree to use the target solution to establish security with UE 1, such as indicating that the use of the target solution is not agreed through the indication field "0", and indicating that the use of the target solution is agreed through the indication field "1"; for example, indicating that the use of the target solution is not agreed through the indication field "00", and indicating that the use of the on-line solution as the target solution is agreed through the indication field "01", and indicating that the use of the off-line solution as the target solution is agreed through the indication field "10". The present application does not limit the specific method for the first message to indicate whether to agree to use the target solution.

[0267] In step 250, UE 1 and UE 2 perform security establishment.

[0268] After UE 1 and UE 2 have negotiated a solution for security establishment, they can use the solution for security establishment.

[0269] As described above, when executing step 240, UE 2 may send a first message by executing step 240a or 240b to indicate that it agrees to use solution 1 for security establishment. In this case, UE 1 can use solution 1 to establish security with UE 2. UE 2 may also send a first message by executing step 240c to indicate that it does not agree to use solution 1 for security establishment. UE 1 may again send a request message to UE 2 to request that solution 2 be used for security establishment. When executing step 240 again, UE 2 may send a first message by executing step 240a or 240b to indicate that it agrees to use solution 2 for security establishment. In this case, UE 1 can use solution 2 to establish security with UE 2.

[0270] One possible scenario is that UE 1 may receive multiple first messages from multiple UEs. For example, UE 1 sends a request message by broadcasting in step 230, and there may be multiple UEs that receive the request message. Some or all of the multiple UEs (including the above-mentioned UE 2) that receive the request message can execute the above-mentioned step 240 to send the first message to UE 1. In this case, UE 1 can execute subsequent processes based on the first message received first, or it can also execute subsequent processes based on the first message received first that agrees to use the target solution, and so on. How UE 1 handles the situation when it receives multiple first messages depends on the internal implementation of UE 1, and this application does not limit this.

[0271] As previously mentioned, when the first message is used to indicate agreement to use the target solution, it can implicitly indicate agreement to use the target solution through a message in the security establishment process corresponding to the target solution, such as implicitly indicating a solution that relies on the network side for security establishment through a direct connection security mode command message, and implicitly indicating a solution that does not rely on the network side for security establishment through a direct connection authentication and key establishment message. Therefore, the second communication device sending the first message to the first communication device can also be understood as the second communication device using the target solution to establish a security connection with the first communication device. In other words, the aforementioned step 240 is included in step 250, or in other words, step 240 and step 250 can be performed alternatively.

[0272] In this embodiment of the present application, UE 1 initiating ProSe communication can select a target solution from multiple solutions and negotiate with the communication device (e.g., UE 2) that receives the request message by sending a request message indicating the target solution. If UE 2 agrees, the target solution is used for security establishment. If UE 2 disagrees, a new target solution is determined to continue negotiation with the other end. In this way, the security solution used can be a security solution supported by both UE 1 and UE 2, which facilitates the successful establishment of a secure connection.

[0273] In addition, this solution provides multiple solutions for UE 1 and UE 2 to negotiate, and these multiple solutions take into account different network conditions. On the one hand, an off-network solution is provided for situations where UE 2 is not within the network coverage area, so that UE 2 that is not within the network coverage area can also establish a communication connection with UE 1, breaking away from dependence on the network side. For example, in the scenario shown in Figure 1, UE 121 hopes to use UE 124 to assist in the communication between UE 121 and UE 125. UE 124 is not within the network coverage area, but can use the off-network solution to securely establish a connection with UE 121, thereby providing strong support for the communication between UE 121 and UE 125. On the other hand, an on-network solution is provided for situations where UE 2 is within the network coverage area. The network equipment can perform a secure establishment for UE 1 based on the most recent contract information, thereby ensuring that the secure establishment is successfully established. For example, in the scenario shown in FIG1 , UE 121 wishes to use UE 122 to assist communication between UE 121 and UE 123. Since UE 122 happens to be within network coverage, UE 121 can use either an on-network solution or an off-network solution to establish a secure connection with UE 122. When using the on-network solution for secure connection establishment, the network device can determine whether UE 121 and UE 122 are authorized based on the most recent contract information. Therefore, the problem of security connection failure caused by permission changes can be avoided.

[0274] 3, which is a schematic flow chart of a security establishment method provided in an embodiment of the present application, describes a potential relay UE selection scheme and feedback scheme to the terminal UE.

[0275] The method 300 shown in Figure 3 may include steps 310 to 340. Each step in the method 300 is described in detail below.

[0276] In step 310, UE 1 sends at least one request message, where the at least one request message is used to indicate multiple solutions, including: a solution that relies on the network side for security establishment and a solution that does not rely on the network side for security establishment.

[0277] Optionally, the at least one request message is used to indicate multiple schemes, including: a user plane scheme in a scheme that relies on the network side for security establishment, a control plane scheme in a scheme that relies on the network side for security establishment, and a scheme that does not rely on the network side for security establishment.

[0278] For explanations of the schemes that rely on the network side for security establishment and the schemes that do not rely on the network side for security establishment, please refer to the relevant descriptions in the previous terminology description and will not be repeated here. It should be understood that the schemes that rely on the network side for security establishment and the schemes that do not rely on the network side for security establishment are only two examples of schemes for security establishment and should not constitute any limitation to this application. This application does not exclude the possibility that the above-mentioned multiple schemes also include other schemes that can be used for security establishment, nor does it exclude the possibility of defining other schemes that can be used to implement the same or similar schemes in future technical specifications.

[0279] Optionally, multiple solutions may correspond to multiple request messages, each of which may indicate a solution. Accordingly, step 310 includes step 310a: UE 1 sends multiple request messages, each of which may indicate a solution, and the solutions corresponding to the multiple request messages include: a solution that relies on the network side for security establishment (i.e., an on-network solution) and a solution that does not rely on the network side for security establishment (i.e., an off-network solution).

[0280] For example, the multiple solutions include an on-line solution (eg, a control plane solution or a user plane solution) and an off-line solution, and the at least one request message includes a request message corresponding to the on-line solution and a request message corresponding to the off-line solution.

[0281] For another example, the multiple solutions include: a control plane solution, a user plane solution and an offline solution, and the at least one request message includes a request message corresponding to the control plane solution, a request message corresponding to the user plane solution and a request message corresponding to the offline solution.

[0282] Each information element in the request message may correspond to a solution, and each request message may be used to indicate a solution. For details about the information elements in the request message corresponding to each solution, please refer to the above description using the DCR message as an example in conjunction with Tables 1 and 2, and no further details will be given.

[0283] Optionally, the at least one request message is a request message used to indicate multiple solutions. Accordingly, step 310 includes step 310b: UE 1 sends a request message used to indicate multiple solutions, wherein the multiple solutions include: a solution that relies on the network side for security establishment and a solution that does not rely on the network side for security establishment. Further, the multiple solutions may include: a user plane solution and an offline solution; or, the multiple solutions may include: a control plane solution and an offline solution; or, the multiple solutions may include: a user plane solution, a control plane solution, and an offline solution.

[0284] In one possible design, the request message includes information elements corresponding to each of the multiple schemes. For example, taking the aforementioned DCR message as an example, if multiple schemes are indicated by a DCR message, the DCR message may include one or more of the following information elements: source user information, ProSe Indentifier, target user information, key_est_info, Nonce_1, UE security capabilities, MSB of K NRP-sess ID, K NRP ID, UE PC5 signaling security policy, RSC, UTC-based counter LSB, UE ID, user security key ID, HPLMN ID, source L2 ID, or destination L2 ID. That is, the DCR message may include information elements corresponding to the offline solution and information elements corresponding to the online solution. For the correspondence between the information elements in the DCR message and the online solution and offline solution, as well as the correspondence between the information elements in the DCR message and the control plane solution and the user plane solution, please refer to the relevant description in conjunction with Table 1 and Table 2 in method 200 above, and will not be repeated here.

[0285] Among the multiple information elements described above, the content of some information elements varies depending on the corresponding schemes, the content of some information elements remains unchanged depending on the corresponding schemes, and some information elements may exist in the DCR message corresponding to the on-line scheme but not in the DCR message corresponding to the off-line scheme, or exist in the DCR message corresponding to the off-line scheme but not in the DCR message corresponding to the on-line scheme. When constructing the above-mentioned DCR message, UE 1 may carry information elements corresponding to multiple schemes but with different contents in multiple different fields of the DCR message, and carry information elements corresponding to multiple schemes with the same content in the same field of the DCR message.

[0286] For example, among the multiple information elements shown in Table 1, the information elements UE security capabilities, UE PC5 signaling security policy, source L2 ID, and destination L2 ID have the same content for the offline and online scenarios, respectively. Therefore, each information element can be carried in a single field. The information elements source user info, target user info, and so on have different content for the offline and online scenarios, respectively. Therefore, each information element can be carried in two fields, each corresponding to the offline and online scenarios. The information element key_est_info is included in the DCR message corresponding to the offline scenario, while the information element UE ID or user security key ID is included in the DCR message corresponding to the online scenario. Therefore, in this embodiment, one of the information elements UE ID or user security key ID and key_est_info can be carried in different fields within the same DCR message. In this way, information elements with the same content occupy the same field in the DCR message, while information elements with different content occupy multiple fields. This reduces unnecessary field overhead in the DCR message and saves air interface overhead.

[0287] In another implementation, when constructing the DCR message, UE 1 can carry the information elements corresponding to multiple schemes in multiple different fields, regardless of whether the content carried by them is the same. This eliminates the need for UE 1 to determine which information elements have the same content and which have different content when corresponding to different schemes, simplifying the processing logic.

[0288] It should be understood that the above description is only for ease of understanding, using the information elements in the DCR message as an example to describe the structural design of the request message, and should not constitute any limitation on this application. This application does not limit the information elements included in the request message and their content.

[0289] As described above, UE 1 may send the at least one request message mentioned above by unicast, multicast, or broadcast. If UE 1 sends the at least one request message by unicast, UE 1 may send the at least one request message to UE 2 discovered through the discovery process. Accordingly, in step 310, UE 2 receives the at least one request message. For example, if UE 1 sends one request message, UE 2 receives the request message; if UE 1 sends multiple request messages, UE 2 receives the multiple request messages from UE 1. If UE 1 sends the at least one request message by broadcast, the communication device that receives the at least one request message may be one or more. Accordingly, in step 310, one or more communication devices receive the at least one request message. In this embodiment, the one or more communication devices may include UE 2.

[0290] Optionally, before step 310, the method further includes: UE 1 and UE 2 performing ProSe parameter configuration to obtain ProSe parameters. The ProSe parameters may include a correspondence between the RSC and the control plane security scheme indication, including a correspondence between the RSC and the control plane scheme indication. For a description of the control plane scheme indication, refer to the description of "a scheme that relies on the network side for security establishment" in the above terminology description and are not repeated here. The ProSe parameter configuration process for UE 1 and UE 2 may be performed during registration with the network, separately after registration with the network, or pre-configured in the device by default.

[0291] In step 320, UE 2 sends a second message to UE 1 based on the online state, where the second message is used to indicate the use of one of multiple solutions to establish security with UE 1. Correspondingly, UE 1 receives the second message from UE 2.

[0292] In this embodiment, the communication device that receives the request message may include UE 2. In the following, without loss of generality, UE 2 is taken as an example of the communication device that receives the at least one request message to describe the subsequent process.

[0293] After receiving the at least one request message, UE 2 can determine the above-mentioned multiple solutions based on the information elements included in the at least one request message, and then select a solution from the multiple solutions based on the network status, and then send a second message to UE 1 to indicate the solution selected by UE 2.

[0294] A possible situation in which UE 2 selects a solution based on the online status is that UE 2's online status is within network coverage, and UE 2 selects the online solution. Therefore, a second message may be sent to UE 1 to indicate the online solution.

[0295] Another possible situation in which UE 2 selects a solution based on the online status is that UE 2's online status is out of network coverage, and UE 2 selects an offline solution. Therefore, a second message may be sent to UE 1 to indicate the offline solution.

[0296] Of course, UE 2 may also select the offline solution when it is not within the network coverage. In this case, UE 2 may also directly select the offline solution without considering the online status.

[0297] Exemplarily, if UE 2 selects the on-network solution, the second message may be a direct security mode command message, which is used to instruct the use of the on-network solution for security establishment with UE 1, as shown in 320a in the figure. Alternatively, if UE 2 selects the on-network solution, the second message may be a direct security mode command message, and before sending the second message to UE 1, UE 2 does not send a direct authentication and key establishment message to UE 1, then the direct security mode command message may implicitly instruct the use of the on-network solution for security establishment with UE 1. If UE 2 selects the off-network solution, the second message may be a direct authentication and key establishment message, which is used to instruct the use of the off-network solution for security establishment with UE 1, as shown in 320b in the figure.

[0298] Since the direct connection security mode command message is an existing message applied to the on-line solution, the direct connection security mode command message can implicitly indicate the use of the on-line solution for security establishment; since the direct connection authentication and key establishment message is an existing message applied to the off-line solution, the direct connection authentication and key establishment message can implicitly indicate the use of the off-line solution for security establishment.

[0299] One possible scenario is that UE 2 may further determine the target solution based on the solution selection rule.

[0300] In other words, step 320 includes determining a target solution based on the network status and solution selection rules.

[0301] Exemplarily, after receiving the at least one request message, UE 2 can determine the above-mentioned multiple solutions based on the at least one request message, and then select a solution from the multiple solutions based on the network status and solution selection rules, and then send a second message to UE 1 to indicate the solution selected by UE 2. The solution selection rule can be, for example, the rules listed in the above method 200, for example, the correspondence between RSC and solution indication, or it can also be priority information, or it can also be a combination of the correspondence between RSC and solution indication and priority information. This application is not limited to this. In addition, the solution selection rule can also be first-come, first-served, that is, the solution indicated by the first received second message is determined as the target solution; or, it can also be selecting the target solution based on the reception quality or power of multiple second messages, and so on. This application includes but is not limited to this.

[0302] Regarding the specific implementation logic of the second communication device sending the second message to the first communication device based on the online status in step 330, please refer to the relevant description in step 240 of the above method 200, which will not be repeated here.

[0303] In step 330, UE 1 determines a solution indicated by the second message as a target solution.

[0304] In this embodiment, the target solution is a solution determined by UE 1 for performing security establishment. UE 1 may determine the target solution based on the received second message.

[0305] As previously described, UE 1 may receive a direct connection security mode command message in step 320a, thereby determining that the target solution is an on-network solution. UE 1 may also receive a direct connection authentication and key establishment message in step 320b, thereby determining that the target solution is an off-network solution. Alternatively, UE 1 may receive a direct connection security mode command message in step 320a but not receive a direct connection authentication and key establishment message from UE 2 before step 320a, thereby determining that the target solution is an on-network solution. In other words, UE 1 may determine a solution indicated by the second message as the target solution.

[0306] Furthermore, the on-network solution includes a user plane solution and a control plane solution. If UE 1 receives the direct connection security mode command message, it can further determine whether the target solution is a user plane solution or a control plane solution based on the information elements in the message.

[0307] Table 3 below shows the information elements in the direct connection security mode message corresponding to the control plane solution and the user plane solution respectively.

[0308] Table 3

[0309] In Table 3, Nonce_2 and K NRP Freshness parameter 2 is a random number. Specifically, it can be the random number provided by the sender of the message for generating the PC5 key. It is just defined with different names in the direct security mode command message corresponding to different schemes. Selected security algorithm is the selected encryption algorithm. LSB of K NRP-sess ID is the session key K NRP-sess The least significant bit (LSB) of the ID; the generic bootstrapping architecture (GBA) push information (GBA Push Info), for details, refer to the relevant description in 3GPP TS 33.503 and are not described in detail in this article; the EAP message is the Extensible Authentication Protocol (EAP) message. For other information elements, refer to the relevant descriptions in Tables 1 and 2 above and are not repeated here.

[0310] As can be seen from Table 3, the information elements contained in the direct connection security mode command message corresponding to the control plane solution and the user plane solution are not exactly the same. For example, the direct connection security mode command message corresponding to the control plane solution includes one or more of the following information elements: Nonce_2, Selected security algorithm, UE security capabilities, MSB of K NRP ID, LSB of K NRP-sess ID, UE PC5 signaling security policy, RSC, source L2 ID or destination L2 ID; the direct connection security mode command message corresponding to the user plane solution includes one or more of the following information elements: Nonce_2, Selected security algorithm, UE security capabilities, MSB of K NRP ID, LSB of K NRP-sess ID, UE PC5 signaling security policy, RSC, GPI, EAP message, source L2 ID or destination L2 ID.

[0311] By comparison, it can be found that the direct connection security mode command message corresponding to the user plane solution includes the information elements EAP message and GPI, while the direct connection security mode command message corresponding to the control plane solution does not include the information elements EAP message and GPI. Among them, EAP message is a mandatory information element. Therefore, it can be determined whether the direct connection security mode command message contains the information element EAP message to indicate the user plane solution or the control plane solution. In the case where the direct connection security mode command message includes the information element EAP message, the message is used to indicate the user plane solution; in the case where the direct connection security mode command message does not include the information element EAP message, the message is used to indicate the control plane solution. In addition, GPI is an optional information element. Therefore, in the case where the direct connection security mode command message includes the information element GPI, it can also be determined that the message is used to indicate the user plane solution.

[0312] In the direct connection security mode command message corresponding to the control plane solution and the user plane solution, although both include the information element RSC, the RSC values ​​corresponding to different solutions are different. Since RSC is a mandatory information element in the direct connection security mode command message corresponding to the network solution, the RSC in the direct connection security mode command message can be used to determine whether the target solution is the control plane solution or the user plane solution. As mentioned above, UE 2 may obtain the correspondence between RSC and the control plane security solution indication before step 320. Therefore, UE 2 can carry the RSC corresponding to the control plane solution in the direct connection security mode command message when determining to use the control plane solution, or carry the RSC corresponding to the user plane solution in the direct connection security mode command message when determining to use the user plane solution. Accordingly, UE 1 can determine whether to use the control plane solution or the user plane solution based on the correspondence and the RSC in the direct connection security mode command message information.

[0313] It can be understood that the correspondence between the above-mentioned RSC and the control plane security scheme is only one possible form, and the correspondence can also be replaced by the correspondence between the ProSe code and the scheme described in method 200. For example, in the ProSe parameter configuration stage, UE 1 and UE 2 can respectively obtain the ProSe parameters that may include the correspondence between the ProSe code and the scheme. Since the implementation logic of UE 2 generating a direct security mode command message based on the correspondence and the implementation logic of UE 1 determining the target scheme based on the direct security mode command message are similar to those described above, they will not be repeated.

[0314] Of course, the second message may also indicate the target solution in other ways. For example, the second message may indicate the target solution through a certain indication field, such as "00" indicating an off-network solution, "01" indicating a control plane solution, and "10" indicating a user plane solution. This application does not limit the specific manner in which the second message is used to indicate the target solution.

[0315] One possible scenario is that UE 1 may receive multiple second messages from multiple UEs. For example, UE 1 broadcasts at least one request message in step 310, and multiple UEs may receive the at least one request message. Some or all of the multiple UEs (including UE 2) that receive the request message may perform step 320 to send the second message to UE 1. In this case, the solutions indicated by each second message may be the same or different. UE 1 may further determine the target solution based on the solution selection rules.

[0316] In other words, step 330 includes: determining the solution indicated by one of the multiple second messages as the target solution based on the solution selection rule.

[0317] Exemplarily, UE 1 can determine the scheme indicated by each second message based on multiple second messages. If the schemes indicated by the multiple second messages are multiple schemes, UE 1 can determine the target scheme from the multiple schemes in combination with the scheme selection rule. The scheme selection rule can be, for example, the rules listed in the above method 200, for example, it can be the correspondence between RSC and the scheme indication, or it can also be priority information, or it can also be a combination of the correspondence between RSC and the scheme indication and priority information. This application is not limited to this. In addition, the scheme selection rule can also be first-come, first-served, that is, the scheme indicated by the first received second message is determined as the target scheme; or, it can also be to select the target scheme based on the reception quality or power of multiple second messages, and so on. This application includes but is not limited to this.

[0318] In step 340, UE 1 and UE 2 perform security establishment.

[0319] In this embodiment, it is assumed that the target solution determined by UE 1 is the solution indicated by the second message from UE 2. UE 1 can use the target solution to establish a secure connection with UE 2. The specific process of establishing a secure connection between UE 1 and UE 2 can be found in existing technologies and will not be described in detail here.

[0320] As mentioned above, when the second message is used to indicate a scheme, the scheme can be implicitly indicated by a message in the security establishment process corresponding to the scheme, such as implicitly indicating a scheme that relies on the network side for security establishment through a direct connection security mode command message, and implicitly indicating a scheme that does not rely on the network side for security establishment through a direct connection authentication and key establishment message. Therefore, when the second communication device sends the second message to the first communication device, it can also be understood that the second communication device uses the selected scheme to establish security with the first communication device, and the first communication device can also directly execute the subsequent security establishment process after receiving the message. In other words, the aforementioned step 330 is optional, and step 320 is included in step 340, or in other words, step 320 and step 340 can be performed selectively.

[0321] In an embodiment of the present application, UE 1 initiating ProSe communication can send at least one request message corresponding to multiple schemes, so that a communication device (such as UE 2) receiving the at least one request message selects a scheme based on its network status and responds to UE 1 via a second message indicating the selected scheme. UE 1 can determine a target scheme based on the second message and then use the target scheme to establish a secure connection with UE 2. In this way, the security scheme used can be a security scheme supported by both UE 1 and UE 2, which facilitates the successful establishment of a secure connection.

[0322] In addition, this solution provides multiple solutions for UE 2 to choose from, and these multiple solutions take into account different network conditions. On the one hand, an off-network solution is provided for the situation where UE 2 is not within the network coverage, so that UE 2 that is not within the network coverage can also establish a communication connection with UE 1, getting rid of dependence on the network side. On the other hand, an on-network solution is provided for the situation where UE 2 is within the network coverage, and the network device can perform a secure establishment for UE 1 based on the latest contract information, thereby ensuring that the security establishment is successfully established. And because the network device can determine whether to authorize UE 121 and UE 122 based on the latest contract information, the problem of security establishment failure caused by permission changes can be avoided. For examples of multiple solutions taking into account different network conditions, please refer to the relevant description of the technical effects in method 200, which will not be repeated here.

[0323] It should be understood that in the embodiments shown in Figures 2 and 3, the specific process of UE 1 and UE 2 establishing security is shown, and the process of UE 1 communicating with UE 3 through UE 2 through ProSe is not described in detail. It is understandable that if each UE conducts ProSe communication, it is necessary to perform pre-configuration before initiating the process shown in Figures 2 or 3. For example, each UE can separately obtain information such as authorization and ProSe policy required for the U2URelay service. Since the pre-configuration process is not the focus of this application, its specific process can be referred to the existing technology and will not be described in detail herein.

[0324] The method provided by the embodiment of the present application is described in detail above with reference to a plurality of drawings. The device provided by the embodiment of the present application is described below with reference to the drawings.

[0325] Figures 4 to 6 are schematic diagrams of possible devices provided in embodiments of the present application. These devices can be used to implement the functions of the first communication device (e.g., UE 1), the second communication device (e.g., UE 2), or the PCF in the above method embodiments, thereby also achieving the beneficial effects of the above method embodiments.

[0326] FIG4 is a schematic block diagram of a communication device according to an embodiment of the present application. As shown in FIG4 , the communication device 400 includes a sending module 410 , a receiving module 420 , and a processing module 430 .

[0327] In one embodiment, the communication device 400 can be used to implement the function of UE 1 in the method embodiment shown in Figure 2 above; or, can be used to implement the function of UE 2 in the method embodiment shown in Figure 2 above; or, can be used to implement the function of PCF in the method embodiment shown in Figure 2 above.

[0328] In one possible design, the communication device 400 is used to implement the functions of UE 1 in the method embodiment shown in FIG2 . In this case, the communication device 400 may be an initiator of a ProSe service, such as the UE 121 in FIG1 .

[0329] Exemplarily, the processing module 430 is used to determine a target scheme from a plurality of schemes, the plurality of schemes including: a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; the sending module 410 is used to send a request message, which is used to request the second communication device that receives the request message to use the target scheme to establish security with the communication device 400; the receiving module 420 is used to receive a first message from the second communication device, which is used to indicate whether to agree to use the target scheme to establish security with the communication device 400.

[0330] Optionally, the processing module 430 is specifically configured to determine the target solution from multiple solutions based on a solution selection rule.

[0331] In one example, the scheme selection rule includes a correspondence between a first RSC corresponding to adjacent service communications and a first scheme indication, where the first scheme indication is used to indicate the first scheme among the multiple schemes; the processing module 430 is specifically used to determine the first scheme corresponding to the first scheme indication as the target scheme based on the correspondence.

[0332] In another example, the solution selection rule includes priority information, where the priority information indicates a priority order of each solution among the multiple solutions; and the processing module 430 is specifically configured to determine a target solution from the multiple solutions based on the priority order of the multiple solutions. For example, the solution with the highest priority among the multiple solutions is determined as the target solution.

[0333] Optionally, the receiving module 420 is further configured to receive the solution selection rule from the PCF.

[0334] Furthermore, the scheme selection rule is determined based on service-specific information of the ProSe corresponding to the communication device 400 .

[0335] Optionally, the target solution is a solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use a solution that does not rely on the network side for security establishment to establish security with the communication device 400.

[0336] Optionally, the target solution does not rely on the network side for security establishment, and the first message is a direct security mode command message, which is used to indicate agreement to use the solution that relies on the network side for security establishment to establish security with the communication device 400.

[0337] Optionally, the first message is a rejection message, which is used to indicate one or more of the following: the reason for not agreeing to use the target solution to establish security with the communication device 400, the solution for security establishment supported by the second communication device, or the solution for security establishment not supported by the second communication device.

[0338] In another possible design, the communication device 400 is used to implement the functions of UE 2 in the method embodiment shown in Figure 2. In this case, the communication device 400 can be a U2U Relay in the ProSe service, such as UE 122 or UE 124 in Figure 1.

[0339] Exemplarily, the receiving module 420 is used to receive a request message from the first communication device, and the request message is used to request the communication device 400 to establish a security relationship with the first communication device based on a target solution, where the target solution is: a solution that relies on the network side for security establishment or a solution that does not rely on the network side for security establishment; the sending module 410 is used to send a first message to the first communication device based on the network status, and the first message is used to indicate whether to agree to use the target solution to establish a security relationship with the first communication device, and the network status includes: being within the network coverage or not being within the network coverage.

[0340] Optionally, the processing module 430 is configured to determine whether to agree to use the target solution to establish security with the first communication device based on the network status.

[0341] Optionally, if the online status of the communication device 400 is within the network coverage, the first message is used to indicate agreement to use the target solution to establish a security connection with the first communication device.

[0342] Optionally, if the target solution is the solution that relies on the network side for security establishment, and the online status of the communication device 400 is not within the network coverage, the first message is used to indicate that the target solution is not agreed to be used for security establishment with the first communication device.

[0343] Optionally, if the target solution is the solution that does not rely on the network side for security establishment, and the online status of the communication device 400 is not within the network coverage, the first message is used to indicate agreement to use the target solution for security establishment with the first communication device.

[0344] Optionally, the target solution is a solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use a solution that does not rely on the network side for security establishment to establish security with the first communication device.

[0345] Optionally, the target solution is a solution that relies on the network side for security establishment, and the first message is a direct connection security mode command message, which is used to indicate agreement to use the solution that relies on the network side for security establishment to establish security with the first communication device.

[0346] Optionally, in the case where the communication device 400 does not agree to use the target scheme to establish a security relationship with the first communication device, the first message is a rejection message, which is used to indicate one or more of the following: the reason for not agreeing to use the target scheme to establish a security relationship with the first communication device, the scheme for security establishment supported by the communication device 400, or the scheme for security establishment not supported by the communication device 400.

[0347] In the above two possible designs, optionally, the target solution is a solution that does not rely on the network side for security establishment, and the above request message includes key_est_info.

[0348] In the above two possible designs, optionally, the target solution is a solution that relies on the network side for security establishment, and the above request message includes at least one of the following: a controller facing proximity service remote user key identifier CP-PRUK ID, a user facing proximity service remote user key identifier UP-PRUK ID, or a user hidden identifier SUCI.

[0349] Furthermore, the solution that relies on the network side for security establishment is: a solution based on the control plane for security establishment or a solution based on the user plane for security establishment.

[0350] Correspondingly, the request message further includes an RSC, which is used to determine a solution for security establishment based on a control plane or a solution for security establishment based on a user plane.

[0351] In yet another possible design, the communication device 400 is used to implement the functionality of the PCF in the method embodiment shown in FIG. 2 .

[0352] Exemplarily, the processing module 430 is used to determine a scheme selection rule, which is used to determine a target scheme for secure establishment between the first communication device and the second communication device from multiple schemes, the multiple schemes including schemes that rely on the network side for secure establishment and schemes that do not rely on the network side for secure establishment, and the first communication device is a device that initiates proximity service communication; the sending module 410 is also used to send the scheme selection rule to the first communication device.

[0353] Optionally, the solution selection rule includes a correspondence between a first RSC corresponding to the adjacent service communication and a first solution indication, where the first solution indication is used to indicate a first solution among the multiple solutions.

[0354] Optionally, the solution selection rule includes priority information, where the priority information is used to indicate a priority order of the multiple solutions.

[0355] Optionally, the receiving module 420 is configured to receive information from the UDM, where the information is used to determine a solution selection rule.

[0356] Optionally, the information is service-specific information of ProSe corresponding to the first communication device.

[0357] In another embodiment, the communication device 400 may be used to implement the functions of UE 1 in the method embodiment shown in FIG. 3 ; or, may be used to implement the functions of UE 2 in the method embodiment shown in FIG. 3 .

[0358] In one possible design, the communication device 400 is used to implement the functions of UE 1 in the method embodiment shown in FIG3 . In this case, the communication device 400 may be an initiator of a ProSe service, such as the UE 121 in FIG1 .

[0359] Exemplarily, the sending module 410 is used to send at least one request message, which is used to indicate multiple schemes, including: a scheme that relies on the network side for security establishment and a scheme that does not rely on the network side for security establishment; the receiving module 420 is used to receive a second message from a second communication device, which is used to indicate the use of one of the multiple schemes to establish security with the communication device 400.

[0360] Optionally, the processing module 430 is configured to determine a solution indicated by the second message as a target solution; and use the target solution to perform a security establishment with the second communication device.

[0361] In one example, the second message is a direct connection security mode command message, which is used to indicate a solution that relies on the network side for security establishment; the processing module 430 is specifically used to determine the solution that relies on the network side for security establishment indicated by the direct connection security mode command message as the target solution.

[0362] In another example, the second message is a direct connection authentication and key establishment message, which is used to indicate a solution that does not rely on the network side for security establishment; the processing module 430 is specifically used to determine the solution that does not rely on the network side for security establishment indicated by the direct connection authentication and key establishment message as the target solution.

[0363] Furthermore, the receiving module 420 is specifically configured to receive multiple second messages from multiple second communication devices; the processing module 430 is specifically configured to determine, based on a solution selection rule, a solution indicated by one of the multiple second messages as a target solution.

[0364] In another possible design, the communication device 400 is used to implement the functions of UE 2 in the method embodiment shown in Figure 3. In this case, the communication device 400 can be a U2U Relay for the ProSe service, such as UE 122 or UE 124 in Figure 1.

[0365] Exemplarily, the receiving module 420 is used to receive at least one request message from the first communication device, and the at least one request message is used to indicate multiple schemes, including schemes that rely on the network side for security establishment and schemes that do not rely on the network side for security establishment; the processing module 430 is used to send a second message to the first communication device based on the network status, and the second message is used to indicate the use of one of the above-mentioned multiple schemes to establish security with the first communication device.

[0366] Optionally, the online status of the communication device 400 is that it is within the network coverage, and the second message is used to instruct to use a solution that relies on the network side for security establishment to establish security with the first communication device.

[0367] Furthermore, the second message is a direct connection security mode command message.

[0368] Optionally, the online status of the communication device 400 is that it is not within the network coverage, and the second message is used to instruct to use a solution that does not rely on the network side for security establishment to establish security with the first communication device.

[0369] Furthermore, the second message is a direct connection authentication and key establishment message.

[0370] In the above two possible designs, optionally, the at least one request message includes multiple request messages, and each request message in the multiple request messages is used to indicate one of the above multiple solutions.

[0371] In the above two possible designs, optionally, the at least one request message is a request message, which is used to indicate the above multiple schemes.

[0372] Furthermore, the request message includes: key_est_info and at least one of the following: CP-PRUK ID, UP-PRUK ID or SUCI.

[0373] A more detailed description of the sending module 410 , the receiving module 420 and the processing module 430 can be directly obtained by referring to the relevant description in the method embodiment shown in FIG. 2 or FIG. 3 , and is not repeated here.

[0374] Figure 5 is another schematic block diagram of a communication device provided in an embodiment of the present application. As shown in Figure 5, the communication device 500 includes one or more processors 510. The processor 510 can be a general-purpose processor or a dedicated processor. For example, it can be a baseband processor or a central processing unit. The baseband processor can be used to process communication protocols and communication data, and the central processing unit can be used to control the communication device (such as UE 1, UE 2, PCF or chip), execute software programs, and process software program data.

[0375] Optionally, in one design, the processor 510 may include a program (also referred to as code or instructions), which may be executed on the processor 510 to cause the communication device 500 to perform the method performed by UE 1, UE 2, or the PCF in the above method embodiments. In another possible design, the communication device 500 includes circuitry (not shown in FIG. 5 ), which is configured to implement the functions of UE 1, UE 2, or the PCF in the above method embodiments.

[0376] Exemplarily, the processor 510 may be configured to execute computer programs or instructions in the memory to implement the steps performed by UE 1, UE 2 or PCF in the embodiment shown in FIG. 2 , or to implement the steps performed by UE 1 or UE 2 in the embodiment shown in FIG. 3 .

[0377] Optionally, the communication device 500 may include one or more memories 520 on which programs (sometimes also referred to as codes or instructions) are stored. The programs can be run on the processor 510, so that the communication device 500 executes the method performed by UE 1, UE 2 or PCF in the above embodiments.

[0378] Optionally, the processor 510 and / or the memory 520 may include an artificial intelligence (AI) module, which is used to implement AI-related functions. The AI ​​module can be implemented through software, hardware, or a combination of software and hardware. For example, the AI ​​module may include a wireless intelligent controller (RIC) module. For example, the AI ​​module may be a near real-time RIC or a non-real-time RIC.

[0379] Optionally, data may also be stored in the processor 510 and / or the memory 520. The processor and memory may be provided separately or integrated together.

[0380] Optionally, the communication device 500 may further include a communication interface 530. The processor 510 and the communication interface 530 are coupled to each other. The processor 510 may also be sometimes referred to as a processing unit, which controls the communication device (e.g., UE 1, UE 2, or PCF). The communication interface 530 may also be sometimes referred to as a transceiver unit, transceiver, transceiver circuit, or transceiver, etc., and is used to implement the transceiver function of the communication device. It is understood that the communication interface 530 may be a transceiver or an input / output interface.

[0381] When the communication device 500 is used to implement the method embodiment shown in Figure 2 or Figure 3, the processor 510 is used to perform the functions of the above-mentioned processing unit, and the communication interface 530 is used to perform the functions of the above-mentioned sending module and receiving module. Whether the communication interface 530 is used for sending or receiving can be determined by whether it is used to perform sending or receiving actions in the solution implemented by the communication device 500.

[0382] When the communication device 500 is a chip applied to UE 1, the chip implements the functions of UE 1 in the above method embodiment. The chip of UE 1 receives a signal from other modules (such as a radio frequency module or antenna) in UE 1, and the signal may be sent from UE 2 to UE 1; or the chip of UE 1 sends a signal to other modules (such as a radio frequency module or antenna) in UE 1, and the signal may be sent from UE 1 to UE 2.

[0383] When the communication device 500 is a chip used in UE 2, the chip implements the functions of UE 2 in the above method embodiment. The chip of UE 2 receives a signal from another module (such as a radio frequency module or antenna) in UE 2. The signal may be sent from UE 1 to UE 2. Alternatively, the chip of UE 2 sends a signal to another module (such as a radio frequency module or antenna) in UE 2. The signal may be sent from UE 2 to UE 1.

[0384] It is understood that when the communication device 500 is UE 1 or UE 2, the communication interface 530 may be a transceiver, specifically including a transmitter and a receiver, where the transmitter is used to transmit signals and the receiver is used to receive signals. When the communication device 500 is a chip applied to UE 1 or UE 2, the communication interface 530 may be an input / output circuit, where the input circuit can be used for receiving and the output interface can be used for transmitting.

[0385] Figure 6 is a structural diagram of a terminal device provided in an embodiment of the present application. As shown in Figure 6, the terminal device 600 can be applied to the scenario shown in Figure 1 to perform the functions of UE 1 or UE 2 in the above method embodiment. As shown in the figure, the terminal device 600 includes a processor 601 and a transceiver 602. Optionally, the terminal device 600 also includes a memory 603. Among them, the processor 601, the transceiver 602 and the memory 603 can communicate with each other through an internal connection path to transmit control and / or data signals. The memory 603 is used to store a computer program, and the processor 601 is used to call and run the computer program from the memory 603 to control the transceiver 602 to send and receive signals. Optionally, the terminal device 600 may also include an antenna 604 for sending the uplink data or uplink control signaling output by the transceiver 602 through a wireless signal.

[0386] The processor 601 and the memory 603 may be combined into a processing device, and the processor 601 is configured to execute program code stored in the memory 603 to implement the aforementioned functions. In a specific implementation, the memory 603 may also be integrated into the processor 601 or independent of the processor 601. The processor 601 may correspond to the processing module in FIG. 4 or the processor in FIG. 5 .

[0387] The transceiver 602 may correspond to the transmitting module and receiving module in FIG4 or the communication interface in FIG5 , and may also be referred to as a transceiver unit. The transceiver 602 may include a receiver (or receiver, receiving circuit) and a transmitter (or transmitter, transmitting circuit). The receiver is used to receive signals, and the transmitter is used to transmit signals.

[0388] It should be understood that the terminal device 600 shown in Figure 6 is capable of implementing the various processes involving UE 1 or the various processes involving UE 2 in the method embodiments shown in Figures 2 or 3. The operations and / or functions of the various modules in the terminal device 600 are respectively for implementing the corresponding processes in the above-mentioned method embodiments. For details, please refer to the description of the above-mentioned method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.

[0389] The processor 601 can be used to execute the actions implemented within the terminal device described in the previous method embodiments, and the transceiver 602 can be used to execute the actions of the terminal device sending to or receiving from the network device described in the previous method embodiments. For details, please refer to the description of the previous method embodiments, which will not be repeated here.

[0390] Optionally, the terminal device 600 may further include a power supply 605 for providing power to various devices or circuits in the terminal device.

[0391] In addition, in order to make the functions of the terminal device more complete, the terminal device 600 can also include one or more of an input unit 606, a display unit 607, an audio circuit 608, a camera 609 and a sensor 610, and the audio circuit can also include a speaker 608a, a microphone 608b, etc.

[0392] It should be noted that the above method embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by hardware integrated logic circuits in the processor or by software instructions.

[0393] The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0394] The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0395] The memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0396] The present application also provides a chip system, which includes at least one processor for supporting the implementation of the functions of UE 1 or UE 2 or PCF involved in any one of the above method embodiments, for example, sending, receiving or processing data and / or information involved in the above method.

[0397] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0398] The chip system can be composed of chips, or can include chips and other discrete devices.

[0399] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions). When the computer program is run, the method executed by UE 1 in the embodiment shown in Figure 2 is executed, or the method executed by UE 2 is executed, or the method executed by PCF is executed; or, when the computer program is run, the method executed by UE 1 in the embodiment shown in Figure 3 is executed, or the method executed by UE 2 is executed.

[0400] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is executed, the method executed by UE 1 in the embodiment shown in FIG. 2 is executed, or the method executed by UE 2 is executed, or the method executed by the PCF is executed; alternatively, when the computer program is executed, the method executed by UE 1 in the embodiment shown in FIG. 3 is executed, or the method executed by UE 2 is executed.

[0401] The present application also provides a communication system, which includes the aforementioned UE 1, UE 2, PCF and / or the device in the aforementioned embodiment.

[0402] The methods provided in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product may include 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 application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may 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 may be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may 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 therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic disk), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0403] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0404] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0405] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.

[0406] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0407] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0408] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0409] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A security establishment method, characterized in that: The method comprises: The first communication device determines a first scheme among multiple schemes as a target scheme based on a correspondence between a first relay service code RSC corresponding to the proximity service communication and a first scheme indication, the multiple schemes including: a scheme that relies on a network side for security establishment and a scheme that does not rely on a network side for security establishment, and the first scheme indication is used to indicate the first scheme; The first communication device sends a request message, where the request message is used to request a second communication device that has received the request message to use the target solution to establish a security connection with the first communication device; The first communication device receives a first message from the second communication device, where the first message is used to indicate agreement to use the target scheme to perform a security establishment with the first communication device.

2. The method according to claim 1, characterized in that The first communication device is a first user equipment UE, the second communication device is a relay UE between the first UE and a second UE, and the second UE is a UE that performs the proximity service communication with the first UE.

3. The method according to claim 1 or 2, characterized in that The target solution is the solution that does not rely on the network side for security establishment, and the request message includes: key establishment information key_est_info.

4. The method according to claim 1 or 2, characterized in that: The target solution is the solution that relies on the network side for security establishment, and the request message includes at least one of the following: a control face proximity service remote user key identifier CP-PRUK ID, a user face proximity service remote user key identifier UP-PRUKID or a user hidden identifier SUCI.

5. The method according to claim 4, characterized in that The solution that relies on the network side to perform security establishment is: a solution based on a control plane to perform security establishment or a solution based on a user plane to perform security establishment.

6. The method according to claim 5, characterized in that The request message also includes a relay service code RSC, and the RSC is used to determine the solution for security establishment based on the control plane or the solution for security establishment based on the user plane.

7. The method according to any one of claims 1 to 3, characterized in that The target solution is the solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use the solution that does not rely on the network side for security establishment to establish security with the first communication device.

8. The method according to any one of claims 1, 2, 4 to 6, characterized in that: The target solution is the solution that relies on the network side for security establishment, and the first message is a direct connection security mode command message, and the direct connection security mode command message is used to indicate agreement to use the solution that relies on the network side for security establishment to establish security with the first communication device.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: A correspondence between the first RSC and the first scheme indication is received from a policy control function PCF.

10. The method according to any one of claims 1 to 8, characterized in that The corresponding relationship between the first RSC and the first scheme indication is pre-configured in the first communication device.

11. The method according to any one of claims 1 to 10, characterized in that The correspondence between the first RSC and the first scheme indication is determined based on service-specific information of a proximity service corresponding to the first communication device.

12. The method according to any one of claims 1 to 11, characterized in that The first message is a rejection message, and the rejection message is used to indicate one or more of the following: the reason for not agreeing to use the target scheme to establish a security with the first communication device, the scheme for security establishment supported by the second communication device, or the scheme for security establishment not supported by the second communication device.

13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: The second communication device receives the request message and sends the first message.

14. A security establishment method, characterized in that, Applied to a second communication device, the method comprises: Receiving a request message from a first communication device, the request message being used to request the second communication device to perform a secure establishment with the first communication device based on a target solution, the target solution being: a solution that relies on a network side for secure establishment or a solution that does not rely on a network side for secure establishment; Based on the network status, a first message is sent to the first communication device, where the first message is used to indicate whether to agree to use the target solution to establish a security connection with the first communication device, and the network status includes: being within the network coverage or not within the network coverage.

15. The method according to claim 14, characterized in that The first communication device is a first user equipment UE, the second communication device is a relay UE between the first UE and a second UE, and the second UE is a UE that performs proximity service communication with the first UE.

16. The method according to claim 14 or 15, characterized in that The target solution is the solution that does not rely on the network side for security establishment, and the request message includes: key establishment information key_est_info.

17. The method according to claim 14 or 15, characterized in that The target solution is the solution that relies on the network side for security establishment, and the request message includes at least one of the following: a control face proximity service remote user key identifier CP-PRUK ID, a user face proximity service remote user key identifier UP-PRUKID or a user hidden identifier SUCI.

18. The method according to claim 17, characterized in that The solution that relies on the network side to perform security establishment is: a solution based on a control plane to perform security establishment or a solution based on a user plane to perform security establishment.

19. The method according to claim 18, characterized in that The request message includes a relay service code RSC, and the RSC is used to determine the scheme for security establishment based on the control plane or the scheme for security establishment based on the user plane.

20. The method according to claim 14 or 15, characterized in that If the online status is within the network coverage, the first message is used to indicate agreement to use the target solution to establish a security connection with the first communication device; or If the target solution is the solution that relies on the network side for security establishment, and the online state is not within the network coverage, the first message is used to indicate that the target solution is not agreed to be used for security establishment with the first communication device; or If the target solution is the solution that does not rely on the network side for security establishment, and the online status is not within the network coverage, the first message is used to indicate agreement to use the target solution to establish security with the first communication device.

21. The method according to any one of claims 14 to 16 and 20, characterized in that: The target solution is the solution that does not rely on the network side for security establishment, and the first message is a direct authentication and key establishment message, which is used to indicate agreement to use the solution that does not rely on the network side for security establishment to establish security with the first communication device.

22. The method according to any one of claims 14, 15, 17 to 20, characterized in that The target solution is the solution that relies on the network side for security establishment, and the first message is a direct connection security mode command message, and the direct connection security mode command message is used to indicate agreement to use the solution that relies on the network side for security establishment to establish security with the first communication device.

23. The method according to any one of claims 14 to 20, characterized in that In the case where the second communication device does not agree to use the target scheme to establish a security relationship with the first communication device, the first message is a rejection message, and the rejection message is used to indicate one or more of the following: the reason for not agreeing to use the target scheme to establish a security relationship with the first communication device, the scheme for security establishment supported by the second communication device, or the scheme for security establishment not supported by the second communication device.

24. A communication device, characterized in that: The method comprises one or more functional units, and is used to implement the method according to any one of claims 1 to 12, or, is used to implement the method according to any one of claims 14 to 23.

25. A communication device, characterized in that: The communication device comprises a processor, wherein the processor is used to execute a program code so that the communication device implements the method according to any one of claims 1 to 12, or is used to implement the method according to any one of claims 14 to 23.

26. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 12, or the method according to any one of claims 14 to 23.

27. A computer program product, characterized in that The invention comprises a computer program, which, when executed on a computer, enables the computer to implement the method according to any one of claims 1 to 12, or the method according to any one of claims 14 to 23.

28. A communication system, characterized in that: comprising a first communication device and a second communication device, The first communication device is used to implement the method according to any one of claims 1 to 12; The second communication device is used to receive a request message and send a first message.

29. The communication system according to claim 28, characterized in that The second communication device is further configured to implement the method according to any one of claims 14 to 23.

Citation Information

Patent Citations

  • Security establishment method and related device

    CN118714575A

  • PC5 root key processing method and device, AUSF and remote terminal

    CN114915407A

  • Method for agreeing to security application policy between PC5 link and uu link in prose relay communication, and device supporting same

    WO2022055078A1

  • Improved security establishment methods and systems

    WO2024033253A1