Communication method and device

The communication method and apparatus facilitate secure and efficient data transmission by enabling nodes to negotiate and use compatible algorithms and KDFs, addressing inefficiencies and security vulnerabilities in existing systems.

JP7775382B2Active Publication Date: 2025-11-25HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024110993
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2025-11-25
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

Existing communication systems face challenges in ensuring efficient and secure data transmission due to the use of multiple algorithms by senders and receivers, which can lead to inefficiencies and security vulnerabilities.

Method used

A communication method and apparatus that enables nodes to negotiate and agree on specific algorithms and key derivation functions (KDFs) for encryption and decryption, allowing for secure and efficient processing of communication information through integrity protection and authenticated encryption.

Benefits of technology

Enhances communication security and efficiency by ensuring that nodes use compatible algorithms and KDFs, improving the integrity and flexibility of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007775382000008
    Figure 0007775382000008
  • Figure 0007775382000009
    Figure 0007775382000009
  • Figure 0007775382000010
    Figure 0007775382000010
Patent Text Reader

Abstract

To provide a communication method and device that enable a sender and a receiver to accurately and efficiently execute processes related to encryption or decryption of communication information.SOLUTION: In a communication system, a method includes receiving first algorithm negotiation request information from a second node, the first algorithm negotiation request information being used to indicate one or more algorithms and one or more key derivation functions, determining at least one first algorithm in the one or more algorithms and at least one first key derivation function in the one or more key derivation functions, and transmitting first information to the second node, the first information being used to indicate the at least one first algorithm and the at least one first key derivation function.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The embodiments of the present application relate to the field of wireless communication, and in particular to a communication method and apparatus. The method and apparatus can be applied to short-range communication fields, such as cockpit domains, and can be applied to scenarios such as autonomous driving or intelligent driving. [Background technology]

[0002] During data transmission, in order to ensure the security of data transmission, the sender will encrypt the data by using an algorithm and send the encrypted data to the receiver. After receiving the encrypted data, the receiver will decrypt the encrypted data by using an algorithm to obtain the data. In order for the receiver to be able to correctly decrypt the data sent by the sender, the receiver needs to decrypt the encrypted data using the same algorithm as the sender to ensure normal communication.

[0003] However, in the prior art, there are many types of algorithms related to communication encryption. Based on the capabilities of the sender and receiver and the requirements of the scenario, the sender and receiver may support many types of algorithms. Therefore, a method that enables the sender and receiver to use the same algorithm to accurately and efficiently perform processing such as encryption or decryption on data is important for communication efficiency and performance. Summary of the Invention [Problem to be solved by the invention]

[0004] SUMMARY OF THE INVENTION The embodiments of the present application provide a communication method and apparatus that enable senders and receivers to accurately and efficiently perform processes related to encryption or decryption of communication information. [Means for solving the problem]

[0005] In order to achieve the aforementioned objectives, the following technical solutions are used in the embodiments of this application.

[0006] According to a first aspect, an embodiment of the present application provides a communication method, the method being applied to a first node, the method including: receiving first algorithm negotiation request information from a second node, the first algorithm negotiation request information being used to indicate one or more algorithms and one or more key derivation functions (KDFs); determining at least one first algorithm among the one or more algorithms and at least one first KDF among the one or more KDFs; and sending first information to the second node, the first information being used to indicate the at least one first algorithm and the at least one first KDF.

[0007] According to the method provided in the first aspect, first algorithm negotiation request information used to indicate one or more algorithms and one or more KDFs can be received from a second node, at least one first algorithm and at least one first KDF can be determined based on the first algorithm negotiation request information, and first information used to indicate the at least one first algorithm and at least one first KDF can be transmitted to the second node. In this manner, the first node can negotiate with the second node about the algorithms and KDFs, so that the first node and the second node can accurately and efficiently perform processing related to encryption or decryption of communication information. Take the example of a first node transmitting information to the second node. The first node can encrypt information according to the negotiated algorithms and KDFs and transmit the encrypted information to the second node. After receiving the encrypted information, the second node can decrypt the encrypted information according to the negotiated algorithms and KDFs. This improves the security of communication between the first node and the second node.

[0008] In relation to the first aspect, in one possible implementation, the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm. Based on the above method, the first node and the second node may communicate with each other by using multiple algorithms, such as an encryption algorithm, an integrity protection algorithm, or an authenticated encryption algorithm. This improves the diversity of algorithms used in communication between the first node and the second node.

[0009] In relation to the first aspect and possible implementations thereof, in one possible implementation, integrity protection is performed on the first information by using at least one first algorithm. Based on the above method, the first node may perform integrity protection on the first information by using at least one first algorithm. This improves the security of communication between the first node and the second node.

[0010] In relation to the first aspect and possible implementations thereof, in one possible implementation, the first information includes second information and a first message authentication code (MAC), the second information is used to indicate at least one first algorithm and at least one first KDF, and the first MAC is obtained by performing integrity protection on the second information. Based on the above method, the first node may send the second information and the first MAC to the second node and perform integrity protection on the second information by using the first MAC. This can improve the security of communication between the first node and the second node.

[0011] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm. Based on the above method, the first node may perform integrity protection on the second information by using multiple algorithms. This improves the flexibility and diversity of the integrity protection performed by the first node on information between the first node and the second node.

[0012] In relation to the first aspect and possible implementations thereof, in one possible implementation, the second information further includes a first freshness parameter and first verification information, where the first freshness parameter is a parameter related to the time validity of the first information, and the first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, the first freshness parameter, and the first KDF. Based on the above method, the first node may further perform integrity protection on the first algorithm negotiation request information based on the first verification information, thereby improving the security of communication between the first node and the second node.

[0013] In relation to the first aspect and possible implementations thereof, in one possible implementation, the first information includes encrypted information, second communication information, and a second MAC; the encrypted information is obtained by encrypting the first communication information, where the first communication information does not indicate at least one of the at least one first algorithm or the at least one first KDF, and the second communication information is used to indicate at least one of the at least one first algorithm or the at least one first KDF; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information. Based on the above method, the first node may encrypt the first communication information to obtain encrypted information and perform integrity protection on the encrypted information and the second communication information by using the second MAC. This can improve the security of communications between the first node and the second node.

[0014] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm; the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm. Based on the above method, the first node may further encrypt the first communication information by using the encryption algorithm and perform integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm. This improves the security of communication between the first node and the second node.

[0015] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an authenticated encryption algorithm; the encrypted information is obtained by encrypting the first communication information by using the authenticated encryption algorithm; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the authenticated encryption algorithm. Based on the above method, the first node may further encrypt the first communication information by using the authenticated encryption algorithm and perform integrity protection on the encrypted information and the second communication information by using the authenticated encryption algorithm. This improves the security of communications between the first node and the second node.

[0016] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm is an algorithm supported by the first node and has the highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has the highest priority among the one or more KDFs. Based on the above method, the priority of the algorithm is obtained based on the security of the algorithm, and a higher priority of the algorithm used indicates higher communication security, so the first node communicates with the second node by using the algorithm supported by the first node and has the highest priority among the one or more algorithms, and the KDF supported by the first node and has the highest priority among the one or more KDFs. This can improve the security of communication between the first node and the second node.

[0017] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm corresponds to one or more algorithm types, and the algorithm type corresponding to the at least one first algorithm is an algorithm type supported by the first node and having a highest priority among the one or more algorithm types of the one or more algorithms. Based on the above method, the first node can determine an algorithm type having a highest priority among the algorithm types supported by both the first node and the second node, and as a result, the first node determines the at least one first algorithm corresponding to the algorithm type having the highest priority.

[0018] In relation to the first aspect and possible implementations thereof, in one possible implementation, at least one first algorithm corresponds to one algorithm type, and the algorithm type may correspond to multiple algorithms with different priorities, and the first algorithm is an algorithm supported by the first node and having the highest priority among the algorithms corresponding to the algorithm type. Based on the above method, when the at least one first algorithm corresponds to one algorithm type, the first node may determine as the first algorithm an algorithm supported by the first node and having the highest priority among the algorithm type corresponding to the first algorithm. Alternatively, if the algorithm type corresponds to only one algorithm, the first node may determine that the first algorithm includes the algorithm. In this way, the first node may communicate with the second node by using an algorithm with a relatively high priority. Typically, the priority of an algorithm is related to the security of the algorithm. Therefore, the first node and the second node may communicate with each other by using an algorithm with a relatively high priority, thereby improving the security of communication between the first node and the second node.

[0019] In relation to the first aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm corresponds to a plurality of algorithm types, and the plurality of algorithm types have the same priority. Each algorithm type may correspond to one or more algorithms having different priorities, and the at least one first algorithm includes an algorithm supported by the first node and having the highest priority among the algorithms corresponding to each of the plurality of algorithm types. Alternatively, if an algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to that algorithm type. Based on the above method, when the at least one first algorithm corresponds to a plurality of algorithm types, the first node may determine an algorithm supported by the first node and having the highest priority among each algorithm type as the first algorithm. In this way, the first node may communicate with the second node by using an algorithm having a relatively high priority. Typically, the priority of an algorithm is related to the security of the algorithm. Therefore, the first node and the second node may communicate with each other by using an algorithm having a relatively high priority, thereby improving the security of communication between the first node and the second node.

[0020] In relation to the first aspect and possible implementations thereof, in one possible implementation, the first algorithm negotiation request information includes a second freshness parameter, where the second freshness parameter is a parameter related to the time validity of the first algorithm negotiation request information, and the method further includes: receiving second verification information from the second node, where the second verification information is obtained based on the first information, the preset shared key, the second freshness parameter, and the first KDF; and verifying the second verification information based on the first information, the shared key, the second freshness parameter, and the first KDF. Based on the above method, the first node can verify whether the first information received by the second node has been modified based on the first information, the shared key, the second freshness parameter, and the first KDF, and the security of communication between the first node and the second node can be improved.

[0021] In relation to the first aspect and possible implementations thereof, in one possible implementation, the method further includes the steps of: receiving second algorithm negotiation request information from the second node, the second algorithm negotiation request information being used to indicate one or more algorithms and one or more KDFs; and transmitting third information to the second node, the third information being used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable. Based on the above method, the first node may receive the second algorithm negotiation request information from the second node and used to indicate one or more algorithms and one or more KDFs, and transmit the third information to the second node, the third information being used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable. In this way, the first node and the second node can negotiate the algorithm and KDF by communicating multiple times, which can improve the success rate of the algorithm and KDF negotiation by the first node and the second node.

[0022] In relation to the first aspect and possible implementations thereof, in one possible implementation, the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; and the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information. Based on the above method, the first node can obtain one or more algorithms and one or more KDFs indicated by the second node multiple times, and as a result, the first node determines the algorithms and KDFs to be used in communication with the second node based on the one or more obtained algorithms and one or more obtained KDFs. This improves the success rate of algorithm and KDF negotiation between the first node and the second node.

[0023] According to a second aspect, an embodiment of the present application provides a communication method, which is applied to a second node, and includes: sending first algorithm negotiation request information to a first node, where the first algorithm negotiation request information is used to indicate one or more algorithms and one or more KDFs; and receiving first information from the first node, where the first information is used to indicate at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs.

[0024] According to a method provided in a second aspect, first algorithm negotiation request information used to indicate one or more algorithms and one or more KDFs can be sent to a first node, and first information used to indicate at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs can be received from a second node. In this manner, the first node and the second node can negotiate algorithms and KDFs and communicate with each other by using the negotiated algorithms and KDFs, so that the first node and the second node can accurately and efficiently perform processing related to encryption or decryption of communication information.

[0025] In relation to the second aspect, in one possible implementation, the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm. Based on the above method, the first node and the second node may communicate with each other by using multiple algorithms, such as an encryption algorithm, an integrity protection algorithm, or an authenticated encryption algorithm. This improves the diversity of algorithms used in communication between the first node and the second node.

[0026] In relation to the second aspect and possible implementations thereof, in one possible implementation, integrity protection is performed on the first information by using at least one first algorithm. Based on the above method, the second node may verify the integrity of the first information by using the at least one first algorithm. This improves the security of communication between the first node and the second node.

[0027] In relation to the second aspect and possible implementations thereof, in one possible implementation, the first information includes second information and a first message authentication code (MAC), the second information is used to indicate at least one first algorithm and at least one first KDF, and the first MAC is obtained by performing integrity protection on the second information. Based on the above method, the second node can receive the second information and the first MAC from the first node, where the integrity protection is performed on the second information by using the first MAC. This can improve the security of communication between the first node and the second node.

[0028] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm, and the method further includes obtaining a third MAC based on the integrity protection algorithm and the second information, and the third MAC is used to verify the integrity of the second information; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm, and the method further includes obtaining a third MAC based on the authenticated encryption algorithm and the second information, and the third MAC is used to verify the integrity of the second information. Based on the above method, the second node can verify the integrity of the second information according to multiple algorithms, thereby improving the flexibility and versatility of the second node when verifying the integrity of information.

[0029]

[0013] In relation to the second aspect and possible implementations thereof, in one possible implementation, the second information further includes a first freshness parameter and first verification information, where the first freshness parameter is a parameter related to the time validity of the first information, and the first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, the first freshness parameter, and the first KDF. Based on the above method, the second node can further verify the integrity of the first algorithm negotiation request information by using the first verification information, thereby improving the security of communication between the first node and the second node.

[0030] In relation to the second aspect and possible implementations thereof, in one possible implementation, the first information includes encrypted information, second communication information, and a second MAC; the encrypted information is obtained by encrypting the first communication information, where the first communication information does not indicate at least one of the at least one first algorithm or the at least one first KDF, and the second communication information is used to indicate at least one of the at least one first algorithm or the at least one first KDF; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information. Based on the above method, the second node can receive the encrypted information, the second communication information, and the second MAC from the first node, and as a result, the second node verifies the integrity of the encrypted information and the second communication information by using the second MAC. This can improve the security of communications between the first node and the second node.

[0031] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm; the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm; the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm; the method further includes the steps of: obtaining a fourth MAC based on the integrity protection algorithm, the encrypted information, and the second communication information; and, if the fourth MAC is the same as the second MAC, decrypting the encrypted information by using the encryption algorithm. Based on the above method, the second node may further obtain a fourth MAC based on the integrity protection algorithm, the encrypted information, and the second communication information, and verify the integrity of the encrypted information and the second communication information by using the fourth MAC. This improves the security of communications between the first node and the second node.

[0032] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm includes an authenticated encryption algorithm; the encrypted information is obtained by encrypting the first communication information using the authenticated encryption algorithm; the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information using the authenticated encryption algorithm; the method further includes the steps of: obtaining a fourth MAC based on the authenticated encryption algorithm, the encrypted information, and the second communication information; and, if the fourth MAC is the same as the second MAC, decrypting the encrypted information using the authenticated encryption algorithm. Based on the above method, the second node may further obtain a fourth MAC based on the authenticated encryption algorithm, the encrypted information, and the second communication information, and verify the integrity of the encrypted information and the second communication information by using the fourth MAC. This improves the security of communications between the first node and the second node.

