Security establishment method and related device

CN118714575APending Publication Date: 2024-09-27HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310313402.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-09-27

AI Technical Summary

Benefits of technology

[0108] In a tenth aspect, the present application provides a computer program product. The computer program product includes: a computer program (which may also be called a code, or an instruction). When the computer program is run, it causes the computer to execute the first to second steps. Methods in any of the five aspects and possible implementation methods of the first to fifth aspects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714575A
    Figure CN118714575A
Patent Text Reader

Abstract

The invention provides a security establishment method and a related device, which are used for selecting an adaptive security establishment scheme for a communication device and ensuring communication security. In the method, a first communication device initiating proximity service communication determines a target scheme from a plurality of schemes, for example, the target scheme is determined based on a scheme selection rule, and sends a request message to request a receiver to use the target scheme to perform security establishment with the first communication device; the second communication device receiving the request message sends a first message to the first communication device based on the online state to indicate whether to agree to use the target scheme for secure establishment therewith. The second communication device may agree to use a network-side-independent or network-side-dependent secure setup scheme when within network coverage; and when the user is not in the network coverage range, the user agrees to use a security establishment scheme which does not depend on the network side. Through negotiation of the first communication device and the second communication device, the first communication device and the second communication device can establish a secure connection using a co-supported secure establishment scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of mobile communications, device to device (D2D) communication allows user equipment (UE) to communicate directly. UE can share spectrum resources with other UEs in the cell under the control of the cell network, which is conducive to improving the utilization of spectrum resources. Proximity based service (ProSe) communication is a type of D2D communication. User equipment with ProSe communication function can communicate through the PC5 interface.

[0003] When two UEs need to perform ProSe communication, if the other UE is out of the signal coverage of the initiating UE, or the signal is weak, a relay UE can be used to assist in communication. The relay UE can also be called a UE-to-UE Relay (U2U Relay). In the following text, for the convenience of distinguishing from the relay UE, the UE performing ProSe communication is recorded as the end UE.

[0004] The security establishment between the terminal side UE and the U2U Relay is an important step to ensure communication security. Therefore, it is hoped to provide a solution that can be used for the security establishment between the terminal side UE and the U2U Relay. Summary of the invention

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

[0006] In a 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.

[0007] 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 perform a security establishment 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 perform a security establishment with the first communication device.

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

[0009] Based on the above scheme, the first communication device initiating ProSe communication can select a target scheme from multiple schemes, and negotiate with the second communication device that receives the request message by sending a request message indicating the target scheme. For example, when the second communication device agrees to use the target scheme, the target scheme can be directly used to establish security with the second communication device; when the second communication device disagrees to use the target scheme, other schemes can be continuously selected as the target scheme to send request messages and negotiate with the second communication device. Thus, the scheme supported by both the first communication device and the second communication device can be determined for security establishment, which is conducive to the successful establishment of a secure connection.

[0010] 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, and get 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 according to 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.

[0011] 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 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) can be used to implicitly indicate the agreement to use the target scheme. In this case, it can be regarded that the second communication device directly uses the target scheme to establish security with the first communication device.

[0012] Therefore, another possible implementation of the above method is: determine a target scheme from multiple schemes, the multiple 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; send a request message, the request message 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; use the target scheme to establish security with the second communication device.

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

[0014] The scheme selection rule may indicate a rule for determining a target scheme. The first communication device may determine a target scheme from multiple schemes based on the scheme selection rule, or may determine the target scheme from multiple schemes randomly, which is not limited in the present application.

[0015] Optionally, the scheme selection rule includes: a correspondence between a first RSC corresponding to the ProSe communication and a first scheme indication, the first scheme indication being used to indicate a first scheme among multiple schemes; the above-mentioned determination of a 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.

[0016] 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 according to 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.

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

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

[0019] One possible design is that the scheme selection rule is a correspondence between at least one RSC and at least one scheme indication. Another possible design is that the scheme selection rule is priority information. Still another possible design is that the scheme selection rule includes but is not limited to a correspondence between at least one RSC and at least one scheme indication, and priority information. This application does not limit the specific content of the scheme selection rule.

[0020] The above scheme selection rule may be pre-configured, or may be acquired from the network side.

[0021] As mentioned above, the first communication device may be a UE, or a component configured in the UE, or other logic modules or software that can be used to implement part or all of its functions. If the scheme selection rule is preconfigured, one possible scenario is that the scheme selection rule may be pre-stored in the first communication device, and another possible scenario is that the scheme selection rule is pre-stored in a memory coupled to the first communication device.

[0022] 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). That is, the solution selection rule may be obtained from the PCF.

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

[0024] That is to say, the service-specific information of the ProSe corresponding to the first communication device contains information for determining the scheme selection rule, or contains the scheme selection rule. The PCF can determine the scheme selection rule based on the acquired service-specific information of the ProSe, and send the determined scheme selection rule to the first communication device. Since the service-specific information of the ProSe comes from the contract information, the scheme selection rule is determined based on the contract information of the first communication device, and the scheme selection rule determined thereby is a rule applicable to the first communication device.

[0025] The first message received by the first communication device may be different depending on whether the second communication device agrees or disagrees to use the target solution, or may be different depending on the target solution. Exemplarily, 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 does not receive other messages after sending the request message and before receiving the first message.

[0026] 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.

[0027] 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.

[0028] Optionally, the first message is a rejection message, and the rejection message is used to indicate that the use of the target scheme to establish security with the first communication device is not agreed.

[0029] Furthermore, the rejection message is also used to indicate one or more of the following: the reason for not agreeing to use the target scheme to establish 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.

[0030] 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.

[0031] In a second aspect, a security establishment method is provided, which 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 that can implement all or part of the functions of the second communication device.

[0032] 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, wherein the target solution is: 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, wherein 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, wherein the online status includes: being within the network coverage or not being within the network coverage.

[0033] The request message may be used to indicate the determination of the target solution, so that the second communication device can determine the target solution. In other words, the request message may be used to determine the target solution.

[0034] Being within the network coverage may mean being within the coverage of the base station and being able to successfully establish a connection with the network. Correspondingly, not being within the network coverage may mean being unable to successfully establish a connection with the network, for example, being outside the coverage of the base station, or being within the coverage of the base station but unable to successfully establish a connection with the network due to a large number of users accessing the network and other reasons, resulting in 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.

[0035] 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 online status. The result determined in this way can be adapted to the online status of the second communication device. Since the second communication device can give different feedback to different target schemes based on different online statuses. The first communication device can make different responses based on different feedback, such as 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, and when the first message indicates that the target scheme is refused to be used, 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.

[0036] 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 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) can be used to implicitly indicate the agreement to use the target solution. In this case, it can be regarded that the second communication device directly uses the target solution to establish security with the first communication device.

[0037] Therefore, another possible implementation of the above method is: receiving a request message from the first communication device, the request message is used to request the 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 the network status, using the target solution to establish a security connection with the first communication device, the network status including: being within the network coverage or not being within the network coverage. The following lists the different contents indicated by the first message under different network statuses.

[0038] 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.

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

[0040] If the second communication device is within the network coverage, the second communication device may support a solution that relies on the network side and a solution that does not rely on the network side, and thus may perform security establishment according to the target solution used by the first communication device.

[0041] 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.

[0042] If the second communication device is not within the network coverage, the second communication device may support a solution that does not rely on the network side, but does not support 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 establishment 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.

[0043] 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.

[0044] 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.

[0045] If the second communication device is not within the network coverage, the second communication device may support a solution that does not rely on the network side, but does not support a solution that relies on the network side. If the target solution is a solution that does not rely on the network side, the second communication device may agree to use the target solution, so that 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, thereby reducing the signaling overhead caused by the negotiation with the second communication device and reducing the time consumption.

[0046] In summary, it can be seen that the second communication device can agree to use different schemes to establish a secure connection with the first communication device in different network states. In this way, the security establishment scheme does not need to be restricted to a certain scheme, but can be flexibly adjusted according to the network state of the second communication device, thereby facilitating the successful establishment of a secure connection between the first communication device and the second communication device.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] Optionally, in a case where the second communication device does not agree to use the target scheme to establish a security connection 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 scheme to establish a security connection with the first communication device.

[0051] Furthermore, the rejection message is also used to indicate one or more of the following: the reason for not agreeing to use the target scheme to establish 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.

[0052] 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.

[0053] In combination 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.

[0054] 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.

[0055] 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).

[0056] Another possible situation 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 (contro plane ProSe remote user key, CP-PRUK) identifier (identifier, ID) (CP-PRUK ID), a user plane ProSe remote user key (user planeProSe remote user key, UP-PRUK) ID or a user hidden identifier (subscription concealed identifier, SUCI).

