Communication method and device

The method and apparatus facilitate secure and efficient communication by negotiating KDFs and algorithms between nodes, addressing inefficiencies and vulnerabilities in existing systems through enhanced encryption and decryption processes.

JP2024160226AActive Publication Date: 2024-11-13HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing communication systems face challenges in accurately and efficiently performing encryption and decryption processes due to the variety of algorithms supported by senders and receivers, leading to inefficiencies and potential security vulnerabilities.

Method used

A method and apparatus for negotiating and using key derivation functions (KDFs) and algorithms between communication nodes to ensure secure and efficient encryption and decryption, allowing for the use of multiple algorithms such as encryption, integrity protection, and authenticated encryption.

Benefits of technology

Enhances communication security by enabling accurate and efficient encryption and decryption processes, improving the diversity and flexibility of algorithms used, and ensuring higher priority algorithms are utilized for enhanced security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024160226000001_ABST
    Figure 2024160226000001_ABST
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 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 sender and receiver capability settings and scenario requirements, the sender and receiver may support many types of algorithms. Therefore, a method that allows the sender and receiver to use the same algorithm to perform processing such as encryption or decryption on data accurately and efficiently is important to communication efficiency and performance. Summary of the Invention [Problem to be solved by the invention]

[0004] SUMMARY OF THE DISCLOSURE The embodiments of the present application provide a communication method and apparatus, allowing 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, which is applied to a first node, and includes the steps of: receiving 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 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; and sending the first information to the second node, where the first information is 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, a 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 the first information used to indicate the at least one first algorithm and at least one first KDF can be sent to the second node. In this way, the first node can negotiate with the second node about the algorithm and the KDF, so that the first node and the second node accurately and efficiently perform processing related to encryption or decryption on communication information. Take an example in which the first node sends information to the second node. The first node can encrypt information according to the negotiated algorithm and KDF, and send the encrypted information to the second node. After receiving the encrypted information, the second node can decrypt the encrypted information according to the negotiated algorithm and KDF. This improves the security of the 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 for 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 the 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 the 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 of the second information by using the first MAC. This can improve the security of the 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 of the first aspect, in one possible implementation, the second information further includes a first freshness parameter and a first verification information, the first freshness parameter being 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 the communication between the first node and the second node.

[0013] In relation to the first aspect and possible implementations of the first aspect, 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 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 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 the communication 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 the communication between the first node and the second node.

[0015] In relation to the first aspect and possible implementations thereof, in one possible implementation, 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 the communication between the first node and the second node.

[0016] In relation to the first aspect and possible implementations of the first aspect, in one possible implementation, the at least one first algorithm is an algorithm supported by the first node and has the highest priority in 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 in 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 a higher communication security, so that the first node communicates with the second node by using the algorithm supported by the first node and has the highest priority in the one or more algorithms, and the KDF supported by the first node and has the highest priority in the one or more KDFs. This can improve the security of the 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, such that 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 of the first aspect, in one possible implementation, the at least one first algorithm corresponds to one algorithm type, and the algorithm type may correspond to a plurality of algorithms with different priorities, and the first algorithm is an algorithm supported by the first node and having the highest priority in the algorithms corresponding to the above 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 in the algorithm type corresponding to the first algorithm. Alternatively, if the algorithm type corresponds to only one algorithm, the first node determines 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. Usually, the priority of an algorithm is related to the security of the algorithm. Thus, the first node and the second node communicate with each other by using an algorithm with a relatively high priority, and as a result, the security of the communication between the first node and the second node can be improved.

[0019] In relation to the first aspect and possible implementations of the first aspect, in one possible implementation, the at least one first algorithm corresponds to a plurality of algorithm types, and the priorities of the plurality of algorithm types are the same. 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 a highest priority among the algorithms corresponding to each of the plurality of algorithm types. Alternatively, if the algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to the 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 a 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. Usually, the priority of an algorithm is related to the security of the algorithm. Thus, the first node and the second node communicate with each other by using an algorithm having a relatively high priority, and as a result, the security of the communication between the first node and the second node may be improved.