[0033] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm is an algorithm supported by the first node and has the highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has the highest priority among the one or more KDFs. Based on the above method, the priority of the algorithm is obtained based on the security of the algorithm, and a higher priority of the algorithm used indicates higher communication security. Therefore, the second node communicates with the first node by using the algorithm supported by the first node and has the highest priority among the one or more algorithms, and the KDF supported by the first node and has the highest priority among the one or more KDFs. This can improve the security of communication between the first node and the second node.

[0034] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm corresponds to one or more algorithm types, and the algorithm type corresponding to the at least one first algorithm is an algorithm type supported by the first node and having a highest priority among the one or more algorithm types of the one or more algorithms. Based on the above method, the first node can determine an algorithm type having a highest priority among the algorithm types supported by both the first node and the second node, and as a result, the first node determines the at least one first algorithm corresponding to the algorithm type having the highest priority.

[0035] In relation to the second aspect and possible implementations thereof, in one possible implementation, at least one first algorithm corresponds to one algorithm type, and the algorithm type may correspond to multiple algorithms with different priorities, and the first algorithm is the algorithm supported by the first node and having the highest priority among the algorithms corresponding to the algorithm type. Based on the above method, when the at least one first algorithm corresponds to one algorithm type, the first node may determine the algorithm supported by the first node and having the highest priority among the algorithm type corresponding to the first algorithm as the first algorithm. Alternatively, if the algorithm type corresponds to only one algorithm, the first node may determine that the first algorithm includes the algorithm. In this way, the first node may communicate with the second node by using an algorithm with a relatively high priority. Typically, the priority of an algorithm is related to the security of the algorithm. Therefore, the first node and the second node may communicate with each other by using an algorithm with a relatively high priority, thereby improving the security of communication between the first node and the second node.

[0036] In relation to the second aspect and possible implementations thereof, in one possible implementation, the at least one first algorithm corresponds to multiple algorithm types, and the multiple algorithm types have the same priority. Each algorithm type may correspond to one or more algorithms with different priorities, and the at least one first algorithm includes an algorithm supported by the first node and having the highest priority among the algorithms corresponding to each of the multiple algorithm types. Alternatively, if an algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to that algorithm type. Based on the above method, when the at least one first algorithm corresponds to multiple algorithm types, the first node may determine, as the first algorithm, an algorithm supported by the first node and having the highest priority among each algorithm type. In this way, the first node may communicate with the second node by using an algorithm with a relatively high priority. Typically, the priority of an algorithm is related to the security of the algorithm. Therefore, the first node and the second node may communicate with each other by using an algorithm with a relatively high priority, thereby improving the security of communication between the first node and the second node.

[0037] In relation to the second aspect and possible implementations thereof, in one possible implementation, the first algorithm negotiation request information further includes a second freshness parameter, the second freshness parameter being a parameter related to the time validity of the first algorithm negotiation request information, and the method further includes a step of transmitting second verification information to the first node, the second verification information being obtained based on the first information, the preset shared key, the second freshness parameter, and the first KDF. Based on the above method, the second node can perform integrity protection on the first information by using the second verification information.

[0038] In relation to the second aspect and possible implementations thereof, in one possible implementation, the method further includes the steps of: sending second algorithm negotiation request information to the first node, the second algorithm negotiation request information being used to indicate one or more algorithms and one or more KDFs; and receiving third information from the first node, the third information being used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable. Based on the above method, the second node may send second algorithm negotiation request information to the first node, used to indicate one or more algorithms and one or more KDFs, and receive third information from the first node, used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable. In this way, the first node and the second node can negotiate the algorithm and KDF by communicating multiple times, which can improve the success rate of the algorithm and KDF negotiation by the first node and the second node.

[0039] In relation to the second aspect and possible implementations thereof, in one possible implementation, the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; and the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information. Based on the above method, the second node can indicate one or more algorithms and one or more KDFs to the first node multiple times, so that the first node determines the algorithms and KDFs to be used in communication with the second node based on the one or more received algorithms and one or more received KDFs. This improves the success rate of algorithm and KDF negotiation between the first node and the second node.

[0040] According to a third aspect, an embodiment of the present application provides a communication device for implementing the method of the first aspect or any one of the possible implementations of the first aspect. The device includes corresponding units or components configured to perform the method. The units included in the device may be implemented by software and / or hardware. For example, the device may be a first node or a chip, chip system, processor, etc. capable of supporting the first node in implementing the aforementioned method.

[0041] According to a fourth aspect, an embodiment of the present application provides a communication device for implementing the method of the second aspect or any one of the possible implementations of the second aspect. The device includes corresponding units or components configured to perform the method. The units included in the device may be implemented by software and / or hardware. For example, the device may be a second node or a chip, chip system, processor, etc. capable of supporting the second node in implementing the aforementioned method.

[0042] According to a fifth aspect, an embodiment of the present application provides a communication device including a processor, the processor coupled to a memory, the memory configured to store programs or instructions, wherein when the programs or instructions are executed by the processor, the device is capable of implementing the first aspect or any one of the possible implementations of the first aspect.

[0043] According to a sixth aspect, an embodiment of the present application provides a communication device including a processor, the processor coupled to a memory, the memory configured to store programs or instructions, wherein the programs or instructions, when executed by the processor, enable the device to implement the second aspect or any one of the possible implementations of the second aspect.

[0044] According to a seventh aspect, an embodiment of the present application provides a communication device, the device being configured to implement the first aspect or any one of the possible implementations of the first aspect.

[0045] According to an eighth aspect, an embodiment of the present application provides a communication device, the device being configured to implement the second aspect or any one of the possible implementations of the second aspect.

[0046] According to a ninth aspect, an embodiment of the present application provides a computer-readable medium, which stores a computer program or instructions, which, when executed, cause a computer to perform the method of the first aspect or any one of the possible implementations of the first aspect.

[0047] According to a tenth aspect, an embodiment of the present application provides a computer-readable medium storing a computer program or instructions, which, when executed, enables a computer to perform the method of the second aspect or any one of the possible implementations of the second aspect.

[0048] According to an eleventh aspect, an embodiment of the present application provides a computer program product, the computer program product including computer program code, which, when executed on a computer, enables the computer to perform the method of the first aspect or any one of the possible implementations of the first aspect.

[0049] According to a twelfth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising computer program code, which, when executed on a computer, enables the computer to perform the method of the second aspect or any one of the possible implementations of the second aspect.

[0050] According to a thirteenth aspect, an embodiment of the present application provides a chip including at least one processor, the processor coupled to a memory, the memory configured to store programs or instructions, and wherein when the programs or instructions are executed by the processor, the chip is capable of implementing the method of the first aspect or any one of the possible implementations of the first aspect.

[0051] According to a fourteenth aspect, an embodiment of the present application provides a chip including at least one processor, the processor coupled to a memory, the memory configured to store programs or instructions, wherein the programs or instructions, when executed by the processor, enable the chip to implement the method of the second aspect or any one of the possible implementations of the second aspect.

[0052] According to a fifteenth aspect, an embodiment of the present application provides a communication system, the system comprising an apparatus according to the third aspect and / or an apparatus according to the fourth aspect, the system comprising an apparatus according to the fifth aspect and / or an apparatus according to the sixth aspect, or the system comprising an apparatus according to the seventh aspect and / or an apparatus according to the eighth aspect.

[0053] It should be understood that any one of the communication apparatus, chip, computer-readable medium, computer program product, communication system, etc. provided above is configured to perform the corresponding method provided above. Therefore, for the beneficial effects that can be achieved by the communication apparatus, chip, computer-readable medium, computer program product, communication system, etc., please refer to the beneficial effects of the corresponding method. Details will not be described herein. [Brief explanation of the drawings]

[0054] [Figure 1] 1 is a schematic architecture diagram of a communication system according to an embodiment of the present application;

[0055] [Figure 2]1 is a schematic diagram of a hardware structure of a communication device according to an embodiment of the present application;

[0056] [Figure 3] 1 is a schematic flowchart 1 of a communication method according to an embodiment of the present application;

[0057] [Figure 4] 2 is a schematic flowchart 2 of a communication method according to an embodiment of the present application.

[0058] [Figure 5] 3 is a schematic flowchart 3 of a communication method according to an embodiment of the present application.

[0059] [Figure 6] 4 is a schematic flowchart 4 of a communication method according to an embodiment of the present application.

[0060] [Figure 7] 5 is a schematic flowchart 5 of a communication method according to an embodiment of the present application.

[0061] [Figure 8] 6 is a schematic flowchart 6 of a communication method according to an embodiment of the present application.

[0062] [Figure 9] 1 is a schematic structural diagram of a communication device according to an embodiment of the present application;

[0063] [Figure 10] 2 is a schematic structural diagram of a communication device according to an embodiment of the present application;

[0064] [Figure 11] 3 is a schematic structural diagram of a communication device according to an embodiment of the present application;

[0065] [Figure 12] 1 is a schematic configuration diagram of a communication system according to an embodiment of the present application.

[0066] [Figure 13] 1 is a schematic structural diagram of a chip according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0067] The following describes in detail the implementation of the embodiments of the present application with reference to the accompanying drawings.

[0068] The method provided in the embodiments of the present application may be applied to various communication systems. For example, the communication system may be a long term evolution (LTE) system, a fifth generation (5G) communication system, a new radio (NR) system, a wireless fidelity (Wi-Fi) system, a communication system related to the 3rd generation partnership project (3GPP®), and a communication system to be deployed in the future. This is not limited thereto. The communication system 10 shown in FIG. 1 is used hereinafter merely as an example to describe the method provided in the embodiments of the present application.

[0069] Fig. 1 is a schematic architecture diagram of a communication system 10 according to an embodiment of the present application. In Fig. 1, the communication system 10 may include a node 101 and a node 102 that can communicate with the node 101. Fig. 1 is merely a schematic diagram and does not constitute a limitation on applicable scenarios of the technical solutions provided in the present application.

[0070] 1 may be any device having reception and transmission capabilities. This device includes, but is not limited to, an evolved NodeB (NodeB, eNB, or e-NodeB, evolutionary Node B) in LTE, a gNodeB (gNodeB or gNB) or transmission receiving point (TRP) in NR, a base station evolved from 3GPP, an access node in a Wi-Fi system, a wireless relay node, a wireless backhaul node, a data forwarding device (e.g., a router, a repeater, a bridge, or a switch), etc. The base station may be a macro base station, a micro base station, a picocell base station, a small cell, a relay base station, a balloon base station, etc. Alternatively, the node 101 or the node 102 may be a radio controller, a centralized unit (CU), and / or a distributed unit (DU) in a cloud radio access network (CRAN) scenario. Alternatively, the node 101 or the node 102 may be a server, a wearable device (such as a smart watch, a smart band, or a pedometer), a machine communication device, an in-vehicle device, or the like.The node 101 or the node 102 may be a mobile phone, a tablet computer (Pad), a computer with wireless transmission and reception capabilities, a headset, a speaker, a virtual reality (VR) terminal device, an augmented reality (AR), a terminal in machine type communication (MTC), a terminal in industrial control, an in-vehicle terminal device, a self-driving terminal, an assisted driving terminal device, a terminal in remote medical, a terminal in smart grid, a terminal in transportation safety, a terminal in smart city, a terminal in smart home, etc. The application scenarios are not limited to the embodiments of the present application. A terminal may also be referred to as a terminal device, user equipment (UE), access terminal device, in-vehicle terminal, industrial control terminal, UE unit, UE station, mobile station, mobile console, remote station, remote terminal device, mobile device, UE terminal device, wireless communication device, machine terminal, UE agent, UE equipment, etc. A terminal may be fixed or mobile. Alternatively, node 101 or node 102 may be a vehicle cockpit domain device or a module within a vehicle cockpit domain (such as a cockpit domain controller (CDC), camera, screen, microphone, speaker, electronic key, or passive entry / passive initiation system controller).

[0071] The communication system 10 shown in Fig. 1 is used merely as an example and is not intended to limit the technical solution of the present application. Those skilled in the art should understand that in a specific implementation process, the communication system 10 may further include other devices, and the number of nodes may be determined based on specific requirements. This is not limiting.

[0072] Optionally, in an embodiment of the present application, each node in Fig. 1, such as node 101 or node 102, may be a functional module in an apparatus. It may be understood that a functional module may be an element in a hardware device, such as a communication chip or a communication component in a terminal device or a network device, or may be a software functional module running on hardware or a virtualized function instantiated on a platform (e.g., a cloud platform).

[0073] For example, each node in Fig. 1 may be implemented by using a communication device 200 in Fig. 2. Fig. 2 is a schematic diagram of a hardware structure of a communication device applicable to an embodiment of the present application. The communication device 200 may include at least one processor 201, a memory 203, and at least one communication interface 204. Optionally, the communication device further includes a communication line 202.

[0074] The at least one processor 201 may include one or more of a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA), or one or more integrated circuits configured to control program execution in the solutions of the present application.

[0075] The communication line 202 may be configured to transmit information between the aforementioned components, for example, the communication line 202 may be a bus.

[0076] The communication interface 204 is configured to communicate with another device or a communication network and is any transceiver-type device such as an Ethernet interface, a radio access network (RAN) interface, or a wireless local area network (WLAN) interface. Alternatively, the communication interface 204 may provide input and output to at least one processor 201 to complete the transmission or reception of data, instructions, or information. However, the connection structure is not limited to that shown in FIG. 2.

[0077] The memory 203 may be, but is not limited to, a read-only memory (ROM) or another type of static storage device capable of storing static information and instructions, or a random access memory (RAM) or another type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other compact disc storage, an optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), a magnetic disc storage medium or another magnetic storage device, or any other medium capable of carrying or storing expected program code in the form of instructions or data structures and that can be accessed by a computer. The memory may exist independently or be connected to the processor via communication line 202. Alternatively, the memory may be integrated with the processor. The memory provided in the embodiments of the present application may typically be non-volatile. The memory 203 is configured to store computer-executable instructions for carrying out the solutions of the present application, and the processor 201 controls the execution. The processor 201 is configured to execute the computer-executable instructions stored in the memory 203 to implement the methods provided in the embodiments of the present application.

[0078] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application program code, which is not particularly limited in the embodiments of the present application.

[0079] During a particular implementation, in one embodiment, processor 201 may include one or more CPUs, such as CPU0 and CPU1 of FIG.

[0080] During a particular implementation, in one embodiment, communications device 200 may include multiple processors, such as processor 201 and processor 207 of FIG. 2. Each of the processors may be a single-core (single-CPU) processor or a multi-core (multiple-CPU) processor. A processor herein may refer to one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0081] During specific implementation, in one embodiment, the communication apparatus 200 may further include an output device 205 and an input device 206. The output device 205 communicates with the processor 201 and may display information in a number of ways. For example, the output device 205 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 206 communicates with the processor 201 and may receive input from a user in a number of ways. For example, the input device 206 may be a mouse, a keyboard, a touchscreen device, or a sensing device.