[0057] By comparison, it can be found that the target solutions are different, and the information elements included in the request message are not exactly the same. The request message corresponding to the solution that depends on the network side satisfies: including at least one of CP-PRUK ID, UP-PRUK ID or SUCI, and / or, does not include key_est_info. The request message corresponding to the solution that does not depend on the network side satisfies: including key_est_info, and / or, does not include CP-PRUK ID, UP-PRUK ID and SUCI.

[0058] Therefore, by determining whether the request message includes any one of key_est_info, CP-PRUK ID, UP-PRUK ID or SUCI, it can be determined which solution the request message is used to indicate.

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

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

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

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

[0063] In a third aspect, a security establishment method is provided, which is applied to PCF. The method can be executed by PCF, or by a component configured in PCF (such as a chip, a chip system, a processor, etc.), or can also be implemented by a logic module or software that can implement all or part of the PCF functions.

[0064] 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 a network side for secure establishment and schemes that do not rely on a network side for secure establishment, the first communication device being a device that initiates proximity service communications; and sending the scheme selection rule to the first communication device.

[0065] Based on the above scheme, by sending the scheme selection rule to the first communication device, it is convenient for the first communication device to determine the target scheme from multiple schemes, so as to establish a secure connection with the second communication device. The multiple schemes include schemes that rely on the network side for secure establishment and schemes that do not rely on the network side for secure establishment, taking into account different situations, providing feasible schemes for communication devices within and outside the network coverage, thereby facilitating the successful establishment of a secure connection.

[0066] 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 scheme selection rule.

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

[0068] That is, the service-specific information of the ProSe corresponding to the first communication device includes information for determining the scheme selection rule, or includes the scheme selection rule. The PCF may send the determined scheme selection rule to the first communication device. Since the service-specific information of the ProSe comes from the contract information, the scheme selection rule is determined based on the contract information of the first communication device, and the scheme selection rule determined thereby is a rule applicable to the first communication device.

[0069] Optionally, the scheme selection rule includes: a correspondence between a first RSC corresponding to the ProSe communication and a first scheme indication, and the first scheme indication is used to indicate a first scheme among multiple schemes.

[0070] 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.

[0071] Optionally, the scheme selection rule includes priority information, and the priority information is used to indicate the priority order of the multiple schemes.

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

[0073] 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 implement all or part of the functions of the first communication device.

[0074] Exemplarily, the method includes: sending at least one request message, the at least one request message is used to indicate multiple schemes, the 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; receiving a second message from a second communication device, the second message is used to indicate the use of one of the multiple schemes to establish security with the first communication device.

[0075] Based on the above scheme, the first communication device can send at least one request message for indicating multiple schemes, so that the second communication device that receives the at least one request message can select a scheme from them to establish a security connection with the first communication device. The multiple schemes include schemes that rely on the network side for security establishment and schemes that do not rely on the network side for security establishment, taking into account different situations, and providing feasible schemes for the second communication device whether it is within the network coverage or not. Therefore, the second communication device can select one of the multiple schemes based on the online status, and indicate it to the first communication device through the second message, so that both parties can establish a security connection. This scheme does not require multiple negotiations between the first communication device and the second communication device, so it is conducive to completing the security establishment more quickly.

[0076] 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.

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

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

[0079] 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.

[0080] 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.

[0081] Further, 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: based on a scheme selection rule, determining a scheme indicated by a second message among the multiple second messages as a target scheme.

[0082] Since the first communication device may send the at least one request message mentioned above by broadcasting, there may 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.

[0083] Since the solutions respectively 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 the solution selection rule. The solution selection rule may include but is not limited to the rules described above in combination with the first aspect to the third aspect, and the details are described above, which will not be repeated here.

[0084] In a fifth aspect, a security establishment method is provided, which 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 (such as a chip, a chip system, a processor, etc.), or a logic module or software that can implement all or part of the functions of the second communication device.

[0085] 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 an 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.

[0086] Based on the above scheme, the first communication device can send at least one request message for indicating multiple schemes, so that the second communication device that receives the at least one request message can select a scheme from them to establish a security connection with the first communication device. The multiple schemes include schemes that rely on the network side for security establishment and schemes that do not rely on the network side for security establishment, taking into account different situations, and providing feasible schemes for the second communication device whether it is within the network coverage or not. Therefore, the second communication device can select one of the multiple schemes based on the online status, and indicate it to the first communication device through the second message, so that both parties can establish a security connection. This scheme does not require multiple negotiations between the first communication device and the second communication device, so it is conducive to completing the security establishment more quickly.

[0087] In combination with the fifth aspect, in some possible implementations of the fifth aspect, the online status is being within 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.

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

[0089] 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.

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

[0091] 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.

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

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

[0094] 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.

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

[0096] As mentioned above, the information elements in the request message corresponding to the solution that depends on the network side include UTC-based counterLSB and RSC, and the information elements in the request message corresponding to the solution that does not depend on the network side include ProSe Identifier. Therefore, in this solution, when the multiple solutions are indicated by one request message, the request message can include the above multiple information elements at the same time.

[0097] 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.

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

[0099] 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 a variety of 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.

[0100] In a sixth aspect, a communication device is provided, which can implement the security establishment method described in the first to fifth aspects and any possible implementation of the first to fifth aspects. The device includes one or more corresponding functional units or modules for executing the above method. The functional units or modules included in the device can be implemented by software and / or hardware.

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

[0102] Optionally, the device 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.

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

[0104] 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 method of the first to fifth aspects, for example, receiving or processing the data and / or information involved in the above-mentioned method.

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

[0106] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0107] 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 manner of the first to fifth aspects.

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

[0109] 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).

[0110] 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 here. BRIEF DESCRIPTION OF THE DRAWINGS

[0111] Figure 1 It is a schematic diagram of a scenario applicable to the security establishment method provided in the embodiment of the present application;

[0112] Figure 2 is a schematic flow chart of a security establishment method provided in an embodiment of the present application;

[0113] Figure 3 is a schematic flow chart of a security establishment method provided by another embodiment of the present application;

[0114] Figure 4 and Figure 5 is a schematic block diagram of a communication device provided in an embodiment of the present application;

[0115] Figure 6 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0116] The technical solution in this application will be described below in conjunction with the accompanying drawings.

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

[0118] First, in the embodiments of the present application, the use of prefixes such as "first" and "second" is only to facilitate the distinction and description of different things belonging to the same name category, and does not restrict the order, size or quantity of things. For example, "first communication device" and "second communication device" are just different communication devices, and do not limit the number or priority of communication devices; for another example, "first message" and "second message" are just different messages, and there is no time sequence, size relationship or priority relationship between the two.

[0119] Second, the messages mentioned in the embodiments of the present application, such as the DCR message, the direct connection security mode command message, the direct connection authentication and key establishment message, and the information element (IE) included in each message are only examples and should not constitute any limitation to the present application. The present application does not exclude the possibility of using other messages to replace the above messages to achieve the same or similar functions.

[0120] 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 UE2, which can include directly receiving from UE 2 through the air interface, and also include indirectly receiving from UE2 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.

[0121] In other words, sending and receiving can be performed between devices, for example, between UE 2 and UE 1; it can also 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.

[0122] 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.

[0123] 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: A exists alone, A and B exist at the same time, and B exists 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 it 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.

[0124] Fifth, the pre-defined in the present application can be understood as: define, pre-define, store, pre-store, pre-negotiate, pre-configure, solidify, or pre-burn.

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

[0126] 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.

[0127] 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.

[0128] 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), sidelink (SL) communication system, universal mobile telecommunication system (UMTS), worldwide 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).

[0129] 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.

[0130] The radio access network (RAN) device in this application is a device with wireless transceiver function. The radio access network device can provide wireless communication function services and can access the terminal to the wireless network. The radio access network device can be a node in the radio access network, referred to as a RAN node.

[0131] In a possible scenario, a RAN node may be a base station (BS), an evolved NodeB (eNodeB), a transmission reception point (TRP), a home evolved NodeB (or home Node B, HNB), an access point (AP) of wireless fidelity (Wi-Fi), 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 may also be a device that performs base station functions in a device to device (D2D) communication system, a vehicle to everything (V2X) communication system, a machine to machine (M2M) communication system, and an Internet of Things (IoT) communication system. A RAN node may also be a RAN node in a non terrestrial network (NTN), that is, a RAN node may be deployed on a high altitude platform or a satellite. The RAN node can be a macro base station, a micro base station or an indoor station, a relay node or a donor node, or a wireless controller in a cloud radio access network (CRAN) scenario, a node in an open radio access network (O-RAN or ORAN) scenario, etc. Optionally, the RAN node can also be a server, a wearable device, a vehicle or an onboard device, etc. For example, the RAN node in the V2X technology can be a road side unit (RSU). Of course, the RAN node can also be a node in the core network.

