Communication method and device based on security negotiation
By receiving and processing proposed information from communication partners, we negotiate a security algorithm supported by both parties, which solves the problem of difficult to effectively determine the security algorithm in the prior art and improves communication security.
Patent Information
- Application Number
- CN202311096346.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
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 receiving the proposed information from the communication partner, the information indicates at least two supported algorithms, including M security algorithms and N unsafe algorithms, to negotiate the security algorithms supported by both parties.
It ensures that the algorithm negotiated by both parties to the communication is a secure algorithm rather than an unsafe algorithm, thereby improving communication security and reducing the confidentiality and integrity of information transmission.
Smart Images

Figure CN119544233A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] In a communication system, the sending device in both communicating parties can encrypt the information to be transmitted by an encryption algorithm, and the receiving device in both communicating parties can decrypt the received information by a decryption algorithm, thereby ensuring the security of the information transmitted between the sending device and the receiving device.
[0003] How to enable both communicating parties to effectively determine the security algorithm requires further research. Summary of the invention
[0004] The present application provides a communication method and device for improving the security of an algorithm determined during security negotiation.
[0005] In the first aspect, the embodiment of the present application provides a communication method, which can be applied to a second device, and the second device can be a communication device or a module in the communication device (such as a circuit, a chip, a chip system or a processor), and can also be a logical node, a logical module or software that can realize all or part of the functions of the communication device, or can be a hardware circuit + software module, without limitation. Among them, 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, and the at least two algorithms include M secure algorithms and N unsecure algorithms, and 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, first information is sent to the first device, and the first information is used to indicate the first secure algorithm, and the first secure algorithm is used to communicate with the first device.
[0006] 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.
[0007] 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 a first secure algorithm, and the first unsecure algorithm set includes a first unsecure algorithm. With this design, the second device may learn which algorithms are secure algorithms based on the second information. In this way, regardless of how the algorithm indication information in the proposal information is sorted, the second device may select a secure 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.
[0008] In a possible design, the proposed information may include indication information of each algorithm in at least two algorithms, and the indication information of M1 secure algorithms in the M secure algorithms is located before the indication information of N1 unsecure algorithms in the N unsecure algorithms. Among them, the remaining secure algorithms except M1 secure algorithms in the M secure algorithms are located after the M1 secure algorithms, and the remaining unsecure algorithms except N1 unsecure algorithms in the N 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.
[0009] 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.
[0010] Since in the proposed information, the indication information of M1 security algorithms among M security algorithms is located below the indication information of N1 unsecure algorithms among N unsecure 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.
[0011] In one possible design, the M security algorithms may satisfy at least one of the following conditions:
[0012] 1. Among the M security algorithms, the earlier the security algorithm is determined as the 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.
[0013] 2. Among the M security algorithms, the security algorithm with a higher security factor is ranked higher among 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.
[0014] 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. This design can be applicable to security negotiations of multiple algorithm types, so that 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.
[0015] In the second aspect, the embodiment of the present application provides a communication method, which can be applied to a first device, and the first device can be a communication device or a module in a communication device (such as a circuit, a chip, a chip system or a processor), and can also be a logical node, a logical module or software that can realize all or part of the functions of the communication device, or can be a hardware circuit + software module, without limitation. Among them, the method may include: sending a proposal information to a second device, the proposal information can be used to indicate at least two algorithms of the first algorithm type supported by the first device, the at least two algorithms include M secure algorithms and N unsecure algorithms, M and N are positive integers; receiving first information from the second device, the first information is used to indicate a first security algorithm, and the first security algorithm is used to communicate with the second device.
[0016] In a possible design, the proposed information includes indication information of each algorithm in at least two algorithms, and the indication information of M1 secure algorithms in the M secure algorithms is located before the indication information of N1 unsecure algorithms in the N unsecure algorithms. Among them, the remaining secure algorithms except M1 secure algorithms in the M secure algorithms are located after the M1 secure algorithms, and the remaining unsecure algorithms except N1 unsecure algorithms in the N 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.
[0017] In one possible design, the M security algorithms satisfy at least one of the following conditions:
[0018] 1. 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.
[0019] 2. Among the M security algorithms, the security algorithm with a higher security factor is ranked higher among the M security algorithms.
[0020] 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.
[0021] 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.
[0022] In a third aspect, an embodiment of the present application provides a communication method, which can be applied to a third device, which can be a server or a module in a server (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 server functions, or a hardware circuit + software module, without limitation. The method may include: determining and outputting second information, the second information is used to indicate at least one of the following: a first secure algorithm set or a first unsecure algorithm set.
[0023] Through this method, the third device can output the second information for indicating at least one item in the first security algorithm set or the first unsafe algorithm set, so that the device receiving the second information can promptly know which algorithms are secure algorithms and which algorithms are unsafe algorithms. In this way, when the first device and the second device both support the first security algorithm and the first unsafe algorithm, the algorithm negotiated by the first device and the second device is a secure algorithm, rather than an unsafe algorithm, thereby improving the security of communication between the first device and the second device. In addition, in this method, the third device outputs the second information instead of manually configuring at least one item in the first security algorithm set or the first unsafe algorithm set, thereby reducing the configuration operations of the administrator and improving the efficiency of configuring at least one item in the first security algorithm set or the first unsafe algorithm set.
[0024] A possible design further includes: outputting at least one of the following:
[0025] 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 timely obtain the safety coefficient of each security algorithm in the first security algorithm set.
[0026] 2. Indicative information of the output time of the second information. In this way, at least one of the first device or the second device can timely learn the output time of the second information.
[0027] In a fourth aspect, the present application provides a communication device, which may be a second device. The communication device has the function of implementing the first aspect. For example, the communication device includes a module or unit or means corresponding to the operation involved in the first aspect, and the module or unit or means may be implemented by software, or by hardware, or the corresponding software may be implemented by hardware.
[0028] 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 achieve communication between the communication device and other devices; the processing unit can be used to perform some internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations involved in the first aspect above.
[0029] In one possible design, the communication device includes a processor, and the processor is used to implement the functions of the first aspect. In one possible implementation, the processor is coupled to a memory, and the memory can store a computer program or instruction for implementing the functions involved in the first aspect. The processor can execute the computer program or instruction stored in the memory, and when the computer program or instruction is executed, the communication device implements the method in any possible design of the first aspect.
[0030] Optionally, the communication device also includes a memory.
[0031] 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.
[0032] In a fifth aspect, the present application provides a communication device, which may be a first device. The communication device has the function of implementing the second aspect. For example, the communication device includes a module or unit or means corresponding to the operation involved in the second aspect, and the module or unit or means may be implemented by software, or by hardware, or the corresponding software may be implemented by hardware.
[0033] 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 achieve communication between the communication device and other devices; the processing unit can be used to perform some internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations involved in the second aspect above.
[0034] In one possible design, the communication device includes a processor, and the processor is used to implement the functions of the second aspect. In one possible implementation, the processor is coupled to a memory. The memory can store a computer program or instruction that implements the functions involved in the above-mentioned second aspect. The processor can execute the computer program or instruction stored in the memory, and when the computer program or instruction is executed, the communication device implements the method in any possible design of the above-mentioned second aspect.
[0035] Optionally, the communication device also includes a memory.
[0036] 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.
[0037] In a sixth aspect, the present application provides a communication device, which may be a third device. The communication device has the function of implementing the third aspect. For example, the communication device includes a module or unit or means corresponding to the operation involved in the third aspect, and the module or unit or means may be implemented by software, or by hardware, or the corresponding software may be implemented by hardware.
[0038] 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 achieve communication between the communication device and other devices; the processing unit can be used to perform some internal operations of the communication device. The functions performed by the processing unit and the interface unit can correspond to the operations involved in the third aspect above.
[0039] In one possible design, the communication device includes a processor, and the processor is used to implement the functions of the third aspect. In one possible implementation, the processor is coupled to a memory. The memory can store a computer program or instruction for implementing the functions involved in the third aspect. The processor can execute the computer program or instruction stored in the memory, and when the computer program or instruction is executed, the communication device implements the method in any possible design of the third aspect.
[0040] Optionally, the communication device also includes a memory.
[0041] 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.
[0042] 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.
[0043] 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 one of the first to third aspects above.
[0044] 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.
[0045] In a tenth aspect, the present application provides a chip, wherein the chip is used to read a computer program stored in a memory to execute a method in any possible design of any one of the first to third aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;
[0047] Figure 2 A flowchart of another communication method provided in an embodiment of the present application;
[0048] Figure 3 A structural diagram of a communication device provided in an embodiment of the present application;
[0049] Figure 4 A structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The present application provides a communication method and device, wherein the method and device are based on the same technical concept, so the implementation of the method and device can refer to each other, and the repeated parts will not be repeated.
[0051] Below, some terms in this application are explained to facilitate understanding.
[0052] 1) Communication equipment refers to equipment with communication functions.
[0053] 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, etc. 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, etc.). Alternatively, the mobile communication system may also be a fusion of at least two of the above communication systems.
[0054] In some 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.
[0055] In the present application, the communication device that performs security negotiation may also be referred to as an Internet Key Exchange (IKE) device or an IKE peer device.
[0056] 2) Access network equipment is equipment in the radio access network (RAN) to help terminals achieve wireless access. Access network equipment can also be called access network nodes.
[0057] RAN can be a cellular system related to the 3rd Generation Partnership Project (3GPP), for example, 4G mobile communication systems such as LTE, 5G mobile communication systems such as NR, or future evolution systems (such as 6G mobile communication systems). RAN can also be an open access network (open RAN, O-RAN or ORAN), a cloud radio access network (cloud radio access network, CRAN), etc. RAN can also be a communication system that integrates two or more of the above systems.
[0058] 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 the present application may also be implemented by software functions running on hardware, or by virtualization functions instantiated on a platform (e.g., a cloud platform). The access network device in the present 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.
[0059] 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 can also be included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or a radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU) or a remote radio head (RRH).
[0060] 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, CU, CU-CP, CU-UP, DU and RU are described as examples in this application. Any unit of CU (or CU-CP, CU-UP), DU and RU in this application may be implemented by a software module, a hardware module, or a combination of a software module and a hardware module.
[0061] 3) Core network equipment is a network element in the core network. The core network equipment can connect the terminal to different data networks and perform at least one of the following: 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 be different. However, the embodiments of the present application do not limit the specific names of the core network devices with each function.
[0062] 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 is the serving gateway (S-GW); the network element serving as the anchor for switching the external data network and responsible for the allocation of Internet protocol (IP) addresses is the packet data network (PDN) gateway (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 charging functions is called the policy and charging rule function (PCRF) network element.
[0063] For another example, in the 5G mobile communication system, according to the specific logical function division, the core network can be divided into the control plane (CP) and the user plane (UP). Among them, the network elements responsible for the control plane function in the core network can be collectively referred to as the control plane network elements, and the network elements responsible for the user plane function can be collectively referred to as the user plane network elements. Specifically, in the user plane, the network element that serves as the interface of the data network and is responsible for the user plane data forwarding and other functions 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 execution of control policies 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; the application function (AF) network element responsible for transmitting the application side's requirements to the network side.
[0064] 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 wear, smart transportation, or smart city. The terminal can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle, a drone, a helicopter, an airplane, a ship, a robot, a robotic arm, a smart home device, etc. The embodiments of the present application do not limit the device form of the terminal.
[0065] 5) Safe and unsafe algorithms:
[0066] According to the security of the algorithm, the algorithm can be divided into a secure algorithm and an unsecure algorithm. Among them, the security of the secure algorithm is higher than the security of the unsecure algorithm. For example, when the secure algorithm is used to process the transmitted information, the time length of the non-target receiving node parsing the information is greater than or equal to the time length threshold; when the unsecure algorithm is used to process the transmitted information, the time length of the non-target receiving node parsing the information is less than the time length threshold. Among them, the time length threshold can be pre-configured, such as specified by the protocol.
[0067] 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.
[0068] 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 directly or indirectly sending information to the device. "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 directly or indirectly receiving information from the device. 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.
[0069] To improve the security of communication, the algorithm used by the two parties in communication can be determined through security negotiation. The following takes the two parties in communication as communication device A and communication device B as an example to illustrate the security negotiation method. Figure 1 As shown, the security negotiation method may include:
[0070] S101: Communication device A sends a security association (SA) initialization (SA Init) request message to communication device B.
[0071] Among them, the SA Init request message includes a payload carrying proposal information. The proposal information can be used to indicate the algorithms supported by the communication device A. Exemplarily, the proposal information may include one or more transform information, and each transform information may indicate an algorithm of an algorithm type supported by the communication device A. In each transform information, the algorithms are sorted according to the size of the algorithm identifier (ID), and 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 a safe algorithm and an unsafe algorithm, the ID of the unsafe algorithm is located before the ID of the safe algorithm.
[0072] For example (hereinafter referred to as Example 1), the proposal information includes three transformation information, namely, encryption algorithm transformation information, integrity algorithm transformation information and key exchange algorithm (such as Diffie-Hellman (DH) algorithm) transformation information. That is, the proposal information indicates the three types of algorithms supported by communication device A, and the three algorithm types include encryption algorithm, integrity algorithm and DH algorithm.
[0073] 1. Encryption algorithm transformation information:
[0074] The encryption algorithms supported by communication device A include: triple data encryption standard (3DES), advanced encryption standard cipherblock chaining mode (AESCBC) 128 and advanced encryption standard galois / counter mode (AESGCM) 128. 3DES is an unsafe algorithm, AESCBC128 and AESGCM128 are safe algorithms, and the ID of 3DES is smaller than that of AESCBC128 and AESGCM128. In the encryption algorithm transformation information, the IDs of the algorithms are ranked as follows: 3DES, AESCBC128 and AESGCM128.
[0075] 2. Integrity algorithm transformation information:
[0076] The integrity algorithms supported by communication device A include: secure hash algorithm (SHA) 1, SHA2-256, SHA2-512, and SHA3-256. SHA1 is an unsafe algorithm, SHA2-256, SHA2-512, and SHA3-256 are safe algorithms, and 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 ordered as follows: SHA1, SHA2-256, SHA2-512, and SHA3-256.
[0077] 3. DH algorithm transformation information:
[0078] The DH algorithms supported by communication device A include: DH1, DH5, DH14, DH19, and DH31. DH1, DH5, and DH14 are insecure algorithms, DH19 and DH31 are secure algorithms, and the IDs of DH1, DH5, and DH14 are smaller than those of DH19 and DH31. In the DH algorithm transformation information, the IDs of the algorithms are ranked as follows: DH1, DH5, DH14, DH19, and DH31.
[0079] S102: Communication device B determines the algorithm used when communication device A and communication device B communicate according to the SA Init request message.
[0080] For each transformation information, communication device B can select an algorithm supported by communication device B according to the order of the algorithm IDs from front to back as the algorithm used when communication device A and communication device B communicate. For example, still taking Example 1 as an example. If the algorithms supported by communication device B and communication device A are exactly the same, the algorithms selected by communication device B include: 3DES, SHA1 and DH1.
[0081] S103: Communication device B sends a SA initialization (Init) response message to communication device A.
[0082] The SA Init response message may be used to indicate the algorithm determined in S102 by the communication device B. For example, if the algorithms selected by the communication device B include: 3DES, SHA1 and DH1, the SA Init response message may include: 3DES ID, SHA1 ID and DH1 ID.
[0083] pass Figure 1 In the method shown, when communication device A and communication device B support both secure algorithms and unsecure algorithms, the negotiated algorithm is usually an unsecure algorithm. If communication device A and communication device B use an unsecure algorithm to communicate, the confidentiality and integrity of the information transmitted between the two will be affected, thereby reducing the security of the communication.
[0084] In view of this, an embodiment of the present application provides a communication method. Figure 2 A flow chart corresponding to the communication method provided in the embodiment of the present application. Figure 2 The method is illustrated by taking the first device and the second device as the execution subject of the interaction as an example, but the present application does not limit the execution subject of the interaction. For example, the first device and the second device can be two communication devices that interact, or modules used in two communication devices that interact, such as circuits, chips, chip systems or processors, or logical nodes, logical modules or software that can implement all or part of the functions of the communication devices.
[0085] S201: The first device sends proposal information to the second device; correspondingly, the second device receives the proposal information from the first device.
[0086] 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, the proposal information includes indication information (for example, ID) of the at least two algorithms; the proposal information may also indirectly indicate the at least two algorithms, for example, the proposal information includes information that has a corresponding relationship with the at least two algorithms.
[0087] 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 pseudo-random 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, at least two algorithms of the first algorithm type may be encapsulated in the encryption algorithm transformation information.
[0088] 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, and this application does not limit this.
[0089] 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. Through this method, a security algorithm can be negotiated with the second device as much as possible. In another possible implementation, the M security algorithms indicated by the proposal information are some security algorithms of the first algorithm type supported by the first device. Through this method, signaling overhead can be reduced. 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 restriction.
[0090] 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.
[0091] The first information may be used to indicate the first security algorithm. For example, the first information includes indication information (eg, ID) of the first security algorithm. The first security algorithm may be used for communication between the first device and the second device.
[0092] There may be multiple 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, without limitation. Table 1 shows several possible examples. There may also be multiple unsafe algorithms supported by the first device indicated by the proposal information, the unsafe algorithms supported by the second device, and the first unsafe algorithm, without limitation. Table 2 shows several possible examples. Any example in Table 1 may be combined with any example in Table 2.
[0093] Table 1
[0094]
[0095] Table 2
[0096]
[0097] The following uses the first algorithm type of an encryption algorithm, an integrity algorithm, and a key exchange algorithm as examples to illustrate the first security algorithm indicated by the first information.
[0098] For example, the first algorithm type is an encryption algorithm. The M security algorithms among the encryption algorithms supported by the first device include: AESCBC128 and AESGCM128, and the N unsafe algorithms among the encryption 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.
[0099] For another example, the first algorithm type is an integrity algorithm. The M security algorithms among the integrity algorithms supported by the first device include: SHA2-256, SHA2-512, and SHA3-256, and the N unsafe algorithms among the integrity algorithms supported by the first device 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.
[0100] For another example, the first algorithm type is a key exchange algorithm. The M security algorithms among the key exchange algorithms supported by the first device include: DH19 and DH31, and the N unsafe algorithms among the 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.
[0101] 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.
[0102] pass Figure 2 In the method shown, when the first device and the second device both support a first secure algorithm and a 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.
[0103] Figure 2 The method shown is described by taking the security negotiation of the algorithm of the first algorithm type as an example. It should be understood that Figure 2 The method shown can also be applied to secure negotiation of algorithms of various algorithm types, which is described below.
[0104] In S201, the first device may send proposal information to the second device, and the proposal information may indicate at least two algorithms of each algorithm type among 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 interaction algorithm, and a pseudo-random algorithm.
[0105] For the i-th algorithm type among the P algorithm types, i is an integer ranging from 1 to P, the at least two algorithms may include M i security algorithms and N i Unsafe algorithms, M i and N i Is a positive integer.
[0106] In S202, when the second device supports M i The i-th security algorithm and N security algorithms 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 in Table 1, except that the first security algorithm is replaced by the i-th security algorithm. i The i-th unsafe algorithm and N i The relationship between the unsafe algorithms can be referred to in Table 2, except that the first unsafe algorithm is replaced by the i-th unsafe algorithm. i unsafe algorithms are replaced by N unsafe algorithms.
[0107] 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.
[0108] 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 supported unsecure algorithms 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 according to 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 method for determining the security algorithm, 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.
[0109] Mode A1: The second device receives the second information, and the second information can 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 a first secure algorithm, and the first unsecure algorithm set includes a first unsecure algorithm. In this way, the second device can determine at least one of the following based on the second information: the first secure algorithm set or the first unsecure algorithm set.
[0110] 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 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.
[0111] 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.
[0112] Table 3
[0113]
[0114] Table 4
[0115]
[0116] 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 algorithm that does not belong to the first security algorithm set as an unsafe algorithm, thereby determining the first unsafe algorithm set containing 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 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).
[0117] In some other examples, the second information includes indication information of each algorithm in the first secure algorithm set and indication information of each algorithm in the first unsecure algorithm set. In this way, 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 of each algorithm in the first secure algorithm set includes indication information of algorithms 1 to 4, and the indication information of each algorithm in the first unsecure algorithm set includes indication information of algorithms 5 to 6. The second device can determine that the first secure algorithm set includes algorithms 1 to 4, and the first unsecure algorithm set includes algorithms 5 and 6.
[0118] 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 Algorithm 6 (e.g., Algorithms 1 to Algorithm 4) are secure algorithms, thereby determining that the first security algorithm set includes algorithms other than Algorithms 5 to Algorithm 6 (e.g., Algorithms 1 to Algorithm 4).
[0119] Optionally, after receiving the second information, the second device may save at least one of the following: the first security algorithm set or the first unsafe algorithm set. For example, the second device may save the first security algorithm set in a local security algorithm database. For another example, the second device may save the first unsafe algorithm set in a local unsafe algorithm database.
[0120] 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).
[0121] 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. Among them, 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 realize all or part of the server function. 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, another 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.
[0122] The third device may output the second information after determining 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 by unicast. The second information may be sent periodically by the third device, or may be sent when at least one of the first security algorithm set or the first unsafe algorithm set is updated.
[0123] 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, such as specified by a protocol, or included in the factory configuration of the second device, or pre-configured in a subscriber identity module (SIM) card of the second device, without restriction.
[0124] Method A3: The secure algorithm set (for example, 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 (for example, the first unsecure algorithm set) or which algorithms are unsecure algorithms is pre-configured using the method described in method A2.
[0125] Some possible ways are Figure 2The method shown also includes the first device determining which algorithms are secure algorithms and which algorithms are unsecure algorithms. The determination method of the first device is the same as the determination method of 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 the above-mentioned methods A1 to A3, which will not be repeated here. Among them, the method of indicating the first secure algorithm set and / or the first unsecure algorithm set to the second device through the second information is the same as the method of indicating the second secure algorithm set and / or the second unsecure algorithm set to the first device through the third information, but the results of the indication can be the same or different, and are not limited. 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, and the contents indicated by the second information and the third information are the same or different. Exemplarily, the secure algorithm set indicated by the second information includes the first secure algorithm, and the indicated unsecure algorithm set includes the first unsecure algorithm; the secure algorithm set indicated by the third information includes the above-mentioned M secure algorithms, and the indicated unsecure algorithm set includes the said 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 supported unsecure algorithms 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 according to 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 method for determining the security algorithm, 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.
[0126] The determination methods of the first device and the second device can be the same or different, without limitation. For example, the first device and the second device are both determined by method A1; for another example, the first device is determined by method A1, and the second device is determined by method A2; no more examples are given.
[0127] Optionally, after determining at least one of the first secure algorithm set or the first unsecure algorithm set, the second device may learn which algorithms are secure algorithms and which algorithms are unsecure algorithms. Then, the second device may adopt 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.
[0128] Method R1: includes steps B1 and B2.
[0129] B1: The second device 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.
[0130] In some examples, if M algorithms of 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.
[0131] 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.
[0132] B2: The second device determines a first security algorithm from the M security algorithms.
[0133] In some possible ways, the second device supports one security algorithm among M security algorithms, and 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, the second device supports security algorithm #1 among M security algorithms, and the second device may determine that the first security algorithm is security algorithm #1.
[0134] In some other possible ways, the second device supports M2 security algorithms among the M security algorithms (for example, as shown in example a2 or example a4 in Table 1 above), and the second device can select one algorithm from the M2 security algorithms as the first security algorithm. There are multiple ways for the second device to select one algorithm from the M2 security algorithms as the first security algorithm, for example, way 1, way 2, or way 3.
[0135] Mode 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 algorithm a1 to algorithm a2. The second device can randomly select an algorithm from algorithm a1 to algorithm a2 as the first security algorithm.
[0136] Mode 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 can be determined based on the security factors of the M2 security algorithms. Exemplarily, the second device can select the algorithm with the highest security factor from the M2 security algorithms as the first security algorithm; that is, 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 to a2. If the security factor of algorithm a1 is higher than the security factor of algorithm a2, the second device can select algorithm a1 as the first security algorithm.
[0137] 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.
[0138] 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.
[0139] Mode 3: The second device selects an algorithm from the M2 security algorithms as the first security algorithm according to the time when the M2 security algorithms are determined as security algorithms; in other words, the first security algorithm is determined according to the time when the M2 security algorithms are determined as security algorithms. Exemplarily, the second device may select the algorithm that is determined as the security algorithm the latest from the M2 security algorithms as the first security algorithm; that is, the first security algorithm is the algorithm that is determined as the security algorithm the latest among the M2 security algorithms. For example, the M2 algorithms include algorithms a1 to a2. If the time when algorithm a1 is determined as the security algorithm is later than the time when algorithm a2 is determined as the security algorithm, the second device may select algorithm a1 as the first security algorithm.
[0140] 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.
[0141] In some possible ways, 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: a timestamp 1 for indicating the output time 1 of the second information 5, and a timestamp 2 for indicating the output time 2 of the second information 6. After receiving the indication information 1, the second device may determine that the time when algorithm a1 is determined as the security algorithm is the output time 1, and the time when algorithm a2 is determined as the security algorithm is the output time 2.
[0142] 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.
[0143] In some other possible ways, 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 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 time when algorithm a1 is determined as the security algorithm is the time when the second device receives the second information 5, and the time when algorithm a2 is determined as the security algorithm is the time when the second device receives the second information 6.
[0144] According to method 3, the latest security algorithm can be negotiated first for communication.
[0145] Through steps B1 to B2, the second device can learn which algorithms are secure algorithms based on at least one of the first secure algorithm set or the first unsecure algorithm set. In this way, no matter how the algorithm indication information in the proposal information in S201 is sorted, the second device can select a secure 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.
[0146] In some possible examples, in step B1, the second device may determine some of the 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 the first security algorithm from the M3 security algorithms. The specific algorithms are similar to the descriptions of B1 and B2 above. That is, the second device does not need to know how many security algorithms are indicated by the proposal information. After identifying some security algorithms indicated by the proposal information, it can determine the first security algorithm. Through this method, the implementation complexity of the second device can be reduced and computing resources can be saved.
[0147] Method R2:
[0148] The second device may select the first security algorithm supported by the second device from at least two algorithms according to the order of the indication information of each algorithm in the proposal information from front to back, and the 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 among at least two algorithms according to the order of the indication information of each algorithm in the proposal information from front to back. For example, the M security algorithms are algorithms a1 to a4, and the N unsafe algorithms are algorithms b1 to b3. In the proposal information, the order of the indication information of each algorithm from front to back is: algorithm a1, algorithm a2, algorithm a3, algorithm a4, algorithm b1, algorithm b2 and algorithm b3. For example, if the second device supports algorithms a1 to a4, and algorithms b1 to b3, the second device selects algorithm a1 as the first security algorithm according to the order of the indication information of each algorithm in the proposal information from front to back. For another example, the second device supports algorithms a2 to a4, and algorithms b1 to b3, then the second device selects algorithm a2 as the first security algorithm according to the order of the indication information of each algorithm in the proposal information from front to back.
[0149] 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.
[0150] Design C1: The proposed information includes indication information of each of at least two algorithms, and the at least two algorithms include M secure algorithms and N unsecure algorithms. 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. M1 is a positive integer less than or equal to M, and N1 is a positive integer less than or equal to N. Through this method, when the first secure algorithm is determined using the above-mentioned method R1, method R2 or other possible methods, the second device can quickly determine the secure algorithm.
[0151] The M1 security algorithms may be part or all of the M security algorithms. When the M1 security algorithms are part of the M security algorithms, the remaining security algorithms in the M security algorithms except the M1 security algorithms are located after the M1 security algorithms. The N1 unsafe algorithms may be part or all of the N unsafe algorithms. When the N1 unsafe algorithms are part of the N unsafe algorithms, the remaining unsafe algorithms in the N unsafe algorithms except the N1 unsafe algorithms are located after the N1 unsafe algorithms.
[0152] In some examples, in the proposal information, the indication information of the M security algorithms may all be located before the indication information of the N unsafe algorithms. For example, the M security algorithms are algorithms a1 to a4, the M1 security algorithms are part or all of the M security algorithms, and the N unsafe algorithms are algorithms b1 to b3. In the proposal information, the order of the indication information of each algorithm from front to back is: algorithm a1, algorithm a2, algorithm a3, algorithm a4, algorithm b1, algorithm b2, and algorithm b3.
[0153] In some other examples, in the proposal information, some or all of the algorithms except the M1 security algorithms in the M security algorithms are located after some or all of the algorithms in the N1 unsafe algorithms. The following example is taken as an example that the M security algorithms are algorithms a1 to a4, the M1 security algorithms are 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 indication information of 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 indication information of 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 indication information of 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 indication information of each algorithm from front to back is: algorithm a1, algorithm b1, algorithm b2, algorithm b3, algorithm a2, algorithm a3, and algorithm a4.
[0154] Design C2: The proposed information includes indication information of each algorithm 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 as a security algorithm, the later it is ranked among the M security algorithms. That is to say, in the proposed information, the earlier the indication information of the security algorithm is determined as a security algorithm among the M security algorithms, the later it is ranked. Among them, the specific content of the time when the M security algorithms are determined as security algorithms can refer to the description of the time when the M2 security algorithms are determined as security algorithms in the above-mentioned method 3. When referring to it, the M2 security algorithms are replaced with the M security algorithms, which will not be repeated here. That is, the time when the algorithm is determined as 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 times determined as security algorithms are from earliest to latest: algorithm a4, algorithm a3, algorithm a2, algorithm a1, then in the proposal information, the order of the instruction information of each algorithm from front to back is: algorithm a1, algorithm a2, algorithm a3, algorithm a4. In this way, if the second device determines the first security algorithm according to method a1, and the second device supports algorithms a1 to a4, the second device can determine algorithm a1 as the first security algorithm. Through this design, the latest security algorithm can be negotiated first for communication.
[0155] Design C3: The proposal information includes indication information of each algorithm in at least two algorithms, and the at least two algorithms include M security algorithms and N unsafe algorithms. Among the M security algorithms, the security algorithm with a higher security factor is ranked higher in the M security algorithms. That is, in the proposal information, the indication information of the security algorithm with a higher security factor is ranked higher in the M security algorithms. Among them, the specific content of the security factor of the M security algorithms can refer to the description of the security factor of the M2 security algorithms in the above-mentioned method 2. When referring, the M2 security algorithms are replaced by the M security algorithms, which will not be repeated here. That is, the security factor of the security algorithm can be determined by pre-configuration or by instructions from other devices (for example, a third device). For example, the M security algorithms are algorithms a1 to a4. If the security factors are from low to high: algorithm a4, algorithm a3, algorithm a2, algorithm a1, then in the proposal information, the indication information of each algorithm is ordered from front to back: algorithm a1, algorithm a2, algorithm a3, algorithm a4. In this way, if the second device determines the first security algorithm according to the method a1, and the second device supports algorithms a1 to a4, the second device can determine that algorithm a1 is the first security algorithm. The higher the security factor of the security algorithm, the stronger the security of the security algorithm. Therefore, through this design, the security of the communication between the first device and the second device can be further improved.
[0156] Design C4: A combination of at least two designs from Designs C1 to C3, such as C1+C2, C1+C3, C1+C3, or C1+C2+C3.
[0157] Based on the same technical concept as the above 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 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 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 realize 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 realize all or part of the functions of the server. Among them, a possible example of a server is a network management.
[0158] In a possible implementation, the structure of the communication device provided in the embodiment of the present application is as follows: Figure 3 As shown, it includes an interface unit 301 and a processing unit 302. The functions of each unit in the communication device 300 are introduced below.
[0159] 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 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. Among them, 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.
[0160] The processing unit 302 can be used to support the communication device 300 to perform 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.
[0161] In one embodiment, the communication device 300 is applied to Figure 2 The second device in the embodiment of the present application is shown. The specific functions of the processing unit 302 in this implementation are introduced below.
[0162] The processing unit 302 is used to: receive proposal information from the first device through the interface unit 301, the proposal information is used to indicate at least two algorithms of the first algorithm type supported by the first device, the at least two algorithms include M security algorithms and N unsafe algorithms, 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, send first information to the first device through the interface unit 301, the first information is used to indicate a first security algorithm, and the first security algorithm is used to communicate with the first device.
[0163] In some possible embodiments, the processing unit 302 is also used to: receive second information through the interface unit 301, and the second information is used to indicate at least one of the following: a first security algorithm set or a first unsafe algorithm set, wherein the first security algorithm set includes a first security algorithm, and the first unsafe algorithm set includes a first unsafe algorithm.
[0164] In another embodiment, the communication device 300 is applied to Figure 2 The first device in the embodiment of the present application is shown. The specific functions of the processing unit 302 in this embodiment are introduced below.
[0165] 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; 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.
[0166] In some possible embodiments, the processing unit 302 is also 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.
[0167] In yet another embodiment, the communication device 300 is applied to Figure 2 The third device in the embodiment of the present application is shown below. The specific functions of the processing unit 302 in this implementation are introduced below.
[0168] The processing unit 302 is used 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.
[0169] In some possible embodiments, the processing unit 302 is further used to: output at least one of the following through the interface unit 301: a safety factor of each security algorithm in the first security algorithm set; or indication information of an output time of the second information.
[0170] For a more detailed description of the processing unit 302 and the interface unit 301, please refer to Figure 2 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0171] It should be noted that the division of modules in the above embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0172] 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 to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0173] In a possible implementation, the communication device provided in the embodiment of the present application refers to Figure 4 As shown, the communication device 400 includes: a processor 402. Optionally, the communication device 400 also 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.
[0174] 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 divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0175] The interface circuit 401 is used to input and / or output information. The input information can be replaced by receiving information, and the output information can be replaced by sending information. When outputting information, the interface circuit 401 can output information to other devices outside the communication device 400, or can output information to other units in the communication device 400. Exemplarily, the interface circuit 401 can be implemented by at least one of a physical interface, a communication module, a communication interface, an input-output interface, and a mobile communication module. Among them, 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, etc.
[0176] The processor 402 may be used to support the communication device 400 in executing the processing actions in the above method embodiment. When the communication device 400 is used to implement the above method embodiment, the processor 402 may also be used to implement the functions of the above processing unit 302. The processor 402 may be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor, or any conventional processor.
[0177] In one embodiment, the communication device 400 is applied to Figure 2 The second device in the embodiment of the present application is shown. The specific functions of the processor 402 in this implementation are introduced below.
[0178] The processor 402 is used 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 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 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.
[0179] In another embodiment, the communication device 400 is applied to Figure 2 The first device in the embodiment of the present application is shown. The specific functions of the processor 402 in this implementation are introduced below.
[0180] The processor 402 is used 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 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; 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.
[0181] In yet another embodiment, the communication device 400 is applied to Figure 2 The third device in the embodiment of the present application is shown below. The specific functions of the processor 402 in this implementation are introduced below.
[0182] The processor 402 is used 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.
[0183] The specific functions of the processor 402 may refer to the description of the communication method provided in the above embodiments and examples of the present application, and Figure 3 The specific functional description of the communication device 300 in the embodiment of the present application is not repeated here.
[0184] The memory 403 is used to store program instructions and / or data, etc. Specifically, the program instructions may include program codes, and the program codes include 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-mentioned 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.
[0185] It is understandable that this application Figure 4 The memory 403 in can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a ROM, a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (electrically EPROM, EEPROM) or a flash memory. The volatile memory can 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 (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (doubledata rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhancedSDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
[0186] Based on the above embodiments, the embodiments of the present application further provide a computer program product including computer executable instructions. When the computer program product is run, the method provided in the above embodiments is executed.
[0187] Based on the above embodiments, the embodiments of the present application further provide 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.
[0188] The storage medium may be any available medium that can be accessed by a computer. For example, but not limited to, a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
[0189] 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.
[0190] Based on the above embodiments, the 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 a possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0191] In the various embodiments of the present application, unless otherwise specified or provided for in any logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.
[0192] 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 process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0193] These computer program instructions may also be stored in a computer-readable memory capable of directing 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 an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0194] 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, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0195] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, 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 associated objects before and after are in an "or" relationship.
[0196] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.
[0197] Obviously, those skilled in the art can 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 also intended to include these modifications and variations.
Claims
1. A communication method, characterized in that: include: Receive proposal information from a first device, 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; 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
Cited By
Security negotiation-based communication method, and apparatus
EP4734575A1