[0082] During specific implementation, the communication device 200 may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, an embedded device, or a device having a structure similar to that of Figure 2. The type of the communication device 200 is not limited in the embodiments of the present application.

[0083] The following specifically describes a communication method in an embodiment of the present application with reference to Figures 1 and 2. A node in the following embodiment may have the components shown in Figure 2.

[0084] It should be noted that the algorithms in the embodiments of the present application may be signaling plane algorithms, user plane algorithms, or signaling plane and user plane algorithms. The signaling plane is used to transmit control-type signaling, such as access request information or identity authentication information, and the user plane is used to transmit data. The signaling plane algorithms are used for signaling plane communication between a first node and a second node. The signaling plane algorithms may include encryption algorithms and / or integrity protection algorithms and / or authenticated encryption algorithms. The user plane algorithms are used for user plane communication between a first node and a second node. The user plane algorithms may include encryption algorithms and / or integrity protection algorithms and / or authenticated encryption algorithms.

[0085] In the embodiments of the present application, the user plane algorithm may be the same as the signaling plane algorithm, or may be different from the signaling plane algorithm. The signaling plane algorithm being the same as the user plane algorithm can be expressed as follows: the quantity of the signaling plane algorithm is the same as the quantity of the user plane algorithm, the type of the signaling plane algorithm is the same as the type of the user plane algorithm, and the identifier of the signaling plane algorithm is the same as the identifier of the user plane algorithm. For example, there are two signaling plane algorithms: encryption algorithm 1 and integrity protection algorithm 1, and there are also two user plane algorithms: encryption algorithm 1 and integrity protection algorithm 1. The signaling plane algorithm being different from the user plane algorithm can be expressed as follows: the type of the signaling plane algorithm is different from the type of the user plane algorithm (e.g., the signaling plane algorithm includes an encryption algorithm and an integrity protection algorithm, and the user plane algorithm includes an authenticated encryption algorithm), and / or the number of signaling plane algorithms is different from the number of user plane algorithms (e.g., there are two signaling plane algorithms and one user plane algorithm); or when the type of the signaling plane algorithm is the same as the type of the user plane algorithm and the number of signaling plane algorithms is the same as the number of user plane algorithms, the identifier of the signaling plane algorithm is different from the identifier of the user plane algorithm (e.g., there are two signaling plane algorithms: encryption algorithm 1 and integrity protection algorithm 1, and there are two user plane algorithms: encryption algorithm 2 and integrity protection algorithm 2).

[0086] It should be noted that in the following embodiments of the present application, the names of messages between nodes, the names of each parameter in the messages, etc. are merely examples, and may be alternatively named differently depending on the specific implementation, which is not particularly limited in the embodiments of the present application.

[0087] It may be understood that in the embodiments of the present application, the first node or the second node may perform some or all of the steps in the embodiments of the present application. These steps are merely examples. Other steps or variations of various steps may alternatively be performed in the embodiments of the present application. In addition, steps may be performed in an order different from that presented in the embodiments of the present application, and not all of the steps in the embodiments of the present application may necessarily be performed.

[0088] 3 shows a communication method according to an embodiment of the present application, which includes steps 301 to 303.

[0089] Step 301: The second node sends first algorithm negotiation request information to the first node.

[0090] The second node may be any node in Figure 1. For example, the second node may be node 101 or node 102 shown in Figure 1. When the second node is node 101 shown in Figure 1, the first node may be node 102 shown in Figure 1. When the second node is node 102 shown in Figure 1, the first node may be node 101 shown in Figure 1.

[0091] The first algorithm negotiation request information may be used to indicate one or more algorithms and one or more key derivation functions (KDFs). The one or more algorithms may be one or more algorithms supported by the second node. The one or more KDFs may be one or more KDFs supported by the second node. The KDFs may be used to generate keys corresponding to some or all of the one or more algorithms.

[0092] It should be noted that, in this specification, one or more algorithms supported by the second node and / or one or more KDFs supported by the second node may be collectively referred to as the security capabilities of the second node.

[0093] The one or more algorithms may be of the same type or may be of different types. For example, the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm. Further, the one or more algorithms include at least one encryption algorithm and / or at least one integrity protection algorithm and / or at least one authenticated encryption algorithm. An encryption algorithm may be used to encrypt or decrypt some or all of the communication information between a first node and a second node by using a key for the encryption algorithm. An integrity protection algorithm may be used to perform integrity protection on some or all of the communication information between a first node and a second node by using a key corresponding to the integrity protection algorithm, or to verify the integrity of some or all of the communication information between a first node and a second node by using a key corresponding to the integrity protection algorithm. An authenticated encryption algorithm may be used to encrypt or decrypt some or all of the communication information between a first node and a second node by using a key for the authenticated encryption algorithm, and an authenticated encryption algorithm may be used to perform integrity protection on some or all of the communication information between a first node and a second node by using a key for the authenticated encryption algorithm, or to verify the integrity of some or all of the communication information between a first node and a second node by using a key for the authenticated encryption algorithm.

[0094] It can be understood that the number of encryption algorithms, integrity protection algorithms, or authenticated encryption algorithms indicated by the first algorithm negotiation request information is not limited in this embodiment of the present application. For example, the first algorithm negotiation request information can indicate eight algorithms, including two encryption algorithms, three integrity protection algorithms, and three authenticated encryption algorithms.

[0095] Optionally, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted based on priority, e.g., the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in descending order of priority, or the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in ascending order of priority.

[0096] For example, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in descending order of priority. If the first algorithm negotiation request information is used to indicate encryption algorithm 1, encryption algorithm 2, integrity protection algorithm 1, integrity protection algorithm 2, KDF1, and KDF2, the priority of the encryption algorithm is equal to or greater than the priority of the integrity protection algorithm. Among the encryption algorithms, the priority of encryption algorithm 1 is equal to or greater than the priority of encryption algorithm 2. Among the integrity protection algorithms, the priority of integrity protection algorithm 1 is equal to or greater than the priority of integrity protection algorithm 2. Among the KDFs, the priority of KDF1 is equal to or greater than the priority of KDF2.

[0097] For example, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in ascending order of priority. If the first algorithm negotiation request information is used to indicate encryption algorithm 1, encryption algorithm 2, integrity protection algorithm 1, integrity protection algorithm 2, KDF1, and KDF2, the priority of the encryption algorithms is equal to or lower than the priority of the integrity protection algorithm. Among the encryption algorithms, the priority of encryption algorithm 1 is equal to or lower than the priority of encryption algorithm 2. Among the integrity protection algorithms, the priority of integrity protection algorithm 1 is equal to or lower than the priority of integrity protection algorithm 2. Among the KDFs, the priority of KDF1 is equal to or lower than the priority of KDF2.

[0098] It may be understood that if the one or more algorithms include both signaling plane algorithms and user plane algorithms, the one or more algorithms are sorted separately based on the priority of the signaling plane algorithms and the priority of the user plane algorithms.

[0099] For example, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in descending order of priority. It is assumed that the algorithms and KDFs indicated by the first algorithm negotiation request information may be shown in Table 1. In Table 1, the user plane algorithms include encryption algorithm 1, encryption algorithm 2, and integrity protection algorithm 1, the signaling plane algorithms include encryption algorithm 2, integrity protection algorithm 1, and integrity protection algorithm 2, and the KDFs include KDF1, KDF2, and KDF3. In this case, the priority of the encryption algorithm is equal to or greater than the priority of the integrity protection algorithm for the user plane algorithms and the signaling plane algorithms. For the encryption algorithms included in the user plane algorithms, the priority of encryption algorithm 1 is equal to or greater than the priority of encryption algorithm 2. For the integrity protection algorithms included in the signaling plane algorithms, the priority of integrity protection algorithm 1 is equal to or greater than the priority of integrity protection algorithm 2. [Table 1]

[0100] For example, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted in descending order of priority. The algorithms and KDFs indicated by the first algorithm negotiation request information may alternatively be shown in Table 2. In Table 2, for a user plane algorithm / KDF, the priority of the authenticated encryption algorithm is higher than the priority of the encryption algorithm and the integrity protection algorithm, and the priority of the encryption algorithm and the integrity protection algorithm are the same. Here, the priority of authenticated encryption algorithm 1 is higher than or equal to the priority of authenticated encryption algorithm 2, the priority of integrity protection algorithm 1 is higher than or equal to the priority of integrity protection algorithm 2, the priority of integrity protection algorithm 2 is higher than or equal to the priority of encryption algorithm 1, the priority of encryption algorithm 1 is higher than or equal to the priority of encryption algorithm 2, and the priority of KDF1 is higher than or equal to the priority of KDF2. For a signaling plane algorithm / KDF, the priority of the encryption algorithm and the integrity protection algorithm are the same, and the priority of the encryption algorithm and the integrity protection algorithm is higher than the priority of the authenticated encryption algorithm. Here, the priority of integrity protection algorithm 1 is equal to or greater than the priority of integrity protection algorithm 2, the priority of integrity protection algorithm 2 is equal to or greater than the priority of encryption algorithm 1, the priority of encryption algorithm 1 is equal to or greater than the priority of encryption algorithm 2, the priority of authenticated encryption algorithm 2 is equal to or greater than the priority of authenticated encryption algorithm 1, and the priority of KDF3 is equal to or greater than the priority of KDF4. [Table 2]

[0101] The first algorithm negotiation request information may indicate one or more algorithms and one or more KDFs in any one of the following ways:

[0102] Method 1.1: The first algorithm negotiation request information includes one or more identifiers of one or more algorithms and one or more identifiers of one or more KDFs.

[0103] Take the algorithm / KDF identifiers shown in Table 3 as an example. When the first algorithm negotiation request information includes ID1, ID3, and ID5, the first algorithm negotiation request information is used to indicate algorithm 1, algorithm 3, and KDF2. When the first algorithm negotiation request information includes ID2 and ID4, the first algorithm negotiation request information is used to indicate algorithm 2 and KDF1. [Table 3]

[0104] It may be understood that Tables 1 to 3 are merely examples of algorithms indicated by the first algorithm negotiation request information. In a specific application, the algorithm indicated by the first algorithm negotiation request information may alternatively be in other formats. This is not limited thereto.

[0105] Method 1.2: The first algorithm negotiation request information includes one bit sequence, where one bit in the bit sequence corresponds to one algorithm or one KDF, and each bit in the bit sequence can indicate whether the first algorithm negotiation request information indicates the algorithm or KDF corresponding to that bit by using 0 or 1. For example, if the bit is 1, this can indicate that the first algorithm negotiation request information indicates the algorithm or KDF corresponding to that bit, and if the bit is 0, this can indicate that the first algorithm negotiation request information does not indicate the algorithm or KDF corresponding to that bit, and vice versa.

[0106] For example, the first algorithm negotiation request information includes 5 bits, where the first bit corresponds to algorithm 1, the second bit corresponds to algorithm 2, the third bit corresponds to algorithm 3, the fourth bit corresponds to KDF1, and the fifth bit corresponds to KDF2. If the 5 bits are 01010, this may indicate that the first algorithm negotiation request information is used to indicate algorithm 2 and KDF1. If the 5 bits are 11001, this may indicate that the first algorithm negotiation request information is used to indicate algorithm 1, algorithm 2, and KDF2.

[0107] Method 1.3: The first algorithm negotiation request information includes two bit sequences, where the lengths of the two bit sequences may be the same or different.

[0108] For one of the bit sequences, one bit in the bit sequence corresponds to one algorithm, and each bit in the bit sequence may indicate whether the first algorithm negotiation request information indicates the algorithm corresponding to that bit by using 0 or 1. For example, if a bit is 1, this may indicate that the first algorithm negotiation request information indicates the algorithm corresponding to that bit, and if the bit is 0, this may indicate that the first algorithm negotiation request information does not indicate the algorithm corresponding to that bit, and vice versa.

[0109] For the other bit sequence of the bit sequences, one bit in the bit sequence corresponds to one KDF, and each bit in the bit sequence may indicate whether the first algorithm negotiation request information indicates the KDF corresponding to that bit by using 0 or 1. For example, if a bit is 1, this may indicate that the first algorithm negotiation request information indicates the KDF corresponding to that bit, and if the bit is 0, this may indicate that the first algorithm negotiation request information does not indicate the KDF corresponding to that bit, and vice versa.

[0110] For example, the first algorithm negotiation request information includes two bit sequences, one of which includes three bits, where a first bit corresponds to algorithm 1, a second bit corresponds to algorithm 2, and a third bit corresponds to algorithm 3; the other of which includes two bits, where a first bit corresponds to KDF1 and a second bit corresponds to KDF2. If the first algorithm negotiation request information includes 110 and 01, this may indicate that the first algorithm negotiation request information is used to indicate algorithm 1, algorithm 2, and KDF2. If the first algorithm negotiation request information includes 010 and 11, this may indicate that the first algorithm negotiation request information is used to indicate algorithm 2, KDF1, and KDF2.

[0111] Optionally, the first algorithm negotiation request information further includes an identifier of the second node and a second refresh parameter.

[0112] The identifier of the second node may be used to identify the second node. The second freshness parameter is a parameter related to the time validity of the first algorithm negotiation request information. For example, the second freshness parameter includes a value of a counter in the second node or a first nonce. The value of the counter may be that of a counter in the second node and may be a value that exists when the second node decides to send the first algorithm negotiation request information, and the counter may be used to record the amount of time of communication between the first node and the second node. The first nonce may be a nonce generated by the second node when the second node decides to send the first algorithm negotiation request information.

[0113] Optionally, before step 301, the second node detects whether it has an algorithm and KDF negotiated with the first node. If the second node has an algorithm and KDF negotiated with the first node, the second node communicates with the first node by using the negotiated algorithm and KDF. If the second node does not have an algorithm or KDF negotiated with the first node, the second node performs step 301.

[0114] Step 302: The first node receives first algorithm negotiation request information from the second node, and determines at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs.

[0115] It should be noted that, in this specification, one or more algorithms supported by a first node and / or one or more KDFs supported by a first node may be collectively referred to as the security capabilities of the first node.

[0116] Optionally, the at least one first algorithm includes an encryption algorithm; the at least one first algorithm includes an integrity protection algorithm; the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm; or the at least one first algorithm includes an authenticated encryption algorithm.

[0117] Optionally, multiple algorithms correspond to corresponding priorities, and multiple KDFs correspond to corresponding priorities.

[0118] In a possible implementation, the one or more algorithms and one or more KDFs indicated by the first algorithm negotiation request information are sorted based on priority. For details, please refer to the description of step 301. The details will not be described again.