[0132] 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 can also be included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or a radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU) or a remote radio head (RRH).

[0133] In different systems, CU (or CU-CP and CU-UP), DU or RU may also have different names, but those skilled in the art can understand their meanings. For example, in the ORAN system, CU may also be called an open CU (O-CU), DU may also be called an open DU (O-DU), CU-CP may also be called an open CU-CP (O-CU-CP), CU-UP may also be called an open CU-UP (O-CU-UP), and RU may also be called an open RU (O-RU).

[0134] 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.

[0135] 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 (mobile equipment, ME), user terminal, terminal, wireless communication equipment, user agent or user device.

[0136] UE can be a device that provides voice / data connectivity to users, for example, a handheld device with wireless connection function, a vehicle-mounted device, etc. At present, some examples of UE can be: mobile phone, tablet computer (pad), computer with wireless transceiver function (such as laptop computer, PDA, etc.), mobile Internet device (mobile internet device, MID), virtual reality (virtual reality, VR) device, augmented reality (augmented reality, AR) device, wireless terminal in industrial control (industrial control), wireless terminal in self driving, uncrewed aerial vehicle (UAV), wireless terminal in V2X, wireless terminal in remote medical, wireless terminal in smart grid (smart grid), wireless terminal in transportation safety (transportation safety), wireless terminal in smart city (smart city), wireless terminal in smart home (smart home), cellular phone, cordless phone, session initiation protocol (session initiation protocol, SIP) phone, wireless local loop (wireless local loop, WLL) station, personal digital assistant (personal The invention relates to a mobile phone or a digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network, or a terminal device in a public land mobile communication network (PLMN) to be evolved in the future, etc.

[0137] Among them, wearable devices can also be called wearable smart devices, which are a general term for the intelligent design and development of wearable devices for daily wear using wearable technology, 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 clothes or accessories. Wearable devices are not only hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, 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.

[0138] In addition, UE can also include terminal devices in the IoT system, which can also be called IoT nodes. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection. IoT technology can achieve massive connections, deep coverage, and terminal power saving through narrow band (NB) technology, for example.

[0139] 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.

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

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

[0142] 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 rate 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, which 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 a close range, they can communicate directly after mutual discovery.

[0143] 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 adjacent UEs that support ProSe communication by using the user plane transmission of NR technology without traversing any network node path.

[0144] UEs performing ProSe communication can communicate through the PC5 port, and UEs can transmit control plane and user plane information through the PC5 port, which includes signaling and / or data. The link for the UE to directly communicate through the PC5 port can also be called a sidelink, or a PC5 link. Unicast communication through the PC5 link can also be called PC5 unicast communication (PC5 unicast communication), and the PC5 link used for unicast communication can also be called a PC5 unicast link (PC5 unicast link).

[0145] Compared with traditional cellular network communications, UEs used for ProSe communications 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 referred to as source UEs and target UEs, or they can also be collectively referred to as end UEs. 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 referred to as U2U Relay service.

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

[0147] 3. Network status: For the convenience of description, this document introduces the network status to distinguish the status of different UEs. The network status can include: being in network coverage (in-coverage) and not being in network coverage (or out-of-coverage).

[0148] Among them, being within the network coverage range may mean being within the coverage range of the base station and being able to successfully establish a connection with the network. Correspondingly, not being within the network coverage range may mean being unable to successfully establish a connection with the network, for example, being outside the coverage range of the base station, or being within the coverage range of the base station but being unable to successfully establish a connection with the network due to too many users accessing the network, weak signal quality, etc. In other words, the network status can be used to determine whether the UE can successfully establish a connection with the network.

[0149] 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 (e.g., denoted as device A) wishes to perform ProSe communication service A1 through the UE to the network U2U Relay, it may correspond to one RSC (e.g., denoted as RSC#1); if device A wishes to perform ProSe communication service A2 through U2U Relay, it may correspond to another RSC (e.g., denoted as RSC#2). Device A can broadcast the RSC (e.g., RSC#2) corresponding to the service it wishes to initiate in the discovery process, and the device (e.g., denoted as device B) that receives RSC#2 can determine that device A wishes to perform ProSe communication through U2U Relay.

[0150] 5. Security establishment: The purpose of security establishment is to establish a secure connection between communication devices to ensure communication security. Here is a brief description of the security establishment process as follows:

[0151] 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 turned on (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. Among them, the scheme that relies on the network side for security establishment can also be called an on-line scheme, and the method that does not rely on the network side for security establishment can also be called an off-line scheme.

[0152] 6. Solutions that rely on the network side for security establishment: that is, solutions that perform security authentication, authorization, and key establishment through the network side. In the process of relying on the network side for security establishment, it is necessary to interact with the network side to complete the security establishment.

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

[0154] 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 a 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 successful, 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 UE NR_ProSeAmong them, K NR_ProSe It can be the key of PC5 link under CP solution. The initiating UE can generate K based on CP-PRUK. NR_ProSe At this point, both the initiating UE and the receiving UE obtain K NR_ProSe , both parties can use K NR_ProSe Establish a secure connection with PC5.

[0155] 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.

[0156] It can be understood 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.

[0157] 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 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: an 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 the PC5 link in the UP solution. The receiving UE obtains K NRP Then, K is sent to the initiating UE. NRP The 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 obtain K NRP , both parties can use K NRP Establish a secure connection with PC5.

[0158] It can be 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.

[0159] 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 be changed as the contract information is updated. This authorization can be regarded as a dynamic authorization. On the other hand, since the network side participates in the security establishment, there are more interactive signaling between the communication device and the network equipment, especially for solutions based on the user plane, which also requires the establishment of a protocol data unit (PDU) session, and the authorization is relatively time-consuming.

[0160] 7. Solutions that do not rely on the network side for security establishment: Compared with solutions that rely on the network side for security establishment, solutions that do not rely on the network side for security establishment do not require the network side to perform authentication, authorization, and key establishment. Mutual authentication and key establishment can be performed between devices.

[0161] 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 information required for key establishment (Key_Est_Info). For example, the information required for key establishment may be an information container for carrying information required for key establishment. The initiating UE and the receiving UE can complete mutual authentication and key establishment processes by exchanging Key_Est_Info multiple times to obtain the root key K of the PC5 unicast link. NRP .

[0162] Optionally, the direct communication request message may also 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 a 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 K NRPID, and then the previously obtained key can be directly used instead of using Key_Est_Info to negotiate the key again.

[0163] When the communication device does not rely on the network side for security establishment, it needs to authenticate with the communication device of the other end to obtain the authorization of the other end. However, since the security establishment can be completed without the participation of the network side, the signaling interaction is less and has higher flexibility. On the other hand, once the two communication devices complete mutual authentication and authorization, the other end can be considered to be trustworthy. Since there is no interaction with the network equipment, the communication device may not be able to obtain the latest contract information, and the authorization may not change for a long time after obtaining the authorization. Therefore, this authorization can be regarded as a static authorization.

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

[0165] The core network 130 may include a plurality of network elements with different functions for implementing different functions. Exemplarily, the core network 110 may include, but is not limited to, network elements such as 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, AMF may be used for mobility management and access management. SMF may be used for session management, allocation and management of Internet protocol (IP) addresses of terminal devices, selection and management of user plane functions, policy control, or termination points of charging function interfaces, and downlink data notification. UPF may be used for packet routing and forwarding, or quality of service (QoS) processing of user plane data. PCF may be used for a unified policy framework for guiding network behavior, providing policy rule information for control plane function (such as AMF, SMF, etc.) network elements, etc. UDM may be used to store user data, such as contract 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.

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

[0167] UE 121 and UE 122, UE 121 and UE 124, UE 122 and UE 123, and UE 124 and UE 125 can communicate through the PC5 port. If UE 121 wants to communicate with UE 123 through the PC5 port, and the distance between UE 121 and UE 123 is far, UE 123 is outside the signal coverage of UE 121, or the communication quality is poor, UE 121 can assist in communication through UE 122. At this time, UE 122 is a relay UE between UE 121 and UE 123, that is, 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 wants to communicate with UE 125 through PC5 port, and the distance between UE 121 and UE 125 is far, UE 125 is out of the signal coverage of UE 121, or the communication quality is poor, UE 121 can assist communication through UE 124. At this time, UE 124 is a relay UE between UE 121 and UE 125, that is, 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.

[0168] 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 relay UE has different network states and supports different security establishment schemes.

[0169] In order to ensure communication security, secure connections need to 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 the U2U Relay scenario, how to establish a secure connection between the end-side UE and the relay UE is not yet clear in the current technical standards. Therefore, how to establish a secure connection between the end-side UE and the relay UE is still a technical problem that needs to be solved urgently.

[0170] In view of this, the present application provides a method for providing multiple optional security establishment schemes for the end-side UE using ProSe communication to adapt to the different network states of the relay UE. In this way, no matter whether the relay UE is within the network coverage or not, it can adapt to a security establishment scheme, thereby completing the security establishment between the relay UE and the end-side UE, and ensuring the security of ProSe communication.

[0171] It can be understood that although the method provided in the present application is proposed for the security establishment between the source UE and the relay UE of ProSe communication in the U2U relay service, this should not constitute any limitation on the scope of application of the method. For example, after the security establishment between the source UE and the relay UE of ProSe communication is completed, the relay UE can further establish security with the target UE of ProSe communication. At this time, the relay UE can also use the method provided below to establish security with the target UE. The following is just for the convenience of understanding and explanation, taking the security establishment between the source UE and the relay UE of ProSe communication as an example to describe the method provided in the present application.

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

[0173] 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 the present 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.

[0174] UE 1 may be the first UE initiating ProSe communication, for example, Figure 1 UE 121 in the example, UE 2 may be a potential relay UE determined by UE 1, for example, corresponding to Figure 1 In other words, UE 1 wishes to establish a secure connection with UE 2, and then assist UE 1 with a second UE (such as UE 3) through UE 2, for example, corresponding to Figure 1 UE 123 or UE 125 in the network performs ProSe communication.

[0175] See also Figure 2 , Figure 2 It is a schematic flowchart of a security establishment method provided by an embodiment of the present application. Figure 2 The process shown describes that the end-side UE actively selects a solution, and then determines the solution for establishing security between the two through negotiation with the relay UE.

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

[0177] 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.

[0178] 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 recorded as UE 2.

[0179] For the description of the scheme that relies on the network side for security establishment (or, the on-line scheme) and the scheme that does not rely on the network side for security establishment (or, the off-line scheme), please refer to the relevant description above and will not be repeated here. It should be understood that the scheme that relies on the network side for security establishment and the scheme that does 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.

[0180] In this embodiment, the solution determined by UE 1 is recorded as the target solution. UE 1 can determine that both parties support the target solution through negotiation with other communication devices (such as UE 2), and then use the target solution for secure establishment. Therefore, during the negotiation process, the target solution may change. For the convenience 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 solutions that can be used for secure establishment, and this application does not limit this.

[0181] It is understandable that, when determining the target solution, UE 1 may determine the target solution in combination with information such as its own capabilities, so the target solution is a solution supported by UE 1.

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

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

[0184] 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 of the multiple schemes. In yet another possible design, the scheme selection rule includes the aforementioned correspondence between the RSC and the scheme indication, and the priority information. The correspondence between the RSC and the scheme indication, and the priority information are described in detail below.

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

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

[0187] 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 this. For the convenience of explanation, this embodiment is described below 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.

[0188] Each RSC may correspond to one or more scheme indications, and the scheme indications corresponding to different RSCs may be the same or different. In other words, the scheme selection rule is the correspondence between one or more RSCs and one or more scheme indications, and each scheme indication is used to indicate or determine one of the multiple schemes. RSC may also correspond to U2U Relay services, and different RSCs may correspond to different U2U Relay services, or different RSCs may correspond to the same U2U Relay service.

[0189] In this embodiment, UE 1 determines to perform ProSe communication with UE 3 through the assistance of relay UE, 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 locally determine the use of the U2URelay service and then further determine the first RSC corresponding to the U2U Relay service. UE 1 can also obtain the first RSC from UE 2 in the discovery process of U2U Relay.

[0190] 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, and the two exist independently of each other, and this application does not limit this.

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

[0192] Optionally, in another implementation, in the correspondence between the ProSe code and the scheme indication in this scheme, the scheme indication may be an off-network indication, which is used to indicate that a scheme 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 scheme 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 scheme that does not rely on the network side for security establishment needs to be used.

[0193] Priority information: The above-mentioned multiple 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.

[0194] In a 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 means a higher priority, or a lower priority value means a higher priority. In one example, the priority information may be a priority value table, in which the priority values ​​of each solution are recorded.

[0195] In another possible implementation, the priority order of each solution can be reflected by the ranking of each solution among multiple solutions, for example, the earlier the solution, the higher the priority, or the later the solution, the higher the 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.

[0196] 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, the priority order of the two solutions is indicated by indicating the default solution. If the multiple solutions also include more other solutions, indicating the default solution indicates the solution with the highest priority, and the other solutions can be regarded as solutions with the same priority.

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

[0198] The aforementioned correspondence between the RSC and the scheme indication and the priority information can be used alone or in combination. For example, the first RSC corresponding to the 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 a scheme from the multiple first schemes as the target scheme.

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

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

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

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

[0203] Step 220b, UE 1 obtains a solution selection rule from the core network. For example, UE 1 obtains a solution selection rule from PCF, and the following description takes PCF as an example.

[0204] 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.

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

[0206] Exemplarily, the scheme selection rule may be determined by the PCF based on an indication of the scheme selection rule. The indication of the scheme selection rule may be understood as information for determining the scheme selection rule. The information may be, for example, the corresponding relationship between the aforementioned RSC and the scheme indication and / or may also be priority information, or may also be other information for determining the corresponding relationship between the aforementioned RSC and the scheme indication and / or priority information, which is not limited in the present application.

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

[0208] Optionally, before the AMF sends a ProSe parameter acquisition request to the PCF, the method also 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.

[0209] 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.

[0210] Since the UDM stores the contract information of each contracted UE, such as the contract information of UE 1. The contract information of UE 1 records whether UE 1 is a contracted user of ProSe. It should be understood that whether the UE is a contracted user of ProSe can be understood as whether the UE has the ProSe function. If it is a contracted user, it has the ProSe function and can obtain the authorization of ProSe; if it is not a contracted user, it does not have the ProSe function and cannot obtain the authorization of ProSe. Further, if the UE 1 is a contracted user of ProSe, the contract information also includes the aforementioned ProSe service-specific information; if the UE 1 is not a contracted user of ProSe, the UDM can reply to the PCF with a message to indicate that the UE 1 does not have the ProSe function. In this case, UE 1 cannot obtain the scheme selection rule from the PCF.

[0211] It should be understood that the above Figure 2 The example is only a possible design and should not constitute any limitation to the present application. The indication of the scheme selection rule may not be included in the service-specific information of ProSe, such as included in other information of the subscription information of UE 1, or may not be included in the subscription information of UE 1. PCF may also send the scheme selection rule to UE 1 through other processes or messages.

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

[0213] 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.

[0214] A possible implementation manner 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.

[0215] Exemplarily, UE 1 and UE 2 may discover each other through the discovery process. Since UE 1 hopes to assist UE 1 and UE 3 in ProSe communication through the relay UE, UE 1 may send the above request message to UE 2 after discovering UE 2, and the request message may 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.

[0216] Another possible implementation of step 230 is that UE 1 sends the request message by broadcasting. In other words, UE 1 does not know in advance 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.

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

[0218] An example of UE 1 and UE 2 performing a discovery process is as follows: UE 1 and UE 2 may respectively send a broadcast message on the PC5 port, and the broadcast message carries a first RSC. The first RSC may be a parameter obtained by UE 1 and UE 2 in the ProSe parameter configuration phase, respectively, wherein the ProSe parameter configuration process of UE 1 and UE 2 may be performed in the process of UE 1 and UE 2 registering with the network, respectively, or after registering with the network, or the ProSe parameter may also be a default parameter preconfigured in the device. Since the broadcast messages of UE 1 and UE 2 both carry the first RSC, this indicates that UE 1 and UE 2 have ProSe functions and UE 2 can provide U2U Relay services for UE 1, so UE 1 can determine UE 2 as a potential relay UE. It is called a potential relay UE because at this time UE 1 has not established a secure connection with UE 2, and UE 1 cannot assist UE 1 in communicating with other UEs (such as UE 3) through UE 2.

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

[0220] 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 can also discover UE 2 by directly sending the aforementioned request message without performing the discovery process.

[0221] Optionally, before step 230, the method further includes: UE 1 and UE 2 perform ProSe parameter configuration to obtain ProSe parameters. Wherein, 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 the correspondence between the first RSC and the first scheme indication. Optionally, the correspondence between the ProSe code and the scheme indication includes the 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 relevant description of the “scheme that relies on the network side for security establishment” in the above terminology description, which will not be repeated. Wherein, the ProSe parameter configuration process of UE 1 and UE 2 may be performed during the process of UE 1 and UE 2 registering with the network, respectively, or may be performed separately after registering with the network, or the ProSe parameters may also be default parameters preconfigured in the device (in this case, the preconfiguration process may be regarded as the ProSe parameter configuration process).

[0222] In the 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.

[0223] 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.

[0224] Table 1 below shows examples of each information element in the DCR message corresponding to the online solution and the offline solution, respectively, and Table 2 further shows examples of each information element in the DCR message corresponding to the control plane solution and the user plane solution, respectively. Among them, the first column is the information elements currently defined in the DCR message, which lists the information elements included in the DCR message corresponding to the offline solution and the information elements included in the DCR message corresponding to the online solution. The information element marked "optional" indicates that the information element is optional in the DCR message, and the information element not marked "optional" indicates that the information element is mandatory in the DCR message. In combination with the second and third columns, "none" in each row means that the DCR message corresponding to different solutions does not contain the information element corresponding to the row, and "yes" in each row means that the DCR message corresponding to different solutions contains the information element corresponding to the row, and the content in each row indicates that the DCR message corresponding to different solutions contains the information element corresponding to the row, and different types are defined.

[0225] Table 1

[0226] Cell Offline Solution Online Solution source user information initiating UE's app layer ID initiating UE's app layer ID ProSe Indentifier have none target user information target UE's app layer ID User info ID (Optional) key_est_info have none (Optional) Nonce_1 have have UE security capabilities have have <![CDATA[MSB of K NRP-sess ID]]> have have <![CDATA[(Optional) K NRP ID]]> have none UE PC5 signaling security policy have have RSC none have UTC-based counter LSB none have (Optional) UE ID none have (Optional) user security key ID none have (Optional) HPLMN ID none See Table 2 (Optional) MIC none have source L2 ID have have destination L2 ID have have

[0227] Table 2

[0228]

[0229]

[0230] In Table 1 and Table 2, source user information is source user information, and the source user may refer to user information of the source UE (for example, UE 1 in this embodiment), and specifically may be an application layer (application layer, app layer) identity (identity, ID) of the initiating UE (initiating UE's app layer ID); ProSe Indentifier is a ProSe identity, and the ProSe identity may be an identity of a ProSe application corresponding to a U2U Relay service (for example, UE 1 in this embodiment uses the relay service of UE 2 to establish a subsequent unicast link); target user information is target user information, and the target user may refer to a target UE (for example, UE 3 with which UE 1 in this embodiment wishes to perform ProSe communication, or UE 2 in this embodiment); target UE's app layer ID is the application layer ID of the target user; user info ID is the user information ID; key_est_info is key establishment information (key_est_info), for example, it may be an information container for mutual authentication and establishment of a unicast key; Nonce_1 and K NRP freshness parameter 1 is a random number, which 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. NRP ID is the root key K of the link NRP ID, which is only carried when the root key is already present; UE security capabilities are UE security capabilities, which may include PC5 security algorithms supported by UE; MSB of K NRP-sess ID is the session key K NRP-sessThe most significant bit (MSB) of the ID; UE PC5 signalling security policy is the UE PC5 signaling plane security policy; UE ID is the UE identifier. If the DCR message corresponding to the network solution does not carry UP-PRUK ID and CP-PRUKID (that is, the DCR message does not include the information element User security key ID), the SUCI of the UE that sends 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 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, and the source end can refer to the device from which the DCR message comes (for example, UE 1 in this embodiment); destination L2 ID is the ID of the opposite layer 2. The opposite end 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.

[0231] It can be seen from Table 1 and Table 2 that 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 signalling 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-basedcounter LSB, UE ID, user security key ID, HPLMN ID, MIC, source L2 ID or destinationL2 ID.

[0232] 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 securitykey 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.

[0233] In other words, the DCR message corresponding to the offline solution satisfies: including at least one of the cells Prose Identifier or key_est_info, and / or, excluding the cells UE ID and User security key ID. The DCR message corresponding to the online solution satisfies: including at least one of the cells UE ID, User security key ID, UTC-based counter LSB or RSC, and / or, excluding the cell key_est_info.

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

[0235] If UE 1 needs to use an off-network solution for security establishment, the DCR message will usually carry the information element key_est_info. In other words, for the off-network solution, the information element key_est_info can be distinguished from the on-network solution. Therefore, whether the DCR message is used to indicate the off-network solution can be determined by whether the DCR message contains key_est_info. Optionally, for the off-network solution, the information element Prose Identifier is a mandatory information element. Therefore, whether the DCR message is used to indicate the off-network solution can be determined by whether the DCR message contains ProseIdentifier.

[0236] If UE 1 needs to use the online solution for security establishment, the DCR message usually carries one of the information elements UE ID or user security key ID. In other words, for the online solution, the information element UE ID or user security key ID can be distinguished from the offline solution, so whether the DCR message is used to indicate the online solution can be determined by whether the DCR message contains the UE ID or the user security key ID.

[0237] Optionally, for the in-network solution, the information elements UTC-based counter LSB and RSC are mandatory information elements, so whether the DCR message is used to indicate the in-network solution can be determined by whether the DCR message contains UTC-based counter LSB and RSC. 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 network solution, the RSC in the DCR message can be used to facilitate the receiving end to determine whether the target solution is a control plane solution or a user plane solution. As mentioned above, UE 1 may obtain the correspondence between RSC and the solution before step 230, so UE 1 can determine the target solution based on the correspondence and the first RSC corresponding to the ProSe communication. Correspondingly, 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.

[0238] 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.

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

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

[0241] In the above, the DCR message is used as an example of a request message to explain in detail the request messages corresponding to different schemes and the process of determining the target scheme based on the request message. These examples are only shown for ease of understanding. This application does not exclude the possibility of defining other request messages in future protocols to implement requests with the same or similar functions as the DCR message, nor does it exclude the possibility of defining more or fewer information elements in the request message and distinguishing different schemes through other information elements.

[0242] In step 240, UE 2 sends a first message to UE 1 based on the online state, 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.

[0243] 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.

[0244] The above article uses 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.

[0245] As mentioned above, UE 2 determined as a potential relay UE may be within the network coverage, such as Figure 1 UE 122 in the network may also be out of network coverage, such as Figure 1 UE 124 in the network. UE 2 may determine whether to agree to use the target solution requested by UE 1 for security establishment based on the network status.

[0246] One possible situation is that the online state of UE 2 is within the network coverage, and UE 2 can use the online solution for security establishment, or use the offline solution for security establishment. Therefore, regardless of whether the target solution requested by UE 1 is the online solution or the 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 be used to indicate agreement to use the target solution for security establishment with UE 1.

[0247] Another possible situation is that when the online status of UE 2 is within the network coverage, UE 2 defaults to using the online solution for security establishment, and does not use the offline solution for security establishment. 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.

[0248] Another possible situation is that the online status of UE 2 is that it is not within the network coverage, and UE 2 can use the offline solution for security establishment, but cannot use the online solution for security establishment. Therefore, if the target solution requested by UE 1 is the offline solution, UE 2 can agree to use the target solution for security establishment; if the target solution requested by UE 1 is the online solution, UE 2 may not agree to use the target solution for security establishment.

[0249] UE 2 may indicate, through different messages, whether it agrees or disagrees to use the target solution to establish security with UE 1.

[0250] 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 consent to use the off-network solution to establish security 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, the direct authentication and key establishment message may implicitly indicate consent to use the off-network solution to establish security with UE 1.

[0251] For another example, the target solution is the on-line solution, and the first message may be a direct connection security mode command message, which is used to indicate that the on-line solution is used to establish security with UE 1, as shown in 240b in the figure. 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 may implicitly indicate that the on-line solution is used to establish security with UE 1.

[0252] It should be noted that in the current online solution process and offline 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 online solution or the offline 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 online solution or the offline 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, when the target solution is the online solution and UE 2 agrees to use the online solution, the first message can be a direct connection security mode command message, and before sending the first message to UE 1, UE 2 does not send a direct connection authentication and key establishment message to UE 1, then the direct connection security mode command message can implicitly indicate that it agrees to use the online solution to establish security with UE 1. For another example, UE 2 determines that it does not agree to use the target solution for security establishment based on the network status, and 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.

[0253] Furthermore, the rejection message may also be used to indicate one or more of the following: the 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.

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

[0255] It can be understood 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 choose 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.

[0256] For example, if the online status of UE 2 is not in the network coverage, and the target solution is the online solution, UE 2 can carry the reason value 2 in the rejection message to indicate that the reason for not agreeing to the target solution is that it is not in the network coverage. For another example, if UE 2 does not support the online solution, and the target solution is the online solution, UE 2 can carry the reason value 1 in the rejection message to indicate that the reason for not agreeing to the target solution is that it does not support the target solution.

[0257] It should be understood that the above examples of reasons for not agreeing to use the target solution and 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.

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

[0259] 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 to negotiate with UE 2 next time, so that both parties can complete the security establishment as soon as possible. In this way, UE 1 can perform ProSe communication with UE 3 as soon as possible.

[0260] It is understandable that the scheme supported by UE 2 can also be implicitly indicated by the scheme not supported by UE 2. Multiple schemes for security establishment are predefined, such as the aforementioned online scheme and offline scheme. For UE 2, the schemes supported and the schemes not supported by it constitute the full set of the above multiple schemes, or in other words, the schemes supported and the schemes not supported by UE 2 are complementary, so the schemes supported by UE 2 can be deduced from the schemes not supported by UE 2.

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

[0262] For example, the information carried in the rejection message may be information after confidentiality protection and / or integrity protection, or the rejection message may be a message after confidentiality protection and / or integrity protection. The key used for confidentiality protection and / or integrity protection may be the key obtained by the UE 2 and the UE 1 in the discovery process. Optionally, the key used for confidentiality protection and / or integrity protection is determined according to the long-term credentials preconfigured in the UE 2.

[0263] Correspondingly, after receiving the securely protected message, UE 1 can first perform confidentiality protection and / or integrity verification, and then obtain valid information from it. It can be understood that the key used by UE 1 to perform confidentiality protection and / or integrity verification can also be the key obtained by UE 1 and UE 2 in the discovery process. Optionally, the key used for confidentiality protection and / or integrity verification can be determined based on the long-term credentials preconfigured in the UE 1.

[0264] Whether UE 2 performs confidentiality protection and / or integrity protection on each information in the rejection message, or whether the 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.

[0265] 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.

[0266] By indicating one or more of the above, the rejection message can facilitate UE 1 to reselect the target solution based on the rejection message, and then continue to negotiate with the UE 2 to determine the solution for security establishment. For example, UE 1 can select the target solution by repeatedly executing the aforementioned step 210, and can negotiate with UE 2 for the solution for security establishment by repeatedly executing steps 230 and 240. It can be understood that when UE 1 repeats step 210, it can exclude the target solution used last time and select a solution from other solutions as the target solution, such as the target solution determined last time is solution 1, and the target solution determined this time is solution 2; when UE 1 repeats step 230, the target solution requested to be used is the reselected 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 time, such as receiving a rejection message last time, receiving a direct connection authentication and key establishment message or a direct connection security mode command message this time, or may also receive a rejection message. For the convenience of explanation, 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. That is, UE 2 agrees to use solution 2 to establish security with UE 1.

[0267] 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 a security connection with UE 1 in other ways. For example, an indication field in the first message may be used to indicate whether to agree to use the target solution to establish a security connection with UE 1, such as indicating that the target solution is not agreed to be used by indicating the field "0", and indicating that the target solution is agreed to be used by indicating the field "1"; for example, indicating that the target solution is not agreed to be used by indicating the field "00", indicating that the on-line solution is agreed to be used as the target solution by indicating the field "01", and indicating that the off-line solution is agreed to be used as the target solution by indicating the field "10". The present application does not limit the specific method in which the first message is used to indicate whether the target solution is agreed to be used.

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

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

[0270] As described above, when UE 2 executes step 240, it 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 send a request message to UE 2 again to request solution 2 for security establishment. When UE 2 executes step 240 again, it 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.

[0271] 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 multiple UEs may receive the request message. Some or all of the multiple UEs (including the above-mentioned UE 2) that receive the request message may execute the above-mentioned step 240 to send a first message to UE 1. In this case, UE 1 may execute subsequent processes based on the first message received first, or may 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 in which multiple first messages are received depends on the internal implementation of UE 1, and this application does not limit this.

[0272] As mentioned above, when the first message is used to indicate agreement to use the target solution, the agreement to use the target solution can be implicitly indicated 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 security mode command message, and implicitly indicating a solution that does not rely on the network side for security establishment through a direct 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 security 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.

[0273] In the embodiment of the present application, UE 1 initiating ProSe communication can select a target solution from multiple solutions, and negotiate with the communication device (such as 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, the target solution is re-determined to continue the 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 is conducive to the successful establishment of a secure connection.

[0274] In addition, this solution provides multiple solutions for UE 1 and UE 2 to negotiate, and the multiple solutions take into account different network conditions. On the one hand, it provides an offline solution for the case 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 the dependence on the network side. Figure 1 In the scenario shown, UE 121 wants to assist UE 124 in the communication between UE 121 and UE 125, and UE 124 is not in the network coverage, but can use the off-network solution to establish security 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 the case where UE 2 is in the network coverage, and the network device can perform security establishment for UE 1 based on the latest subscription information, thereby ensuring that the security establishment is successfully established. For example, in Figure 1 In the scenario shown, UE 121 hopes to assist UE 122 in the communication between UE 121 and UE 123, and UE 122 happens to be within the network coverage, so UE 121 can use the on-network solution or the off-network solution to establish security with UE 122. When the on-network solution is used for security establishment, since the network device can determine whether to authorize UE 121 and UE 122 based on the most recent contract information, the problem of security establishment failure caused by authority change can be avoided.

[0275] See also Figure 3 , Figure 3 It is a schematic flowchart of a security establishment method provided by an embodiment of the present application. Figure 3 The process shown describes a potential relay UE selection scheme and feedback scheme to the terminal side UE.

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

[0277] In step 310, UE 1 sends at least one request message, where the at least one request message 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.

[0278] 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.

[0279] For the description of the scheme that relies on the network side for security establishment and the scheme that does not rely on the network side for security establishment, please refer to the relevant description in the previous terminology description, which will not be repeated here. It should be understood that the scheme that relies on the network side for security establishment and the scheme that does 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.

[0280] Optionally, multiple schemes may correspond to multiple request messages, and each request message may be used to indicate a scheme. Accordingly, step 310 includes step 310a: UE 1 sends multiple request messages, each request message is used to indicate a scheme, and the schemes corresponding to the multiple request messages include: a scheme that relies on the network side for security establishment (i.e., an on-line scheme) and a scheme that does not rely on the network side for security establishment (i.e., an off-line scheme).

[0281] 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.

[0282] 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.

[0283] Each information element in a 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 of the DCR message as an example combined with Table 1 and Table 2, which will not be repeated here.

[0284] Optionally, the at least one request message is a request message, and the request message is used to indicate multiple schemes. Accordingly, step 310 includes step 310b: UE 1 sends a request message, and the request message 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. Further, the multiple schemes may include: a user plane scheme and an offline scheme; or, the multiple schemes may include: a control plane scheme and an offline scheme; or, the multiple schemes may include: a user plane scheme, a control plane scheme, and an offline scheme.

[0285] In one possible design, the request message includes an information element corresponding to each of the multiple schemes. For example, taking the aforementioned DCR message as an example, if multiple schemes are indicated by one 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 PC5signalling security policy, RSC, UTC-based counter LSB, UE ID, user security keyID, HPLMN ID, source L2 ID or destination L2 ID. That is, the DCR message may include an information element corresponding to the offline solution and an information element corresponding to the online solution. For the correspondence between the information element in the DCR message and the online solution and the offline solution, as well as the correspondence between the control plane solution and the user plane solution, please refer to the relevant description in the above method 200 in combination with Table 1 and Table 2, which will not be repeated here.

[0286] Among the above-mentioned multiple information elements, the contents of some information elements are different due to the corresponding schemes, the contents of some information elements do not change due to the corresponding schemes, and some information elements may exist in the DCR message corresponding to the online scheme but not in the DCR message corresponding to the offline scheme, or exist in the DCR message corresponding to the offline scheme but not in the DCR message corresponding to the online 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 and with the same contents in the same field of the DCR message.

[0287] 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 correspond to the same content in the offline solution and the online solution, respectively, so each information element can be carried by one field. The information elements source userinfo, target user info, etc. correspond to different contents in the offline solution and the online solution, respectively, so each information element can be carried by two fields, and the contents carried in the two fields correspond to the offline solution and the online solution, respectively. The information element key_est_info exists in the DCR message corresponding to the offline solution, and the information element UE ID or user security key ID exists in the DCR message corresponding to the online solution, so in this embodiment, one of the information elements UE ID or user security keyID, and key_est_info, can be carried by different fields in the same DCR message, respectively. In this way, information elements with the same content occupy the same field in the DCR message, and information elements with different contents occupy multiple fields in the DCR message, which can reduce unnecessary field overhead of the DCR message and save air interface overhead.

[0288] In another implementation, when constructing the above-mentioned DCR message, UE 1 may carry the information elements corresponding to the multiple schemes in multiple different fields, regardless of whether the contents carried thereon are the same. In this way, UE 1 does not need to determine which information elements have the same contents when corresponding to different schemes and which information elements have different contents when corresponding to different schemes, and the processing logic is simpler.

[0289] It should be understood that the above is only for ease of understanding, and the structural design of the request message is described by taking the information element in the DCR message as an example, which should not constitute any limitation to the present application. The present application does not limit the information element and its content included in the request message.

[0290] As mentioned 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 by 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, and 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.

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

[0292] 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.

[0293] 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.

[0294] After receiving the at least one request message, UE 2 can determine the above-mentioned multiple solutions according to the information element 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.

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

[0296] Another possible situation in which UE 2 selects a solution based on the online status is that the online status of UE 2 is not within the network coverage, and UE 2 selects the offline solution, so a second message can be sent to UE 1 to indicate the offline solution.

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

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

[0299] 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.

[0300] One possible situation is that UE 2 may further determine the target solution in combination with the solution selection rule.

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

[0302] Exemplarily, after receiving the at least one request message, UE 2 can determine the above-mentioned multiple schemes according to the at least one request message, and then select a scheme from the multiple schemes based on the network status and the scheme selection rule, and then send a second message to UE 1 to indicate the scheme selected by UE 2. The scheme selection rule can be, for example, the rules listed in the method 200 above, for example, 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 according to the reception quality or power of multiple second messages, and so on. This application includes but is not limited to this.

[0303] 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 can be found in the relevant description in step 240 of the above method 200, which will not be repeated here.

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

[0305] 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.

[0306] As mentioned above, UE 1 may receive a direct connection security mode command message in step 320a, thereby determining that the target solution is an online 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 offline solution. Optionally, UE 1 may receive a direct connection security mode command message in step 320a, and may not obtain a direct connection authentication and key establishment message from UE 2 before step 320a, thereby determining that the target solution is an online solution. In other words, UE 1 may determine a solution indicated by the second message as the target solution.

[0307] 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 element in the message.

[0308] 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.

[0309] Table 3

[0310]

[0311]

[0312] In Table 3, Nonce_2 and K NRP freshness parameter 2 is a random number, which can be a 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 ofK 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, please refer to the relevant description in 3GPP TS 33.503, which will not be described in detail in this article; EAP message is the extensible authentication protocol (EAP) message. For other information elements, please refer to the relevant description in the previous text combined with Table 1 and Table 2, which will not be repeated here.

[0313] It can be seen from Table 3 that 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, MSBof K NRP ID、LSB of K NRP-sess ID, UE PC5 signalling 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.

[0314] By comparison, it can be found that the direct security mode command message corresponding to the user plane solution includes the information elements EAPmessage and GPI, while the direct 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 security mode command message contains the information element EAPmessage to indicate the user plane solution or the control plane solution. When the direct security mode command message includes the information element EAP message, the message is used to indicate the user plane solution; when the direct 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, when the direct 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.

[0315] In the direct connection security mode command messages corresponding to the control plane solution and the user plane solution, respectively, 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 a control plane solution or a 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 based on the correspondence, 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. Correspondingly, UE 1 can determine 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.

[0316] 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 UE2 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.

[0317] 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 indicating the offline solution through "00", indicating the control plane solution through "01", and indicating the user plane solution through "10". The present application does not limit the specific manner in which the second message is used to indicate the target solution.

[0318] One possible scenario is that UE 1 may receive multiple second messages from multiple UEs. For example, UE 1 sends at least one request message by broadcasting in step 310, and multiple UEs may receive the at least one request message. Some or all of the multiple UEs (including the above-mentioned UE 2) that receive the request message may execute the above-mentioned step 320 to send a second message to UE 1. In this case, the schemes indicated by each second message may be the same or different. UE1 may further determine the target scheme in combination with the scheme selection rule.

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

[0320] 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 rule 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. The present 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 according to the reception quality or power of multiple second messages, and so on. The present application includes but is not limited to this.

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

[0322] 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 security with UE 2. Since the specific process of establishing security with UE 1 and UE 2 can refer to the existing technology, it will not be described in detail here.

[0323] 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 security mode command message, and implicitly indicating a scheme that does not rely on the network side for security establishment through a direct authentication and key establishment message. Therefore, the second communication device sending the second message to the first communication device can also be understood as the second communication device using 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 executed one by one.

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

[0325] In addition, the present solution provides a variety of solutions for UE 2 to choose from, and the various 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, and get rid of the 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 most recent 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 most recent contract information, the problem of security establishment failure caused by authority changes can be avoided. For examples of various 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.

[0326] It should be understood that Figure 2 and Figure 3 In the embodiment shown, the specific process of UE 1 and UE 2 establishing security is shown, but the process of UE 1 communicating with UE 3 through UE 2 through ProSe is not described in detail. It can be understood that if each UE conducts ProSe communication, it is necessary to initiate Figure 2 or Figure 3Before the process shown, pre-configuration is performed, for example, each UE can obtain the authorization and ProSe policy information required for the U2U Relay service. Since the pre-configuration process is not the focus of this application, its specific process can be referred to the existing technology, and this article will not describe it in detail.

[0327] The above is a detailed description of the method provided by the embodiment of the present application in combination with multiple drawings. The following is a description of the device provided by the embodiment of the present application in combination with the drawings.

[0328] Figures 4 to 6 Schematic diagram of possible devices provided for embodiments of the present application. These devices can be used to implement the functions of the first communication device (such as UE 1), the second communication device (such as UE 2) or the PCF in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.

[0329] Figure 4 is a schematic block diagram of a communication device provided in an embodiment of the present application. Figure 4 As shown, the communication device 400 includes a sending module 410 , a receiving module 420 and a processing module 430 .

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

[0331] In one possible design, the communication device 400 is used to implement Figure 2 In the method embodiment shown in FIG. 1 , the communication device 400 may be the initiator of the ProSe service, such as Figure 1 UE 121 in.

[0332] Exemplarily, the processing module 430 is used to determine a target scheme from 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; the sending module 410 is used to send a request message, and the request message is used to request the second communication device that receives the request message to use the target scheme to establish a security with the communication device 400; the receiving module 420 is used to receive a first message from the second communication device, and the first message is used to indicate whether to agree to use the target scheme to establish a security with the communication device 400.

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

[0334] 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 a 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.

[0335] In another example, the scheme selection rule includes priority information, and the priority information is used to indicate the priority order of each scheme among the multiple schemes; the processing module 430 is specifically used to determine the target scheme from the multiple schemes based on the priority order of the multiple schemes. For example, the scheme with the highest priority among the multiple schemes is determined as the target scheme.

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

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

[0338] 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.

[0339] Optionally, the target solution does not rely on the solution for security establishment on the network side, 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 communication device 400.

[0340] 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 scheme to establish security with the communication device 400, the scheme for security establishment supported by the second communication device, or the scheme for security establishment not supported by the second communication device.

[0341] In another possible design, the communication device 400 is used to implement Figure 2 In the method embodiment shown in FIG. 1 , the function of UE 2 is shown. At this time, the communication device 400 may be a U2U Relay in a ProSe service, such as Figure 1 UE 122 or UE 124 in.

[0342] Exemplarily, the receiving module 420 is used to receive a request message from the first communication device, where the request message is used to request the communication device 400 to establish a security connection 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 connection or a solution that does not rely on the network side for security connection; the sending module 410 is used to send a first message to the first communication device based on the network status, 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, where the network status includes: being within the network coverage or not being within the network coverage.

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

[0344] 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.

[0345] 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.

[0346] 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 to establish security with the first communication device.

[0347] 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.

[0348] 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.

[0349] Optionally, in the case that the communication device 400 does not agree to use the target scheme to establish a security connection 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 connection 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.

[0350] 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.

[0351] In the above two possible designs, optionally, the target scheme is a scheme 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.

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

[0353] Correspondingly, the request message further includes an RSC, where the RSC 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.

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

[0355] 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 security establishment and schemes that do not rely on the network side for security establishment, and the first communication device is a device that initiates proximity service communications; the sending module 410 is also used to send the scheme selection rule to the first communication device.

[0356] Optionally, the scheme selection rule includes a correspondence between a first RSC corresponding to the proximity service communication and a first scheme indication, where the first scheme indication is used to indicate a first scheme among the multiple schemes.

[0357] Optionally, the scheme selection rule includes priority information, and the priority information is used to indicate the priority order of the multiple schemes.

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

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

[0360] In another embodiment, the communication device 400 may be used to implement the above Figure 3 The function of UE 1 in the method embodiment shown in FIG. 1 ; or, it can be used to implement the above Figure 3Functions of UE 2 in the method embodiment shown.

[0361] In one possible design, the communication device 400 is used to implement Figure 3 In the method embodiment shown in FIG. 1 , the communication device 400 may be the initiator of the ProSe service, such as Figure 1 UE 121 in.

[0362] Exemplarily, the sending module 410 is used to send 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; the receiving module 420 is used to receive a second message from a second communication device, and the second message is used to indicate the use of one of the multiple schemes to establish security with the communication device 400.

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

[0364] 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.

[0365] In another example, 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; the processing module 430 is specifically used to determine 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.

[0366] Further, the receiving module 420 is specifically used to receive multiple second messages from multiple second communication devices; the processing module 430 is specifically used to determine the solution indicated by one second message among the multiple second messages as the target solution based on the solution selection rule.

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

[0368] 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.

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

[0370] Furthermore, the second message is a direct connection safety mode command message.

[0371] 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.

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

[0373] 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 schemes.

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

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

[0376] For a more detailed description of the sending module 410, the receiving module 420 and the processing module 430, please refer to the reference Figure 2 or Figure 3 The relevant description in the illustrated method embodiment is directly obtained and will not be repeated here.

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

[0378] Optionally, in one design, the processor 510 may include a program (also referred to as code or instruction), which may be executed on the processor 510 to enable the communication device 500 to perform the method performed by the UE 1, UE2, or PCF in the above method embodiment. In another possible design, the communication device 500 includes a circuit ( Figure 5 The circuit is used to implement the functions of UE 1, UE 2 or PCF in the above method embodiments.

[0379] For example, the processor 510 may be configured to execute computer programs or instructions in the memory to implement Figure 2 The steps performed by UE 1, UE 2 or PCF in the embodiment shown, or, to implement Figure 3 The steps in the illustrated embodiment are performed by UE 1 or UE 2.

[0380] 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 executed by UE 1, UE 2 or PCF in the above embodiments.

[0381] Optionally, the processor 510 and / or the memory 520 may include an artificial intelligence (AI) module, and the AI ​​module is used to implement AI-related functions. The AI ​​module may be implemented by 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.

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

[0383] 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, a transceiver, a transceiver circuit, or a transceiver, etc., which is used to implement the transceiver function of the communication device. It is understandable that the communication interface 530 may be a transceiver or an input / output interface.

[0384] When the communication device 500 is used to implement Figure 2 or Figure 3 In the method embodiment shown, the processor 510 is used to execute the functions of the above processing unit, and the communication interface 530 is used to execute the functions of the above sending module and receiving module. Whether the communication interface 530 is used for sending or receiving can be determined by whether it is used for performing a sending action or a receiving action in the scheme executed by the communication device 500.

[0385] 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 an 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 an antenna) in UE 1, and the signal may be sent from UE 1 to UE 2.

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

[0387] It can be understood that when the communication device 500 is UE 1 or UE 2, the communication interface 530 can be a transceiver, which can specifically include a transmitter and a receiver, the transmitter is used to send 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 can be an input-output circuit, wherein the input circuit can be used for receiving, and the output interface can be used for sending.

[0388] Figure 6 Schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 6 As shown, the terminal device 600 can be applied to Figure 1In the scenario shown, the functions of UE 1 or UE 2 in the above method embodiment are performed. 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, and 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, which is used to send the uplink data or uplink control signaling output by the transceiver 602 through a wireless signal.

[0389] The processor 601 and the memory 603 may be combined into a processing device, and the processor 601 is used to execute the program code stored in the memory 603 to implement the above functions. In specific implementation, the memory 603 may also be integrated into the processor 601, or independent of the processor 601. Figure 4 The processing module in Figure 5 The processor in corresponds to .

[0390] The transceiver 602 can be used with Figure 4 The sending module and receiving module in Figure 5 The communication interface in the communication device 600 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.

[0391] It should be understood that Figure 6 The terminal device 600 shown can implement Figure 2 or Figure 3 The method embodiment shown involves various processes of UE 1 or various processes of UE 2. The operations and / or functions of various modules in the terminal device 600 are respectively to implement the corresponding processes in the above method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.

[0392] The processor 601 can be used to execute the actions implemented by the terminal device in the previous method embodiment, and the transceiver 602 can be used to execute the actions of the terminal device sending to or receiving from the network device in the previous method embodiment. Please refer to the description in the previous method embodiment for details, which will not be repeated here.

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

[0394] In addition, in order to make the functions of the terminal device more complete, the terminal device 600 may 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 may also include a speaker 608a, a microphone 608b, etc.

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

[0396] 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.

[0397] The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0398] 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 (DDRSDRAM), 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.

[0399] 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.

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

[0401] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0402] The present application also provides a computer program product, which includes: a computer program (also referred to as code or instruction), when the computer program is executed, Figure 2 In the embodiment shown, the method executed by UE 1 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 executed, Figure 3 In the illustrated embodiment, the method executed by UE 1 is executed, or the method executed by UE 2 is executed.

[0403] The present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, Figure 2 In the embodiment shown, the method executed by UE 1 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 executed, Figure 3 In the illustrated embodiment, the method executed by UE 1 is executed, or the method executed by UE 2 is executed.

[0404] 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.

[0405] The method provided in the above embodiment can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it 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 a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital user (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. 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. 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 disk (SSD)), etc.

[0406] Those of ordinary skill 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 to be beyond the scope of this application.

[0407] Those skilled in the art can 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.

[0408] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0410] 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.

[0411] 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 can essentially or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0412] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A secure establishment method, It is characterized in that A first communication device for initiating proximity service communication, the method comprising: Determine a target solution from a plurality of solutions, the plurality of solutions including: a solution that relies on a network side for security establishment and a solution that does not rely on a network side for security establishment; Sending a request message, wherein the request message is used to request a second communication device that has received the request message to use the target solution to perform a security establishment with the first communication device; A first message is received from the second communication device, where the first message is used to indicate whether to agree to use the target scheme to perform a security establishment with the first communication device.

2. The method according to claim 1, It is 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, It is 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, It is 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-PRUK ID, or a user hidden identifier SUCI.

5. The method according to claim 4, It is 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, It is 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 6, It is characterized in that The step of determining a target solution from a plurality of solutions comprises: The target solution is determined from the multiple solutions based on a solution selection rule.

8. The method according to claim 7, It is characterized in that The scheme selection rule includes a correspondence between a first RSC corresponding to the proximity service communication and a first scheme indication, wherein the first scheme indication is used to indicate a first scheme among the multiple schemes; as well as The method of determining a target solution from a plurality of solutions based on a solution selection rule includes: Based on the corresponding relationship, a first solution corresponding to the first solution indication is determined as the target solution.

9. The method according to claim 7, It is characterized in that The scheme selection rule includes priority information, and the priority information is used to indicate the priority order of each scheme among the multiple schemes; as well as The method of determining a target solution from a plurality of solutions based on a solution selection rule includes: The target solution is determined from the multiple solutions based on the priority order of the multiple solutions.

10. The method according to any one of claims 7 to 9, It is characterized in that The method further comprises: The scheme selection rule is received from a policy control function PCF.

11. The method according to claim 10, It is characterized in that The scheme selection rule 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 3, 6 to 11, It is 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.

13. The method according to any one of claims 1, 2, 4 to 11, It is 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.

14. The method according to any one of claims 1 to 11, It is 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.

15. A secure establishment method, It is 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, 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.

16. The method of claim 15, It is 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.

17. The method according to claim 15 or 16, It is 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.

18. The method according to claim 15 or 16, It is 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-PRUK ID, or a user hidden identifier SUCI.

19. The method of claim 18, It is 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.

20. The method of claim 19, It is 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.

21. The method according to claim 15 or 16, It is 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 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; 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.

22. The method according to any one of claims 15 to 17 or 21, It is 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.

23. The method of any one of claims 15, 16, 18 to 21, It is 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.

24. The method according to any one of claims 15 to 21, It is 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.

25. A communication device, It is 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 14, or, is used to implement the method according to any one of claims 15 to 24.

26. A communication device, It is 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 14, or is used to implement the method according to any one of claims 15 to 24.

Citation Information

Cited By

  • Security establishment method and related apparatus

    EP4668819A1

  • Security establishment method and related apparatus

    WO2024199060A1