Security negotiation-based communication method, and apparatus
By negotiating and determining the security algorithm between the two parties to the communication, the problem of difficulty in effectively determining the security algorithm in the prior art is solved, and the effect of improving communication security is achieved.
Patent Information
- Application Number
- PCT/CN2024/112110
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-28
- Filing Date
- 2024-08-14
- Publication Date
- 2025-03-06
AI Technical Summary
The prior art is difficult to effectively determine the security algorithm between the two parties in the communication, which affects the confidentiality and integrity of information transmission.
By negotiating between the two parties of the communication, the supported security algorithms and unsafe algorithms are determined, and the security algorithms are preferred for communication to improve communication security.
It realizes the negotiation of a security algorithm between the two parties to the communication, reduces the confidentiality and integrity of information transmission, and improves the security of communication.
Smart Images

Figure CN2024112110_06032025_PF_FP_ABST
Abstract
Description
A communication method and device based on security negotiation
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 28, 2023, with application number 202311096346.1 and application name “A communication method and device based on security negotiation”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of communication technology, and in particular to a communication method and device based on security negotiation. Background Art
[0004] In a communication system, the sending device in both communicating parties can encrypt the information to be transmitted using an encryption algorithm, and the receiving device in both communicating parties can decrypt the received information using a decryption algorithm, thereby ensuring the security of the information transmitted between the sending device and the receiving device.
[0005] How to enable both communicating parties to effectively determine the security algorithm requires further research.
[0006] Summary of the Invention
[0007] The present application provides a communication method and apparatus for improving the security of an algorithm determined during security negotiation.
[0008] In a first aspect, an embodiment of the present application provides a communication method, which can be applied to a second device. The second device can be a communication device or a module in the communication device (such as a circuit, chip, chip system or processor). It can also be a logical node, logic module or software that can realize all or part of the functions of the communication device, or it can be a hardware circuit + software module, without limitation. The method may include: receiving proposal information from a first device; the proposal information can be used to indicate at least two algorithms of a first algorithm type supported by the first device, the at least two algorithms including M secure algorithms and N unsecure algorithms, M and N being positive integers; when the second device supports a first secure algorithm among the M secure algorithms and a first unsecure algorithm among the N unsecure algorithms, sending first information to the first device, the first information is used to indicate a first secure algorithm, and the first secure algorithm is used to communicate with the first device.
[0009] Through this method, when the first device and the second device both support the first security algorithm and the first unsecure algorithm, the algorithm negotiated by the first device and the second device is a secure algorithm rather than an unsecure algorithm, thereby reducing the impact on the confidentiality and integrity of information transmitted between the first device and the second device and improving the security of communication between the first device and the second device.
[0010] In one possible design, the method further includes receiving second information. The second information may be used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set. The first secure algorithm set includes the first secure algorithm, and the first unsecure algorithm set includes the first unsecure algorithm. With this design, the second device can determine which algorithms are secure based on the second information. In this way, regardless of how the algorithm indication information in the proposal information is ordered, the second device can select a secure algorithm supported by both the first and second devices, thereby improving the security of communication between the first and second devices.
[0011] In one possible design, the proposed information may include indication information for each of the at least two algorithms, with the indication information for M1 secure algorithms among the M secure algorithms positioned before the indication information for N1 unsecure algorithms among the N unsecure algorithms. The remaining secure algorithms among the M secure algorithms, excluding the M1 secure algorithms, are positioned after the M1 secure algorithms, and the remaining unsecure algorithms among the N unsecure algorithms, excluding the N1 unsecure algorithms, are positioned after the N1 unsecure algorithms. M1 is a positive integer less than or equal to M, and N1 is a positive integer less than or equal to N.
[0012] Optionally, the first security algorithm is a first security algorithm supported by the second device among at least two algorithms in the order of indication information of each algorithm in the proposal information from front to back.
[0013] Since in the proposal information, the indication information of M1 security algorithms among the M security algorithms is located below the indication information of N1 unsafe algorithms among the N unsafe algorithms, the second device can preferentially select the security algorithm supported by the second device from the M1 security algorithms as the first security algorithm, thereby quickly negotiating a security algorithm supported by both the first device and the second device, thereby improving the security of communication between the first device and the second device.
[0014] In one possible design, the M security algorithms may satisfy at least one of the following conditions:
[0015] 1. Among the M security algorithms, the earlier the security algorithm is determined as a security algorithm, the lower it is ranked among the M security algorithms. In this way, the first device and the second device can preferentially negotiate the latest security algorithm for communication.
[0016] 2. Among the M security algorithms, a security algorithm with a higher security factor is ranked higher in the M security algorithms. In this way, the first device and the second device can preferentially negotiate a security algorithm with a higher security factor for communication, thereby further improving the security of communication between the first device and the second device.
[0017] In one possible design, the first algorithm type includes one of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm, or a pseudorandom algorithm. This design is applicable to security negotiation of multiple algorithm types. In this way, the first device and the second device can negotiate security algorithms of multiple algorithm types, thereby improving the security of communication between the first device and the second device.
[0018] In a second aspect, an embodiment of the present application provides a communication method, which can be applied to a first device. The first device can be a communication device or a module in a communication device (such as a circuit, chip, chip system or processor), or a logical node, logic module or software that can implement all or part of the functions of the communication device, or a hardware circuit + software module, without limitation. The method may include: sending proposal information to a second device, where the proposal information can be used to indicate at least two algorithms of a first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; and receiving first information from the second device, where the first information is used to indicate a first security algorithm, where the first security algorithm is used to communicate with the second device.
[0019] In one possible design, the proposed information includes indication information for each of at least two algorithms, and the indication information for M1 secure algorithms among the M secure algorithms is located before the indication information for N1 unsecure algorithms among the N unsecure algorithms. The remaining secure algorithms among the M secure algorithms, excluding the M1 secure algorithms, are located after the M1 secure algorithms, and the remaining unsecure algorithms among the N unsecure algorithms, excluding the N1 unsecure algorithms, are located after the N1 unsecure algorithms. M1 is a positive integer less than or equal to M, and N1 is a positive integer less than or equal to N.
[0020] In one possible design, the M security algorithms meet at least one of the following conditions:
[0021] 1. Among the M security algorithms, the earlier a security algorithm is determined as a security algorithm, the lower its ranking among the M security algorithms.
[0022] 2. Among the M security algorithms, the security algorithm with a higher security factor is ranked higher among the M security algorithms.
[0023] In one possible design, the method further includes: receiving third information. The third information is used to indicate at least one of the following: a second secure algorithm set or a second unsecure algorithm set, wherein the second secure algorithm set includes M secure algorithms and the second unsecure algorithm set includes N unsecure algorithms.
[0024] In one possible design, the first algorithm type includes one of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm, or a pseudo-random algorithm.
[0025] In a third aspect, embodiments of the present application provide a communication method that can be applied to a third device, which can be a server or a module in a server (e.g., a circuit, chip, chip system, or processor), or a logical node, logic module, or software that can implement all or part of the server's functions, or a hardware circuit + software module, without limitation. The method can include: determining and outputting second information, where the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set.
[0026] Through this method, the third device can output second information indicating at least one item in the first secure algorithm set or the first unsecure algorithm set, thereby enabling the device receiving the second information to promptly determine which algorithms are secure and which are unsecure. Thus, when both the first and second devices support the first secure algorithm and the first unsecure algorithm, the algorithm negotiated between the first and second devices is a secure algorithm, rather than an unsecure algorithm, thereby improving the security of communication between the first and second devices. Furthermore, in this method, the third device outputs the second information, rather than manually configuring at least one item in the first secure algorithm set or the first unsecure algorithm set. This reduces configuration operations required by administrators and improves the efficiency of configuring at least one item in the first secure algorithm set or the first unsecure algorithm set.
[0027] One possible design further includes outputting at least one of the following:
[0028] 1. The safety coefficient of each security algorithm in the first security algorithm set. In this way, at least one of the first device or the second device can promptly obtain the safety coefficient of each security algorithm in the first security algorithm set.
[0029] 2. Information indicating the output time of the second information. In this way, at least one of the first device or the second device can promptly learn the output time of the second information.
[0030] In a fourth aspect, the present application provides a communication device, which may be a second device. The communication device is capable of implementing the functions of the first aspect. For example, the communication device includes a module, unit, or means corresponding to performing the operations involved in the first aspect. The module, unit, or means may be implemented through software or hardware, or the corresponding software implementation may be executed by hardware.
[0031] In one possible design, the communication device includes a processing unit and an interface unit, wherein the interface unit can be used to send and receive signals to enable communication between the communication device and other devices; and the processing unit can be used to perform certain internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations described in the first aspect above.
[0032] In one possible design, the communication device includes a processor, the processor being configured to implement the functionality of the first aspect. In one possible implementation, the processor is coupled to a memory, the memory being configured to store a computer program or instructions for implementing the functionality of the first aspect. The processor is configured to execute the computer program or instructions stored in the memory. When the computer program or instructions are executed, the communication device implements the method of any possible design of the first aspect.
[0033] Optionally, the communication device also includes a memory.
[0034] In one possible design, the communication device includes a processor and an interface circuit, wherein the processor is used to communicate with other devices through the interface circuit and execute the method in any possible design of the first aspect above.
[0035] In a fifth aspect, the present application provides a communication device, which may be a first device. The communication device is capable of implementing the functions of the second aspect. For example, the communication device includes a module, unit, or means corresponding to performing the operations involved in the second aspect. The module, unit, or means may be implemented through software or hardware, or the corresponding software implementation may be executed by hardware.
[0036] In one possible design, the communication device includes a processing unit and an interface unit, wherein the interface unit can be used to send and receive signals to enable communication between the communication device and other devices; and the processing unit can be used to perform certain internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations described in the second aspect above.
[0037] In one possible design, the communication device includes a processor, the processor being configured to implement the functionality of the second aspect. In one possible implementation, the processor is coupled to a memory. The memory may store a computer program or instructions for implementing the functionality of the second aspect. The processor may execute the computer program or instructions stored in the memory. When the computer program or instructions are executed, the communication device implements the method of any possible design of the second aspect.
[0038] Optionally, the communication device also includes a memory.
[0039] In one possible design, the communication device includes a processor and an interface circuit, wherein the processor is used to communicate with other devices through the interface circuit and execute the method in any possible design of the second aspect above.
[0040] In a sixth aspect, the present application provides a communication device, which may be a third device. The communication device is capable of implementing the functions of the third aspect. For example, the communication device includes a module, unit, or means corresponding to performing the operations involved in the third aspect. The module, unit, or means may be implemented through software or hardware, or the corresponding software implementation may be executed by hardware.
[0041] In one possible design, the communication device includes a processing unit and an interface unit, wherein the interface unit can be used to send and receive signals to enable communication between the communication device and other devices; and the processing unit can be used to perform certain internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations described in the third aspect above.
[0042] In one possible design, the communication device includes a processor, the processor being configured to implement the functionality of the third aspect. In one possible implementation, the processor is coupled to a memory. The memory may store a computer program or instructions for implementing the functionality of the third aspect. The processor may execute the computer program or instructions stored in the memory. When the computer program or instructions are executed, the communication device implements the method of any possible design of the third aspect.
[0043] Optionally, the communication device also includes a memory.
[0044] In one possible design, the communication device includes a processor and an interface circuit, wherein the processor is used to communicate with other devices through the interface circuit and execute the method in any possible design of the third aspect above.
[0045] In a seventh aspect, the present application provides a communication system, which may include at least two of the communication device described in the fourth aspect, the communication device described in the fifth aspect, and the communication device described in the sixth aspect.
[0046] In an eighth aspect, the present application provides a computer-readable storage medium, in which computer-readable instructions are stored. When a computer reads and executes the computer-readable instructions, the computer executes a method in any possible design of any aspect from the first to the third aspects mentioned above.
[0047] In a ninth aspect, the present application provides a computer program product, comprising: a computer program code, which, when read and executed by a computer, enables the computer to execute a method in any possible design of any one of the first to third aspects above.
[0048] In a tenth aspect, the present application provides a chip, which is used to read a computer program stored in a memory to execute a method in any possible design of any aspect from the first to the third aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] FIG1 is a flow chart of a communication method provided in an embodiment of the present application;
[0050] FIG2 is a flow chart of another communication method provided in an embodiment of the present application;
[0051] FIG3 is a structural diagram of a communication device provided in an embodiment of the present application;
[0052] FIG4 is a structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The present application provides a communication method and apparatus, wherein the method and apparatus are based on the same technical concept, and thus the implementation of the method and apparatus can refer to each other, and the repeated parts will not be repeated.
[0054] Below, some of the terms used in this application are explained to facilitate understanding.
[0055] 1) Communication equipment generally refers to equipment with communication functions.
[0056] In some examples, the communication device may be a device in a mobile communication system. For example, a terminal, an access network (AN) device, or a core network device. The mobile communication system may be, for example, a universal mobile telecommunications system (UMTS), a wireless local area network (WLAN), a wireless fidelity (Wi-Fi) system, a 4th generation (4G) mobile communication system (such as a long term evolution (LTE) system), a 5th generation (5G) mobile communication system (such as a new radio (NR) system), or a future evolved communication system (such as a 6th generation (6G) mobile communication system). Alternatively, the mobile communication system may be a fusion of at least two of the above communication systems.
[0057] In other examples, the communication device may also be a device in other communication systems. For example, the communication device may be a communication node in a network such as an optical transmission network, a cloud core network, a network address translation (NAT) traversal network, or a space transmission network.
[0058] In this application, a communication device that performs security negotiation may also be referred to as an Internet Key Exchange (IKE) device or an IKE peer device.
[0059] 2) Access network equipment is a device in the radio access network (RAN) that helps terminals achieve wireless access. Access network equipment can also be called access network nodes.
[0060] The RAN can be a cellular system related to the Third Generation Partnership Project (3GPP), for example, a 4G mobile communication system such as LTE, a 5G mobile communication system such as NR, or a future-oriented evolution system (such as a 6G mobile communication system). The RAN can also be an open access network (O-RAN or ORAN), a cloud radio access network (CRAN), etc. The RAN can also be a communication system that integrates two or more of the above systems.
[0061] In one possible scenario, the access network device may be a base station, an evolved NodeB (eNodeB), an access point (AP), a transmission reception point (TRP), a next generation NodeB (gNB), a next generation base station in a 6G mobile communication system, a base station in a future mobile communication system, etc. The access network device may 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 CRAN scenario. Optionally, the access network device may also be a server, a wearable device, a vehicle or an on-board device, etc. For example, the access network device in the vehicle to everything (V2X) technology may be a road side unit (RSU). All or part of the functions of the access network device in this application may also be implemented by software functions running on hardware, or by virtualization functions instantiated on a platform (such as a cloud platform). The access network device in this application may also be a logical node, a logical module or software that can implement all or part of the functions of the access network device.
[0062] In another possible scenario, multiple access network devices collaborate to assist the terminal in achieving wireless access, and different access network devices respectively implement part of the functions of the base station. For example, the access network device can be a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU). The CU and DU can be set separately, or they can be included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH).
[0063] 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 O-CU (Open CU), DU may also be called O-DU, CU-CP may also be called O-CU-CP, CU-UP may also be called O-CU-UP, and RU may also be called O-RU. For the convenience of description, this application uses CU, CU-CP, CU-UP, DU and RU as examples for description. Any unit of CU (or CU-CP, CU-UP), DU and RU in this application can be implemented by a software module, a hardware module, or a combination of a software module and a hardware module.
[0064] 3) Core network devices are network elements within the core network. Core network devices connect terminals to different data networks and perform at least one of the following services: billing, mobility management, session management, and user plane forwarding. In communication systems of different standards, the names of core network devices with the same function may vary. However, the embodiments of this application do not limit the specific names of core network devices for each function.
[0065] For example, in the 4G mobile communication system, the network element responsible for access control, security control and signaling coordination is the mobility management entity (MME); the network element serving as the local mobility management anchor point is the serving gateway (S-GW); the network element serving as the anchor point for switching to the external data network and responsible for allocating Internet protocol (IP) addresses is the packet data network (PDN) gateway (P-GW); the network element storing user-related data and subscription data is the home subscriber server (HSS); the network element responsible for policy and billing functions is called the policy and charging rule function (PCRF) network element.
[0066] For example, in a 5G mobile communication system, the core network can be divided into a control plane (CP) and a user plane (UP) based on specific logical functions. The network elements in the core network responsible for control plane functions can be collectively referred to as control plane network elements, and the network elements responsible for user plane functions can be collectively referred to as user plane network elements. Specifically, in the user plane, the network element that serves as the interface to the data network and is responsible for functions such as user plane data forwarding is the user plane function (UPF) network element. In the control plane, the network element responsible for access control and mobility management functions is called the access and mobility management function (AMF) network element; the network element responsible for session management and control policy execution is called the session management function (SMF) network element; the network element responsible for managing subscription data, user access authorization, and other functions is called the unified data management (UDM) network element; the network element responsible for billing and policy control functions is called the policy control function (PCF) network element; and the application function (AF) network element is responsible for transmitting the application side's requirements to the network side.
[0067] 4) Terminal, which can also be called terminal equipment, user equipment (UE), mobile station, or mobile terminal. Terminals can be widely used in various scenarios, such as device-to-device (D2D), V2X communication, machine-type communication (MTC), Internet of Things (IOT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grid, smart furniture, smart office, smart wearable, smart transportation, or smart city. The terminal can be a mobile phone, tablet computer, computer with wireless transceiver function, wearable device, vehicle, drone, helicopter, airplane, ship, robot, robotic arm, smart home device, etc. The embodiments of this application do not limit the device form of the terminal.
[0068] 5) Secure algorithms and unsafe algorithms:
[0069] Algorithms can be categorized as secure or unsecure based on their security. Secure algorithms are more secure than unsecure algorithms. For example, when a secure algorithm is used to process transmitted information, the duration of time it takes for a non-target receiving node to parse the information is greater than or equal to a threshold duration. When an unsecure algorithm is used to process transmitted information, the duration of time it takes for a non-target receiving node to parse the information is less than the threshold duration. This threshold duration can be pre-configured, for example, as specified by a protocol.
[0070] Whether an algorithm is a secure algorithm or an unsecure algorithm may be pre-configured, such as specified in a protocol, or may be notified / indicated to the communication device by other devices (eg, a server), without limitation.
[0071] In the following text of this application, "sending information to a device (such as a terminal)" can be understood as the destination of the information being the device, and can include sending information to the device directly or indirectly. "Receiving information from a device (such as a terminal)" or "receiving information from a device (such as a terminal)" can be understood as the source of the information being the device, and can include receiving information from the device directly or indirectly. The information may be processed as necessary between the source and destination of the information, such as format changes, 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 here.
[0072] To improve communication security, a security negotiation can be used to determine the algorithm used by both parties. The following describes the security negotiation method using communication devices A and B as an example. As shown in Figure 1, the security negotiation method may include:
[0073] S101: Communication device A sends a security association (SA) initialization (SA Init) request message to communication device B.
[0074] The SA Init request message includes a payload carrying proposal information. The proposal information can be used to indicate the algorithms supported by communication device A. Exemplarily, the proposal information may include one or more transform information, each of which may indicate an algorithm of a type supported by communication device A. In each transform information, the algorithms are sorted according to the size of the algorithm identifier (ID). The smaller the algorithm ID, the higher the order of the algorithm. Since the ID of an unsafe algorithm is usually smaller than the ID of a safe algorithm, when the algorithms indicated by a certain transform information include both a safe algorithm and an unsafe algorithm, the ID of the unsafe algorithm is located before the ID of the safe algorithm.
[0075] For example (hereinafter referred to as Example 1), the proposal information includes three transformation information: encryption algorithm transformation information, integrity algorithm transformation information, and key exchange algorithm (such as the Diffie-Hellman (DH) algorithm) transformation information. In other words, the proposal information indicates the three algorithm types supported by communication device A: encryption algorithm, integrity algorithm, and DH algorithm.
[0076] 1. Encryption algorithm transformation information:
[0077] Communication device A supports the following encryption algorithms: Triple Data Encryption Standard (3DES), Advanced Encryption Standard Cipher Block Chaining Mode (AESCBC)128, and Advanced Encryption Standard Galois / Counter Mode (AESGCM)128. 3DES is an insecure algorithm, while AESCBC128 and AESGCM128 are secure algorithms. The ID of 3DES is smaller than those of AESCBC128 and AESGCM128. In the encryption algorithm transformation information, the IDs of the algorithms are listed in the following order: 3DES, AESCBC128, and AESGCM128.
[0078] 2. Integrity algorithm transformation information:
[0079] Communication device A supports the following integrity algorithms: Secure Hash Algorithm (SHA) 1, SHA2-256, SHA2-512, and SHA3-256. SHA1 is an insecure algorithm, while SHA2-256, SHA2-512, and SHA3-256 are secure algorithms. The ID of SHA1 is smaller than the IDs of SHA2-256, SHA2-512, and SHA3-256. In the integrity algorithm transformation information, the IDs of the algorithms are listed in the following order: SHA1, SHA2-256, SHA2-512, and SHA3-256.
[0080] 3. DH algorithm transformation information:
[0081] Communication device A supports the following DH algorithms: DH1, DH5, DH14, DH19, and DH31. DH1, DH5, and DH14 are insecure algorithms, while DH19 and DH31 are secure algorithms. The IDs of DH1, DH5, and DH14 are smaller than those of DH19 and DH31. In the DH algorithm transformation information, the algorithm IDs are listed in the following order: DH1, DH5, DH14, DH19, and DH31.
[0082] S102: Communication device B determines the algorithm used by communication device A and communication device B for communication based on the SA Init request message.
[0083] For each transformation information item, communication device B can select an algorithm supported by communication device B, in descending order of the algorithm IDs, as the algorithm to be used when communicating between communication device A and communication device B. For example, using Example 1 again, if communication device B and communication device A support exactly the same algorithms, the algorithms selected by communication device B include: 3DES, SHA1, and DH1.
[0084] S103: Communication device B sends an SA initialization (Init) response message to communication device A.
[0085] The SA Init response message may be used to indicate the algorithm determined in S102 by communication device B. For example, if the algorithms selected by communication device B include 3DES, SHA1, and DH1, the SA Init response message may include the ID of 3DES, the ID of SHA1, and the ID of DH1.
[0086] Using the method shown in Figure 1, when communication devices A and B support both secure and insecure algorithms, the negotiated algorithm is typically an insecure algorithm. If communication devices A and B use an insecure algorithm to communicate, the confidentiality and integrity of information transmitted between them will be compromised, thereby reducing the security of the communication.
[0087] In view of this, an embodiment of the present application provides a communication method. Figure 2 is a flow chart corresponding to the communication method provided in an embodiment of the present application. Figure 2 illustrates the method by taking the first device and the second device as the execution subjects of the interaction as an example, but the present application does not limit the execution subjects of the interaction. For example, the first device and the second device can be two communication devices that interact, or they can be modules in two communication devices that interact, such as circuits, chips, chip systems or processors, or they can be logical nodes, logical modules or software that can implement all or part of the functions of the communication device.
[0088] S201: The first device sends proposal information to the second device; correspondingly, the second device receives the proposal information from the first device.
[0089] The proposal information may be used to indicate at least two algorithms of the first algorithm type supported by the first device. The at least two algorithms may include M secure algorithms and N unsecure algorithms, where M and N are positive integers. The proposal information may directly indicate the at least two algorithms, for example, by including indication information (e.g., IDs) of the at least two algorithms; or the proposal information may indirectly indicate the at least two algorithms, for example, by including information corresponding to the at least two algorithms.
[0090] Exemplarily, the first algorithm type includes one of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm (such as a DH algorithm or other key exchange algorithm, without limitation), or a pseudorandom algorithm. At least two algorithms of the first algorithm type may be encapsulated in the transformation information corresponding to the first algorithm type. For example, when the first algorithm type is an encryption algorithm, the at least two algorithms of the first algorithm type may be encapsulated in the encryption algorithm transformation information.
[0091] It should be understood that the proposal information may be carried in a traditional message (eg, SA Init request message) or in a new message, which is not limited in this application.
[0092] In one possible implementation, the M security algorithms indicated by the proposal information are all security algorithms of the first algorithm type supported by the first device. This method allows for the negotiation of security algorithms with the second device to the greatest extent possible. In another possible implementation, the M security algorithms indicated by the proposal information are some of the security algorithms of the first algorithm type supported by the first device. This method reduces signaling overhead. Similarly, the N unsafe algorithms indicated by the proposal information are all or some of the unsafe algorithms of the first algorithm type supported by the first device, without limitation.
[0093] S202: When the second device supports a first security algorithm among the M security algorithms and a first unsafe algorithm among the N unsafe algorithms, the second device sends first information to the first device; correspondingly, the first device receives the first information from the second device.
[0094] The first information may be used to indicate a first security algorithm. For example, the first information includes information indicating the first security algorithm (eg, an ID). The first security algorithm may be used for communication between the first device and the second device.
[0095] The security algorithms supported by the first device indicated by the proposal information, the security algorithms supported by the second device, and the first security algorithm indicated by the first information may be multiple, without limitation. Table 1 shows several possible examples. The unsecure algorithms supported by the first device indicated by the proposal information, the unsecure algorithms supported by the second device, and the first unsecure algorithm may also be multiple, without limitation. Table 2 shows several possible examples. Any example in Table 1 may be combined with any example in Table 2.
[0096] Table 1
[0097] Table 2
[0098] The following uses an encryption algorithm, an integrity algorithm, and a key exchange algorithm as examples to illustrate the first security algorithm indicated by the first information.
[0099] For example, the first algorithm type is an encryption algorithm. Among the encryption algorithms supported by the first device, the M secure algorithms include AESCBC128 and AESGCM128, and among the N unsecure algorithms supported by the first device include 3DES. If the second device supports 3DES, AESCBC128, and AESGCM128, the first security algorithm may be one of AESCBC128 and AESGCM128.
[0100] For another example, the first algorithm type is an integrity algorithm. Among the integrity algorithms supported by the first device, the M secure algorithms include SHA2-256, SHA2-512, and SHA3-256, and among the N unsecure algorithms supported by the first device, the N unsecure algorithms include SHA1. If the second device supports SHA1, SHA2-256, SHA2-512, and SHA3-256, the first security algorithm may be one of SHA2-256, SHA2-512, and SHA3-256.
[0101] For another example, the first algorithm type is a key exchange algorithm. The M secure algorithms among the key exchange algorithms supported by the first device include DH19 and DH31, and the N unsecure DH algorithms supported by the first device include DH1, DH5, and DH14. If the second device supports DH1, DH5, DH14, DH19, and DH31, the first security algorithm may be one of DH19 and DH31.
[0102] It should be understood that the first information can be carried in a traditional message (for example, an SA Init response message) or in a new message, and this application does not limit this.
[0103] Through the method shown in Figure 2, when the first device and the second device both support the first security algorithm and the first unsecure algorithm, the algorithm negotiated by the first device and the second device is a secure algorithm rather than an unsecure algorithm, thereby reducing the impact on the confidentiality and integrity of information transmitted between the first device and the second device, and improving the security of communication between the first device and the second device.
[0104] The method shown in Figure 2 is described by taking the security negotiation of an algorithm of the first algorithm type as an example. It should be understood that the method shown in Figure 2 can also be applied to the security negotiation of algorithms of various algorithm types, which will be described below.
[0105] In S201, the first device may send proposal information to the second device, where the proposal information may indicate at least two algorithms of each of P algorithm types supported by the first device, where P is an integer greater than or equal to 2. Any algorithm of the P algorithm types may be the first algorithm type in S201. Optionally, the P algorithm types include at least two of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm, and a pseudo-random algorithm.
[0106] For the i-th algorithm type among the P algorithm types, i is an integer ranging from 1 to P, and the at least two algorithms may include M i security algorithms and N i Unsafe algorithm, M i and N i Is a positive integer.
[0107] In S202, when the second device supports M i The i-th security algorithm and N i When the i-th unsafe algorithm among the unsafe algorithms is used, the second device may send information indicating the i-th safe algorithm to the first device. The i-th safe algorithm may be used to communicate with the first device. i The relationship between the security algorithms can be referred to Table 1, except that the first security algorithm is replaced by the i-th security algorithm, M i The secure algorithms are replaced by M secure algorithms. The i-th unsafe algorithm and N i The relationship between the unsafe algorithms can be referred to Table 2, except that the first unsafe algorithm is replaced by the i-th unsafe algorithm, N i unsafe algorithms are replaced by N unsafe algorithms.
[0108] It should be understood that for P algorithm types, the second device may send P pieces of information to the first device, including information indicating the first security algorithm to information indicating the Pth security algorithm. The P pieces of information may be carried in the same message or in different messages.
[0109] In some possible ways, the second device may determine which algorithms are secure algorithms and which algorithms are unsecure algorithms according to Way A1, Way A2, or Way A3. The secure algorithms supported by the second device may be the full set or a subset of these secure algorithms, and the unsecure algorithms supported may be the full set or a subset of these unsecure algorithms, without limitation. For example, the secure algorithms supported by the second device may be determined by the second device based on the configuration information of the second device. For example, if the configuration information of the second device indicates that the second device supports security algorithms 1 to 4, then the second device may determine the security algorithms 1 to 4 supported by the second device. For another example, the security algorithms supported by the second device are the same as the security algorithms determined according to the second information. For another example, if the configuration information of the second device indicates that the first device supports algorithms 1 to 4, and the second device obtains that algorithms 1 to 4 are secure algorithms through the above-mentioned security algorithm determination method, then the second device may determine that the security algorithms supported by the second device are algorithms 1 to 4. This application does not limit the security algorithms supported by the second device.
[0110] Method A1: A second device receives second information, where the second information may be used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set. The first secure algorithm set includes the first secure algorithm, and the first unsecure algorithm set includes the first unsecure algorithm. Thus, the second device may determine, based on the second information, at least one of the following: the first secure algorithm set or the first unsecure algorithm set.
[0111] Exemplarily, the second information may include at least one of the following: indication information (e.g., ID) of each algorithm in the first security algorithm set or indication information (e.g., ID) of each algorithm in the first unsafe algorithm set. In one possible implementation, the second device may receive one or more pieces of second information, and the second device may update at least one of the first security algorithm set or the first unsafe algorithm set based on the latest second information. The latest second information may indicate configuration change information relative to the previous one (such as Table 3 or other possible forms), or may indicate the current latest configuration (such as Table 4 or other possible forms), without limitation.
[0112] In a possible example, the first security algorithm set indicated by the second information includes the above-mentioned M security algorithms, and the unsafe algorithm set indicated by the first unsafe algorithm set includes the above-mentioned N unsafe algorithms.
[0113] Table 3
[0114] Table 4
[0115] In some examples, the second information includes indication information of each algorithm in the first security algorithm set. In this way, the second device can determine the first security algorithm set based on the second information. Optionally, the second device can also determine the algorithms that do not belong to the first security algorithm set as unsafe algorithms, thereby determining the first unsafe algorithm set including unsafe algorithms. For example, the second information includes: indication information of algorithms 1 to 4. The second device can determine that the first security algorithm set includes algorithms 1 to 4. Optionally, the second device can also determine that algorithms other than algorithms 1 to 4 (for example, algorithms 5 and 6) are unsafe algorithms, thereby determining that the first unsafe algorithm set includes algorithms other than algorithms 1 to 4 (for example, algorithms 5 and 6). For another example, the second information 1 includes indication information of algorithms 1 to 3, and the second information 2 includes: indication information of algorithm 4. The second device can determine that the first security algorithm set includes algorithms 1 to 4. Optionally, the second device may also determine that algorithms other than Algorithms 1 to 4 (e.g., Algorithms 5 and 6) are unsafe algorithms, thereby determining that the first unsafe algorithm set includes algorithms other than Algorithms 1 to 4 (e.g., Algorithms 5 and 6).
[0116] In other examples, the second information includes indication information for each algorithm in the first secure algorithm set and indication information for each algorithm in the first unsecure algorithm set. Thus, the second device can determine the first secure algorithm set and the first unsecure algorithm set based on the second information. For example, in the second information, the indication information for each algorithm in the first secure algorithm set includes indication information for algorithms 1 through 4, and the indication information for each algorithm in the first unsecure algorithm set includes indication information for algorithms 5 and 6. The second device can determine that the first secure algorithm set includes algorithms 1 through 4, and the first unsecure algorithm set includes algorithms 5 and 6.
[0117] In some other examples, the second information includes indication information of each algorithm in the first unsafe algorithm set. In this way, the second device can determine the first unsafe algorithm set based on the second information. Optionally, the second device can also determine the algorithms that do not belong to the first unsafe algorithm set as safe algorithms, thereby determining the first safe algorithm set containing safe algorithms. For example, the second information includes: indication information of algorithms 5 to 6. The second device can determine that the first unsafe algorithm set includes algorithms 5 to 6. Optionally, the second device can also determine that algorithms other than algorithms 5 to 6 (for example, algorithms 1 to 4) are safe algorithms, thereby determining that the first safe algorithm set includes algorithms other than algorithms 5 to 6 (for example, algorithms 1 to 4). For another example, the second information 3 includes indication information of algorithm 5, and the second information 4 includes: indication information of algorithm 6. The second device can determine that the first unsafe algorithm set includes algorithms 5 to 6. Optionally, the second device may also determine that algorithms other than Algorithms 5 to 6 (e.g., Algorithms 1 to 4) are secure algorithms, thereby determining that the first secure algorithm set includes algorithms other than Algorithms 5 to 6 (e.g., Algorithms 1 to 4).
[0118] Optionally, after receiving the second information, the second device may store at least one of the following: the first secure algorithm set or the first unsecure algorithm set. For example, the second device may store the first secure algorithm set in a local secure algorithm database. For another example, the second device may store the first unsecure algorithm set in a local unsecure algorithm database.
[0119] It should be understood that the present application does not limit the order in which the second device receives the second information and the second device receives the proposal information (ie, S201).
[0120] In some possible ways, the second information may be output by a third device; accordingly, the second device receives the second information output by the third device. The third device may be a server, such as a network management server or an IKE device manager, or a module applied to the server, such as a circuit, a chip, a chip system or a processor, or a logical node, a logical module or software that can implement all or part of the server functions. In some examples, the third device may be a module inside the server, such as a chip. The third device may output the second information to another module in the server, such as a radio frequency module or a communication module. Then, the other module in the server may send the second information to the second device. In other examples, the third device may send the second information to the second device. In this case, the third device may be a device including a radio frequency module or a communication module, such as a server.
[0121] After determining the second information, the third device may output the second information. The second information may be broadcast information, for example, the third device broadcasts the second information to one or more devices including the second device; the second information may also be unicast information, for example, the third device sends the second information to the second device via unicast. The second information may be sent periodically by the third device or when at least one of the first security algorithm set or the first unsecure algorithm set is updated.
[0122] Method A2: The secure algorithm set (e.g., the first secure algorithm set) or which algorithms are secure algorithms, and the unsecure algorithm set (e.g., the first unsecure algorithm set) or which algorithms are unsecure algorithms can be pre-configured, for example, as specified in a protocol, or included in the factory configuration of the second device, or pre-configured in the subscriber identity module (SIM) card of the second device, without restriction.
[0123] Method A3: The secure algorithm set (e.g., the first secure algorithm set) or which algorithms are secure algorithms is notified using the second information described in method A1, and the unsecure algorithm set (e.g., the first unsecure algorithm set) or which algorithms are unsecure algorithms is pre-configured using the method described in method A2.
[0124] In some possible implementations, the method shown in FIG2 further includes the first device determining which algorithms are secure and which are unsecure. The determination method for the first device is similar to the determination method for the second device described above. Specifically, the second device described above can be replaced by the first device, the second information can be replaced by the third information, the first secure algorithm set can be replaced by the second secure algorithm set, and the first unsecure algorithm set can be replaced by the second unsecure algorithm set. See also implementations A1 to A3 described above, which will not be repeated here. The method for indicating the first secure algorithm set and / or the first unsecure algorithm set to the second device via the second information is the same as the method for indicating the second secure algorithm set and / or the second unsecure algorithm set to the first device via the third information. However, the results of the indications can be the same or different, without limitation. For example, the third device sends the third information to the first device, and the third device sends the second information to the second device, where the second and third information indicate the same or different contents. Exemplarily, the secure algorithm set indicated by the second information includes the first secure algorithm, and the unsecure algorithm set indicated by the third information includes the first unsecure algorithm; the secure algorithm set indicated by the third information includes the M secure algorithms, and the unsecure algorithm set indicated by the third information includes the N unsecure algorithms. After determining which algorithms are secure algorithms and which are unsecure algorithms, the secure algorithms supported by the first device may be the full set or a subset of these secure algorithms, and the unsecure algorithms supported may be the full set or a subset of these unsecure algorithms, without limitation. For example, the secure algorithms supported by the first device may be determined by the first device based on the configuration information of the first device. For example, if the configuration information of the first device indicates that the first device supports security algorithms 1 to 4, then the first device may determine that the first device supports security algorithms 1 to 4. For another example, the security algorithms supported by the first device are the same as the security algorithms indicated by the third information. For another example, if the configuration information of the first device indicates that the first device supports algorithms 1 to 4, and the first device obtains that algorithms 1 to 4 are secure algorithms through the above-mentioned security algorithm determination method, then the first device may determine that the security algorithms supported by the first device are algorithms 1 to 4. This application does not limit the security algorithms supported by the first device.
[0125] The first device and the second device can be determined in the same or different manners without limitation. For example, the first device and the second device are both determined using manner A1; for another example, the first device is determined using manner A1, and the second device is determined using manner A2. Examples are not given one by one.
[0126] Optionally, after determining at least one of the first secure algorithm set or the first unsecure algorithm set, the second device may determine which algorithms are secure algorithms and which algorithms are unsecure algorithms. The second device may then employ the following method R1 or method R2 to determine the first secure algorithm from the M secure algorithms indicated by the proposal information from the first device.
[0127] Method R1: includes steps B1 and B2.
[0128] B1: The second apparatus determines M secure algorithms from the at least two algorithms indicated by the proposal information according to at least one of the first secure algorithm set or the first unsecure algorithm set.
[0129] In some examples, if M algorithms among the at least two algorithms belong to a first security algorithm set, the second device may determine that the M algorithms are M security algorithms.
[0130] In other examples, if M algorithms among the at least two algorithms do not belong to the first set of unsafe algorithms, the second device may determine that the M algorithms are M safe algorithms.
[0131] B2: The second device determines a first security algorithm from the M security algorithms.
[0132] In some possible implementations, if the second device supports one of the M security algorithms, the second device may determine that the first security algorithm is the one security algorithm. For example, as shown in Example a1 or Example a3 of Table 1 above, if the second device supports Security Algorithm #1 of the M security algorithms, the second device may determine that the first security algorithm is Security Algorithm #1.
[0133] In other possible approaches, the second device supports M2 security algorithms from the M security algorithms (for example, as shown in Example a2 or Example a4 in Table 1 above), and the second device may select one algorithm from the M2 security algorithms as the first security algorithm. There are multiple ways for the second device to select an algorithm from the M2 security algorithms as the first security algorithm, for example, Approach 1, Approach 2, or Approach 3.
[0134] Method 1: The second device randomly selects an algorithm from the M2 security algorithms as the first security algorithm. In other words, the first security algorithm is any one of the M2 security algorithms. For example, the M2 algorithms include algorithms a1 and a2. The second device may randomly select an algorithm from algorithms a1 and a2 as the first security algorithm.
[0135] Method 2: The second device selects an algorithm from the M2 security algorithms as the first security algorithm based on the security factors of the M2 security algorithms. In other words, the first security algorithm may be determined based on the security factors of the M2 security algorithms. For example, the second device may select the algorithm with the highest security factor from the M2 security algorithms as the first security algorithm. In other words, the first security algorithm is the algorithm with the highest security factor among the M2 security algorithms. For example, the M2 algorithms include algorithms a1 through a2. If the security factor of algorithm a1 is higher than the security factor of algorithm a2, the second device may select algorithm a1 as the first security algorithm.
[0136] Among them, the safety coefficients of the M2 security algorithms can be pre-configured, for example, specified by the protocol, or obtained from other devices. For example, the third device can output the safety coefficient of each security algorithm in the first security algorithm set; correspondingly, the second device can receive the safety coefficient of each security algorithm in the first security algorithm set. Among them, the first security algorithm set includes M2 security algorithms. The output method of the safety coefficient of each security algorithm in the first security algorithm set can refer to the output method of the second information, which will not be repeated here. The safety coefficient of each security algorithm in the first security algorithm set and the second information can be carried in the same message or in different messages, and this application does not limit this.
[0137] The higher the security factor of the security algorithm, the stronger the security of the security algorithm. Therefore, through this method 2, the security of the communication between the first device and the second device can be further improved.
[0138] Method 3: The second device selects an algorithm from the M2 security algorithms as the first security algorithm based on the time when the M2 security algorithms were determined as security algorithms. In other words, the first security algorithm is determined based on the time when the M2 security algorithms were determined as security algorithms. For example, the second device may select the algorithm from the M2 security algorithms that was determined as a security algorithm the latest as the first security algorithm. In other words, the first security algorithm is the algorithm that was determined as a security algorithm the latest among the M2 security algorithms. For example, the M2 algorithms include algorithms a1 through a2. If the time when algorithm a1 was determined as a security algorithm is later than the time when algorithm a2 was determined as a security algorithm, the second device may select algorithm a1 as the first security algorithm.
[0139] The time when the M2 security algorithms are determined as security algorithms may be preconfigured, for example, specified by a protocol, or may be obtained from other devices.
[0140] In some possible embodiments, the time when the M2 security algorithms are determined as security algorithms may be the output time of the second information, and the first security algorithm set indicated by the second information includes the M2 security algorithms. Exemplarily, the third device may output indication information of the output time of the second information (hereinafter referred to as indication information 1); accordingly, the second device receives indication information 1. The indication information 1 may indicate the output time of the indication information of each algorithm in the first security algorithm set. For example, the first security algorithm set includes algorithms a1 to a4, and the M2 security algorithms include algorithms a1 to a2. If the indication information of algorithm a1 is carried in the second information 5, and the indication information of algorithms a2 to a4 is carried in the second information 6, then the indication information 1 includes: timestamp 1 for indicating the output time 1 of the second information 5, and timestamp 2 for indicating the output time 2 of the second information 6. After receiving indication information 1, the second device may determine that the time when algorithm a1 is determined as the security algorithm is output time 1, and the time when algorithm a2 is determined as the security algorithm is output time 2.
[0141] The output method of the indication information 1 can refer to the output method of the second information, which will not be repeated here. The indication information 1 and the second information can be carried in the same message or in different messages, which is not limited in this application.
[0142] In other possible approaches, the time when the M2 security algorithms are determined as security algorithms may be the time when the second information is received, and the first security algorithm set indicated by the second information includes the M2 security algorithms. For example, the first security algorithm set includes algorithms a1 through a4, and the M2 security algorithms include algorithms a1 through a2. If the indication information for algorithm a1 is carried in second information 5, and the indication information for algorithms a2 through a4 is carried in second information 6, then algorithm a1 is determined as the security algorithm when the second device receives second information 5, and algorithm a2 is determined as the security algorithm when the second device receives second information 6.
[0143] According to method 3, the latest security algorithm can be negotiated first for communication.
[0144] Through steps B1 and B2, the second device can determine which algorithms are secure based on at least one of the first secure algorithm set or the first unsecure algorithm set. This allows the second device to select a secure algorithm supported by both the first and second devices, regardless of the order of the algorithm indication information in the proposal information in S201. This improves the security of communication between the first and second devices.
[0145] In some possible examples, in step B1, the second device may determine a subset of M security algorithms, such as M3 security algorithms, where M3 is a positive integer less than M. Then, in step B2, the second device determines a first security algorithm from these M3 security algorithms. The specific algorithms are similar to those described in steps B1 and B2 above. That is, the second device does not need to know how many security algorithms are indicated in the proposed information; once it identifies some of the security algorithms indicated in the proposed information, it can determine the first security algorithm. This method can reduce the implementation complexity of the second device and conserve computing resources.
[0146] Method R2:
[0147] The second device may select the first security algorithm supported by the second device from the at least two algorithms according to the order of the algorithm indication information in the proposal information. This selected security algorithm is the first security algorithm. In other words, the first security algorithm is the first security algorithm supported by the second device from the at least two algorithms according to the order of the algorithm indication information in the proposal information. For example, the M security algorithms are algorithms a1 through a4, and the N unsafe algorithms are algorithms b1 through b3. In the proposal information, the order of the algorithm indication information is, from front to back, as: algorithm a1, algorithm a2, algorithm a3, algorithm a4, algorithm b1, algorithm b2, and algorithm b3. For example, if the second device supports algorithms a1 through a4, and algorithms b1 through b3, the second device selects algorithm a1 as the first security algorithm according to the order of the algorithm indication information in the proposal information. For another example, if the second device supports algorithms a2 to a4, and algorithms b1 to b3, the second device selects algorithm a2 as the first security algorithm according to the order of the instruction information of each algorithm in the proposal information from front to back.
[0148] In the method provided in the embodiment of the present application, in order to reduce the implementation complexity of the second device determining the first security algorithm, the following possible designs C1 to C4 may be performed on the proposal information.
[0149] Design C1: The proposed information includes indication information for each of at least two algorithms, where the at least two algorithms include M secure algorithms and N unsecure algorithms. The indication information for M1 secure algorithms among the M secure algorithms precedes the indication information for N1 unsecure algorithms among the N unsecure algorithms. M1 is a positive integer less than or equal to M, and N1 is a positive integer less than or equal to N. This method enables the second device to quickly determine a secure algorithm when determining the first secure algorithm using the aforementioned method R1, method R2, or other possible methods.
[0150] The M1 secure algorithms may be some or all of the M secure algorithms. When the M1 secure algorithms are some of the M secure algorithms, the remaining secure algorithms in the M secure algorithms, excluding the M1 secure algorithms, are placed after the M1 secure algorithms. The N1 unsafe algorithms may be some or all of the N unsafe algorithms. When the N1 unsafe algorithms are some of the N unsafe algorithms, the remaining unsafe algorithms in the N unsafe algorithms, excluding the N1 unsafe algorithms, are placed after the N1 unsafe algorithms.
[0151] In some examples, in the proposal information, the indication information for the M secure algorithms may precede the indication information for the N unsecure algorithms. For example, the M secure algorithms are algorithms a1 through a4, the M1 secure algorithms are part or all of the M secure algorithms, and the N unsecure algorithms are algorithms b1 through b3. In the proposal information, the indication information for each algorithm is listed in the following order from front to back: algorithm a1, algorithm a2, algorithm a3, algorithm a4, algorithm b1, algorithm b2, and algorithm b3.
[0152] In other examples, in the proposal information, some or all of the M secure algorithms, excluding the M1 secure algorithms, are placed after some or all of the N1 unsafe algorithms. The following example illustrates a situation where the M secure algorithms are algorithms a1 to a4, the M1 secure algorithm is algorithm a1, the N unsafe algorithms are algorithms b1 to b3, and the N1 unsafe algorithms are algorithms b1 and b2. For example, in the proposal information, the order of the instructions for each algorithm, from front to back, is: algorithm a1, algorithm a2, algorithm b1, algorithm a3, algorithm a4, algorithm b2, and algorithm b3. For another example, in the proposal information, the order of the instructions for each algorithm, from front to back, is: algorithm a1, algorithm b1, algorithm a2, algorithm a3, algorithm a4, algorithm b2, and algorithm b3. For another example, in the proposal information, the order of the instructions for each algorithm, from front to back, is: algorithm a1, algorithm b1, algorithm b2, algorithm b3, algorithm a2, algorithm a3, and algorithm a4.
[0153] Design C2: The proposed information includes indication information of each of at least two algorithms, and the at least two algorithms include M security algorithms and N unsafe algorithms. Among the M security algorithms, the earlier the security algorithm is determined to be a security algorithm, the lower its ranking among the M security algorithms. That is, in the proposed information, the earlier the security algorithm is determined to be a security algorithm among the M security algorithms, the lower its ranking is. Among them, the specific content of the time when the M security algorithms are determined to be security algorithms can refer to the description of the time when the M2 security algorithms are determined to be security algorithms in the above-mentioned method 3. When making the reference, the M2 security algorithms are replaced with the M security algorithms, and no further details are given here. That is, the time when the algorithm is determined to be a security algorithm can be determined by pre-configuration, or according to the output time of the second information, or according to the time when the security algorithm is received. For example, the M security algorithms are algorithms a1 to a4. If the security algorithms identified as being, from earliest to latest, are: Algorithm a4, Algorithm a3, Algorithm a2, Algorithm a1, then the algorithm instructions in the proposal message will be, from earliest to latest, in the following order: Algorithm a1, Algorithm a2, Algorithm a3, Algorithm a4. Thus, if the second device determines the first security algorithm according to method a1 and supports algorithms a1 through a4, the second device will determine algorithm a1 as the first security algorithm. This design allows the most recent security algorithm to be negotiated first for communication.
[0154] Design C3: The proposal information includes indication information for each of at least two algorithms, where the at least two algorithms include M secure algorithms and N unsecure algorithms. Among the M secure algorithms, the security algorithm with a higher security factor is ranked higher in the M secure algorithms. That is, in the proposal information, the indication information for the security algorithm with a higher security factor is ranked higher in the M secure algorithms. The specific details of the security factors of the M secure algorithms can be found in the description of the security factors of the M2 secure algorithms in Method 2 above. For this reference, the M2 secure algorithms are replaced with the M secure algorithms, and this description is omitted here. That is, the security factors of the security algorithms can be determined through preconfiguration or by instructions from another device (e.g., a third device). For example, the M secure algorithms are algorithms a1 to a4. If the security factors, from lowest to highest, are: algorithm a4, algorithm a3, algorithm a2, algorithm a1, then the indication information for each algorithm in the proposal information is, from front to back, in the following order: algorithm a1, algorithm a2, algorithm a3, algorithm a4. Thus, if the second device determines the first security algorithm according to method a1 and the second device supports algorithms a1 through a4, the second device can determine that algorithm a1 is the first security algorithm. The higher the security factor of a security algorithm, the stronger its security. Therefore, this design further improves the security of communication between the first and second devices.
[0155] Design C4: A combination of at least two designs from C1 to C3, such as C1+C2, C1+C3, C1+C3, or C1+C2+C3.
[0156] Based on the same technical concept as the above-mentioned method embodiment, the embodiment of the present application provides a corresponding communication device, which can be used to perform the functions of the relevant steps in the above-mentioned method embodiment. The function can be implemented by hardware, can be implemented by software, or can be implemented by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. The communication device can be a communication device or a module in a communication device (such as a circuit or a chip), or can be a logical node, a logical module or software that can implement all or part of the functions of the communication device; or the communication device can be a server or a module in a server (such as a circuit or a chip), or can be a logical node, a logical module or software that can implement all or part of the functions of the server. Among them, one possible example of a server is a network management.
[0157] In a possible implementation, the structure of the communication device provided in the embodiment of the present application is shown in Figure 3, including an interface unit 301 and a processing unit 302. The functions of each unit in the communication device 300 are introduced below.
[0158] The interface unit 301 is used to input and / or output information. Input information can be replaced by receiving information, and output information can be replaced by sending information. When outputting information, the interface unit 301 can output information to other devices outside the communication device 300, or it can output information to other units in the communication device 300. In some embodiments, the interface unit 301 can be implemented by at least one of a physical interface, a communication module, a communication interface, and an input / output interface. In other embodiments, the interface unit 301 can be implemented by an interface circuit, for example, a mobile communication module. The mobile communication module may include one or more of at least one antenna, at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
[0159] The processing unit 302 can be used to support the communication device 300 in performing the processing actions in the above method embodiment. The processing unit 302 can be implemented by one or more processors. For example, the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.
[0160] In one embodiment, the communication device 300 is applied to the second device in the embodiment of the present application shown in Figure 2. The specific functions of the processing unit 302 in this embodiment are introduced below.
[0161] The processing unit 302 is used to: receive proposal information from the first device through the interface unit 301, where the proposal information is used to indicate at least two algorithms of the first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; when the second device supports the first secure algorithm among the M secure algorithms and the first unsecure algorithm among the N unsecure algorithms, send first information to the first device through the interface unit 301, where the first information is used to indicate the first secure algorithm, and the first secure algorithm is used to communicate with the first device.
[0162] In some possible embodiments, the processing unit 302 is further used to: receive second information through the interface unit 301, the second information being used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set, wherein the first secure algorithm set includes a first secure algorithm, and the first unsecure algorithm set includes a first unsecure algorithm.
[0163] In another embodiment, the communication device 300 is applied to the first device in the embodiment of the present application shown in Figure 2. The specific functions of the processing unit 302 in this embodiment are introduced below.
[0164] The processing unit 302 is used to: send proposal information to the second device through the interface unit 301, where the proposal information is used to indicate at least two algorithms of the first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; and receive first information from the second device through the interface unit 301, where the first information is used to indicate a first security algorithm, and the first security algorithm is used to communicate with the second device.
[0165] In some possible embodiments, the processing unit 302 is further used to: receive third information through the interface unit 301, and the third information is used to indicate at least one of the following: a second secure algorithm set or a second unsecure algorithm set, wherein the second secure algorithm set includes M secure algorithms and the second unsecure algorithm set includes N unsecure algorithms.
[0166] In yet another embodiment, the communication device 300 is applied to the third device in the embodiment of the present application shown in Figure 2. The specific functions of the processing unit 302 in this embodiment are introduced below.
[0167] The processing unit 302 is configured to: determine second information, where the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set; and output the second information through the interface unit 301 .
[0168] In some possible embodiments, the processing unit 302 is further configured to: output, through the interface unit 301 , at least one of the following: a safety factor of each security algorithm in the first security algorithm set; or information indicating an output time of the second information.
[0169] A more detailed description of the processing unit 302 and the interface unit 301 can be directly obtained by referring to the relevant description in the method embodiment shown in FIG2 , and is not repeated here.
[0170] It should be noted that the division of modules in the above embodiments of the present application is illustrative and is only a logical functional division. In actual implementation, there may be other division methods. In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or may exist separately physically, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all 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 enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0172] In one possible implementation, a communication device provided in an embodiment of the present application is shown in FIG4 . The communication device 400 includes a processor 402. Optionally, the communication device 400 further includes an interface circuit 401 and a memory 403. The interface circuit 401, the processor 402, and the memory 403 are coupled to each other.
[0173] Optionally, the interface circuit 401, the processor 402, and the memory 403 are coupled to each other via a bus 404. The bus 404 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG4 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0174] The interface circuit 401 is used to input and / or output information. Inputting information can be replaced by receiving information, and outputting information can be replaced by sending information. When outputting information, the interface circuit 401 can output the information to other devices outside the communication device 400, or to other units within the communication device 400. Exemplarily, the interface circuit 401 can be implemented via at least one of a physical interface, a communication module, a communication interface, an input / output interface, and a mobile communication module. The mobile communication module may include one or more of at least one antenna, at least one filter, a switch, a power amplifier, an LNA, and the like.
[0175] The processor 402 can be used to support the communication device 400 in executing the processing actions in the above-mentioned method embodiment. When the communication device 400 is used to implement the above-mentioned method embodiment, the processor 402 can also be used to implement the functions of the processing unit 302. The processor 402 can be a CPU, other general-purpose processors, DSPs, ASICs, FPGAs, other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.
[0176] In one embodiment, the communication device 400 is applied to the second device in the embodiment of the present application shown in Figure 2. The specific functions of the processor 402 in this embodiment are introduced below.
[0177] The processor 402 is configured to: receive proposal information from the first device through the interface circuit 401, where the proposal information is used to indicate at least two algorithms of a first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; and when the second device supports a first secure algorithm among the M secure algorithms and a first unsecure algorithm among the N unsecure algorithms, send first information to the first device through the interface circuit 401, where the first information is used to indicate a first secure algorithm, and the first secure algorithm is used to communicate with the first device.
[0178] In another embodiment, the communication device 400 is applied to the first device in the embodiment of the present application shown in Figure 2. The specific functions of the processor 402 in this embodiment are introduced below.
[0179] The processor 402 is configured to: send proposal information to the second device through the interface circuit 401, where the proposal information is used to indicate at least two algorithms of a first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; and receive first information from the second device through the interface circuit 401, where the first information is used to indicate a first security algorithm, and the first security algorithm is used to communicate with the second device.
[0180] In yet another embodiment, the communication device 400 is applied to the third device in the embodiment of the present application shown in Figure 2. The specific functions of the processor 402 in this embodiment are described below.
[0181] The processor 402 is configured to: determine second information, where the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set; and output the second information through the interface circuit 401 .
[0182] The specific functions of the processor 402 can refer to the description of the communication method provided in the above embodiments and examples of the present application, as well as the specific functional description of the communication device 300 in the embodiment of the present application shown in Figure 3, and will not be repeated here.
[0183] The memory 403 is used to store program instructions and / or data, etc. Specifically, the program instructions may include program code, which includes computer operation instructions. The memory 403 may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. The processor 402 executes the program instructions stored in the memory 403, and uses the data stored in the memory 403 to implement the above functions, thereby realizing the communication method provided in the above embodiment of the present application. The memory 403 can be integrated with the processor 402, or it can be a memory outside the communication device.
[0184] It will be appreciated that the memory 403 in FIG. 4 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 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 RAM, which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that memory of the systems and methods described herein is intended to comprise, but not be limited to, these and any other suitable types of memory.
[0185] Based on the above embodiments, an embodiment of the present application further provides a computer program product including computer-executable instructions. When the computer program product is run, the method provided in the above embodiments is executed.
[0186] Based on the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method provided in the above embodiments.
[0187] The storage medium may be any available medium that can be accessed by a computer. By way of example and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0188] Based on the above embodiments, an embodiment of the present application further provides a chip, which is used to read a computer program stored in a memory to implement the method provided in the above embodiments.
[0189] Based on the above embodiments, embodiments of the present application provide a chip system, which includes a processor for supporting a computer device to implement the functions involved in each device in the above embodiments. In one possible design, the chip system also includes a memory for storing the necessary programs and data for the computer device. The chip system can be composed of a chip or can include a chip and other discrete devices.
[0190] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0191] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0192] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0194] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the related objects are in an "or" relationship.
[0195] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.
[0196] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A communication method, characterized in that: include: Receiving proposal information from a first device, the proposal information being used to indicate at least two algorithms of a first algorithm type supported by the first device, the at least two algorithms comprising M secure algorithms and N unsecure algorithms, where M and N are positive integers; When the second device supports a first security algorithm among the M security algorithms and a first unsafe algorithm among the N unsafe algorithms, first information is outputted, where the first information is used to indicate the first security algorithm, and the first security algorithm is used to communicate with the first device.
2. The method according to claim 1, characterized in that Also includes: Second information is received, where the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set, wherein the first secure algorithm is included in the first secure algorithm set, and the first unsecure algorithm is included in the first unsecure algorithm set.
3. The method according to claim 1 or 2, characterized in that The proposal information includes indication information of each of the at least two algorithms, and the indication information of M1 secure algorithms among the M secure algorithms is located before the indication information of N1 unsecure algorithms among the N unsecure algorithms, wherein the remaining secure algorithms among the M secure algorithms except the M1 secure algorithms are located after the M1 secure algorithms, and the remaining unsecure algorithms among the N unsecure algorithms except the N1 unsecure algorithms are located after the N1 unsecure algorithms, and the M1 is a positive integer less than or equal to the M, and the N1 is a positive integer less than or equal to the N.
4. The method according to any one of claims 1 to 3, characterized in that The M security algorithms satisfy at least one of the following conditions: Among the M security algorithms, the earlier a security algorithm is determined as a security algorithm, the later it is ranked among the M security algorithms; or Among the M security algorithms, a security algorithm with a higher security factor is ranked higher among the M security algorithms.
5. The method according to any one of claims 1 to 4, characterized in that: The first algorithm type includes one of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm or a pseudo-random algorithm.
6. A communication method, characterized in that: include: Sending proposal information to the second device, where the proposal information is used to indicate at least two algorithms of the first algorithm type supported by the first device, where the at least two algorithms include M secure algorithms and N unsecure algorithms, where M and N are positive integers; First information is received from the second device, where the first information is used to indicate a first security algorithm, and the first security algorithm is used to communicate with the second device.
7. The method according to claim 6, characterized in that The proposal information includes indication information of each of the at least two algorithms, and the indication information of M1 secure algorithms among the M secure algorithms is located before the indication information of N1 unsecure algorithms among the N unsecure algorithms, wherein the remaining secure algorithms among the M secure algorithms except the M1 secure algorithms are located after the M1 secure algorithms, and the remaining unsecure algorithms among the N unsecure algorithms except the N1 unsecure algorithms are located after the N1 unsecure algorithms, and the M1 is a positive integer less than or equal to the M, and the N1 is a positive integer less than or equal to the N.
8. The method according to claim 6 or 7, characterized in that The M security algorithms satisfy at least one of the following conditions: Among the M security algorithms, the earlier a security algorithm is determined as a security algorithm, the later it is ranked among the M security algorithms; or Among the M security algorithms, a security algorithm with a higher security factor is ranked higher among the M security algorithms.
9. The method according to any one of claims 6 to 8, characterized in that Also includes: Third information is received, where the third information is used to indicate at least one of the following: a second secure algorithm set or a second unsecure algorithm set, wherein the second secure algorithm set includes the M secure algorithms, and the second unsecure algorithm set includes the N unsecure algorithms.
10. The method according to any one of claims 6 to 9, characterized in that: The first algorithm type includes one of the following: an encryption algorithm, an integrity algorithm, a key exchange algorithm or a pseudo-random algorithm.
11. A communication method, characterized in that: include: Determine second information, where the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set; The second information is output.
12. The method according to claim 11, characterized in that Also includes: Output at least one of the following: The safety factor of each security algorithm in the first security algorithm set; or Indicative information of the output time of the second information.
13. A communication device, characterized in that: Used to perform the method according to any one of claims 1 to 5.
14. A communication device, characterized in that: The method comprises at least one processor, wherein the processor is configured to execute the method according to any one of claims 1 to 5.
15. A communication device, characterized in that: Used to execute the method according to any one of claims 6 to 10.
16. A communication device, characterized in that: The method comprises at least one processor, wherein the processor is configured to execute the method according to any one of claims 6 to 10.
17. A communication device, characterized in that: Used to perform the method according to any one of claims 11-12.
18. A communication device, characterized in that: The method comprises at least one processor, wherein the processor is configured to execute the method according to any one of claims 11 to 12.
19. A communication system, characterized in that: include: The communication device according to claim 13 or 14 and the communication device according to claim 15 or 16; or, The communication device according to claim 13 or 14, the communication device according to claim 15 or 16, and the communication device according to claim 17 or 18.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by the communication device, the method according to any one of claims 1 to 12 is implemented.
21. A computer program product, characterized in that The computer program product comprises: computer program codes or instructions, and when the computer program codes or instructions are executed, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Consultation method and equipment for group algorithms of MTC (Machine Type Communication) equipment
CN102833742A
Security negotiation method, terminal device and network device
CN113423104A
Communication method and device
CN113455032A
Provider and receiver cryptosystems comprising combined algorithms
WO2022008587A1