[0119] In another possible implementation, there is a correspondence between algorithm identifiers and algorithm priorities. Optionally, the correspondence may be preset, e.g., defined in a standard or protocol, or the correspondence may be preset and preconfigured for corresponding nodes using any other device. For example, the priority of an algorithm with a larger identifier is higher than the priority of an algorithm with a smaller identifier. Alternatively, the priority of an algorithm with a smaller identifier is higher than the priority of an algorithm with a larger identifier. For example, the priority of algorithm 2 is higher than the priority of algorithm 1. Alternatively, the priority of algorithm 1 is higher than the priority of algorithm 2. Similarly, there is a correspondence between KDF identifiers and KDF priorities. For example, the priority of a KDF with a larger identifier is higher than the priority of a KDF with a smaller identifier. Alternatively, the priority of a KDF with a smaller identifier is higher than the priority of a KDF with a larger identifier. For ease of explanation, the correspondences are described below mainly in a list format. However, those skilled in the art will appreciate that the present application includes, but is not limited to, presenting correspondences in a table format.

[0120] In yet another possible implementation, the priority of multiple algorithms is indicated by using an algorithm priority list. The priority of multiple KDFs is indicated by using a KDF priority list.

[0121] Optionally, the algorithm priority list comprises an encryption algorithm priority list and / or an integrity protection algorithm priority list and / or an authenticated encryption algorithm priority list.

[0122] When the algorithms in this embodiment of the present application are signaling plane algorithms and user plane algorithms, it can be understood that the algorithm priority list includes a user plane algorithm priority list and / or a signaling plane algorithm priority list. The user plane algorithm priority list may be used to determine the first algorithm of the user plane, and the signaling plane algorithm priority list may be used to determine the first algorithm of the signaling plane. The user plane algorithm priority list and the signaling plane algorithm priority list may be the same or different.

[0123] It can be understood that the algorithm priority list includes one or more algorithms, and the one or more algorithms included in the algorithm priority list are sorted based on the priority of the algorithms. For example, take the encryption algorithm priority list as an example. The encryption algorithm priority list includes algorithm 1, algorithm 2, and algorithm 3, and the priority of algorithm 1≧the priority of algorithm 2≧the priority of algorithm 3, or the priority of algorithm 1≦the priority of algorithm 2≦the priority of algorithm 3. The KDF priority list includes one or more KDFs, and the one or more KDFs are sorted based on the priority of the KDFs. For example, the KDF priority list includes KDF1, KDF2, and KDF3, and the priority of KDF1≧the priority of KDF2≧the priority of KDF3, or the priority of KDF1≦the priority of KDF2≦the priority of KDF3.

[0124] Optionally, the algorithms in the algorithm priority list are sorted in descending or ascending order of algorithm priority, and the KDFs in the KDF priority list are sorted in descending or ascending order of KDF priority.

[0125] For example, the algorithm priority list may include an encryption algorithm priority list, an integrity protection algorithm priority list, and an authenticated encryption algorithm priority list, where the authenticated encryption algorithm priority > the integrity protection algorithm priority ≥ the encryption algorithm priority, the encryption algorithm priority list includes algorithm 1 and algorithm 2, where algorithm 1 has a higher priority than algorithm 2, the integrity protection algorithm priority list includes algorithm 3 and algorithm 4, where algorithm 3 has a higher priority than algorithm 4, the authenticated encryption algorithm priority list includes algorithm 5 and algorithm 6, where algorithm 5 has a higher priority than algorithm 6, and the algorithms in each priority list are sorted in descending order of algorithm priority. The algorithm priority list may be shown in Table 4. Table 4 is merely an example of an algorithm priority list, and the algorithm priority list may alternatively be in another form. This is not limiting. [Table 4]

[0126] For the above example, it can be seen that when the priority of the integrity protection algorithm is the same as the priority of the encryption algorithm, the algorithm priority list can be shown in Table 5. In Table 5, the priority of the authenticated encryption algorithm is priority 1, and the priority of the encryption algorithm and the integrity protection algorithm is priority 2, with priority 1 being higher than priority 2. [Table 5]

[0127] Optionally, the at least one first algorithm is an algorithm supported by the first node and has a highest priority among the one or more algorithms. The at least one first algorithm corresponds to one or more algorithm types. For example, if the at least one first algorithm includes one algorithm, the at least one first algorithm corresponds to one algorithm type. If the at least one first algorithm includes multiple algorithms, each of the multiple algorithms included in the at least one first algorithm corresponds to one algorithm type.

[0128] Furthermore, the algorithm type corresponding to the at least one first algorithm is an algorithm type supported by the first node and having the highest priority among the algorithm types of the one or more algorithms.

[0129] In a possible implementation, the at least one first algorithm corresponds to one algorithm type, and the algorithm type may correspond to multiple algorithms with different priorities, and the first algorithm is the algorithm supported by the first node and has the highest priority among the algorithms corresponding to the algorithm type. Alternatively, if the algorithm type corresponds to only one algorithm, the first algorithm includes the algorithm corresponding to the algorithm type.

[0130] For example, the at least one first algorithm includes one algorithm, and the first algorithm negotiation request information indicates algorithm 3, algorithm 4, algorithm 1, and algorithm 2, with the priority of algorithm 3 > priority of algorithm 4 > priority of algorithm 1 > priority of algorithm 2. If the algorithms supported by the first node include algorithm 4 and algorithm 1, the at least one first algorithm is algorithm 4. If the algorithms supported by the first node include algorithm 3 and algorithm 1, the at least one first algorithm is algorithm 3.

[0131] For example, the at least one first algorithm includes one algorithm, the algorithm priority list is shown in Table 5, and the first algorithm negotiation request information indicates algorithm 5, algorithm 6, algorithm 3, and algorithm 2. If the algorithms supported by the first node include algorithm 6, algorithm 3, and algorithm 1, the at least one first algorithm is algorithm 6. If the algorithms supported by the first node include algorithm 5, algorithm 4, and algorithm 2, the at least one first algorithm is algorithm 5.

[0132] In another possible implementation, the at least one first algorithm corresponds to multiple algorithm types, and the multiple algorithm types have the same priority. Each algorithm type may correspond to one or more algorithms with different priorities, and the at least one first algorithm includes an algorithm supported by the first node and having the highest priority among the algorithms corresponding to each of the multiple algorithm types. Alternatively, if the algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to that algorithm type.

[0133] For example, the at least one first algorithm includes two algorithms, and the algorithm priority list is shown in Table 6, and the first algorithm negotiation request information indicates algorithm 5, algorithm 6, algorithm 3, and algorithm 2. In Table 6, for the algorithm type, the priority of the encryption algorithm and the integrity protection algorithm is the same, and the priority of the encryption algorithm and the integrity protection algorithm is higher than the priority of the authenticated encryption algorithm. Among the encryption algorithms, the priority of algorithm 5 is equal to or higher than the priority of algorithm 6. Among the integrity protection algorithms, the priority of algorithm 3 is equal to or higher than the priority of algorithm 4. Among the authenticated encryption algorithms, the priority of algorithm 1 is equal to or higher than the priority of algorithm 2. If the algorithms supported by the first node include algorithm 5, algorithm 6, algorithm 3, algorithm 4, and algorithm 1, the at least one first algorithm includes algorithm 5 and algorithm 3. [Table 6]

[0134] It should be noted that when there are multiple algorithm types with the highest priority among the algorithm types of the algorithms indicated by the first algorithm negotiation request information, the first node may determine some of the multiple algorithm types as the algorithm type corresponding to at least one first algorithm. For example, when the algorithm types with the highest priority among the algorithm types of the algorithms indicated by the first algorithm negotiation request information are an encryption algorithm and an integrity protection algorithm, the first node determines the integrity protection algorithm as the algorithm type corresponding to at least one first algorithm. In this scenario, encryption may not be performed by using an encryption algorithm. It should be further noted that the expression "determine an algorithm type" is used for ease of explanation of the solution. However, in an actual solution, the algorithm type may not be determined separately, but at least one first algorithm corresponding to the algorithm type is directly determined.

[0135] It should be noted that the encryption algorithm may include a null encryption algorithm. A null encryption algorithm is used to generate an all-zero keystream. In other words, a null encryption algorithm may indicate that information is not encrypted. When at least one first algorithm includes a null encryption algorithm, it indicates that communication information between the first node and the second node is not encrypted.

[0136] It should be understood that Tables 4 to 6 are merely examples of algorithm priority lists. In particular applications, the algorithm priority lists may alternatively be in other forms. This is not limiting.

[0137] Optionally, the priority of an algorithm is related to the security of the algorithm, e.g., an algorithm with higher security has a higher priority and an algorithm with lower security has a lower priority. The priority of a KDF is related to the security of the KDF, e.g., a KDF with higher security has a higher priority and a KDF with lower security has a lower priority.

[0138] Optionally, the at least one first KDF is a KDF supported by the first node and has the highest priority among the one or more KDFs. For example, if the at least one first KDF includes one KDF, the at least one first KDF is a KDF supported by the first node and has the highest priority among the one or more KDFs. If the at least one first KDF includes m KDFs, where m is a positive integer greater than 1, the at least one first KDF is the first m KDFs supported by the first node and has the highest priority among the one or more KDFs.

[0139] For example, the at least one first KDF includes one KDF, and the first algorithm negotiation request information indicates KDF1, KDF2, and KDF3, with the priority of KDF1 > the priority of KDF2 > the priority of KDF3. If the KDFs supported by the first node include KDF2 and KDF3, the at least one first KDF is KDF2. If the KDFs supported by the first node include KDF1 and KDF2, the at least one first KDF is KDF1.

[0140] Step 303: The first node sends the first information to the second node.

[0141] The first information is used to indicate at least one first algorithm and at least one first KDF, so that the first node communicates with the second node by using the at least one first algorithm and the at least one first KDF.

[0142] Optionally, integrity protection is performed on the first information by using the at least one first algorithm; or the first information is encrypted by using the at least one first algorithm and integrity protection is performed on the first information by using the at least one first algorithm; or the first information is encrypted by using the at least one first algorithm.

[0143] The case where integrity protection is performed on the first information by using at least one first algorithm will be described first.

[0144] The first information includes second information and a first MAC. The second information is used to indicate at least one first algorithm and at least one first KDF. For example, the second information includes information about at least one first algorithm and information about at least one first KDF. For example, the second information includes an identifier of at least one first algorithm and an identifier of at least one first KDF. The first MAC is obtained by performing integrity protection on the second information.

[0145] Furthermore, the at least one first algorithm includes an integrity protection algorithm, or the at least one first algorithm includes an integrity protection algorithm and an encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm. For details, please refer to the following method descriptions shown in Figure 6 or Figure 7.

[0146] The first information may indicate the at least one first algorithm and the at least one first KDF in any one of the following ways:

[0147] Method 2.1: The second information includes an identifier of the first algorithm and an identifier of the first KDF.

[0148] For example, take the algorithm / KDF identifiers shown in Table 3 as an example. When the second information includes ID1 and ID5, the first information is used to indicate algorithm 1 and KDF2. When the second information includes ID2 and ID4, the first information is used to indicate algorithm 2 and KDF1.

[0149] For example, the algorithm / KDF identifier is shown in Table 7, where the second information includes 16 bits, with bits 1 through 4 used to indicate the encryption algorithm identifier, bits 5 through 8 used to indicate the integrity protection algorithm identifier, bits 9 through 12 used to indicate the authenticated encryption algorithm identifier, and bits 13 through 16 used to indicate the KDF identifier. In Table 7, the encryption algorithms include algorithm 1, algorithm 2, and algorithm 3. The identifier for algorithm 1 is 0000, and algorithm 1 is a null encryption algorithm used to generate an all-zero keystream. The identifier for algorithm 2 is 0001, and the identifier for algorithm 3 is 0010. The integrity protection algorithms include algorithm 4 and algorithm 5. The identifier for algorithm 4 is 0001, and the identifier for algorithm 5 is 0010. The authenticated encryption algorithm includes algorithm 6, and the identifier for algorithm 6 is 0011. The KDFs include KDF1 and KDF2, with the identifier of KDF1 being 0001 and the identifier of KDF2 being 0010. If the second information includes 0001000100000001, the first information is used to indicate algorithm 2, algorithm 4, and KDF1. If the second information includes 0000000000110010, the first information is used to indicate algorithm 6 and KDF2. [Table 7]

[0150] It can be understood that Table 7 is merely an example of an algorithm / KDF identifier. In a particular application, the algorithm / KDF identifier may alternatively be in another form. This is not limited.

[0151] Method 2.2: The second information includes one bit sequence, and one bit in the bit sequence corresponds to one algorithm or one KDF. For example, one bit in the bit sequence corresponds to one or more algorithms indicated by the first algorithm negotiation request information. Alternatively, one bit in the bit sequence corresponds to a KDF indicated by the first algorithm negotiation request information. Each bit in the bit sequence can indicate, by using 0 or 1, whether the first algorithm includes the algorithm corresponding to the bit or whether the first KDF includes the KDF corresponding to the bit. For example, if the bit is 1, this can indicate that the first algorithm includes the algorithm corresponding to the bit or the first KDF includes the KDF corresponding to the bit; if the bit is 0, this can indicate that the first algorithm does not include the algorithm corresponding to the bit or the first KDF does not include the KDF corresponding to the bit, and vice versa.

[0152] For example, the second information includes 5 bits, where the first bit corresponds to algorithm 1, the second bit corresponds to algorithm 2, the third bit corresponds to algorithm 3, the fourth bit corresponds to key KDF1, and the fifth bit corresponds to key KDF2. If the 5 bits are 01010, this may indicate that the first algorithm includes algorithm 2 and the first KDF includes KDF1. If the 5 bits are 11001, this may indicate that the first algorithm includes algorithm 1 and algorithm 2, and the first KDF includes KDF2.

[0153] Scheme 2.3: The second information includes two bit sequences, where the lengths of the two bit sequences may be the same or different.

[0154] For one of the bit sequences, one bit in the bit sequence corresponds to one algorithm. For example, one bit in the bit sequence corresponds to one or more algorithms indicated by the first algorithm negotiation request information. Each bit in the bit sequence can indicate whether the first algorithm includes the algorithm corresponding to that bit by using 0 or 1. For example, if the bit is 1, this can indicate that the first algorithm includes the algorithm corresponding to that bit, or if the bit is 0, this can indicate that the first algorithm does not include the algorithm corresponding to that bit, and vice versa.

[0155] For the other of the bit sequences, one bit in the bit sequence corresponds to one KDF. For example, one bit in the bit sequence corresponds to the KDF indicated by the first algorithm negotiation request information. Each bit in the bit sequence can indicate whether the first KDF includes the KDF corresponding to that bit by using 0 or 1. For example, a 1 in the bit can indicate that the first KDF includes the KDF corresponding to that bit, and a 0 in the bit can indicate that the first KDF does not include the KDF corresponding to that bit, and vice versa.