[0020] In relation to the first aspect and possible implementations of the first aspect, in one possible implementation, the first algorithm negotiation request information includes a second freshness parameter, the second freshness parameter being a parameter related to time validity of the first algorithm negotiation request information, and the method further includes: receiving second verification information from the second node, the second verification information being 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 the communication between the first node and the second node can be improved.

[0021] In relation to the first aspect and possible implementations of the first aspect, 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 used to indicate one or more algorithms and one or more KDFs; and transmitting third information to the second node, the third information used to indicate that the 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, the second algorithm negotiation request information used to indicate one or more algorithms and one or more KDFs, and transmit the third information to the second node, the third information used to indicate that the 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 manner, the first node and the second node can negotiate the algorithm and KDF by communicating multiple times, thereby improving 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, so that the first node determines the algorithms and KDFs to be used for 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 the negotiation of algorithms and KDFs by 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, such that the first node and the second node accurately and efficiently perform processing related to encryption or decryption on 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 for 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 can verify the integrity of the first information by using at least one first algorithm. This improves the security of the 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 the 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 the communication between the first node and the second node.

[0028] In relation to the second aspect and possible implementations of the second aspect, 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 a 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, and the method further includes a step of 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 may verify the integrity of the second information according to multiple algorithms, which improves the flexibility and versatility of the second node when the second node verifies the integrity of the information.

[0029] In relation to the second aspect and possible implementations thereof, in one possible implementation, the second information further includes a first freshness parameter and a first verification information, the first freshness parameter being 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 may further verify the integrity of the first algorithm negotiation request information by using the first verification information, thereby improving the security of the communication between the first node and the second node.

[0030] In relation to the second aspect and possible implementations of the second aspect, in one possible implementation, the first information includes the encrypted information, the second communication information, and the 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 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 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, so that 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 the communication between the first node and the second node.

[0031] In relation to the second aspect and possible implementations of the second aspect, 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 the communication between the first node and the second node.

[0032] In relation to the second aspect and possible implementations of the second aspect, in one possible implementation, 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; the second MAC is obtained by performing integrity protection on the encrypted information and the second communication information by 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 by 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 the communication 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 in 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 in 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 a higher communication security, so that the second node communicates with the first node by using the algorithm supported by the first node and has the highest priority in the one or more algorithms, and the KDF supported by the first node and has the highest priority in the one or more KDFs. This can improve the security of the 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, such that 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 of the second aspect, in one possible implementation, the at least one first algorithm corresponds to one algorithm type, and the algorithm type may correspond to a plurality of algorithms with different priorities, and the first algorithm is an algorithm supported by the first node and having the highest priority in the algorithms corresponding to the above 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 in the algorithm type corresponding to the first algorithm. Alternatively, if the algorithm type corresponds to only one algorithm, the first node determines 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. Usually, the priority of an algorithm is related to the security of the algorithm. Thus, the first node and the second node communicate with each other by using an algorithm with a relatively high priority, and as a result, the security of the communication between the first node and the second node can be improved.

[0036] In relation to the second aspect and possible implementations of the second aspect, in one possible implementation, the at least one first algorithm corresponds to a plurality of algorithm types, and the priorities of the plurality of algorithm types are the same. 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 a highest priority among the algorithms corresponding to each of the plurality of algorithm types. Alternatively, if the algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to the 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 a 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. Usually, the priority of an algorithm is related to the security of the algorithm. Thus, the first node and the second node communicate with each other by using an algorithm having a relatively high priority, and as a result, the security of the communication between the first node and the second node may be improved.