[0156] For example, the second information includes two bit sequences, one of the bit sequences includes three bits, a first bit of which corresponds to algorithm 1, a second bit of which corresponds to algorithm 2, and a third bit of which corresponds to algorithm 3, and the other of the bit sequences includes two bits, a first bit of which corresponds to key KDF1, and a second bit of which corresponds to key KDF2. If the second information includes 110 and 01, this may indicate that the first algorithm includes algorithm 1 and algorithm 2, and the first KDF includes KDF2. If the second information includes 010 and 10, this may indicate that the first algorithm includes algorithm 2, and the first KDF includes KDF1.

[0157] Optionally, the second information further includes information unrelated to instructions for the first algorithm or the first KDF. For example, the second information further includes first verification information. Alternatively, the second information further includes first freshness parameters and first verification information. Alternatively, the second information further includes instruction information used to indicate one or more algorithms and one or more KDFs in step 301.

[0158] The first freshness parameter is a parameter related to the time validity of the first information. For example, the first freshness parameter includes a value of a counter in the first node or a second nonce. The value of the counter can be that of a counter in the first node and can be a value that exists when the first node decides to transmit the first information, and the counter can be used to record the amount of communication time between the first node and the second node. The second nonce can be a nonce generated when the first node decides to transmit the first information.

[0159] The first verification information is used by the second node to verify whether the first algorithm negotiation request information received by the first node has been modified.

[0160] For example, the second information further includes first verification information. The first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, and the second KDF received by the first node. For example, AUTH1 = second KDF (K, first algorithm negotiation request information). Here, AUTH1 is the first verification information, K is the preset shared key, and the preset shared key is set in advance. Specifically, the preset shared key may be pre-configured for the corresponding node by using any other device. The second KDF may be the same as or different from the first KDF. If the second KDF is different from the first KDF, the second KDF may be a KDF preset in the first node and the second node.

[0161] For example, the second information further includes a first refresh parameter and a first verification information. The first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, the first refresh parameter, and the second KDF received by the first node. For example, AUTH1=second KDF(K, first refresh parameter, first algorithm negotiation information). For descriptions of AUTH1, K, and the second KDF, please refer to the above example. The details will not be described again.

[0162] It can be understood that in step 301, if the second information further includes indication information used to indicate one or more algorithms and one or more KDFs, then after receiving the indication information, the second node can determine whether the algorithms and KDFs in the first algorithm negotiation request information have been changed based on the indication information.

[0163] The following describes a case in which first information is encrypted by using at least one first algorithm, and integrity protection is performed on the first information by using at least one first algorithm.

[0164] The first information includes encrypted information, second communication information, and a second MAC. The encrypted information is obtained by encrypting the first communication information, where the first communication information does not indicate at least one of the at least one first algorithm or the at least one first KDF. The second communication information is used to indicate at least one of the at least one first algorithm and the at least one first KDF. The second MAC is obtained by performing integrity protection on the encrypted information and the second communication information.

[0165] Further, the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, wherein the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm, and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm; or the at least one first algorithm includes an authenticated encryption algorithm, wherein the encrypted information is obtained by encrypting the first communication information by using the authenticated encryption algorithm, and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the authenticated encryption algorithm. For details, please refer to the following method description shown in Figure 4 or Figure 5.

[0166] The first information can indicate at least one first algorithm and at least one first KDF in any one of the following ways: the second communication information includes an identifier of the first algorithm and an identifier of the first KDF; alternatively, the second communication information includes one bit sequence, where one bit in the bit sequence corresponds to one algorithm or one KDF; alternatively, the second communication information includes two bit sequences, where one bit in one of the bit sequences corresponds to one algorithm, and one bit in the other of the bit sequences corresponds to one KDF. For details, please refer to the descriptions in Methods 2.1 to 2.3 above. Details will not be described again.

[0167] Optionally, the first communication information includes information not related to the indication of the first algorithm or the first KDF. For example, the first communication information includes first verification information. Alternatively, the first communication information includes first refresh parameters and first verification information. Alternatively, the first communication information includes indication information used to indicate one or more algorithms and one or more KDFs in step 301. For descriptions of the first verification information, the first refresh parameters, and the indication information used to indicate one or more algorithms and one or more KDFs in step 301, please refer to the corresponding descriptions provided above when the second information includes information not related to the first algorithm or the first KDF. Details will not be described again.

[0168] In the above description, it can be understood that the first node first encrypts information and then obtains the second MAC. Alternatively, the first node can first obtain the second MAC and then encrypt the first communication information. This is not limited to this. The difference is as follows: when the first node first encrypts information and then obtains the second MAC, after receiving the first information, the second node needs to first verify the integrity of the first information and, after verifying the integrity of the first information, decrypt the encrypted information. When the first node first obtains the second MAC and then encrypts the first communication information, after receiving the first information, the second node first decrypts the encrypted information and then verifies the integrity of the first information.

[0169] The following describes the case where the first information is encrypted by using at least one first algorithm.

[0170] The first information includes encrypted information and second communication information. The encrypted information is obtained by encrypting the first communication information. For a description of the first communication information and the second communication information and a description of the at least one first algorithm and at least one first KDF used by the first information, please refer to the description of the previous case in which the first information is encrypted by using at least one first algorithm and integrity protection is performed on the first information by using at least one first algorithm. Details will not be described again.

[0171] Furthermore, the at least one first algorithm includes an encryption algorithm. The encrypted information is obtained by encrypting the first communication information by using the encryption algorithm. For example, the encrypted information is obtained by encrypting the first communication information by using an encryption key. For a description of the encryption key, please refer to the following method shown in Figure 5. The details will not be described again.

[0172] In the case where the at least one first algorithm includes an encryption algorithm, it can be understood that when the first node communicates with the second node, the sender can encrypt information to be sent by using an encryption key to obtain the encrypted information, and send the encrypted information to the receiver. After receiving the encrypted information, the receiver can decrypt the encrypted information by using the encryption key to obtain the sender's information to be sent. In this way, the security of the communication between the first node and the second node can be improved.

[0173] In response, the second node may receive the first information from the first node, and the second node then communicates with the first node by using at least one first algorithm and at least one first KDF.

[0174] Optionally, if integrity protection is performed on the first information by using at least one first algorithm, the second node needs to verify the integrity of the first information. If integrity protection is performed on the first information by using at least one first algorithm, the second node receives the first information, obtains an authenticated encryption key based on at least one first KDF, obtains a third MAC based on the at least one first algorithm and the second information, and verifies the integrity of the first information by using the third MAC. For details, see the following method description shown in FIG. 6 or FIG. 7. If the first information is encrypted by using at least one first algorithm and integrity protection is performed on the first information by using at least one first algorithm, the second node receives the first information, obtains a fourth MAC based on the at least one first algorithm, the encrypted information, and the second communication information, and verifies the integrity of the first information by using the fourth MAC. For details, see the following method description shown in FIG. 4 or FIG. 5.

[0175] Optionally, after receiving the first information, the second node sends acknowledgement information to the first node, which is used to indicate that the second node has received the first information.

[0176] Optionally, after receiving the first information, the second node transmits second verification information to the first node, which is used by the first node to verify whether the first information received by the second node has been modified.

[0177] For example, the second verification information is obtained based on the first information, the preset shared key, and the second KDF received by the second node. For example, AUTH2=2KDF(K, first information). In this case, after receiving the second verification information, the first node obtains third verification information based on the first information, the preset shared key, and the second KDF. For example, AUTH3=2KDF(K, first information). If the third verification information is the same as the second verification information, this indicates that the first information received by the second node has not been modified. If the third verification information is different from the second verification information, this indicates that the first information received by the second node has been modified. Here, AUTH2 is the second verification information, AUTH3 is the third verification information, K is the preset shared key, and the second KDF may be the same as or different from the first KDF. If the second KDF is different from the first KDF, the second KDF may be a KDF preset in the first node and the second node.

[0178] For example, the second verification information is obtained based on the first information, the preset shared key, the second refresh parameter, and the second KDF received by the second node. For example, AUTH2=2KDF(K, 2nd refresh parameter, 1st information). In this case, after receiving the second verification information, the first node obtains the third verification information based on the first information, the preset shared key, the second refresh parameter, and the second KDF. For example, AUTH3=2KDF(K, 2nd refresh parameter, 1st information). If the third verification information is the same as the second verification information, this indicates that the first information received by the second node has not been modified; alternatively, if the third verification information is different from the second verification information, it indicates that the first information received by the second node has been modified. For descriptions of AUTH2, AUTH3, K, and the second KDF, please refer to the above example. The details will not be described again.

[0179] Optionally, integrity protection is performed on the acknowledgment information or the second verification information by using at least one first algorithm. For the process of performing integrity protection on the acknowledgment information or the second verification information by using at least one first algorithm, please refer to the description of performing integrity protection on the first information by using at least one first algorithm in the following method shown in Figure 4, Figure 5, Figure 6 or Figure 7. The details will not be described again.

[0180] Based on the method shown in Figure 3, the second node may send to the first node first algorithm negotiation request information used to indicate one or more algorithms and one or more KDFs. After receiving the first algorithm negotiation request information, the first node may determine at least one first algorithm and at least one first KDF based on the first algorithm negotiation request information and send first information used to indicate the at least one first algorithm and at least one first KDF to the second node. In this way, the first node and the second node may communicate with each other by using the at least one first algorithm and the at least one first KDF, thereby allowing the first node and the second node to encrypt or decrypt communication information between the first node and the second node by using the same algorithm.

[0181] It may be understood that there are several different implementations for the content included in the first information and / or the different types and quantities of algorithms that may be included in the at least one first algorithm, see the following first, second, third and fourth implementations of the method shown in FIG.

[0182] Optionally, in a first possible implementation of the method shown in FIG. 3, the first information includes encrypted information, second communication information, and a second MAC. When the at least one first algorithm includes an authenticated encryption algorithm, the encrypted information is obtained by encrypting the first communication information using the authenticated encryption algorithm, and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information using the authenticated encryption algorithm. After receiving the first information, the second node may obtain a fourth MAC based on the authenticated encryption algorithm, the encrypted information, and the second communication information, and verify the integrity of the first information by using the fourth MAC. Specifically, as shown in FIG. 4, the method shown in FIG. 3 further includes steps 401 to 404.

[0183] Step 401: A first node obtains an encryption key that is authenticated based on at least one first KDF.

[0184] The authenticated encryption key may be used to encrypt the first communication, or the authenticated encryption key may be used to decrypt the encrypted information, and the authenticated encryption key may be used to perform integrity protection on the second communication and the encrypted information, or the authenticated encryption key may be used to verify the integrity of the second communication and the encrypted information.

[0185] The first node may obtain the authenticated encryption key in any one of the following ways:

[0186] Scheme 3.1: The first node uses the shared key as input to the first KDF to obtain an authenticated encryption key, i.e., K c = first KDF(K), where K c is the authenticated encryption key and K is the shared key.

[0187] Scheme 3.2: The first node uses the shared key and the second fresh parameter as inputs to the first KDF to obtain an authenticated encryption key, i.e., K c = 1st KDF(K,C), where K c is the authenticated encryption key, K is the shared key, and C is the second fresh parameter.

[0188] Scheme 3.3: The first node uses the shared key, the second fresh parameter, and the first string as inputs to the first KDF to obtain an authenticated encryption key, i.e., K c = 1st KDF(K, C, 1st string), where K cwhere K is the authenticated encryption key, K is the shared key, and C is the second fresh parameter. The first string may be used to identify the authenticated encryption algorithm. For example, if the at least one first algorithm is an authenticated encryption algorithm for the user plane, the first string may be "user auth enc" that identifies the authenticated encryption algorithm for the user plane.

[0189] Scheme 3.4: The first node uses the shared key, the second fresh parameter, the first string, and the first identifier as inputs to the first KDF to obtain an authenticated encryption key, i.e., K c = first KDF(K, C, first string, first identifier), where K c is the authenticated encryption key, K is the shared key, and C is the second freshness parameter. For a description of the first string, see Scheme 3.3 above. The details will not be described again. The first identifier may be used to identify the KDF used to generate the authenticated encryption key. For example, the first identifier may be the identifier of the first KDF.

[0190] It can be understood that the first identifier can include numbers and / or letters. The first string in method 3.4 can be any parameter.

[0191] Scheme 3.5: The first node derives a first intermediate key based on the shared key and the second fresh parameter; the first node derives an authenticated encryption key based on the first intermediate key and at least one of the first identifier and the first string. For example, the first node uses the shared key and the second fresh parameter as inputs to KDF1 to derive the first intermediate key, i.e., K mid1 = KDF1(K,C). The first node uses the first intermediate key, the first identifier, and the first string as inputs to KDF2 to obtain an authenticated encryption key, i.e., K c =KDF2(K mid1 , first identifier, first string), where K mid1is the first intermediate key, K is the shared key, C is the second fresh parameter, and K c is the authenticated encryption key. For a description of the first string, see method 3.3 above. For a description of the first identifier, see the description of method 3.4 above. The details will not be repeated.

[0192] KDF1 and KDF2 may be included in at least one first KDF. KDF1 and KDF2 may be the same or different. For example, if at least one first KDF includes one KDF, KDF1 and KDF2 are the same. If at least one first KDF includes two or more KDFs, KDF1 and KDF2 are different.

[0193] To explain the solution more clearly, it can be understood that the method for obtaining the certified encryption key is described in two steps in this specification. In actual processing, the certified encryption key can alternatively be obtained in one step. The first intermediate key is merely an intermediate result. Specifically, the method for determining the certified encryption key is as follows: c =KDF2(KDF1(K,C),first algorithm,first string).

[0194] Optionally, the shared key in the above-mentioned scheme is preset in the first node, or the shared key in the above-mentioned scheme is obtained by the first node through calculation before step 401 .

[0195] Furthermore, a second MAC is obtained based on the authenticated encryption algorithm, the encrypted information, the second communication information, and the authenticated encryption key. For example, the first node obtains the second MAC by using the encrypted information, the second communication information, and the authenticated encryption key as inputs to the authenticated encryption algorithm.

[0196] Step 402: The second node obtains an encryption key that is authenticated based on at least one first KDF.

[0197] For the specific process in which the second node obtains an encryption key authenticated based on at least one first KDF, please refer to the corresponding description in step 401 in which the first node obtains an encryption key authenticated based on at least one first KDF, and the details will not be described again.

[0198] Step 403: The second node obtains a fourth MAC based on the authenticated encryption algorithm, the encrypted information and the second communication information.

[0199] Furthermore, the second node derives a fourth MAC based on the authenticated encryption algorithm, the encrypted information, the second communication information, and the authenticated encryption key. For example, the second node derives the fourth MAC by using the encrypted information, the second communication information, and the authenticated encryption key as inputs to the authenticated encryption algorithm.

[0200] It may be understood that the second node may further perform integrity protection on the encrypted information and the part of the information in the second communication information, for example, the second node derives a fourth MAC based on the encrypted information, the part of the information in the second communication information, the authenticated encryption algorithm, and the authenticated encryption key.

[0201] Step 404: If the fourth MAC is the same as the second MAC, the second node decrypts the encrypted information by using the authenticated encryption algorithm.

[0202] Optionally, if the fourth MAC is the same as the second MAC, this indicates that the first communication information has not been modified, and the second node decrypts the encrypted information by using the authenticated encryption key to obtain the first communication information.

[0203] Optionally, if the fourth MAC is different from the second MAC, this indicates that the first communication information has been altered, and the second node discards the first information. The second node may perform step 301 again, or the second node may instruct the first node to redetermine the at least one first algorithm and the at least one first KDF.

[0204] It may be understood that when the first communication information includes indication information used to indicate one or more algorithms and one or more KDFs, after obtaining the first communication information, the second node may further verify whether the one or more algorithms and one or more KDFs included in the first communication information are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information. If the one or more algorithms and one or more KDFs included in the first communication information are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has not been modified, and the communication environment of the first node and the second node is secure. If the one or more algorithms and one or more KDFs included in the first communication information are different from the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has been modified, and the communication environment of the first node and the second node is not secure.

[0205] It can be understood that when the first communication information includes first verification information, after obtaining the first communication information, the second node verifies whether the first algorithm negotiation request information has been changed by using the first verification information. If the first algorithm negotiation request information has not been changed, the communication environment between the first node and the second node is secure, or if the first algorithm negotiation request information has been changed, the communication environment between the first node and the second node is not secure.

[0206] Based on the method shown in FIG. 4 , when the at least one first algorithm includes an authenticated encryption algorithm, the first node and the second node may obtain an authenticated encryption key based on the at least one first KDF. Subsequently, the first node may encrypt the first communication information by using the authenticated encryption key to obtain the encrypted information, obtain a second MAC based on the authenticated encryption algorithm, the encrypted information, the second communication information, and the authenticated encryption key, and perform integrity protection on the first information by using the second MAC. The second node may obtain a fourth MAC based on the authenticated encryption algorithm, the encrypted information, the second communication information, and the authenticated encryption key, and verify the integrity of the first information by using the fourth MAC. In this way, when the first node communicates with the second node, the first communication information can be encrypted by using the authenticated encryption algorithm, and integrity protection can be further performed on the first information by using the authenticated encryption algorithm. Therefore, the security of communication between the first node and the second node can be improved.

[0207] Optionally, in a second possible implementation of the method shown in FIG. 3, the first information includes encrypted information, second communication information, and a second MAC. When the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm, and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm. After receiving the first information, the second node may obtain a fourth MAC based on the integrity protection algorithm, the encrypted information, and the second communication information, and verify the integrity of the first information by using the fourth MAC. Specifically, as shown in FIG. 5, the method shown in FIG. 3 further includes steps 501 to 504.

[0208] Step 501: A first node obtains an encryption key and an integrity protection key based on at least one first KDF.

[0209] The encryption key may be used to encrypt the first communication, or the encryption key may be used to decrypt the encrypted information. The integrity protection key may be used to perform integrity protection on the second communication and the encrypted information, or the integrity protection key may be used to verify the integrity of the second communication and the encrypted information.

[0210] The first node may obtain the encryption and integrity protection keys in any one of the following ways:

[0211] Scheme 4.1: The first node uses the shared key as input to the first KDF to obtain the encryption key and the integrity protection key, i.e., K enc = 1st KDF(K) and K int = 1st KDF(K), where K enc is the encryption key, K is the shared key, and K int is the integrity protecting key.

[0212] Method 4.2: The first node uses the shared key and the second fresh parameter as inputs of the first KDF to obtain an encryption key and an integrity protection key, i.e., K enc = 1st KDF(K,C) and K int = 1st KDF(K,C), where K enc is the encryption key, K is the shared key, C is the second fresh parameter, and K int is the integrity protecting key.

[0213] Scheme 4.3: The first node uses the shared key, the second fresh parameter, and the second string as inputs to the first KDF to obtain an encryption key, i.e., K enc = first KDF(K, C, second string). The first node uses the shared key, the second fresh parameter, and the third string as inputs to the first KDF to obtain an integrity protection key, i.e., K int= 1st KDF(K, C, 3rd string). Here, K enc is the encryption key, K is the shared key, C is the second fresh parameter, and K int is an integrity protection key. The second string may be used to identify an encryption algorithm. For example, when the at least one first algorithm is a signaling plane encryption algorithm, the second string may be "signalling enc". The third string may be used to identify an integrity protection algorithm. For example, when the at least one first algorithm is a signaling plane integrity protection algorithm, the third string may be "signalling int".

[0214] Scheme 4.4: The first node uses the shared key, the second fresh parameter, the second string, and the second identifier as inputs to the first KDF to obtain an encryption key, i.e., K enc = first KDF(K, C, second string, second identifier). The first node uses the shared key, the second fresh parameter, the third string, and the third identifier as inputs to the first KDF to obtain an integrity protection key, i.e., K int = first KDF(K, C, third character string, third identifier). Here, K enc is the encryption key, K is the shared key, C is the second fresh parameter, and K int is the integrity protection key. For a description of the second string and the third string, see Scheme 3.3 above. The details will not be described again. The second identifier may be used to identify the first KDF used to generate the encryption key. For example, the second identifier may be the identifier of the first KDF used to generate the encryption key. The third identifier may be used to identify the KDF used to generate the integrity protection key. For example, the third identifier may be the identifier of the first KDF used to generate the integrity protection key.

[0215] It can be understood that the second or third identifier can include numbers and / or letters. The second and third strings in method 4.4 can be any parameters.

[0216] Scheme 4.5: The first node derives a second intermediate key based on the shared key and the second fresh parameter; the first node derives an encryption key based on the second intermediate key and at least one of the second identifier and the second string. For example, the first node uses the shared key and the second fresh parameter as inputs to KDF3 to derive the second intermediate key, i.e., K mid2 = KDF1(K,C). The first node uses the second intermediate key, the second identifier, and the second string as inputs to KDF4 to obtain an encryption key, i.e., K enc =KDF2(K mid2 , the second identifier, and the second string). The first node derives a third intermediate key based on the shared key and the second fresh parameter; and the first node derives an integrity-protecting key based on the third intermediate key and at least one of the third identifier and the third string. For example, the first node uses the shared key and the second fresh parameter as inputs for KDF5 to derive the third intermediate key, i.e., K mid3 = KDF1(K,C). The first node uses the third intermediate key, the third identifier, and the third string as inputs to KDF6 to obtain an integrity protection key, i.e., K int =KDF2(K mid3 , third identifier, third string).

[0217] where K mid2 is the second intermediate key, K is the shared key, C is the second fresh parameter, and K enc is the encryption key, and K mid3 is the third intermediate key, and K int is the integrity protection key. For a description of the second and third strings, see scheme 4.3 above. For a description of the second and third identifiers, see scheme 4.4 above. The details will not be repeated.

[0218] At least one first KDF may include KDF3, KDF4, KDF5, and KDF6. KDF3 and KDF4 may be the same or different. KDF5 and KDF6 may be the same or different.

[0219] To explain the solution more clearly, it can be understood that the method for obtaining the encryption key and the integrity protection key is described in this specification in two steps. In actual processing, the encryption key and the integrity protection key may alternatively be obtained in one step. The second intermediate key and the third intermediate key are merely intermediate results. Specifically, the method for determining the encryption key is as follows: enc = KDF4(KDF3(K, C), second algorithm, second string), and the method for determining the integrity protection key is K int =KDF6(KDF5(K,C), third algorithm, third string).

[0220] Optionally, the shared key in the above scheme is preset in the first node, or the shared key in the above scheme is obtained by the first node through calculation before step 501 .

[0221] Optionally, in the above scheme, the first KDF for generating the encryption key is the same as or different from the first KDF for generating the integrity protection key, e.g., the at least one first KDF includes one KDF, and the first KDF for generating the encryption key is the same as the first KDF for generating the integrity protection key; or the at least one first KDF includes multiple KDFs, and the first KDF for generating the encryption key is different from the first KDF for generating the integrity protection key.

[0222] Furthermore, a second MAC is obtained based on the integrity protection algorithm, the encrypted information, the second communication information, and the integrity protection key. For example, the first node obtains the second MAC by using the encrypted information, the second communication information, and the integrity protection key as inputs to the integrity protection algorithm.

[0223] Step 502: The second node obtains an encryption key and an integrity protection key based on at least one first KDF.

[0224] For the specific process of the second node obtaining an encryption key and an integrity protection key based on at least one first KDF, please refer to the corresponding description of step 501 in which the first node obtains an encryption key and an integrity protection key based on at least one first KDF, and the details will not be described again.

[0225] Step 503: The second node obtains a fourth MAC based on the integrity protection algorithm, the encrypted information and the second communication information.

[0226] Furthermore, the second node derives a fourth MAC based on the integrity protection algorithm, the encrypted information, the second communication information, and the integrity protection key. For example, the second node derives the fourth MAC by using the encrypted information, the second communication information, and the integrity protection key as inputs to the integrity protection algorithm.

[0227] It may be understood that the second node may further perform integrity protection on the encrypted information and the part of the information in the second communication, for example, the second node derives a fourth MAC based on the encrypted information, the part of the information in the second communication, the integrity protection algorithm, and the integrity protection key.

[0228] Step 504: If the fourth MAC is the same as the second MAC, the second node decrypts the encrypted information by using the encryption algorithm.

[0229] Optionally, if the fourth MAC is the same as the second MAC, this indicates that the first communication information is not modified, and the second node decrypts the encrypted information by using the encryption key to obtain the first communication information.

[0230] Optionally, if the fourth MAC is different from the second MAC, this indicates that the first communication information has been altered, and the second node discards the first information. The second node may perform step 301 again, or the second node may instruct the first node to redetermine the at least one first algorithm and the at least one first KDF.

[0231] It may be understood that when the first communication information includes instruction information used to indicate one or more algorithms and one or more KDFs, after obtaining the first communication information, the second node may further verify whether the one or more algorithms and one or more KDFs included in the first communication information are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information. If the one or more algorithms and one or more KDFs included in the first communication information are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has not been modified, and the communication environment between the first node and the second node is secure. If the one or more algorithms and one or more KDFs included in the first communication information are different from the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has been modified, and the communication environment between the first node and the second node is not secure.

[0232] It can be understood that when the first communication information includes first verification information, after obtaining the first communication information, the second node uses the first verification information to verify whether the first algorithm negotiation request information has been changed. If the first algorithm negotiation request information has not been changed, the communication environment between the first node and the second node is secure; or if the first algorithm negotiation request information has been changed, the communication environment between the first node and the second node is not secure.

[0233] Based on the method shown in FIG. 5 , when the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, the first node and the second node may obtain an encryption key and an integrity protection key based on the at least one first KDF. Subsequently, the first node may encrypt the first communication information by using the encryption key to obtain the encrypted information, obtain a second MAC based on the integrity protection algorithm, the encrypted information, the second communication information, and the integrity protection key, and perform integrity protection on the first communication information by using the second MAC. The second node may obtain a fourth MAC based on the integrity protection algorithm, the encrypted information, the second communication information, and the integrity protection key, and verify the integrity of the first information by using the fourth MAC. In this way, when the first node communicates with the second node, the first communication information can be encrypted by using the encryption algorithm, and integrity protection can be further performed on the first information by using the integrity protection algorithm. Therefore, the security of communication between the first node and the second node can be improved.

[0234] Optionally, in a third possible implementation of the method shown in FIG. 3, the first information includes second information and a first MAC. When the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm. After receiving the first information, the second node may obtain a third MAC based on the integrity protection algorithm, the second information, and the integrity protection key, and verify the integrity of the first information by using the third MAC. Specifically, as shown in FIG. 6, the method shown in FIG. 3 further includes steps 601 to 603.

[0235] Step 601: A first node obtains an integrity protection key based on at least one first KDF.

[0236] For the specific process of step 601, please refer to the corresponding description in step 501. The details will not be described again.

[0237] Furthermore, a first MAC is obtained based on the integrity protection algorithm, the second information, and the integrity protection key. For example, the first node obtains the first MAC by using the second information and the integrity protection key as inputs to the integrity protection algorithm.

[0238] Optionally, the first node obtains an encryption key based on at least one first KDF, so that the first node and the second node subsequently encrypt or decrypt communication information between the first node and the second node by using the encryption key, which improves the security of communication between the first node and the second node. For the process in which the first node obtains an encryption key based on at least one first KDF, please refer to the corresponding description in step 501. The details will not be described again.

[0239] Step 602: The second node obtains an integrity protection key based on the at least one first KDF.

[0240] For the specific process of step 602, please refer to the corresponding description in step 502. The details will not be described again.

[0241] Optionally, the second node obtains an encryption key based on at least one KDF. For the process in which the second node obtains an encryption key based on at least one first KDF, please refer to the corresponding description in step 502. The details will not be described again.

[0242] Step 603: The second node obtains a third MAC based on the integrity protection algorithm and the second information.

[0243] The third MAC may be used to verify the integrity of the second information.

[0244] Furthermore, the second node derives a third MAC based on the integrity protection algorithm, the second information, and the integrity protection key. For example, the second node derives the third MAC by using the second information and the integrity protection key as inputs to the integrity protection algorithm.

[0245] It may be understood that the second node may further perform integrity protection on some information in the second information, for example, the second node derives a third MAC based on the some information in the second information, the integrity protection algorithm, and the integrity protection key.

[0246] Note that if the third MAC is the same as the first MAC, this indicates that the second information has not changed, and the second node and the first node can communicate with each other by using at least one first algorithm and at least one first KDF. If the third MAC is different from the first MAC, this indicates that the first information has changed, and the second node may perform step 301 again; or the second node may instruct the first node to redetermine at least one first algorithm and at least one first KDF.

[0247] It may be understood that when the first communication includes instruction information used to indicate one or more algorithms and one or more KDFs, after receiving the first communication, the second node may further verify whether the one or more algorithms and one or more KDFs included in the first communication are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information. If the one or more algorithms and one or more KDFs included in the first communication are the same as the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has not been modified, and the communication environment between the first node and the second node is secure. If the one or more algorithms and one or more KDFs included in the first communication are different from the one or more algorithms and one or more KDFs included in the first algorithm negotiation request information, this indicates that the first algorithm negotiation request information has been modified, and the communication environment between the first node and the second node is not secure.

[0248] It can be understood that if the first communication information includes first verification information, after obtaining the first communication information, the second node uses the first verification information to verify whether the first algorithm negotiation request information has been changed. If the first algorithm negotiation request information has not been changed, the communication environment between the first node and the second node is secure; or if the first algorithm negotiation request information has been changed, the communication environment between the first node and the second node is not secure.