[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 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 may 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: transmitting 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 transmit 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 receive 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. In this manner, the first node and the second node can negotiate the algorithm and KDF by communicating multiple times, thereby improving 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 the one or more algorithms and the one or more KDFs to the first node multiple times, so that the first node determines the algorithms and KDFs to be used for communication with the second node based on the one or more received algorithms and the one or more received KDFs. This improves the success rate of the negotiation of the algorithms and KDFs by 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 said first aspect. The device includes corresponding units or components configured to execute 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 said 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 said second aspect. The device comprises corresponding units or components configured to execute 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 said 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, which when executed by the processor, are 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, which when executed by the processor, are capable of implementing 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, causes 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, which stores a computer program or instructions, which, when executed, causes 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 comprising 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, is capable of causing 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 a method in 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 when the programs or instructions are executed by the processor, the chip is capable of implementing 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, the system comprising an apparatus according to the seventh aspect and / or an apparatus according to the eighth aspect.

[0053] It is understood that any one of the communication device, chip, computer readable medium, computer program product, communication system, etc. provided above is configured to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved by the communication device, chip, computer readable medium, computer program product, communication system, etc., please refer to the beneficial effects in the corresponding method. Details will not be described in this specification. [Brief description of the drawings]

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

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

[0056] [Diagram 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] [Diagram 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] FIG. 1 is a schematic structural diagram of a chip according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[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 embodiment 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 5th 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. The communication system 10 shown in FIG. 1 is used below only as an example to describe the method provided in the embodiment 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 only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solutions provided in the present application.

[0070] The node 101 or the node 102 in FIG. 1 may be any device having a receiving and transmitting function. This device includes, but is not limited to, an evolved NodeB (NodeB, eNB or e-NodeB, evolutional Node B) in LTE, a gNodeB (gNodeB or gNB) or a transmission receiving point / transmission reception point (TRP) in NR, a base station evolved from 3GPP, an access node, a wireless relay node, a wireless backhaul node, a data forwarding device (e.g., a router, a repeater, a bridge or a switch) in a Wi-Fi system, etc. The base station may be a macro base station, a micro base station, a pico cell 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 a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, etc. The application scenario is not limited to the embodiments of this application. A terminal may also be referred to as a terminal device, user equipment (UE), access terminal device, vehicle-mounted 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 in a vehicle cockpit domain (such as a cockpit domain controller (CDC), a camera, a screen, a microphone, a speaker, an electronic key, or a passive entry passive initiation system controller).

[0071] The communication system 10 shown in Fig. 1 is merely used 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. Not limited thereto.

[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 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 inputs and outputs 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 the expected program code in the form of instructions or data structures and accessible by a computer. The memory may exist independently and 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, the 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 a particular 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 touch screen 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 Fig. 2. The type of the communication device 200 is not limited in the embodiments of the present application.

[0083] The following specifically describes the communication method in the embodiment of the present application with reference to Figures 1 and 2. The 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 the first node and the 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 the first node and the second node. The user plane algorithms may include encryption algorithms and / or integrity protection algorithms and / or authenticated encryption algorithms.

[0085] In the embodiment 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. A signaling plane algorithm being different from a user plane algorithm may be expressed as follows: the type of the signaling plane algorithm is different from the type of the user plane algorithm (e.g., a signaling plane algorithm includes an encryption algorithm and an integrity protection algorithm, and a 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 there is 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] Please note 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 alternatively have different names among specific implementations, which are 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 a different order than the order 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. The communication method 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. Furthermore, 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 the first node and the second node by using a key of the encryption algorithm. An integrity protection algorithm may be used to perform integrity protection on some or all of the communication information between the first node and the 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 the first node and the 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 of the authenticated encryption algorithm, and the 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 of 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 of 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, and the eight algorithms include 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. In the encryption algorithms, the priority of encryption algorithm 1 is equal to or greater than the priority of encryption algorithm 2. In the integrity protection algorithms, the priority of integrity protection algorithm 1 is equal to or greater than the priority of integrity protection algorithm 2. In 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 algorithm is equal to or lower than the priority of the integrity protection algorithm. In the encryption algorithms, the priority of encryption algorithm 1 is equal to or lower than the priority of encryption algorithm 2. In the integrity protection algorithms, the priority of integrity protection algorithm 1 is equal to or lower than the priority of integrity protection algorithm 2. In 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 algorithm includes an encryption algorithm 1, an encryption algorithm 2, and an integrity protection algorithm 1, the signaling plane algorithm includes an encryption algorithm 2, an integrity protection algorithm 1, and an integrity protection algorithm 2, and the KDFs include KDF1, KDF2, and KDF3. In this case, in the user plane algorithms and the signaling plane algorithms, the priority of the encryption algorithm is equal to or higher than the priority of the integrity protection algorithm. In the encryption algorithms included in the user plane algorithms, the priority of the encryption algorithm 1 is equal to or higher than the priority of the encryption algorithm 2. In the integrity protection algorithms included in the signaling plane algorithms, the priority of the integrity protection algorithm 1 is equal to or higher than the priority of the 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 the authenticated encryption algorithm 1 is higher than or equal to the priority of the authenticated encryption algorithm 2, the priority of the integrity protection algorithm 1 is higher than or equal to the priority of the integrity protection algorithm 2, the priority of the integrity protection algorithm 2 is higher than or equal to the priority of the encryption algorithm 1, the priority of the encryption algorithm 1 is higher than or equal to the priority of the encryption algorithm 2, and the priority of the KDF1 is higher than or equal to the priority of the 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 greater than or equal to the priority of integrity protection algorithm 2, which is greater than or equal to the priority of encryption algorithm 1, which is greater than or equal to the priority of encryption algorithm 1, which is greater than or equal to the priority of encryption algorithm 2, which is greater than or equal to the priority of authenticated encryption algorithm 2, and which is greater than or equal to the priority of authenticated encryption algorithm 1, and which is greater than or equal to 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 manners:

[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 can 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.

[0105] Scheme 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 the KDF corresponding to that bit by using 0 or 1. For example, when a bit is 1, it can indicate that the first algorithm negotiation request information indicates the algorithm or the KDF corresponding to that bit, and when the bit is 0, it can indicate that the first algorithm negotiation request information does not indicate the algorithm or the KDF corresponding to that bit, and vice versa.

[0106] For example, the first algorithm negotiation request information includes 5 bits, where in the 5 bits, 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] Scheme 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 the bit is 1, it may indicate that the first algorithm negotiation request information indicates the algorithm corresponding to that bit, and if the bit is 0, it 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, when a bit is 1, it may indicate that the first algorithm negotiation request information indicates the KDF corresponding to that bit, and when the bit is 0, it 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 the bit sequences includes three bits, a first bit of the three bits corresponds to algorithm 1, a second bit of the three bits corresponds to algorithm 2, and a third bit of the three bits corresponds to algorithm 3, and the other of the bit sequences includes two bits, a first bit of the two bits corresponds to KDF1, and a second bit of the two bits 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 of 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 a first algorithm in the one or more algorithms and at least a first KDF in the one or more KDFs.

[0115] It should be noted that, in this specification, the one or more algorithms supported by the first node and / or the one or more KDFs supported by the 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, the multiple algorithms correspond to corresponding priorities, and the 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 the identifiers of algorithms and the priorities of algorithms. Optionally, the correspondence is preset, e.g., defined in a standard or protocol, or the correspondence can be preset and pre-configured for the corresponding node by 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 the identifiers of KDFs and the priorities of KDFs. 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 correspondence is mainly described below in a list manner. However, it may be understood by those skilled in the art that the present application includes, but is not limited to, presenting communication in a table manner.

[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 algorithm. 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 KDF. 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 includes an encryption algorithm priority list, an integrity protection algorithm priority list, and an authenticated encryption algorithm priority list, where the authenticated encryption algorithm priority>integrity protection algorithm priority>encryption algorithm priority, where the encryption algorithm priority list includes algorithm 1 and algorithm 2, where the priority of algorithm 1 is higher than the priority of algorithm 2, where the integrity protection algorithm priority list includes algorithm 3 and algorithm 4, where the priority of algorithm 3 is higher than the priority of algorithm 4, where the authenticated encryption algorithm priority list includes algorithm 5 and algorithm 6, where the priority of algorithm 5 is higher than the priority of algorithm 6, and where 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 limited. [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 priority of the integrity protection algorithm are priority 2, and priority 1 is higher than priority 2. [Table 5]

[0127] Optionally, the at least one first algorithm is an algorithm supported by the first node and having a highest priority among the one or more algorithms. The at least one first algorithm corresponds to one or more algorithm types. For example, when the at least one first algorithm includes one algorithm, the at least one first algorithm corresponds to one algorithm type. When 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 an algorithm type, the algorithm type may correspond to multiple algorithms having 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, or, 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, where 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 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 a highest priority among the algorithms corresponding to each of the plurality of algorithm types. Alternatively, if the algorithm type corresponds to only one algorithm, the at least one first algorithm includes an algorithm corresponding to the algorithm type.

[0133] For example, the at least one first algorithm includes two algorithms, 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 an algorithm type, the priorities of the encryption algorithm and the integrity protection algorithm are the same, and the priorities of the encryption algorithm and the integrity protection algorithm are higher than the priority of the authenticated encryption algorithm. In the encryption algorithm, the priority of algorithm 5 is equal to or higher than the priority of algorithm 6. In the integrity protection algorithm, the priority of algorithm 3 is equal to or higher than the priority of algorithm 4. In the authenticated encryption algorithm, 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 in the algorithm type of the algorithm indicated by the first algorithm negotiation request information, the first node may determine a part of the multiple algorithm types as the algorithm type corresponding to at least one first algorithm. For example, in the algorithm type of the algorithm indicated by the first algorithm negotiation request information, the algorithm types with the highest priority are an encryption algorithm and an integrity protection algorithm, and the first node determines the integrity protection algorithm as the algorithm type corresponding to the at least one first algorithm. In this scenario, encryption may not be performed by using an encryption algorithm. It should be further noted that for ease of explanation of the solution, the expression "determine an algorithm type" is used. 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. The null encryption algorithm is used to generate an all-zero keystream. In other words, the null encryption algorithm may indicate that the information is not encrypted. When the at least one first algorithm includes a null encryption algorithm, it indicates that the communication information between the first node and the second node is not encrypted.

[0136] It can be understood that Tables 4 to 6 are merely examples of algorithm priority lists. In a particular application, the algorithm priority list may alternatively be in another form. This is not limited.

[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 having a highest priority among the one or more KDFs. For example, when the at least one first KDF includes one KDF, the at least one first KDF is a KDF supported by the first node and having a highest priority among the one or more KDFs. When 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 having a 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, where 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, such 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 will first be described in which integrity protection is performed on the first information by using at least one first algorithm.

[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 on at least one first algorithm and information on at least one first KDF. For example, the second information includes an identifier of the at least one first algorithm and an identifier of the 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 description 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] 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, an algorithm / KDF identifier is shown in Table 7, where the second information includes 16 bits, where bits 1 to 4 are used to indicate an identifier of an encryption algorithm, bits 5 to 8 are used to indicate an identifier of an integrity protection algorithm, bits 9 to 12 are used to indicate an identifier of an authenticated encryption algorithm, and bits 13 to 16 are used to indicate an identifier of a KDF. In Table 7, the encryption algorithms include algorithm 1, algorithm 2, and algorithm 3. The identifier of algorithm 1 is 0000, and algorithm 1 is a null encryption algorithm and is used to generate an all-zero keystream. The identifier of algorithm 2 is 0001, and the identifier of algorithm 3 is 0010. The integrity protection algorithms include algorithm 4 and algorithm 5. The identifier of algorithm 4 is 0001, and the identifier of algorithm 5 is 0010. The authenticated encryption algorithm includes algorithm 6, and the identifier of algorithm 6 is 0011. The KDF includes KDF1 and KDF2, where the identifier of KDF1 is 0001 and the identifier of KDF2 is 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 other forms. 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 whether the first algorithm includes an algorithm corresponding to the bit or whether the first KDF includes a KDF corresponding to the bit by using 0 or 1. For example, when a bit is 1, this can indicate that the first algorithm includes an algorithm corresponding to the bit or the first KDF includes a KDF corresponding to the bit, and when a bit is 0, this can indicate that the first algorithm does not include an algorithm corresponding to the bit or the first KDF does not include a KDF corresponding to the bit, and vice versa.

[0152] For example, the second information includes 5 bits, where in the 5 bits, 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 bit sequence of the bit sequences, one bit in the bit sequence corresponds to one KDF. For example, 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 whether the first KDF includes the KDF corresponding to that bit by using 0 or 1. For example, if the bit is 1, it can indicate that the first KDF includes the KDF corresponding to that bit, and if the bit is 0, it 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 the three bits corresponds to algorithm 1, a second bit of the three bits corresponds to algorithm 2, and a third bit of the three bits corresponds to algorithm 3, and the other of the bit sequences includes two bits, a first bit of the two bits corresponds to key KDF1, and a second bit of the two bits 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 not related to instructions for the first algorithm or the first KDF. For example, the second information further includes the first verification information. Alternatively, the second information further includes the first freshness parameter and the first verification information. Alternatively, the second information further includes instruction information used in step 301 to indicate one or more algorithms and one or more KDFs.

[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 a value present 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 fresh 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 fresh parameter and the second KDF received by the first node. For example, AUTH1=second KDF(K, first fresh parameter, first algorithm negotiation information). For the description 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, subsequently 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] Furthermore, 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, 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, and 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; or, the second communication information includes one bit sequence, and one bit in the bit sequence corresponds to one algorithm or one KDF; or, the second communication information includes two bit sequences, and in one of the bit sequences, one bit in the bit sequence corresponds to one algorithm, and in the other of the bit sequences, one bit in the bit sequence corresponds to one KDF. For details, please refer to the explanation in the above-mentioned methods 2.1 to 2.3. 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 the first verification information. Alternatively, the first communication information includes the first freshening parameter and the 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 the description of the first verification information, the first freshening parameter and the indication information used to indicate one or more algorithms and one or more KDFs in step 301, please refer to the corresponding description above provided 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. Or, the first node may first obtain the second MAC and then encrypt the first communication information. This is not limited. 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 the description of the first communication information and the second communication information and the description of the at least one first algorithm and the at least one first KDF by the first information, please refer to the description of the above case of encrypting the first information by using at least one first algorithm and performing integrity protection on the first information by using at least one first algorithm. Details will not be described again.

[0171] Further, 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 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 the 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, please refer to the following method description shown in Figure 6 or Figure 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, please refer to the following method description shown in Figure 4 or Figure 5.

[0175] Optionally, after receiving the first information, the second node sends acknowledgement information to the first node, where the acknowledgement information 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 the 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 is not modified, and if the third verification information is different from the second verification information, this indicates that the first information received by the second node is 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 fresh parameter, and the second KDF received by the second node. For example, AUTH2=2KDF(K,2Fresh 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 fresh parameter, and the second KDF. For example, AUTH3=2KDF(K,2Fresh 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. Please refer to the above example for the description of AUTH2, AUTH3, K, and the second KDF. The details will not be described again.

[0179] Optionally, integrity protection is performed on the acknowledgement information or the second verification information by using at least one first algorithm. For the process of performing integrity protection on the acknowledgement 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. 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 at least one first algorithm and at least one first KDF, so that the first node and the second node can encrypt or decrypt communication information between the first node and the second node by using the same algorithm.

[0181] It can be understood that there are several different implementations for the contents 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 implementation, second implementation, third implementation and fourth implementation 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 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. 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 = 1st KDF(K), where K c is the authenticated encryption key and K is the shared key.

[0187] Method 3.2: The first node uses the shared key and the second fresh parameter as input 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 an authenticated encryption algorithm. For example, if the at least one first algorithm is a user plane authenticated encryption algorithm, the first string may be "user auth enc" that identifies the user plane authenticated encryption algorithm.

[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 a 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 fresh parameter. For a description of the first string, please refer to 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 an identifier of the first KDF.

[0190] It may be appreciated that the first identifier may include numbers and / or letters. The first string in method 3.4 may 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 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] In order to explain the solution more clearly, it can be understood that the method for obtaining the authenticated encryption key is described in this specification in two steps. In actual processing, the authenticated encryption key can alternatively be obtained in one step. The first intermediate key is only an intermediate result. Specifically, the method for determining the authenticated encryption key is to 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 derived based on the authenticated encryption algorithm, the encrypted information, the second communication information, and the authenticated encryption key. For example, the first node derives the second MAC by using the encrypted information, the second communication information, and the authenticated encryption key as inputs of the authenticated encryption algorithm.

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

[0197] For a 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 of 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, for example, the second node derives a fourth MAC based on the encrypted information, the part of the information in the second communication, 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 is unchanged, 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 can 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, and if the first algorithm negotiation request information has not been changed, the communication environment of the first node and the second node is secure, or if the first algorithm negotiation request information has been changed, the communication environment of 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. Then, 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 the 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] Method 4.1: The first node uses the shared key as the input of the first KDF to obtain an encryption key and an 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 of the first KDF to obtain an integrity protection key, i.e., K int= 1st KDF(K, C, 3rd string), where 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] Method 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 of the first KDF to obtain an integrity protection key, i.e., K int = 1st KDF(K, C, 3rd string, 3rd identifier), where 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, please refer to 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 an 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 an identifier of the first KDF used to generate the integrity protection key.

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

[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 for 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 protection 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] Here, 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 string and the third string, please refer to the description of scheme 4.3 above. For a description of the second identifier and the third identifier, please refer to the description of scheme 4.4 above. The details will not be described again.

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

[0219] In order 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 simply intermediate results. Specifically, the method for determining the encryption key is as follows: enc = KDF4(KDF3(K,C),2nd algorithm,2nd string), and the method for determining the integrity protection key is K int =KDF6(KDF5(K,C),3rd algorithm,3rd string).

[0220] 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 a 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 of the integrity protection algorithm.

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

[0224] For a specific process in which the second node obtains 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 derives 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 of 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 unchanged, 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 can 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 is not 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 is modified, and the communication environment of 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 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 of the first node and the second node is secure; or, if the first algorithm negotiation request information has been changed, the communication environment of 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. Then, 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 the 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 the 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 of 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. This improves the security of the 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. 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. Details will not be described again.

[0242] Step 603: The second node derives 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 of 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 execute step 301 again; alternatively, the second node may instruct the first node to redetermine at least one first algorithm and at least one first KDF.

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

[0248] 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 of the first node and the second node is secure; or, if the first algorithm negotiation request information has been changed, the communication environment of 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. Then, 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, it can perform integrity protection on the first information by using the integrity protection algorithm. Therefore, the security of the 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 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. 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 of the authenticated encryption algorithm.

[0254] Step 702: The second node obtains an encryption key that is authenticated based on the 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, e.g., the second node derives the third MAC 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] It can be understood that 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, refer 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. Then, 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 the 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 uses the method shown in Figure 3 as an example to describe the above process.

[0264] Optionally, as shown in FIG. 8, in a fifth possible implementation of 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, 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. For example, the one or more algorithms indicated by the second algorithm negotiation request information are completely different from the one or more algorithms indicated by the first algorithm negotiation request information. Alternatively, the one or more algorithms indicated by the second algorithm negotiation request information are not completely the same as 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. For example, the one or more KDFs indicated by the second algorithm negotiation request information are completely different from the one or more KDFs indicated by the first algorithm negotiation request information. Alternatively, the one or more KDFs indicated by the second algorithm negotiation request information are not completely the same as the 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 the first algorithm negotiation request information to the first node. 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 are 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 execute 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 be performed before step 301 of the method shown in Figure 4, Figure 5, Figure 6 or Figure 7. This is not limited.

[0274] Based on the method illustrated in Figure 8, before the first node determines at least one first algorithm and at least one first KDF, the second node may send indications 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 indications 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 are 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 to perform the functions. Those skilled in the art should easily realize 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 can implement the described functions using different methods for each specific application, and the implementation should not be considered as going beyond the scope of the present application.

[0276] In the embodiment of the present application, the first node or the second node may be divided into functional modules based on the above-mentioned method example. 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 function module. It should be noted that in the embodiment of the present application, the division into modules is an example, and is merely a logical function division. During actual implementation, there may be other division methods.

[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 a 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 embodiment.

[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 the at least one first algorithm and the 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 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.

[0287] Optionally, the first information includes the encrypted information, the second communication information and a second message authentication code 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.

[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, the second freshness parameter being 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; 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 are 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 the relevant contents of the operations in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, and the details are not described here.

[0295] In this embodiment, the communication device is presented in the form of an integrated scheme of functional modules obtained through division. In this specification, a "module" may be a specific ASIC, a circuit, a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and / or another component capable of providing the aforementioned functions. In a simple embodiment, a person skilled in the art may 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 FIG. 9 may be implemented by the processor 201 in FIG. 2 by invoking computer-executable instructions stored in the memory 203. Alternatively, the functions / implementation processes of the processing module 902 in FIG. 9 may be implemented by the processor 201 in FIG. 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 FIG. 9 may be implemented by the communication interface 204 in FIG. 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 embodiment. 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 a 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 embodiment.

[0300] In a possible embodiment, the communication device shown in FIG.

[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 in the one or more algorithms and at least one first KDF in 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 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.

[0308] Optionally, the first information includes the encrypted information, the second communication information and a second message authentication code 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.

[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; 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; 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 having 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 having a 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 the one or more algorithms and one or more KDFs indicated by the second algorithm negotiation request information are not supported or are 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 the relevant contents of the operations in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, and the details are not described here.

[0316] In this embodiment, the communication device is presented in the form of an integrated scheme of functional modules obtained through division. In this specification, a "module" may be a specific ASIC, a circuit, a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and / or another component capable of providing the aforementioned functions. In a simple embodiment, a person skilled in the art may 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 FIG. 11 may be implemented by the processor 201 in FIG. 2 by invoking computer-executable instructions stored in the memory 203. Alternatively, the functions / implementation processes of the processing module 1003 in FIG. 11 may be implemented by the processor 201 in FIG. 2 by invoking computer-executable instructions stored in the memory 203, and the functions / implementation processes of the transmitting module 1001 and the receiving module 1002 in FIG. 11 may be implemented by the communication interface 204 in FIG. 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 embodiment. 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 in the one or more algorithms and at least one first KDF in the one or more KDFs, and transmit the first information to the second node.

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

[0323] It should be noted that all the relevant contents of the steps in the above method embodiments may be cited in the functional description of the corresponding nodes of the communication system 120. The 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-mentioned 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 this 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, the chip 130 further includes a 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 a 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 operational instructions stored in the memory (which may be stored in an operating system).

[0329] Optionally, the chip 130 can be used in the communication device (including the first node and the second node) in the embodiment of the present application. Optionally, the interface circuit 1302 can 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 above-mentioned embodiment. 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 in this specification.

[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, the vehicle including a first node and / or a second node. Specifically, the intelligent device can be a robot, etc., and the transportation vehicle can 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 simple and concise description, the above division into 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 apparatus and method may be implemented in other ways. For example, the described apparatus 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 integrated into another apparatus, or some features may be ignored 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 apparatuses or units may be implemented in electronic, mechanical or 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 of the units 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 such 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 some instructions for instructing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store 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 be 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

[Claim 1] 1. A method of communication, comprising: 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 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; A method comprising:

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