[0249] Based on the method shown in FIG. 6 , when the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, the first node and the second node may obtain an encryption key and an integrity protection key based on the at least one first KDF. Subsequently, the first node may obtain a first MAC based on the integrity protection algorithm, the second information, and the integrity protection key, and perform integrity protection on the first information by using the first MAC. The second node may obtain a third MAC based on the integrity protection algorithm, the second information, and the integrity protection key, and verify the integrity of the first information by using the third MAC. In this way, when the first node communicates with the second node, integrity protection can be performed on the first information by using the integrity protection algorithm. Therefore, the security of communication between the first node and the second node can be improved.

[0250] Optionally, in a fourth possible implementation of the method shown in FIG. 3, the first information includes the second information and a first MAC. When at least one first algorithm includes an authenticated encryption algorithm, the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm. After receiving the first information, the second node may obtain a third MAC based on the authenticated encryption algorithm, the second information, and the authenticated encryption key, and verify the integrity of the first information by using the third MAC. Specifically, as shown in FIG. 7, the method shown in FIG. 3 further includes steps 701 to 703.

[0251] Step 701: A first node obtains an encryption key that is authenticated based on at least one first KDF.

[0252] For the specific process of step 701, please refer to the corresponding description in step 401. The details will not be described again.

[0253] Furthermore, the first MAC is derived based on the authenticated encryption algorithm, the second information, and the authenticated encryption key, for example, the first node derives the first MAC by using the second information and the authenticated encryption key as inputs to the authenticated encryption algorithm.

[0254] Step 702: The second node obtains an encryption key that is authenticated based on at least one first KDF.

[0255] For the specific process of step 702, please refer to the corresponding description in step 402. The details will not be described again.

[0256] Step 703: The second node obtains a third MAC based on the authenticated encryption algorithm and the second information.

[0257] The third MAC may be used to verify the integrity of the second information.

[0258] Furthermore, the second node derives a third MAC based on the authenticated encryption algorithm, the second information, and the authenticated encryption key, for example, by using the second information and the authenticated encryption key as inputs to the authenticated encryption algorithm.

[0259] It may be understood that the second node may perform integrity protection on some information in the second information, for example, the second node derives a third MAC based on the some information in the second information, the authenticated encryption algorithm, and the authenticated encryption key.

[0260] Note that if the third MAC is the same as the first MAC, this indicates that the second information has not changed, and the second node and the first node may communicate with each other by using the at least one first KDF and the at least one first KDF. If the third MAC is different from the first MAC, this indicates that the first information has not changed, and the second node may perform step 301 again, or the second node may instruct the first node to redetermine the at least one first algorithm and the at least one first KDF.

[0261] For the case where the first communication information includes instruction information used to indicate one or more algorithms and one or more KDFs and the case where the first communication information includes first verification information, it can be understood that reference is made to the description of the method in Fig. 6. Details will not be described again.

[0262] Based on the method shown in FIG. 7, when the at least one first algorithm includes an authenticated encryption algorithm, the first node and the second node may obtain an authenticated encryption key based on the at least one first KDF. Subsequently, the first node may obtain a first MAC based on the authenticated encryption algorithm, the second information, and the authenticated encryption key, and perform integrity protection on the first information by using the first MAC. The second node may obtain a third MAC based on the authenticated encryption algorithm, the second information, and the authenticated encryption key, and verify the integrity of the first information by using the third MAC. In this way, when the first node communicates with the second node, integrity protection can be performed on the first information by using the authenticated encryption algorithm. Therefore, the security of communication between the first node and the second node can be improved.

[0263] It can be understood that before step 301 of the method shown in Figure 3, the method shown in Figure 4, the method shown in Figure 5, or the method shown in Figure 6, the second node may send instruction information of one or more algorithms and one or more KDFs to the first node multiple times, so that the first node determines at least one first algorithm and at least one first KDF from the instruction information sent multiple times. The following describes the above process using the method shown in Figure 3 as an example.

[0264] Optionally, as shown in FIG. 8, in a fifth possible implementation of the method shown in FIG. 3, the method shown in FIG.

[0265] Step 801: The second node sends second algorithm negotiation request information to the first node.

[0266] The second algorithm negotiation request information may be used to indicate one or more algorithms and one or more KDFs.

[0267] Optionally, one or more algorithms indicated by the second algorithm negotiation request information are different from one or more algorithms indicated by the first algorithm negotiation request information. For example, one or more algorithms indicated by the second algorithm negotiation request information are completely different from one or more algorithms indicated by the first algorithm negotiation request information. Alternatively, one or more algorithms indicated by the second algorithm negotiation request information are not completely the same as one or more algorithms indicated by the first algorithm negotiation request information. One or more KDFs indicated by the second algorithm negotiation request information are different from one or more KDFs indicated by the first algorithm negotiation request information. For example, one or more KDFs indicated by the second algorithm negotiation request information are completely different from one or more KDFs indicated by the first algorithm negotiation request information. Alternatively, one or more KDFs indicated by the second algorithm negotiation request information are not completely the same as one or more KDFs indicated by the first algorithm negotiation request information.

[0268] Optionally, the second algorithm negotiation request information further includes an identifier of the second node and a third freshness parameter. The identifier of the second node may be used to identify the second node. The third freshness parameter is a parameter related to the time validity of the second algorithm negotiation request information. For example, the third freshness parameter includes a value of a counter in the second node or a third nonce. The value of the counter may be that of a counter in the second node and may be a value that exists when the second node decides to send the second algorithm negotiation request information, and the counter may be used to record the amount of communication time between the first node and the second node. The third nonce may be a nonce generated by the second node when the second node decides to send the second algorithm negotiation request information.

[0269] For the specific process of step 801, please refer to the corresponding description of step 301 in which the second node sends first algorithm negotiation request information to the first node, and the details will not be described again.

[0270] Step 802: The first node receives second algorithm negotiation request information from the second node, and sends third information to the second node.

[0271] The third information may be used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or not applicable.

[0272] It can be understood that when the first node indicates that one or more algorithms and one or more KDFs indicated by the second node are not supported or not applicable, the second node may perform step 801 again until the first node determines at least one first algorithm and at least one first KDF based on the one or more algorithms and one or more KDFs indicated by the second node.

[0273] It may be understood that in addition to being performed before step 301 of the method shown in Figure 3, step 801 and step 802 may also be performed before step 301 of the method shown in Figure 4, Figure 5, Figure 6 or Figure 7. This is not limited thereto.

[0274] 8, before the first node determines at least one first algorithm and at least one first KDF, the second node may send an indication of one or more algorithms and one or more KDFs to the first node multiple times. In this manner, the second node can negotiate with the first node about the algorithms and KDFs to be used between the first node and the second node by sending an indication of one or more algorithms and one or more KDFs to the first node multiple times.

[0275] The solutions provided in the embodiments of the present application have been described above mainly in terms of the interaction between the first node and the second node. To implement the aforementioned functions, it can be understood that the first node or the second node includes corresponding hardware structures and / or software modules for performing the functions. Those skilled in the art should readily recognize that the present application can be implemented by hardware or a combination of hardware and computer software, in combination with the examples of units and algorithmic operations described in the embodiments disclosed herein. Whether the functions are performed by hardware or by hardware driven by computer software depends on the specific application and the design constraints of the technical solution. Those skilled in the art may implement the described functions using different methods for each specific application, and such implementations should not be considered to go beyond the scope of the present application.

[0276] In the embodiments of the present application, the first node or the second node may be divided into functional modules based on the above-mentioned method examples. For example, each functional module may be obtained through division based on each corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware or in the form of a software functional module. It should be noted that in the embodiments of the present application, the division into modules is an example and is merely a logical functional division. During actual implementation, other division methods may exist.

[0277] For example, when each functional module is obtained through division in an integrated manner, Fig. 9 is a schematic structural diagram of a communication device. The communication device may be a first node or a chip or system-on-chip in the first node, and the communication device may be configured to perform the functions of the first node in the above-mentioned embodiments.

[0278] In a possible embodiment, the communication device shown in FIG. 9 includes a receiving module 901, a processing module 902 and a transmitting module 903.

[0279] The receiving module 901 is configured to receive first algorithm negotiation request information from a second node, where the first algorithm negotiation request information is used to indicate one or more algorithms and one or more KDFs.

[0280] The processing module 902 is configured to determine at least a first algorithm in the one or more algorithms and at least a first KDF in the one or more KDFs.

[0281] The sending module 903 is configured to send first information to a second node, where the first information is used to indicate at least one first algorithm and at least one first KDF.

[0282] Optionally, the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm.

[0283] Optionally, integrity protection is performed on the first information by using at least one first algorithm.

[0284] Optionally, the first information includes second information and a first message authentication code MAC, the second information being used to indicate at least one first algorithm and at least one first KDF, and the first MAC being obtained by performing integrity protection on the second information.

[0285] Optionally, the at least one first algorithm comprises an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm; or, the at least one first algorithm comprises an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm.

[0286] Optionally, the second information further includes a first fresh parameter and first verification information, where the first fresh parameter is a parameter related to the time validity of the first information, and the first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, the first fresh parameter and the first KDF.

[0287] Optionally, the first information includes encrypted information, second communication information, and a second message authentication code MAC; the encrypted information is obtained by encrypting the first communication information, wherein the first communication information does not indicate at least one of the at least one first algorithm or the at least one first KDF, and the second communication information is used to indicate at least one of the at least one first algorithm or the at least one first KDF; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information.

[0288] Optionally, the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm; the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm.

[0289] Optionally, the at least one first algorithm comprises an authenticated encryption algorithm; the encrypted information is obtained by encrypting the first communication information by using the authenticated encryption algorithm; and the second MAC is obtained by performing integrity protection of the encrypted information and the second communication information by using the authenticated encryption algorithm.

[0290] Optionally, the at least one first algorithm is an algorithm supported by the communication device and has the highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the communication device and has the highest priority among the one or more KDFs.

[0291] Optionally, the first algorithm negotiation request information further includes a second freshness parameter, which is a parameter related to the time validity of the first algorithm negotiation request information; the receiving module 901 is further configured to receive second verification information from the second node, where the second verification information is obtained based on the first information, the preset shared key, the second freshness parameter and the first KDF; and the processing module 902 is further configured to verify the second verification information based on the first information, the preset shared key, the second freshness parameter and the first KDF.

[0292] Optionally, the receiving module 901 is further configured to receive second algorithm negotiation request information from the second node, where the second algorithm negotiation request information is used to indicate one or more algorithms and one or more KDFs; the sending module 903 is further configured to send third information to the second node, where the third information is used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or not applicable.

[0293] Optionally, the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; and the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information.

[0294] All relevant contents of the operations in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, and details will not be described here.

[0295] In this embodiment, the communication device is presented in the form of an integrated system of functional modules obtained through division. As used herein, a "module" may be a specific ASIC, circuitry, a processor and memory executing one or more software or firmware programs, integrated logic circuitry, and / or other component capable of providing the aforementioned functionality. In a simple embodiment, those skilled in the art will understand that the communication device may be in the form shown in FIG. 2.

[0296] For example, the processor 201 of FIG. 2 may invoke computer-executable instructions stored in the memory 203 to enable the communications device to perform the communications method in the method embodiments described above.

[0297] For example, the functions / implementation processes of the receiving module 901, the processing module 902, and the transmitting module 903 in Figure 9 may be implemented by the processor 201 in Figure 2 by invoking computer-executable instructions stored in the memory 203. Alternatively, the functions / implementation processes of the processing module 902 in Figure 9 may be implemented by the processor 201 in Figure 2 by invoking computer-executable instructions stored in the memory 203, and the functions / implementation processes of the receiving module 901 and the transmitting module 903 in Figure 9 may be implemented by the communication interface 204 in Figure 2.

[0298] The communication device provided in this embodiment can be configured to perform the aforementioned communication method. Therefore, for the technical effects that can be achieved by the communication device, please refer to the aforementioned method embodiments, and details will not be described here.

[0299] For example, when each functional module is obtained through division in an integrated manner, Fig. 10 is a schematic structural diagram of a communication device. The communication device may be a second node or a chip or system-on-chip in the second node, and the communication device may be configured to perform the functions of the second node in the above-mentioned embodiments.

[0300] In a possible embodiment, the communication device shown in FIG. 10 includes a transmitting module 1001 and a receiving module 1002 .

[0301] The sending module 1001 is configured to send first algorithm negotiation request information to a first node, where the first algorithm negotiation request information is used to indicate one or more algorithms and one or more KDFs.

[0302] The receiving module 1002 is configured to receive first information from a first node, where the first information is used to indicate at least one first algorithm among the one or more algorithms and at least one first KDF among the one or more KDFs.

[0303] Optionally, the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm.

[0304] Optionally, integrity protection is performed on the first information by using at least one first algorithm.

[0305] Optionally, the first information includes second information and a first message authentication code MAC, the second information being used to indicate at least one first algorithm and at least one first KDF, and the first MAC being obtained by performing integrity protection on the second information.

[0306] Optionally, as shown in FIG. 11 , the communication device further includes a processing module 1003; the at least one first algorithm includes an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm, and the processing module 1003 is configured to obtain a third MAC based on the integrity protection algorithm and the second information, where the third MAC is used to verify the integrity of the second information; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm, and the processing module 1003 is configured to obtain a third MAC based on the authenticated encryption algorithm and the second information, where the third MAC is used to verify the integrity of the second information.

[0307] Optionally, the second information further includes a first fresh parameter and first verification information, where the first fresh parameter is a parameter related to the time validity of the first information, and the first verification information is obtained based on the first algorithm negotiation request information, the preset shared key, the first fresh parameter and the first KDF.

[0308] Optionally, the first information includes encrypted information, second communication information, and a second message authentication code MAC; the encrypted information is obtained by encrypting the first communication information, wherein the first communication information does not indicate at least one of the at least one first algorithm or the at least one first KDF, and the second communication information is used to indicate at least one of the at least one first algorithm or the at least one first KDF; and the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information.

[0309] Optionally, the at least one first algorithm includes an encryption algorithm and an integrity protection algorithm, and the encrypted information is obtained by encrypting the first communication information by using the encryption algorithm; the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the integrity protection algorithm; the processing module 1003 is configured to obtain a fourth MAC based on the integrity protection algorithm, the encrypted information, and the second communication information; and the processing module 1003 is further configured to decrypt the information encrypted by using the encryption algorithm if the fourth MAC is the same as the second MAC.

[0310] Optionally, the at least one first algorithm includes an authenticated encryption algorithm, and the encrypted information is obtained by encrypting the first communication information by using the authenticated encryption algorithm; the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by using the authenticated encryption algorithm, and the processing module 1003 is configured to obtain a fourth MAC based on the authenticated encryption algorithm, the encrypted information, and the second communication information; and the processing module 1003 is further configured to decrypt the encrypted information by using the authenticated encryption algorithm if the fourth MAC is the same as the second MAC.

[0311] Optionally, the at least one first algorithm is an algorithm supported by the first node and has the highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has the highest priority among the one or more KDFs.

[0312] Optionally, the first algorithm negotiation request information further includes a second freshness parameter, the second freshness parameter being a parameter related to the time validity of the first algorithm negotiation request information, and the sending module 1001 is further configured to send second verification information to the first node, where the second verification information is obtained based on the first information, the preset shared key, the second freshness parameter and the first KDF.

[0313] Optionally, the sending module 1001 is further configured to send second algorithm negotiation request information to the first node, where the second algorithm negotiation request information is used to indicate one or more algorithms and one or more KDFs; the receiving module 1002 is further configured to receive third information from the first node, where the third information is used to indicate that one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or not applicable.

[0314] Optionally, the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; and the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information.

[0315] All relevant contents of the operations in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, and details will not be described here.

[0316] In this embodiment, the communication device is presented in the form of an integrated system of functional modules obtained through division. As used herein, a "module" may be a specific ASIC, circuitry, a processor and memory executing one or more software or firmware programs, integrated logic circuitry, and / or other component capable of providing the aforementioned functionality. In a simple embodiment, those skilled in the art will understand that the communication device may be in the form shown in FIG. 2.

[0317] For example, the processor 201 of FIG. 2 may invoke computer-executable instructions stored in the memory 203 to enable the communications device to perform the communications method in the method embodiments described above.

[0318] For example, the functions / implementation processes of the transmitting module 1001, the receiving module 1002, and the processing module 1003 in Figure 11 may be implemented by the processor 201 in Figure 2 by calling computer-executable instructions stored in the memory 203. Alternatively, the functions / implementation processes of the processing module 1003 in Figure 11 may be implemented by the processor 201 in Figure 2 by calling computer-executable instructions stored in the memory 203, and the functions / implementation processes of the transmitting module 1001 and the receiving module 1002 in Figure 11 may be implemented by the communication interface 204 in Figure 2.

[0319] The communication device provided in this embodiment can be configured to perform the aforementioned communication method. Therefore, for the technical effects that can be achieved by the communication device, please refer to the aforementioned method embodiments, and details will not be described here.

[0320] Fig. 12 is a schematic configuration diagram of a communication system. As shown in Fig. 12, a communication system 120 may include a node 1201 and a node 1202. It should be noted that Fig. 12 is merely an exemplary accompanying drawing, and the nodes and the number of nodes included in the communication system 120 shown in Fig. 12 are not limited in this embodiment of the present application.

[0321] Node 1201 has the functionality of the communication device shown in FIG. 9 and is configured to receive first algorithm negotiation request information from a second node, determine at least one first algorithm among the one or more algorithms and at least one first KDF among the one or more KDFs, and send the first information to the second node.

[0322] The node 1202 has the functionality of the communication device shown in FIG. 10 or FIG. 11, and may be configured to send first algorithm negotiation request information to a first node and receive first information from the first node.

[0323] It should be noted that all relevant contents of the steps in the above method embodiments may be cited in the functional descriptions of the corresponding nodes in the communication system 120. Details will not be described here.

[0324] 13 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 130 includes one or more processors 1301 and an interface circuit 1302. Optionally, the chip 130 may further include a bus 1303.

[0325] The processor 1301 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, the steps in the above-described method may be implemented by using hardware integrated logic circuits in the processor 1301 or by using instructions in the form of software. The processor 1301 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or execute the methods and steps disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.

[0326] The interface circuit 1302 is configured to transmit or receive data, instructions, or information. The processor 1301 may perform processing by using the data, instructions, or other information received by the interface circuit 1302, and may transmit the processed information by using the interface circuit 1302.

[0327] Optionally, chip 130 further includes memory, which may include read-only memory and random access memory, and may provide operating instructions and data for the processor, and a portion of the memory may further include non-volatile random access memory (NVRAM).

[0328] Optionally, the memory may store executable software modules or data structures, and the processor may perform corresponding operations by invoking operating instructions stored in the memory (which may be stored in an operating system).

[0329] Optionally, the chip 130 may be used in a communication device (including a first node and a second node) in an embodiment of the present application. Optionally, the interface circuit 1302 may be configured to output the execution result of the processor 1301. For the communication method provided in one or more embodiments of the present application, please refer to the aforementioned embodiments. The details will not be described again here.

[0330] It should be noted that the functions corresponding to the processor 1301 and the interface circuit 1302 may be implemented by using a hardware design, or may be implemented by using a software design, or may be implemented by combining software and hardware, which is not limited herein.

[0331] An embodiment of the present application further provides a smart cockpit product, which includes the above-mentioned first node and / or the above-mentioned second node.

[0332] An embodiment of the present application further provides an intelligent device or a transportation vehicle, wherein the vehicle includes a first node and / or a second node. Specifically, the intelligent device may be a robot, etc., and the transportation vehicle may be a smart car, an unmanned aerial vehicle, an unmanned transportation vehicle, etc.

[0333] The above description of the implementation allows those skilled in the art to clearly understand that for the sake of convenience and conciseness, the division into the above functional modules is merely used as an example for explanation. In actual application, the above functions can be allocated to different functional modules for implementation based on requirements, that is, the internal structure of the device is divided into different functional modules to implement all or part of the above functions.

[0334] In some embodiments provided in the present application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the described device embodiments are merely examples. For example, the division into modules or units is merely a logical function division. In actual implementation, other division methods may exist. For example, multiple units or components may be combined or incorporated into another device, or some features may be omitted or not implemented. In addition, the shown or discussed mutual couplings, direct couplings, or communication connections may be implemented by using some interfaces. Indirect couplings or communication connections between devices or units may be implemented electronically, mechanically, or in other forms.

[0335] Units described as separate components may or may not be physically separated, and components shown as units may be one or more physical units, i.e., located in one location or distributed across multiple different locations. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0336] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0337] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a readable storage medium. Based on this understanding, all or part of the technical solutions, the parts contributing to the prior art, or the technical solutions in the embodiments of the present application may be implemented in the form of a software product. The software product is stored in a storage medium and includes several instructions for instructing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to perform all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0338] The above description is merely a specific implementation of the present application, but is not intended to limit the protection scope of the present application. Any modifications or replacements within the technical scope disclosed in the present application shall fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method implemented by a first node, the method comprising: receiving first algorithm negotiation request information from a second node, the first algorithm negotiation request information being used to indicate security capabilities of the second node, including one or more algorithms and one or more key derivation functions (KDFs); determining at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs; transmitting first information to the second node, the first information being used to indicate the at least one first algorithm and the at least one first KDF, the first information including a freshness parameter related to time validity of the first information; receiving verification information from the second node, the verification information being obtained based on the first information, a preset shared key, the freshness parameter, and the at least one first KDF; verifying the verification information; A method comprising:

2. the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm; The method of claim 1.

3. Integrity protection is performed on the first information by using the at least one first algorithm. The method of claim 2.

4. the first information includes second information and a first message authentication code (MAC); the second information is used to indicate the at least one first algorithm and the at least one first KDF; The method further includes performing integrity protection on the second information to obtain the first MAC. The method according to claim 2 or 3.

5. the at least one first algorithm comprises an integrity protection algorithm, and the method further comprises performing integrity protection on the second information by using the integrity protection algorithm to obtain the first MAC; or the at least one first algorithm comprises an authenticated encryption algorithm, the method further comprising: performing integrity protection on the second information by using the authenticated encryption algorithm to obtain the first MAC. The method of claim 4.

6. the at least one first algorithm is an algorithm supported by the first node and has a highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has a highest priority among the one or more KDFs; 6. The method according to any one of claims 1 to 5.

7. the freshness parameter includes a value of a counter at the first node; 7. The method according to any one of claims 1 to 6.

8. The method comprises: receiving second algorithm negotiation request information from the second node, the second algorithm negotiation request information being used to indicate one or more algorithms and one or more KDFs; sending third information to the second node, the third information being used to indicate that the one or more algorithms and the one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable; The method of claim 1 , further comprising:

9. the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information; The method of claim 8.

10. A method implemented by a second node, the method comprising: sending first algorithm negotiation request information to the first node, the first algorithm negotiation request information being used to indicate security capabilities of the second node, including one or more algorithms and one or more key derivation functions (KDFs); receiving first information from the first node, the first information being used to indicate at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs, the first information including a freshness parameter related to time validity of the first information; obtaining verification information based on the first information, a preset shared key, the freshness parameter, and the at least one first KDF; transmitting the verification information to the first node; A method comprising:

11. the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm; The method of claim 10.

12. Integrity protection is performed on the first information by using the at least one first algorithm. The method of claim 11.

13. the first information includes second information and a first message authentication code (MAC); the second information is used to indicate the at least one first algorithm and the at least one first KDF, and the first MAC is obtained by performing integrity protection on the second information.

13. The method of claim 11 or 12.

14. the at least one first algorithm includes an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm, the method further including the step of obtaining a third MAC based on the integrity protection algorithm and the second information, and the third MAC is used to verify the integrity of the second information; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm, the method further including the step of obtaining a third MAC based on the authenticated encryption algorithm and the second information, the third MAC being used to verify the integrity of the second information. The method of claim 13.

15. the at least one first algorithm is an algorithm supported by the first node and has a highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has a highest priority among the one or more KDFs; 15. The method according to any one of claims 10 to 14.

16. the fresh parameter is a value of a counter at the first node; 16. The method according to any one of claims 10 to 15.

17. The method comprises: sending second algorithm negotiation request information to the first node, the second algorithm negotiation request information being used to indicate one or more algorithms and one or more KDFs; receiving third information from the first node, the third information being used to indicate that the one or more algorithms and the one or more KDFs indicated by the second algorithm negotiation request information are not supported or are not applicable; 17. The method of any one of claims 10 to 16, further comprising:

18. the one or more algorithms indicated by the second algorithm negotiation request information are different from the one or more algorithms indicated by the first algorithm negotiation request information; the one or more KDFs indicated by the second algorithm negotiation request information are different from the one or more KDFs indicated by the first algorithm negotiation request information; 18. The method of claim 17.

19. A communication device, the communication device including a receiving module, a processing module, and a transmitting module; the receiving module is configured to receive first algorithm negotiation request information from a second node, the first algorithm negotiation request information being used to indicate security capabilities of the second node, including one or more algorithms and one or more key derivation functions (KDFs); the processing module is configured to determine at least one first algorithm in the one or more algorithms and at least one first KDF in the one or more KDFs; the transmitting module is configured to transmit first information to the second node, the first information being used to indicate the at least one first algorithm and the at least one first KDF, and the first information including a freshness parameter related to time validity of the first information; the receiving module is configured to receive verification information from the second node, the verification information being obtained based on the first information, a preset shared key, the freshness parameter, and the at least one first KDF; the processing module is configured to verify the verification information; Communication equipment.

20. the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm; 20. The communication device of claim 19.

21. Integrity protection is performed on the first information by using the at least one first algorithm.

21. The communication device of claim 20.

22. the first information includes second information and a first message authentication code (MAC); the second information is used to indicate the at least one first algorithm and the at least one first KDF, and the first MAC is obtained by performing integrity protection on the second information.

22. A communication device according to claim 20 or 21.

23. the at least one first algorithm includes an integrity protection algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm; or the at least one first algorithm includes an authenticated encryption algorithm, and the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm.

23. The communication device of claim 22.

24. the at least one first algorithm is an algorithm supported by the communication device and has a highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the communication device and has a highest priority among the one or more KDFs; 24. A communication device according to any one of claims 19 to 23.

25. The method of claim 24, wherein the fresh parameter includes a value of a counter in the communication device.

25. A communication device according to any one of claims 19 to 24.

26. A communication device, the communication device including a transmitting module, a receiving module, and a processing module; the sending module is configured to send first algorithm negotiation request information to the first node, the first algorithm negotiation request information being used to indicate security capabilities of the second node, including one or more algorithms and one or more key derivation functions (KDFs); The receiving module is configured to receive first information from the first node, the first information being used to indicate at least one first algorithm among the one or more algorithms and at least one first KDF among the one or more KDFs, and the first information including a freshness parameter related to time validity of the first information; the processing module is configured to obtain verification information based on the first information, a preset shared key, the freshness parameter, and the at least one first KDF; the transmitting module is configured to transmit the verification information to the first node; Communication equipment.

27. the one or more algorithms include an encryption algorithm and / or an integrity protection algorithm and / or an authenticated encryption algorithm; 27. The communication device of claim 26.

28. Integrity protection is performed on the first information by using the at least one first algorithm.

28. The communication device of claim 27.

29. the first information includes second information and a first message authentication code (MAC); the second information is used to indicate the at least one first algorithm and the at least one first KDF, and the first MAC is obtained by performing integrity protection on the second information.

29. A communication device according to claim 27 or 28.

30. The at least one first algorithm includes an integrity protection algorithm, the first MAC is obtained by performing integrity protection on the second information by using the integrity protection algorithm, and the processing module is configured to obtain a third MAC based on the integrity protection algorithm and the second information, and the third MAC is used to verify the integrity of the second information; or the at least one first algorithm includes an authenticated encryption algorithm, the first MAC is obtained by performing integrity protection on the second information by using the authenticated encryption algorithm, the processing module is configured to obtain a third MAC based on the authenticated encryption algorithm and the second information, and the third MAC is used to verify the integrity of the second information.

30. The communication device of claim 29.

31. the at least one first algorithm is an algorithm supported by the first node and has a highest priority among the one or more algorithms, and the at least one first KDF is a KDF supported by the first node and has a highest priority among the one or more KDFs; 31. A communication device according to any one of claims 26 to 30.

32. The freshness parameter includes a value of a counter at the first node.

32. A communication device according to any one of claims 26 to 31.

33. 10. A communications device comprising at least one processor, the at least one processor being coupled to a memory, the memory being configured to store a program or instructions, the program or instructions being executed by the processor enabling the device to perform the method of any one of claims 1 to 9.

34. 19. A communications device including at least one processor, the at least one processor being coupled to a memory, the memory being configured to store a program or instructions, the program or instructions being executed by the processor enabling the device to perform the method of any one of claims 10 to 18.

35. 10. A computer readable medium storing a computer program or instructions which, when executed, enable a computer to carry out the method of any one of claims 1 to 9.

36. 19. A computer readable medium storing a computer program or instructions which, when executed, enable a computer to carry out the method of any one of claims 10 to 18.

37. A communication system comprising an apparatus according to claim 33 and an apparatus according to claim 34.

38. A program causing a computer to execute the steps of any one of claims 1 to 9.

39. A program causing a computer to execute the steps of any one of claims 10 to 18.

Citation Information

Patent Citations

  • Security algorithm consultation method of Internet of Things, network element and Internet of Things terminal

    CN106899562A

  • Negotiation method and device for key derivation algorithm

    CN109560919A

  • End-to-end authentication and key negotiation method, device and system

    CN109905348A

  • Communication system and method, information processor and processing method, device, program and recording medium

    JP2008066834A

  • Method and device for key generation

    US20130310006A1