Communication method and related device
By using security parameters and common parameters to generate intermediate parameters during communication, participating in the generation of key negotiation parameters, the problem of low confidentiality of shared keys is solved, and communication security and data security are improved.
Patent Information
- Application Number
- CN202411664326.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the confidentiality of the shared key is low, which can easily lead to the device being accessed by distrusted nodes or the key being cracked, resulting in data leakage and user privacy and security being threatened.
By receiving a first message from the first node, the message contains the first key negotiation parameters, and generates intermediate parameters using the security parameters and common parameters, and then participates in the generation of the first key negotiation parameters, avoiding the use of the security parameters to generate the key directly.
Improve the security of the shared key, reduce the possibility of an attacker accessing the second node, and improve the communication security and data security of the node.
Smart Images

Figure CN119584118A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202280095944.4, and the original application date is May 31, 2022. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the fields of communication technology and smart car technology, and in particular to the field of short-range communication technology, such as communication in scenarios such as smart cars, smart homes, smart terminals, and smart manufacturing, and specifically to communication methods and related devices. Background Art
[0003] With the rapid development of information technology, mobile terminals, such as mobile phones, tablets and other portable smart terminals, are important personal smart tools that we cannot do without. While enjoying the convenience brought by information technology, we are also facing the threat of security vulnerabilities and privacy leaks. Taking smart cars as an example, with the widespread application of vehicle communications, wireless communications have also brought a series of security risks to cars. For example, through existing distance communication technology, hackers may invade the vehicle information system, obtain vehicle information, and even remotely control the car, which poses a high threat to user privacy and vehicle safety.
[0004] In order to ensure the security of communication, nodes usually encrypt the transmitted data before storage or transmission. After receiving the data, the receiving node decrypts the ciphertext and restores the plaintext. Specifically, when the second node accesses the first node, it usually first determines the shared key used by both parties for communication encryption. However, in the existing access process, the confidentiality of the generated shared key is low.
[0005] For example, when a mobile phone accesses a wireless fidelity (Wi-Fi) device, it directly enters an 8-digit security parameter (the security parameter in this scenario is the Wi-Fi password), and the two can obtain a shared key. Since the security parameter may be short, or the user uses a relatively simple security parameter for easy memorization, in these cases, it is easy for the device to be accessed by untrusted nodes, or the key generated based on the security parameter may be cracked. It is not difficult to see that such access methods are prone to data leakage and can easily threaten user privacy and security.
[0006] Therefore, how to improve the security of the shared key and prevent untrusted attackers from accessing is a technical problem that is being studied by those skilled in the art. Summary of the invention
[0007] The embodiments of the present application provide a communication method and related devices, which can improve the security of shared keys and prevent untrusted attackers from accessing.
[0008] In a first aspect, an embodiment of the present application provides a communication method, the method comprising:
[0009] receiving a first message from a first node, wherein the first message includes a first key negotiation parameter, the first key negotiation parameter is associated with a first private key and an intermediate parameter, the intermediate parameter is associated with a security parameter and at least one public parameter, the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and the first password is an agreed access password between the first node and the second node;
[0010] Sending a second message to the first node, where the second message includes a second key negotiation parameter, where the second key negotiation parameter is associated with a second private key and the intermediate parameter;
[0011] A first key is obtained according to the first key negotiation parameter and the second private key.
[0012] The PSK between the first node and the second node is a secret value shared between the first node and the second node, and the first password can be regarded as a password for the first node to access the second node. The first private key is a private key corresponding to the first node, for example, the first node can determine a random number as a private key. The second private key is a private key corresponding to the second node, for example, the second node can determine a random number as a private key.
[0013] Optionally, the above method may be applied to a second node, for example, implemented by a chip or a software module in the second node.
[0014] In the embodiment of the present application, an intermediate parameter is first obtained based on the security parameter and the public parameter, and the intermediate parameter is used to participate in the generation of the first key negotiation parameter. The security parameter is not directly used to generate the key, nor is the key negotiation parameter directly used. Therefore, even if the number of bits of the security parameter is short, the confidentiality of the security parameter can be improved through the public parameter, thereby reducing the possibility of the security parameter being cracked. The security of the first key is correspondingly improved, the possibility of an attacker accessing the second node can be reduced, and the communication security and data security of the node are improved.
[0015] In a possible implementation of the first aspect, the method further includes:
[0016] receiving a third message from the first node, the third message comprising first authentication information, the first authentication information being associated with a second key, the second key being associated with the second key negotiation parameter and the first private key;
[0017] The first authentication information is verified according to the first key.
[0018] In the embodiment of the present application, the security parameters obtained by the first node need to be consistent with the security parameters in the second node, so that the first node and the second node can participate in generating a consistent key through consistent security parameters. Specifically, when the second node generates the first key, the parameters used include the second private key, the security parameter (in the first node), the public parameter and the first private key; when the first node generates the second key, the parameters used include the first private key, the security parameter (in the second node), the public parameter and the second private key. Since the parameters used to generate the first key and the second key are the same, if the security parameters in the first node and the second node are consistent, the generated first key and the second key are consistent.
[0019] The first node can obtain the first authentication information based on the second key, and the second node can verify the authentication information based on the first key. If the verification is successful, it means that the first key and the second key are consistent, that is, the second node and the first node have the same security parameters, which means that the identity of the second node is credible.
[0020] When an attacker requests to access the second node, since the attacker does not have security parameters consistent with the second node, the attacker cannot generate a shared key consistent with the second node, making it impossible for the attacker to access the second node. Therefore, the attacker can be prevented from accessing the second node and preventing the second node from successfully associating with an attacker whose identity is untrustworthy.
[0021] In yet another possible implementation of the first aspect, the first key is used to obtain one or more keys.
[0022] As a possible solution, the first key is used to derive an encryption key, an integrity key, or an identity authentication key, etc.
[0023] With this arrangement, a dedicated key can be derived from the first key for different scenarios, avoiding direct use of the first key for communication, thereby further improving the security of the first key.
[0024] In another possible implementation of the first aspect, the method further includes:
[0025] If the first authentication information is verified successfully, an association establishment message is sent to the first node.
[0026] In the above implementation, if the first authentication information is verified, the second key obtained by the first node is consistent with the first key obtained by the second node, which indicates that the security parameters in the first node are consistent with the security parameters in the second node, and the identity of the first node is credible. Among them, the association establishment message indicates that the first node successfully accesses the second node, or indicates that the first node is associated. At this time, the second node and the second node can perform the next step of data transmission operation, or determine the communication key, or complete the communication configuration information, etc.
[0027] In another possible implementation of the first aspect, the method further includes:
[0028] When the integrity of the third message and the first authentication information are verified, an association establishment message is sent to the first node.
[0029] In the above implementation, the second node may verify the message integrity of the third message, and send an association establishment message to the first node when the integrity of the third message and the first authentication information are verified successfully.
[0030] In another possible implementation of the first aspect, the method further includes:
[0031] Receive indication information of a key negotiation algorithm sent by the first node, where the key negotiation algorithm includes a Two-Basis Password Exponential Key Exchange (TBPEKE) algorithm.
[0032] Optionally, the indication information of the key agreement algorithm includes indication information of a first key agreement algorithm, and the indication information of the first key agreement algorithm is used to indicate a TBPEKE algorithm.
[0033] Among them, the TBPEKE algorithm is a security algorithm based on the mathematical theory of elliptic curves, which allows the communicating parties to create a key in an insecure channel. This key can be used as a key to encrypt communication content in subsequent communications.
[0034] In the above implementation, the first node and the second node may support multiple key negotiation algorithms respectively. When the first node requests to access the second node, the first node may indicate to the second node in the first message which key negotiation algorithm to use, so that the first node and the second node can negotiate the key based on the consistent key negotiation algorithm, thereby improving the key negotiation efficiency.
[0035] Optionally, due to the different elliptic curves used, there may be multiple TBPEKE algorithms. For example, the elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: the elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: the TBPEKE algorithm using the elliptic curve defined by SM2, the TBPEKE algorithm using Curve25519, etc. It should be understood that this is an exemplary description made for the convenience of describing the TBPEKE algorithm using different elliptic curves. In the specific implementation process, other elliptic curves may also be used, which are not listed here one by one.
[0036] In yet another possible implementation of the first aspect, the at least one common parameter includes: a first common parameter and a second common parameter;
[0037] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0038] In the above implementation, the public parameter is a point in the elliptic curve, and the security parameter is a secret value. Due to the discrete logarithm problem on the elliptic curve, it is relatively easy to calculate the intermediate parameter through the security parameter and the public parameter, but it is difficult to crack the security parameter by obtaining the first key negotiation parameter and the public parameter. Therefore, through the TBPEKE algorithm and the public parameter, the possibility of the security parameter being cracked can be reduced and the security of the node can be improved.
[0039] In another possible implementation of the first aspect, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0040] In another possible implementation of the first aspect, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0041] In a possible implementation of the first aspect, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0042] In mathematics, a group represents an algebraic structure with binary operations that satisfy closure, associativity, identity, and inverse. In the embodiment of the present application, the group-related operations may be operations on the first elliptic curve. The operations on the elliptic curve include one or more operations such as elliptic curve point multiplication operations or elliptic curve point addition operations.
[0043] Optionally, in each embodiment of the present application, the group may be a cyclic subgroup of an elliptic curve.
[0044] Base points, also called generators, are parameters in elliptic curve cryptography. Base points are points on the elliptic curve selected by the cryptographic algorithm.
[0045] Generally speaking, the elliptic curves suitable for cryptographic algorithms are defined in a finite field, so the points on the elliptic curve in the finite field are also finite.
[0046] The order refers to the number of points in the group, that is, in a group of order p, the number of points on the elliptic curve is p. Optionally, any point A in the group satisfies A = d*base point, * is the elliptic curve point multiplication operation, and the value range of d is [1, p-1].
[0047] Optionally, the above-mentioned group may be a cyclic group or a cyclic subgroup of the operation on the first elliptic curve.
[0048] Optionally, the base points in some scenarios can also be replaced by generators.
[0049] In another possible implementation of the first aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: part or all of the elements in a group of order p, where p is a prime number.
[0050] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0051] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p).
[0052] In yet another possible implementation of the first aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p, where p is a prime number.
[0053] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0054] In another possible implementation of the first aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include: a cyclic group whose order is a prime number p, and two independent base points U and V in the group.
[0055] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit that there is no correlation between U and V. Optionally, U can be called the first base point, and V can be called the second base point.
[0056] In another possible implementation of the first aspect, the method further includes:
[0057] Receiving a first calculated value from the first node, the first calculated value being related to a first random number and a first public parameter, the first random number being determined by the first node, and the first public parameter being predefined (e.g., predefined based on a TBPEKE algorithm);
[0058] Determine the second public parameter according to a second random number and the first calculated value;
[0059] A second calculated value is sent to the first node, where the second calculated value is related to the second random number and the first public parameter, and the second calculated value is used by the first node to determine the second public parameter.
[0060] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned base point.
[0061] In another possible implementation of the first aspect, the intermediate parameter satisfies the following formula:
[0062] b=U+s*V,
[0063] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0064] In a possible implementation of the first aspect, U is the first base point, and V is the second base point. Further, U and V belong to a cyclic group of order p, where p is a prime number.
[0065] Optionally, the group-related operation is an operation on a first elliptic curve. The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. Exemplarily, taking the selected key agreement algorithm as the TBPEKE algorithm as an example, the first elliptic curve can be: an elliptic curve defined using SM2, or Curve25519, etc.
[0066] In the above implementation, the intermediate parameter (U+s*V) is obtained by performing point addition and point multiplication operations on the security parameter and the public parameter.
[0067] Those skilled in the art should know that for a selected elliptic curve Ep(a,b), given a scalar k and a point P (point P is on the elliptic curve), it is easy to calculate R=k*P (* is the elliptic curve point multiplication operation); however, given a point P and a point R (point P, point R are on the elliptic curve), it is very difficult to calculate which k makes kP=R. Because in the actual use of elliptic curves, in principle, P is made quite large, and R is also quite large. It is a mathematical problem to calculate k points one by one and compare them with R. Therefore, through the TBPEKE algorithm and public parameters, the possibility of the security parameter s being cracked can be reduced, and the security of the node can be improved.
[0068] In another possible implementation of the first aspect, the first key negotiation parameter KEt satisfies the following formula:
[0069] KEt=SKt*b,
[0070] The first key satisfies the following formula:
[0071] First key = SKg*KEt,
[0072] The second key negotiation parameter KEg satisfies the following formula:
[0073] KEg=SKg*b,
[0074] The second key satisfies the following formula:
[0075] Second key = SKt*KEg;
[0076] Among them, SKt is the first private key, and SKg is the second private key.
[0077] Since the point product operation satisfies the associative law, the first key = SKg*KEt = SKg*(SKt*b) = SKt*(SKg*b) = the second key, so the first key determined by the first node and the second key determined by the second node are the same.
[0078] Specifically, the first key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V), the second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V), and "." is a multiplication operation. Therefore, the first key is the same as the second key.
[0079] The above implementation method provides a possible method for obtaining the first key negotiation parameter, the second key negotiation parameter, the first key and the second key. When generating the first key negotiation parameter and the second key negotiation parameter, the security parameter is not directly used for calculation, but the intermediate parameter is first obtained according to the security parameter and the public parameter, and the intermediate parameter is used to participate in the generation of the first key negotiation parameter, thereby reducing the possibility of the security parameter being cracked, reducing the possibility of an attacker accessing the second node, and improving the communication security and data security of the node.
[0080] In another possible implementation of the first aspect, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0081] In another possible implementation of the first aspect, before receiving the first message from the first node, the method further includes:
[0082] The key agreement algorithm capability of the second node is broadcasted, where the key agreement algorithm capability of the second node represents the key agreement algorithm supported by the second node.
[0083] In yet another possible implementation of the first aspect, the key agreement algorithms supported by the first node are arranged in order of priority.
[0084] In another possible implementation of the first aspect, the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0085] In another possible implementation of the first aspect, verifying the first authentication information according to the first key includes:
[0086] The first authentication information is verified according to the PSK between the first node and the second node, the first key, the second message, the first fresh parameter, and the key negotiation algorithm capability of the second node.
[0087] In the above implementation, the parameters involved in generating the first authentication information include one or more of the PSK between the first node and the second node, the second key, the second message, the first fresh parameter, and the key negotiation algorithm capability of the second node. In this way, when verifying the first authentication information, except that the first key and the second key need to be consistent, other parameters involved in generating the first authentication information need to be consistent before verification can be passed. In this way, the integrity of the above parameters can be protected, the possibility of the second node being accessed by an attacker is reduced, and security is improved.
[0088] For example, if the first fresh parameter sent by the first node to the second node is tampered with, the first fresh parameter used by the second node to verify the first authentication information is different from the first fresh parameter used by the second node to generate the first authentication information, which will cause the first authentication information to fail to be verified.
[0089] In yet another possible implementation of the first aspect, the second message further includes second authentication information and a second fresh parameter, and the method further includes:
[0090] The second authentication information is obtained through the PSK between the first node and the second node, the first key, the second fresh parameter and the first message.
[0091] In the above implementation, the second authentication information can be used by the first node to authenticate the identity of the second node. Exemplarily, the second node can generate verification information based on the same parameters. If the verification information is the same as the first authentication information, it means that the second key generated by the first node and the first key generated by the second node are consistent, so that the identity of the second node can be authenticated, the node is prevented from communicating with an attacker, and the security of the node is improved.
[0092] In another possible implementation manner of the first aspect, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the method further includes:
[0093] A third key is obtained according to the first key, the first fresh parameter and the second fresh parameter.
[0094] In another possible implementation of the first aspect, the PSK is preconfigured, predefined, or obtained according to the first password.
[0095] In another possible implementation of the first aspect, the method further includes:
[0096] A PSK between the first node and the second node is obtained according to the first corresponding relationship.
[0097] It can be seen that the second node can store the corresponding relationship between the PSK and the first node in the form of a corresponding relationship. Therefore, the PSK between the first node and the second node can be obtained according to the corresponding relationship.
[0098] In another possible implementation of the first aspect, the method further includes:
[0099] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0100] In one possible design, the PSK is determined based on the first password, the first key, the first fresh parameter, and the second fresh parameter. For example, when the first node associates with the second node for the first time or the second node does not obtain the PSK corresponding to the first node, the second node can determine a new PSK.
[0101] In a second aspect, an embodiment of the present application provides a communication method, characterized in that the method includes:
[0102] Sending a first message to the second node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node;
[0103] receiving a second message from the second node, the second message comprising a second key negotiation parameter, the second key negotiation parameter being associated with a second private key and the intermediate parameter;
[0104] A second key is obtained according to the second key negotiation parameter and the first private key.
[0105] In a possible implementation of the second aspect, the method further includes:
[0106] A third message is sent to the first node, where the third message includes the first authentication information, where the first authentication information is associated with the second key.
[0107] Optionally, the above method may be applied to the first node, for example, implemented by a chip or a software module in the first node.
[0108] The PSK between the first node and the second node is a secret value shared between the first node and the second node, and the first password can be regarded as a password for the first node to access the second node.
[0109] In a possible implementation of the second aspect, the second key is used to obtain one or more keys.
[0110] As a possible solution, the second key is used to derive an encryption key, an integrity key, or an identity authentication key, etc.
[0111] In a possible implementation manner of the second aspect, the method further includes:
[0112] An association establishment message is received from the second node.
[0113] In yet another possible implementation of the second aspect, before sending the first message to the second node, the method further includes:
[0114] A first key agreement algorithm is selected according to the key agreement algorithm capability of the second node, wherein the key agreement algorithm capability of the second node can indicate one or more key agreement algorithms supported by the second node.
[0115] In another possible implementation manner of the second aspect, the method further includes:
[0116] Send indication information of a key agreement algorithm to the second node, where the indication information of the key agreement algorithm indicates a double-base cryptographic exponential function key exchange (TBPEKE) algorithm.
[0117] Among them, the TBPEKE algorithm is a security algorithm based on the mathematical theory of elliptic curves, which allows the communicating parties to create a key in an insecure channel. This key can be used as a key to encrypt communication content in subsequent communications.
[0118] Optionally, due to different elliptic curves used, there may be multiple TBPEKE algorithms. For example, the elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: an elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: a TBPEKE algorithm using an elliptic curve defined by SM2, a TBPEKE algorithm using Curve25519, etc.
[0119] In yet another possible implementation of the second aspect, the at least one common parameter includes: a first common parameter and a second common parameter;
[0120] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0121] In yet another possible implementation of the second aspect, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0122] In another possible implementation of the second aspect, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0123] In a possible implementation of the second aspect, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0124] Optionally, the group may be a cyclic group or a cyclic subgroup with respect to the operation on the first elliptic curve.
[0125] Optionally, the base points in some scenarios can also be replaced by generators.
[0126] In another possible implementation of the second aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: part or all of the elements in a group of order p, where p is a prime number.
[0127] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0128] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p-1].
[0129] In yet another possible implementation of the second aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p.
[0130] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0131] In another possible implementation of the second aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include: a cyclic group whose order is a prime number p, and two independent base points U and V in the group.
[0132] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit the relationship between U and V to no correlation.
[0133] In another possible implementation manner of the second aspect, the method further includes:
[0134] Sending a first calculated value to the second node, the first calculated value being related to a first random number and a first public parameter, the first random number being determined by the first node, and the first public parameter being predefined;
[0135] receiving a second calculated value from the second node, the second calculated value being related to the second random number and the first public parameter;
[0136] The second public parameter is determined according to a second random number and the first calculated value.
[0137] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned second base point.
[0138] In a possible implementation of the second aspect, the first key agreement algorithm is a key agreement algorithm supported by the first node, and the first key agreement algorithm has the highest priority among the key agreement algorithms supported by the second node.
[0139] In a possible implementation manner of the second aspect, the intermediate parameter satisfies the following formula:
[0140] b=U+s*V,
[0141] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0142] In a possible implementation of the second aspect, U is the first base point, and V is the second base point. Further, U and V belong to a group of order p, where p is a prime number. The operation related to the group is an operation on the first elliptic curve.
[0143] The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. For example, taking the selected key agreement algorithm as the TBPEKE algorithm, the first elliptic curve may be: an elliptic curve defined by SM2, or Curve25519, etc.
[0144] In a possible implementation manner of the second aspect, the first key negotiation parameter KEt satisfies the following formula:
[0145] KEt=SKt*b,
[0146] The first key satisfies the following formula:
[0147] First key = SKg*KEt,
[0148] The second key negotiation parameter KEg satisfies the following formula:
[0149] KEg=SKg*b,
[0150] The second key satisfies the following formula:
[0151] Second key = SKt*KEg;
[0152] Among them, SKt is the first private key, and SKg is the second private key.
[0153] Since the point product operation satisfies the associative law, the first key = SKg*KEt = SKg*(SKt*b) = SKt*(SKg*b) = the second key, so the first key determined by the first node and the second key determined by the second node are the same.
[0154] Specifically, the first key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V), the second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V), and "." is a multiplication operation. Therefore, the first key is the same as the second key.
[0155] In a possible implementation of the second aspect, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0156] In a possible implementation manner of the second aspect, before sending the first message to the second node, the method further includes:
[0157] A key negotiation algorithm capability of the second node sent by the second node is received, where the key negotiation algorithm capability of the second node represents a key negotiation algorithm supported by the second node.
[0158] In a possible implementation of the second aspect, the key agreement algorithms supported by the first node are arranged in order of priority.
[0159] In a possible implementation of the second aspect, the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0160] In a possible implementation of the second aspect, the second message further includes second authentication information and a second fresh parameter, and the second authentication information is associated with the PSK between the first node and the second node, the first key, the second fresh parameter, and the first message.
[0161] In a possible implementation manner of the second aspect, the method further includes:
[0162] verifying the second authentication information according to the PSK between the first node and the second node, the second key, the second fresh parameter, and the first message;
[0163] When the integrity of the second message and the second authentication information are verified, the first authentication information is generated.
[0164] In a possible implementation manner of the second aspect, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the method further includes:
[0165] A fourth key is obtained according to the second key, the first fresh parameter and the second fresh parameter.
[0166] In a possible implementation of the second aspect, the PSK is preconfigured, predefined, or obtained according to the first password.
[0167] In another possible implementation manner of the second aspect, the method further includes:
[0168] The PSK between the first node and the second node is obtained according to the second corresponding relationship.
[0169] It can be seen that the first node can store the corresponding relationship between the PSK and the second node in the form of a corresponding relationship. Therefore, the PSK between the first node and the second node can be obtained according to the corresponding relationship.
[0170] In another possible implementation manner of the second aspect, the method further includes:
[0171] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0172] In one possible design, the PSK is determined based on the first password, the first key, the first fresh parameter, and the second fresh parameter. When the first node associates with the second node for the first time or the first node does not obtain the PSK corresponding to the second node, the first node can determine a new PSK.
[0173] In a third aspect, an embodiment of the present application provides a communication device, which includes a receiving unit, a sending unit and a processing unit, and the communication device is used to implement the method described in any implementation of the first aspect.
[0174] In a possible implementation manner of the third aspect, the receiving unit is configured to receive a first message from a first node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node;
[0175] The sending unit is further configured to send a second message to the first node, where the second message includes a second key negotiation parameter, where the second key negotiation parameter is associated with a second private key and the intermediate parameter;
[0176] The processing unit is configured to obtain a first key according to the first key negotiation parameter and the second private key.
[0177] In a possible implementation manner of the third aspect, the receiving unit is further configured to receive a third message from the first node, where the third message includes first authentication information, where the first authentication information is associated with a second key, and where the second key is associated with the second key negotiation parameter and the first private key;
[0178] The processing unit is further configured to verify the first authentication information according to the first key.
[0179] In yet another possible implementation of the third aspect, the first key is used to obtain one or more keys.
[0180] As a possible solution, the first key is used to derive an encryption key, an integrity key, or an identity authentication key, etc. In another possible implementation of the third aspect, the sending unit is further used to:
[0181] If the first authentication information is verified successfully, an association establishment message is sent to the first node.
[0182] In yet another possible implementation manner of the third aspect, the sending unit is further configured to:
[0183] If the integrity of the third message and the first authentication information are verified, an association establishment message is sent to the first node.
[0184] In yet another possible implementation manner of the third aspect, the receiving unit is further configured to:
[0185] Receive indication information of a key negotiation algorithm sent by the first node, where the key negotiation algorithm includes a TBPEKE algorithm.
[0186] Optionally, the indication information of the key agreement algorithm includes indication information of a first key agreement algorithm, and the indication information of the first key agreement algorithm is used to indicate a TBPEKE algorithm.
[0187] Optionally, due to different elliptic curves used, there may be multiple TBPEKE algorithms. For example, the elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: an elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: a TBPEKE algorithm using an elliptic curve defined by SM2, a TBPEKE algorithm using Curve25519, etc.
[0188] In yet another possible implementation of the third aspect, the at least one common parameter includes: a first common parameter and a second common parameter;
[0189] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0190] In yet another possible implementation of the third aspect, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0191] In another possible implementation of the third aspect, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0192] In a possible implementation of the third aspect, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0193] Optionally, the group may be a cyclic group or a cyclic subgroup with respect to the operation on the first elliptic curve.
[0194] Optionally, the base points in some scenarios can also be replaced by generators.
[0195] In another possible implementation of the third aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: part or all of the elements in a group of order p, where p is a prime number.
[0196] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0197] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p-1].
[0198] In yet another possible implementation of the third aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p.
[0199] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0200] In another possible implementation of the third aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include: a cyclic group whose order is a prime number p, and two independent base points U and V in the group.
[0201] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit the relationship between U and V to no correlation.
[0202] In another possible implementation of the third aspect, the receiving unit is further configured to receive a first calculated value from the first node, where the first calculated value is related to a first random number and a first public parameter, where the first random number is determined by the first node, and the first public parameter is predefined;
[0203] The processing unit is further used to determine the second public parameter according to a second random number and the first calculated value;
[0204] The sending unit is further used to send a second calculated value to the first node, where the second calculated value is related to the second random number and the first public parameter, and the second calculated value is used by the first node to determine the second public parameter.
[0205] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned second base point.
[0206] In yet another possible implementation of the third aspect, the at least one public parameter is two points, each of which is a point on the elliptic curve used by the TBPEKE algorithm.
[0207] In yet another possible implementation manner of the third aspect, the intermediate parameter satisfies the following formula:
[0208] b=U+s*V,
[0209] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0210] In a possible implementation of the third aspect, U is the first base point, and V is the second base point. Further, U and V belong to a group of order p, where p is a prime number. The operation related to the group is an operation on the first elliptic curve.
[0211] The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. For example, taking the selected key agreement algorithm as the TBPEKE algorithm, the first elliptic curve may be: an elliptic curve defined by SM2, or Curve25519, etc.
[0212] In yet another possible implementation of the third aspect, the first key negotiation parameter KEt satisfies the following formula:
[0213] KEt=SKt*b,
[0214] The first key satisfies the following formula:
[0215] First key = SKg*KEt,
[0216] The second key negotiation parameter KEg satisfies the following formula:
[0217] KEg=SKg*b,
[0218] The second key satisfies the following formula:
[0219] Second key = SKt*KEg;
[0220] Among them, SKt is the first private key, and SKg is the second private key.
[0221] Since the point product operation satisfies the associative law, the first key = SKg*KEt = SKg*(SKt*b) = SKt*(SKg*b) = the second key, so the first key determined by the first node and the second key determined by the second node are the same.
[0222] Specifically, the first key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V), the second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V), and "." is a multiplication operation. Therefore, the first key is the same as the second key.
[0223] In another possible implementation of the third aspect, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0224] In yet another possible implementation manner of the third aspect, the sending unit is further configured to:
[0225] The key agreement algorithm capability of the second node is broadcasted, where the key agreement algorithm capability of the second node represents the key agreement algorithm supported by the second node.
[0226] In yet another possible implementation of the third aspect, the key agreement algorithms supported by the first node are arranged in order of priority.
[0227] In another possible implementation of the third aspect, the first message also includes a first fresh parameter, the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0228] In yet another possible implementation manner of the third aspect, the processing unit is further configured to:
[0229] The first authentication information is verified according to the PSK between the first node and the second node, the first key, the second message, the first fresh parameter, and the key negotiation algorithm capability of the second node.
[0230] In yet another possible implementation of the third aspect, the second message further includes second authentication information and a second fresh parameter, and the processing unit is further configured to:
[0231] The second authentication information is obtained through the PSK between the first node and the second node, the first key, the second fresh parameter and the first message.
[0232] In yet another possible implementation of the third aspect, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the processing unit is further configured to:
[0233] A third key is obtained according to the first key, the first fresh parameter and the second fresh parameter.
[0234] In another possible implementation of the third aspect, the PSK is preconfigured, predefined, or obtained according to the first password.
[0235] In yet another possible implementation manner of the third aspect, the processing unit is further configured to:
[0236] A PSK between the first node and the second node is obtained according to the first corresponding relationship.
[0237] It can be seen that the second node can store the corresponding relationship between the PSK and the first node in the form of a corresponding relationship. Therefore, the PSK between the first node and the second node can be obtained according to the corresponding relationship.
[0238] In yet another possible implementation manner of the third aspect, the processing unit is further configured to:
[0239] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0240] In one possible design, the PSK is determined based on the first password, the first key, the first fresh parameter, and the second fresh parameter.
[0241] In a fourth aspect, an embodiment of the present application provides a communication device, which includes a sending unit, a receiving unit and a processing unit, and the communication device is used to implement the method described in any implementation manner of the second aspect.
[0242] In a possible implementation manner of the fourth aspect, the sending unit is configured to send a first message to the second node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node;
[0243] The receiving unit is further configured to receive a second message from the second node, where the second message includes a second key negotiation parameter, where the second key negotiation parameter is associated with a second private key and the intermediate parameter;
[0244] The processing unit is configured to obtain a second key according to the second key negotiation parameter and the first private key.
[0245] In a possible implementation of the fourth aspect,
[0246] The sending unit is further configured to send a third message to the first node, where the third message includes the first authentication information, and the first authentication information is associated with a second key.
[0247] In yet another possible implementation of the fourth aspect, the second key is used to obtain one or more keys.
[0248] As a possible solution, the second key is used to derive an encryption key, an integrity key, or an identity authentication key, etc.
[0249] In yet another possible implementation manner of the fourth aspect, the receiving unit is further configured to:
[0250] An association establishment message is received from the second node.
[0251] In yet another possible implementation of the fourth aspect, the communication device further includes a processing unit, wherein the processing unit is configured to:
[0252] A first key agreement algorithm is selected according to the key agreement algorithm capability of the second node, wherein the key agreement algorithm capability of the second node can indicate one or more key agreement algorithms supported by the second node.
[0253] In another possible implementation of the fourth aspect, the sending unit is further used to send indication information of the first key negotiation to the second node, and the indication information of the first key negotiation algorithm is used to indicate a double-base cryptographic exponential function key exchange TBPEKE algorithm.
[0254] Optionally, due to different elliptic curves used, there may be multiple TBPEKE algorithms. For example, the elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: an elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: a TBPEKE algorithm using an elliptic curve defined by SM2, a TBPEKE algorithm using Curve25519, etc.
[0255] In yet another possible implementation of the fourth aspect, the at least one common parameter includes: a first common parameter and a second common parameter;
[0256] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0257] In another possible implementation of the fourth aspect, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0258] In another possible implementation of the fourth aspect, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0259] In a possible implementation of the fourth aspect, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0260] Optionally, the group may be a cyclic group or a cyclic subgroup with respect to the operation on the first elliptic curve.
[0261] Optionally, the base points in some scenarios can also be replaced by generators.
[0262] In another possible implementation of the fourth aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: part or all of the elements in a group of order p, where p is a prime number.
[0263] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0264] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p-1].
[0265] In yet another possible implementation of the fourth aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p.
[0266] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0267] In another possible implementation of the fourth aspect, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include: a cyclic group whose order is a prime number p, and two independent base points U and V in the group.
[0268] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit the relationship between U and V to no correlation.
[0269] In yet another possible implementation of the fourth aspect, the sending unit is configured to send a first calculated value to the second node, where the first calculated value is related to a first random number and a first public parameter, where the first random number is determined by the first node, and the first public parameter is predefined;
[0270] The receiving unit is configured to receive a second calculated value from the second node, where the second calculated value is related to the second random number and the first public parameter;
[0271] The device further includes a processing unit, which determines the second public parameter according to a second random number and the first calculated value.
[0272] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned second base point.
[0273] In another possible implementation of the fourth aspect, when the first key agreement algorithm is a double-base cryptographic exponential function key exchange (TBPEKE) algorithm, the at least one public parameter is two points, each of which is a point on the elliptic curve used by the TBPEKE algorithm.
[0274] In another possible implementation of the fourth aspect, the first key agreement algorithm is a key agreement algorithm supported by the first node, and the first key agreement algorithm has the highest priority among the key agreement algorithms supported by the second node.
[0275] In yet another possible implementation of the fourth aspect, the intermediate parameter satisfies the following formula:
[0276] b=U+s*V,
[0277] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0278] In a possible implementation of the fourth aspect, U is the first base point, and V is the second base point. Further, U and V belong to a group of order p, where p is a prime number. The operation related to the group is an operation on the first elliptic curve.
[0279] The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. For example, taking the selected key agreement algorithm as the TBPEKE algorithm, the first elliptic curve may be: an elliptic curve defined by SM2, or Curve25519, etc.
[0280] In yet another possible implementation of the fourth aspect, the first key negotiation parameter KEt satisfies the following formula:
[0281] KEt=SKt*b,
[0282] The first key satisfies the following formula:
[0283] First key = SKg*KE,
[0284] The second key negotiation parameter KEg satisfies the following formula:
[0285] KEg=SKg*b,
[0286] The second key satisfies the following formula:
[0287] Second key = SKt*KEg;
[0288] Among them, SKt is the first private key, and SKg is the second private key.
[0289] Since the point product operation satisfies the associative law, the first key = SKg*KEt = SKg*(SKt*b) = SKt*(SKg*b) = the second key, so the first key determined by the first node and the second key determined by the second node are the same.
[0290] Specifically, the first key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V), the second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V), and "." is a multiplication operation. Therefore, the first key is the same as the second key.
[0291] In another possible implementation of the fourth aspect, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0292] In yet another possible implementation manner of the fourth aspect, the receiving unit is further configured to:
[0293] A key negotiation algorithm capability of the second node sent by the second node is received, where the key negotiation algorithm capability of the second node represents a key negotiation algorithm supported by the second node.
[0294] In yet another possible implementation of the fourth aspect, the key agreement algorithms supported by the first node are arranged in order of priority.
[0295] In another possible implementation of the fourth aspect, the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0296] In another possible implementation of the fourth aspect, the second message further includes second authentication information and a second fresh parameter, and the second authentication information is associated with the PSK between the first node and the second node, the first key, the second fresh parameter, and the first message.
[0297] In yet another possible implementation manner of the fourth aspect, the processing unit is further configured to:
[0298] verifying the second authentication information according to the PSK between the first node and the second node, the second key, the second fresh parameter, and the first message;
[0299] When the integrity of the second message and the second authentication information are verified, the first authentication information is generated.
[0300] In a possible implementation manner of the fourth aspect, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the processing unit is further configured to:
[0301] A fourth key is obtained according to the second key, the first fresh parameter and the second fresh parameter.
[0302] In a possible implementation manner of the fourth aspect, the PSK is preconfigured, predefined, or obtained according to the first password.
[0303] In yet another possible implementation manner of the fourth aspect, the processing unit is further configured to:
[0304] The PSK between the first node and the second node is obtained according to the second corresponding relationship.
[0305] In yet another possible implementation manner of the fourth aspect, the processing unit is further configured to:
[0306] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0307] In a fifth aspect, an embodiment of the present application discloses a communication device, comprising a processor and a communication interface, wherein the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor, and the processor is used to call a computer program stored in a memory to implement the method described in the first aspect or any possible implementation manner of the first aspect.
[0308] In the sixth aspect, an embodiment of the present application discloses a communication device, comprising a processor and a communication interface, wherein the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor, and the processor is used to call a computer program stored in a memory to implement any possible implementation method of the second aspect or the third aspect.
[0309] It should be noted that the processor included in the communication device described in the fifth aspect and / or the sixth aspect may be a processor specifically used to execute these methods (for convenience of distinction, referred to as a dedicated processor), or may be a processor that executes these methods by calling a computer program, such as a general-purpose processor. Optionally, at least one processor may include both a dedicated processor and a general-purpose processor.
[0310] Optionally, the computer program may be stored in a memory. Exemplarily, the memory may be a non-transitory memory, such as a read-only memory (ROM), which may be integrated with the processor on the same device or may be separately provided on different devices. The embodiment of the present application does not limit the type of memory and the configuration of the memory and the processor.
[0311] In a possible implementation manner, the at least one memory is located outside the communication device.
[0312] In yet another possible implementation, the at least one memory is located within the communication device.
[0313] In yet another possible implementation, part of the at least one memory is located inside the communication device, and another part of the memory is located outside the communication device.
[0314] In the present application, the processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.
[0315] In the seventh aspect, an embodiment of the present application also provides a chip system, comprising at least one processor and a communication interface, wherein the communication interface is used to send and / or receive data, and the at least one processor is used to call a computer program stored in at least one memory, so that the chip system implements the method described in the first aspect or any possible implementation of the first aspect; or implements the method described in the second aspect or any possible implementation of the second aspect.
[0316] In an eighth aspect, an embodiment of the present application further provides a communication system, comprising a first node and a second node. The second node comprises the communication device described in the third aspect or any possible implementation of the third aspect, or the second node is a node implementing the first aspect or any possible implementation of the first aspect. The first node comprises the communication device described in the fourth aspect or any possible implementation of the fourth aspect, or the first node is a node implementing the second aspect or any possible implementation of the second aspect.
[0317] In the ninth aspect, an embodiment of the present application discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect, or executes the method described in the second aspect or any possible implementation of the second aspect.
[0318] In the tenth aspect, an embodiment of the present application discloses a computer program product, which, when running on one or more processors, executes the method described in the first aspect or any possible implementation of the first aspect, or executes the method described in the second aspect or any possible implementation of the second aspect.
[0319] In the eleventh aspect, an embodiment of the present application discloses a terminal, which may be a smart cockpit product, or a vehicle, etc. The terminal includes a first node and / or a second node.
[0320] The second node includes the device described in the third aspect or any possible implementation manner of the third aspect.
[0321] The first node includes the communication device described in the fourth aspect or any possible implementation manner of the fourth aspect.
[0322] Optionally, the first node includes one or more modules such as a camera, a screen, a microphone, a speaker, a radar, an electronic key, a keyless entry, a starting system controller, and a user equipment (UE).
[0323] Optionally, the second node includes one or more modules such as a gateway, a base station, a vehicle cockpit domain controller CDC, etc. Alternatively, the above-mentioned vehicle can also be replaced by an intelligent terminal or transportation tool such as a drone or a robot.
[0324] The beneficial effects of the technical solutions provided in the second to eleventh aspects of the present application can refer to the beneficial effects of the technical solution of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0325] The following is a brief introduction to the drawings required for describing the embodiments.
[0326] Figure 1 is a schematic diagram of a point addition operation provided in an embodiment of the present application;
[0327] Figure 2 is a schematic diagram of a communication system provided in an embodiment of the present application;
[0328] Figure 3 is a schematic diagram of a communication scenario provided in an embodiment of the present application;
[0329] Figure 4 It is a flow chart of a communication method provided in an embodiment of the present application;
[0330] Figure 5 is a flow chart of a method for determining common parameters provided in an embodiment of the present application;
[0331] Figure 6 It is a flowchart of another communication method provided in an embodiment of the present application;
[0332] Figure 7 It is a flowchart of another communication method provided in an embodiment of the present application;
[0333] Figure 8 is a structural diagram of another communication device provided in an embodiment of the present application;
[0334] Fig. 9 It is a structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0335] In order to facilitate understanding of the detailed implementation of the embodiments of the present application, the technical terms involved in the embodiments of the present application are described below.
[0336] 1. Node
[0337] A node is an electronic device with communication capabilities, also known as a communication node. For example, a node may include a handheld terminal, a vehicle, a vehicle-mounted device, or a network-side device, a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a wireless communication device, a user agent, or a user device, or may be a component (such as a chip or an integrated circuit) contained in an independent device. A node may be any possible intelligent terminal device (such as a mobile phone), intelligent transportation equipment (such as a vehicle, a drone, etc.), intelligent manufacturing equipment, intelligent home equipment (such as a large screen, a speaker, etc.), etc.
[0338] Exemplarily, when the node is an onboard device, it can be a cockpit domain device or a module in the cockpit domain device, such as one or more modules of a cockpit domain controller (CDC), camera, screen, microphone, audio, electronic key, keyless entry or start system controller, etc. In the vehicle, the node can also be a battery management system and a battery in a battery pack.
[0339] Exemplarily, when the node is a handheld terminal, it can be a mobile phone, a wearable device, a tablet computer (pad), or a computer with data transceiving functions (such as a laptop computer, a PDA, etc.).
[0340] The nodes in the embodiments of the present application can be applied to a variety of application scenarios, such as the following application scenarios: mobile internet (MI), industrial control, self driving, transportation safety, Internet of Things (IoT), smart city, or smart home, etc.
[0341] The nodes in the present application can be applied to various network types, for example, one or more of the following network types: long term evolution (LTE) network, fifth generation mobile communication technology (5G), wireless local area network (for example, Wi-Fi), Bluetooth (BT), Zigbee, SparkLink, or vehicle-mounted short-range wireless communication network, etc.
[0342] In some application scenarios or certain network types, the name of a device with similar communication capabilities may not be called a node, but for the convenience of description, in the embodiments of the present application, devices with communication capabilities are collectively referred to as nodes.
[0343] 2. Security algorithm (also called cryptographic algorithm)
[0344] (1) Key Agreement Algorithm
[0345] Key negotiation is the process in which the two communicating parties negotiate to obtain a key by exchanging some parameters. The algorithm used for key negotiation is called a key negotiation algorithm, or a key negotiation algorithm. Key negotiation algorithms include the Two-Basis Password Exponential Key Exchange (TBPEKE) algorithm, the Diffie–Hellman key exchange (DH) algorithm, the DH (ECDH) algorithm based on Elliptic Curve Cryptosystems (ECC), the national secret algorithm (such as SM2, etc.), the Oakley algorithm, etc.
[0346] It should be noted that the key agreement algorithm can also be regarded as a key agreement protocol, that is, for the two communicating parties, the key agreement algorithm defines the rules for key generation and exchange.
[0347] (2) Key derivation function (KDF)
[0348] A key derivation algorithm (or key derivation algorithm) is used to deduce (or derive, export) one or more secret values from a secret value. For example, a new secret value DK derived from a secret value Key can be expressed as: DK = KDF (Key). Of course, the key here is only an example, and other parameters may also be involved in the key derivation process during the specific implementation process.
[0349] The key derivation algorithm involved in the embodiments of the present application may include a password-based key derivation function (PBKDF), a scrypt algorithm, etc. Among them, the PBKDF algorithm includes the first generation PBKDF1 and the second generation PBKDF2.
[0350] It should be understood that some KDF algorithms can perform hash changes on the input secret value through a hash algorithm, so the KDF function can also receive an algorithm identifier as an input to indicate which hash algorithm to use.
[0351] It should be noted that KDF is not only used to derive secret values, but also can be used to generate authentication information, identity information, etc. In some possible implementations, when generating authentication information and identity information, the key derivation algorithm can also be called an authentication algorithm (authentication function, AUF, or AUTH function), which is used to obtain authentication information based on input parameters.
[0352] (3) Encryption algorithm
[0353] The encryption algorithm is used to protect the confidentiality of data. It can encrypt plaintext to obtain ciphertext. The encryption algorithm can include encryption operations (such as elliptic point addition operations, or XOR operations, etc.), and can also include various mathematical functions with higher security. Common encryption algorithms mainly include XOR operations, data encryption standard (DES), triple data encryption algorithm (3DES), advanced encryption standard (AES), RSA encryption algorithm, data structure analysis algorithm (DSA), national secret algorithms (such as SM4, etc.), Zu Chongzhi algorithm set (ZUC algorithm, such as Zu Chongzhi algorithm, encryption algorithm 128-EEA3 or integrity algorithm 128-EIA3, etc.), etc.
[0354] TBPEKE algorithm
[0355] In the embodiment of the present application, the TBPEKE algorithm is a security algorithm based on the mathematical theory of elliptic curves, which allows the communicating parties to create a key in an insecure channel, and this key can be used as a key to encrypt the communication content in subsequent communications. Optionally, the elliptic curve used by the TBPEKE algorithm in the embodiment of the present application includes one or more of the following elliptic curves: the elliptic curve defined by SM2, or Curve25519, etc.
[0356] The following is an introduction to elliptic curves.
[0357] The curve equation of an elliptic curve is a cubic equation of two variables. It has many forms, the most commonly used is the following general formula:
[0358] E={(x,y)∈R|y 2 =x 3 +ax+b,4a 3 +27b 2 ≠0}
[0359] It is easy to see from the equation of curve ' that the elliptic curve is symmetric about the X axis. 3 +27b 2 ≠0 can realize that there are no singular points on the elliptic curve, that is, it is smooth and differentiable everywhere, which is convenient for various operations on the elliptic curve: as follows:
[0360] a. Elliptic curve point addition operation
[0361] See also Figure 1 , Figure 1is a schematic diagram of a possible point addition operation provided by this application. Figure 1 In part (a), the addition operation of elliptic curves can be expressed as follows: Figure 1 Take the elliptic curve with a=0, b=7 as an example, that is: y2=x 3 +7) Mark points P and Q on the curve; draw a straight line through points P and Q and intersect the curve at the third point -R; continue to draw the symmetric point R of point -R about the X axis. Point R is the point obtained by adding points P and Q, recorded as P+Q=R.
[0362] It should be noted that the elliptic curve is symmetric about the X-axis, so R is the symmetric point of point -R. Since point -R is on the elliptic curve, point R must also be on the elliptic curve, that is, the point obtained by P+Q is on the elliptic curve.
[0363] See also Figure 1 In part (b), when P = Q, a tangent line is drawn with point P as the tangent point to the elliptic curve. The tangent line will intersect the elliptic curve at another point, which is called point -R. Similarly, a point R is drawn that is symmetric to point -R about the X axis. This point R is the point obtained by adding points P and P, which is called P+P=2P=R.
[0364] b. Elliptic curve point subtraction operation
[0365] See also Figure 1 Part (c) of the equation, since RP = R + (-P), (RP) is the addition of point R and point -P. And point -P is the symmetric point of point P. Therefore, draw a straight line through points R and -P. Since the elliptic curve is symmetric about the X-axis, it can be seen that the straight line and the elliptic curve are tangent to point -P. Therefore, draw the symmetric point P of point -P about the X-axis. Point P is the point obtained by adding points R and -P.
[0366] c. Elliptic curve point multiplication operation
[0367] If you add a point on an elliptic curve n times, you can get the result of adding n points P, which is recorded as nP. The number of additions n is an integer, which can be called a scalar. The point multiplication operation of an elliptic curve can be called a scalar multiplication operation. When multiple scalars are involved, it can be called a multi-scalar multiplication operation.
[0368] It should be noted that the point multiplication algorithm may have different definitions in different computing scenarios. The implementation depends on the specific definition of the point multiplication algorithm. Here is a possible calculation method of the elliptic curve point multiplication algorithm.
[0369] The following introduces elliptic curves suitable for cryptographic algorithms.
[0370] The elliptic curves provided above are continuous and defined over the real number field, which is not suitable for use in the encryption process. Therefore, the elliptic curves used in cryptographic algorithms are usually defined over a finite field, which is a set with a finite number of elements. By constraining the finite field, the points on the ellipse can generate cyclic subgroups.
[0371] The point addition and point product of the elliptic curve over the finite field are slightly different from the point addition and point product over the real number field. For details, please refer to the definition in the prior art.
[0372] For a selected elliptic curve, given a scalar k and a point G, it is easy to calculate R = k*G (* is the elliptic curve point multiplication operation); however, given a point G and a point R (point G and point R are on the elliptic curve), it is very difficult to calculate which k makes kG = R. Because in the actual use of elliptic curves, in principle, G is taken to be quite large, and R is also quite large. It is a mathematical problem to calculate k points one by one and compare them with R. This is the discrete logarithm problem on elliptic curves.
[0373] The key exchange process based on the TBPEKE algorithm is introduced below.
[0374] Assume that the two parties of the key exchange are the first node and the second node, and there is a shared security parameter s between the first node and the second node. The elliptic curve used by the TBPEKE algorithm is E, and U and V are two points on the elliptic curve E. When the first node and the second node exchange keys, there are the following exchange steps:
[0375] Step 1: The first node calculates the intermediate parameter b, b = (U + s * V), where "+" represents the point addition operation on the elliptic curve, "*" represents the point multiplication operation on the elliptic curve, and "." in the subsequent formula represents ordinary multiplication. The first node generates a random number as the private key SKt of the first node, and calculates the public key PKt = SKt * (U + s * V), where the public key PKt is used as the key negotiation parameter KEt.
[0376] Step 2: The first node sends the key negotiation parameter KEt to the second node.
[0377] Step 3: The second node calculates the intermediate parameter b, b = (U + s * V). Generates a random number as the private key SKg of the second node. The second node calculates the public key PKg, PKg = SKg * (U + s * V), where the public key PKg is used as the key negotiation parameter KEg.
[0378] Step 4: The second node sends KEg to the first node.
[0379] Step 5: The second node obtains the key K based on the private key of the second node and the public key of the first node KE ,Right now:
[0380] K KE =SKg*KEt=SKg*(SKt*b)=(SKt.SKg)*(U+s*V).
[0381] Step 6: The first node obtains the key K based on the private key of the first node and the public key of the second node KE ',Right now:
[0382] K KE ′=SKt*KEg=SKt*(SKg*b)=(SKt.SKg)*(U+s*V).
[0383] And K KE =(SKt.SKg)*(U+s*V)=K kE ′, that is, both parties get the same key K KE Since the key K KE Without direct transmission, it is difficult for attackers to calculate K from the obtained U, V, KEt, and KEg. KE , so the key K obtained by exchanging through the TBPEKE algorithm KE It is safe.
[0384] It is understandable that the above explanation of the algorithm is only used to simply describe the principle of implementation, and does not limit the use of the same parameters for implementation. There may be other improvements and variations in the specific implementation of the algorithm, and the algorithm mentioned in this application may be an improved and / or variant algorithm.
[0385] 4. Fresh parameters
[0386] A fresh parameter is a parameter in the field of information security, which is used to generate keys and authentication parameters, etc. It can also be called freshness. A fresh parameter can include one or more of a random number, a counter, a serial number, a sequence number, etc. Fresh parameters generated at different times are usually different.
[0387] It can be understood that the specific value of the fresh parameter will change each time the fresh parameter is generated, so that the fresh parameter used to generate the key (or authentication parameter, etc.) this time is different from the fresh parameter used when the key (or authentication parameter, etc.) was generated last time, which can improve the security of the generated key.
[0388] The non-repeating random number (number once, NONCE) is a (non-repeating) random number that is used only once.
[0389] 5. Password
[0390] A password can be understood as a pre-configured or pre-defined password for a node to allow other nodes to access it, or as a secret value agreed upon between two nodes. Optionally, a password can be in the form of a string (or number) composed of one or more numbers, letters, symbols, etc., and can be input through a keyboard, voice, biometric information, etc. For example, in a scenario where a mobile phone terminal accesses a router that supports the Wireless Fidelity (Wi-Fi) protocol, the mobile phone terminal can use the "Wi-Fi password" to access the router, and the "Wi-Fi password" can be understood as the password of the router.
[0391] For ease of understanding, this application exemplarily lists several possible password usage scenarios (taking the first node requesting access to the second node as an example):
[0392] Scenario 1: The second node predefines or preconfigures the first password. The user of the first node can enter the first password in the first node to access the second node. For example, a car owner configures a first password for the vehicle through the administrator interface. When the car owner's smartphone needs to access the vehicle, the car owner can enter the first password in the smartphone, and the smartphone requests access to the vehicle according to the entered first password.
[0393] Scenario 2: The second node predefines or preconfigures the first password. Similarly, the first node also preconfigures the first password for accessing the second node. When the second node needs to be accessed, the first node can access it using the preconfigured first password. For example, when assembling a vehicle, the OEM can configure the first password in the vehicle's CDC and the first password of the CDC in the vehicle's radar. In this way, the radar can use the first password of the CDC to access the CDC.
[0394] Scenario 3: A third-party device (such as a network-side device, a certificate center, an authentication server, etc., trusted by the second node) can assign an agreed value to the second node and the first node. The agreed value can be used by the first node to access the second node. The agreed value can be called the access password of the second node.
[0395] It should be noted that the association between parameters indicates that there is a connection between the parameters. For example, parameter A is associated with parameter B, which means that there is a corresponding relationship (or mapping relationship) between parameter A and parameter B, or that parameter B is used in the calculation process of parameter A (other parameters can also be used optionally).
[0396] The "authentication", "verification" and "verification" mentioned in the embodiments of the present application can represent the meaning of checking whether it is correct or reasonable. The "access" mentioned in the embodiments of the present application indicates the process of establishing a connection between the first node and the third node. In some specific technical scenarios, the process of one node "accessing" another node can also be described as one node "associating" another node.
[0397] In addition, in each embodiment of the present application, unless otherwise specified, "*" represents an elliptic curve point multiplication operation, "+" represents an elliptic curve point addition operation, and "." represents a multiplication operation.
[0398] The system architecture and business scenarios of the embodiments of the present application are described below. It should be noted that the system architecture and business scenarios described in this application are intended to more clearly illustrate the technical solutions of the present application and do not constitute a limitation on the technical solutions provided by the present application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.
[0399] See also Figure 2 , Figure 2 2 is a schematic diagram of a possible communication system provided by an embodiment of the present application, the communication system includes a first node 201 and a second node 202. The first node 201 can request to associate with the second node 202, and after the association is successful, the second node 202 can perform data transmission with the first node 201.
[0400] Optionally, the link for communication between the second node 202 and the first node 201 may include various types of connection media, including wired links (such as optical fibers), wireless links, or a combination of wired links and wireless links. For example, the short-distance connection technology may include SparkLink, 802.11b / g, Bluetooth, Zigbee, radio frequency identification technology (RFID), ultra-wideband (UWB) technology, or wireless short-distance communication system (such as a vehicle-mounted wireless short-distance communication system). For another example, the long-distance connection technology may include a communication technology based on Long Term Evolution (Long Term Evolution), a fifth generation mobile communication technology (5th generation mobile networks or 5th generation wireless systems, 5th-Generation, referred to as 5G or 5G technology), a global system for mobile communications (GSM), a general packet radio service (GPRS), a universal mobile telecommunications system (UMTS), and other wireless access type technologies.
[0401] In some specific implementation scenarios, the second node may be referred to as a G node, a control node, or an access point. The first node may be referred to as a T node or a terminal. The communication link from the G node to the T node may be referred to as a G link, and the communication link from the T node to the G node may be referred to as a T link.
[0402] It should be understood that the systems shown in the drawings of the present application are merely examples, wherein the number, location, and connection relationship of the nodes are shown as a possible situation for ease of description and are not intended to limit specific communication systems and communication scenarios.
[0403] The second node 202 and the first node 201 can be devices of the same type or devices of different types. Figure 3 , Figure 3 The vehicle cockpit domain controller (CDC) 302 is a control center in the vehicle's smart cockpit device and can be regarded as the second node 202. The smart phone 301 is a device with data transmission and reception capabilities and can be regarded as the first node 201.
[0404] Among them, CDC302 can be accessed through short-range communication technology, and smart phone 301 supports short-range communication technology, so smart phone 301 can request to access CDC302. If the two communicating parties in the short-range communication technology use digital pairing for access, then directly click the logo of CDC302 in smart phone 301, and by confirming the pairing number between CDC302, CDC302 can be connected through short-range communication technology. At this time, if an attacker impersonates the identity of smart phone 301 to connect to CDC302, CDC302 will find it difficult to identify the attacker, which will lead to the attacker successfully accessing CDC302, threatening the privacy and safety of the vehicle.
[0405] Similarly, in some other scenarios, it is often difficult for nodes to avoid access by unidentified attackers, affecting the security of communication. For example, CDC302 supports access through the first password. The user enters the password in the smartphone 301, and CDC302 can connect when it determines that the password entered by the user is correct. However, in order to facilitate input and memory, the password is usually short. When the password is directly used to obtain the communication key during the communication process, the attacker may use brute force or offline cracking to obtain the password of CDC302, threatening the privacy and security of the vehicle.
[0406] In view of this, the communication method and device of the embodiments of the present application are provided to reduce the possibility of successful association between a node and an attacker with an untrustworthy identity, thereby improving node security.
[0407] The method of the embodiment of the present application is described in detail below.
[0408] See also Figure 4 , Figure 4 is a flow chart of a communication method provided in an embodiment of the present application. Optionally, the method may be based on Figure 2 The communication system shown in FIG. Figure 4 The communication method shown may include one or more steps from step S401 to step S406. It should be understood that for the convenience of description, this application is described in the order of S401 to S406, and is not intended to limit the execution to the above order. The embodiment of the application does not limit the execution order, execution time, number of executions, etc. of the above one or more steps. S401 to step S406 are as follows:
[0409] Step S401: A first node sends a first message to a second node. Correspondingly, the second node receives the first message from the first node. The first message includes a first key negotiation parameter.
[0410] Specifically, the key negotiation parameter is a parameter used in the key negotiation process. For the convenience of description, in each embodiment of the present application, the key negotiation parameter provided by the first node is referred to as the first key negotiation parameter.
[0411] In the embodiment of the present application, the first key negotiation parameter is associated with the first private key and an intermediate parameter, and the intermediate parameter is associated with the security parameter and the public parameter.
[0412] For ease of understanding, the following first introduces security parameters and public parameters.
[0413] (1) Security parameters may include a shared key between the first node and the second node (including a pre-shared key, a symmetric encryption key, etc.), a first password, pre-configured parameters between the first node and the second node, or pre-defined parameters in the communication protocol, etc. Taking a pre-shared key (PSK) as an example, the pre-shared key is a secret value shared between the first node and the second node. The PSK shared with the first node may be pre-defined, pre-configured, or generated through mutual negotiation in the first node.
[0414] The first password is the agreed access password between the first node and the second node, and can also be understood as a password pre-configured or pre-defined by the second node (or the first node) in order to allow other nodes to access, or understood as a secret value agreed between the first node and the second node. For a description of the first password, please refer to the description in the technical term explanation section.
[0415] As a possible solution, if the first node has a PSK with the second node, the PSK is used as the security parameter. If the first node does not have a PSK with the second node, the first password is used as the security parameter. That is, the first node preferentially uses the PSK to participate in the key negotiation process.
[0416] The first private key is determined by the first node and is the private key of the first node. The first private key can be a random number. Optionally, when the first node and the second node negotiate the key through the TBPEKE algorithm, the value range of the first private key is: [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm, or p is the order of the group associated with the elliptic curve. It should be understood that the "TBPEKE algorithm" is an algorithm name provided exemplarily in the embodiments of the present application. During implementation, key negotiation algorithms using the same or similar parameters and calculation methods all fall within the scope of the present application, although they may not be called "TBPEKE algorithm".
[0417] (2) Public parameters are parameters that can be used by multiple parties during the key negotiation process. The number of public parameters can be one or more, depending on the specific implementation. Optionally, when the first node and the second node select different key negotiation algorithms to perform key negotiation, the number and determination method of the public parameters may be different.
[0418] The following are some possible ways to determine the public parameters:
[0419] Implementation method 1, pre-define or pre-configure public parameters. Exemplarily, the number and value of public parameters are defined by a protocol, and when a first node and a second node are associated through a protocol, key negotiation parameters are determined based on the public parameters defined by the protocol. Exemplarily, public parameters are pre-configured in multiple communicating parties (e.g., a first node and a second node). Exemplarily, public parameters are pre-configured in the second node (or the first node), and the second node can send them to other nodes through messages, and the communicating parties determine the key negotiation parameters based on consistent public parameters.
[0420] Implementation method 2: A node determines a parameter as a public parameter. The number of public parameters is not limited here. Optionally, the number of public parameters can be one or more.
[0421] For example, the second node may generate a random number and use the random number as a public parameter.
[0422] For another example, the second node determines two points in the group of the first elliptic curve, and the two points are used as common parameters. For example, the first node selects a point as a base point (called the first base point for easy distinction), and obtains a second point (also called the second base point) by operating on the base point.
[0423] Optionally, the group may be a group related to operations on the first elliptic curve, and the operations on the elliptic curve include one or more operations of elliptic curve point multiplication operations, elliptic curve point addition operations, etc. Further optionally, the order corresponding to the group is p, and p may be defined by a node, a standard, a manufacturer, or a user. The order p in each embodiment of the present application may be selected as a prime number.
[0424] Implementation method three: some common parameters are pre-defined, and some parameters are determined by the nodes.
[0425] For example, the number of public parameters may be 2, wherein one public parameter is predefined, and the other public parameter is determined based on a known public parameter and a random number provided by the first node and the second node respectively.
[0426] As a possible implementation, when the key agreement algorithm between the first node and the second node is the TBPEKE algorithm, at least one public parameter includes: a group of order p (or some elements in the group), and / or a first base point and a second base point in the group. Optionally, the group may be a group related to operations on a first elliptic curve, and the operations on the elliptic curve include one or more operations of elliptic curve point multiplication operations, elliptic curve point addition operations, and the like.
[0427] As another possible implementation, the second node may receive a first calculated value from the first node, the first calculated value being related to the first random number and the first public parameter, and the first random number being determined by the first node (in an embodiment of the present application, determining includes one or more of operations such as receiving, copying, reading or generating). Wherein, the first public parameter is predefined, for example, obtained by protocol provisions, manufacturer configuration, or user input. The second node determines the second public parameter based on the second random number and the first calculated value. The second node sends a second calculated value to the first node, and the second calculated value is related to the second random number and the first public parameter. Further, the first node may receive a second calculated value from the first node, and obtain a second public parameter consistent with the first node based on the second calculated value and the first random number.
[0428] Figure 5 The figure shows a possible process for determining public parameters provided by an embodiment of the present application. The public parameters include two base points U and V, where U is a predefined base point, and U and V belong to a cyclic group of order p, where p is a prime number. The elliptic curve used can be an elliptic curve defined by the selected key agreement algorithm. Figure 5 The process shown may specifically include steps S51 to S55, which are specifically as follows:
[0429] Step S51: The first node generates a random number x and calculates X=x*U.
[0430] Wherein, * is a dot multiplication operation, and X is the aforementioned first calculated value.
[0431] Step S52: The first node sends X to the second node. Correspondingly, the second node receives X from the first node.
[0432] Step S53: The second node generates a random number y, calculates Y=y*U, and calculates V=y*X.
[0433] Wherein "*" is a dot multiplication operation. Y is the aforementioned second calculated value, and V is the second base point. Optionally, since X=x*U, V=y*X=y*(x*U)=(xy)*U, and "." is a multiplication operation.
[0434] Step S54: the second node sends Y to the first node. Correspondingly, the first node receives Y from the second node.
[0435] Step S55: The first node calculates V=x*Y.
[0436] Since Y = y*U, V = x*Y = x*(y*U) = (xy)*U, "." is a multiplication operation. Therefore, the second node and the first node are connected by Figure 5 The embodiment shown can determine a consistent V. It should be noted that, Figure 5 For the convenience of description, the sequence of step S51 to step S52 is used for description, and the present application does not limit the sequence of execution of the steps, the actual execution, or the number of executions.
[0437] The above introduces public parameters and security parameters. The following uses the TBPEKE algorithm as an example to provide two possible solutions for the first key negotiation parameters:
[0438] Solution 1: The first node calculates the intermediate parameter b based on the first password pw and the public parameters (U and V), that is, b = (U + pw * V), where U and V are the first base point and the second base point on the elliptic curve used by the TBPEKE algorithm. The first node generates a random number as the first private key SKt and calculates the first public key PKt, where PKt = SKt * b = SKt * (U + pw * V). The first public key PKt is used as the key negotiation parameter KEt.
[0439] In some possible designs, points on the same elliptic curve can be added or multiplied. Therefore, if a parameter is not a point on an elliptic curve, the parameter can be mapped to a point on the elliptic curve before performing a point addition (or multiplication) operation. Taking the first private key SKt as an example, a possible mapping method is as follows: the first node can use SKt as the horizontal coordinate (if it exceeds the domain, SKt can be modulo), and obtain a mapping point R (SKt, y) on the elliptic curve, and then point R can be used to replace SKt. Optionally, when there are multiple y values corresponding to a SKt value, the conditions that the y value needs to meet can be agreed in advance to determine the corresponding point.
[0440] Solution 2: The first node calculates the intermediate parameter b based on PSK and public parameters (U and V), that is, b = (U + PSK * V), where + represents the point addition operation on the elliptic curve and * represents the point multiplication operation on the elliptic curve. The first node generates a random number as the first private key SKt and calculates the first public key PKt, where PKt = SKt * (U + PSK * V). The first public key PKt is used as the key negotiation parameter KEt.
[0441] It should be noted that, in order to explain the scheme more clearly, the above scheme uses multiple steps to explain how to obtain the key negotiation parameter KEt. In actual processing, it can also be completed in one step, and the intermediate parameters, the first public key, etc. may only be internal results, that is, the key negotiation parameter KEt satisfies: KEt = SKt*(U+s*V).
[0442] Optionally, the first node may also send indication information of the key negotiation algorithm to the second node, which is used to indicate the algorithm used in the key negotiation process. The indication information may be specifically indicated by a certain field (referred to as the first field for convenience of description), for example, the first field may be the KE alg field. Different values of the first field may indicate the algorithm used by the first node in the key negotiation process. Optionally, the indication information of the key negotiation algorithm may also be included in the aforementioned first message.
[0443] Please refer to Table 1, which is the value and description of the indication information of a possible key negotiation algorithm provided in an embodiment of the present application. As shown in Table 1, when the value of the first field is 0x003, it indicates that the key is negotiated through the TBPEKE algorithm, and the elliptic curve used by the TBPEKE algorithm is the elliptic curve defined by the SM2 algorithm. Similarly, when the value of the first field is 0x001, it indicates that the first node selects the SM2 algorithm to negotiate the key. The rest of the value situations are similar and will not be repeated here.
[0444] Table 1 Possible values and descriptions of the first field
[0445] value describe 0x001 SM2 0x002 ECDH, based on the elliptic curve curve25519 0x003 TBPEKE, an elliptic curve based on SM2 0x004 TBPEKE, an elliptic curve based on curve25519 …… ……
[0446] It should be understood that Table 1 is an exemplary field value, and does not limit the indication information. In the specific implementation process, the format, number of bits, value and algorithm of the indication information may also have other designs.
[0447] As a possible solution, the second node may send (the sending method may include broadcast sending, multicast sending, or unicast sending, etc.) its key negotiation algorithm capability, and the key negotiation algorithm capability is used to characterize the key negotiation algorithm supported by the second node. Correspondingly, the first node selects a key negotiation algorithm according to the key negotiation algorithm supported by the second node. The first node sends indication information of the key negotiation algorithm to the second node, which is used to indicate the key negotiation algorithm selected by it.
[0448] Optionally, the second node carries its identity and supported key negotiation algorithms in a broadcast message (or access message). The key negotiation algorithms are arranged in order of priority, for example, algorithms with higher priority can be arranged in front. The identity of the second node includes an identifier (identify, ID), a domain ID (domain ID), a media access control (media access control, MAC) address, a domain name, a domain address or other custom identifiers of the second node, also known as a device identifier of the second node.
[0449] For ease of understanding, the following exemplary embodiment provides a possible solution, where the second node supports the SM2 algorithm (identifier: 0x 001), the ECDH algorithm (identifier: 0x 002), the TBPEKE algorithm based on the elliptic curve of SM2 (identifier: 0x 003), and the TBPEKE algorithm based on the elliptic curve of curve25519 (identifier: 0x 004), and their priorities are 1, 2, 3, and 4 respectively (the larger the number, the higher the priority). Then, in the broadcast message, the key agreement algorithm capability of the second node is: "0x 004, 0x 003, 0x 002, 0x 001".
[0450] As a possible solution, the first key agreement algorithm is the key agreement algorithm supported by the first node, and the first key agreement algorithm has the highest priority among the key agreement algorithms supported by the second node. For example, the key agreement algorithms supported by the second node are: Algorithm A, Algorithm B, Algorithm C and Algorithm D, and their priorities are 4, 3, 2, and 1 respectively (the larger the number, the higher the priority). The key agreement algorithms supported by the first node are: Algorithm B, Algorithm D and Algorithm E. The algorithms supported by both the first node and the second node are: Algorithm B and Algorithm D. Since Algorithm B has the highest priority, the first node selects Algorithm B as the algorithm used for key negotiation.
[0451] Of course, the first node can select the algorithm with the highest priority in the first node among the algorithms supported by both the first node and the second node. For example, the key negotiation algorithms supported by the second node are: Algorithm A, Algorithm B, Algorithm C and Algorithm D, and their priorities are 4, 3, 2, and 1 respectively (the larger the number, the higher the priority). The key negotiation algorithms supported by the first node are: Algorithm B, Algorithm D and Algorithm E, and their priorities are 1, 2, and 3 respectively (the larger the number, the higher the priority). The algorithms supported by both the first node and the second node are: Algorithm B and Algorithm D. Since in the second node, the priority of Algorithm D is higher than that of Algorithm B, the first node selects Algorithm D as the algorithm used for key negotiation.
[0452] Optionally, there may be other configurations for setting the priority, for example, by specifying the priorities of various algorithms through a protocol, and determining which algorithm to use according to the priorities specified by the protocol.
[0453] Optionally, the first message may also include a fresh parameter (fresh value) for easy distinction. The fresh parameter provided by the first node is referred to as the first fresh parameter below. The fresh parameter includes at least one of a random number (e.g., NONCE), a count value, a sequence number, etc. In each embodiment of the present application, the fresh parameter includes NONCE as an example for description, but the present application is applicable to various types of fresh parameters. For ease of explanation, the first fresh parameter is represented by NONCEt.
[0454] Optionally, the first message further includes the identity of the first node, wherein the identity of the first node includes the ID, MAC address, domain name, domain address or other custom identifier of the first node, also referred to as the device identifier of the first node.
[0455] It should be noted that, in a specific scenario, the first message may be referred to as an access request message (or access request information), or may be referred to as an association request message (or association request information). In each embodiment of the present application, the name of the message or information is not limited, and only the message content is exemplarily described and expressed, and the name of the message may be replaced.
[0456] It should be understood that this application is for the convenience of describing the transmission of parameters, so the first message, the second message, etc. are used as carriers for carrying data. In the specific implementation process, the first message can be one message or multiple messages. The number of messages contained in the first message may not be limited. Similarly, the number of messages contained in the subsequent second message and the third message may not be limited. For example, when the first node sends the first key negotiation parameter and the first fresh parameter to the second node, the first key negotiation parameter can be carried by message 1, and the first fresh parameter can be carried by message 2. At this time, message 1 and message 2 are included in the first message.
[0457] Step S402: The second node sends a second message to the first node. Correspondingly, the first node receives the second message from the second node, wherein the second message includes a second key negotiation parameter.
[0458] Specifically, in each embodiment of the present application, the key negotiation parameter provided by the second node is referred to as a second key negotiation parameter. The second key negotiation parameter is associated with the second private key and an intermediate parameter, and the intermediate parameter is associated with a security parameter and a public parameter.
[0459] The second private key is a private key determined by the second node. The second private key may be a random number generated by the second node. Optionally, when the first node and the second node negotiate the key through the TBPEKE algorithm, the value range of the second private key is: [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm, or p is the order of the group. For a detailed description of security parameters and public parameters, please refer to the relevant description in step S401.
[0460] As a possible solution, the second key negotiation parameter can be expressed by the following formula: KEg = SKg*b, where b = (U + s*V), SKg is the second private key, b is an intermediate parameter, U and V are public parameters, and s is a security parameter. Alternatively, the second key negotiation parameter is expressed by the following formula: KEg = SKg*(U + s*V).
[0461] Optionally, the second message further includes a fresh parameter. For the convenience of description, in various embodiments of the present application, the fresh parameter provided by the second node is referred to as a second fresh parameter, and in some embodiments, NONCEg is used to represent it.
[0462] Step S403: The second node obtains a first key according to the first key negotiation parameter and the second private key. The first key is associated with the first key negotiation parameter and the second private key.
[0463] As a possible solution, the second node obtains the first key in the following manner: first key = SKg*KEt, where SKg is the second private key and KEt is the first key negotiation parameter. Since the first key negotiation parameter KEt satisfies the following formula: KEt = SKt*(U+s*V), the first key K KE The following formula can be satisfied:
[0464] K KE =SKg*KEt=(SKt.SKg)*(U+s*V).
[0465] For the convenience of description, the process of determining the first private key and calculating the first key are described separately. However, in some specific designs, the above calculation process can be encapsulated into a calculation process, the input of which is the first key negotiation parameter, and the output is the first key.
[0466] Alternatively, the above process of obtaining the first key is indicated by the TBPEKE algorithm, so the above steps can also be expressed as: the second node obtains the first key based on the TBPEKE algorithm and the first key negotiation parameter.
[0467] Optionally, the first key can also be used to obtain one or more keys. As a possible solution, the first key can be used to derive an encryption key, an integrity key, or an authentication key. Exemplarily, the second node can calculate the key Kgt based on the first key. For example, Kgt=KDF(K KE ,NONCEt,NONCEg), where NONCEt is the fresh parameter provided by the first node and NONCEg is the fresh parameter provided by the second node.
[0468] As a possible implementation, the first key may be used to participate in generating identity authentication information to authenticate the identities of both communicating parties.
[0469] For example, the second node can obtain the second identity authentication information using the first key, and the second authentication information is used to authenticate the identity of the second node and / or to verify whether the keys negotiated by the first node and the second node are consistent. That is, the second identity authentication information is associated with the first key.
[0470] In some possible designs, the second authentication information may also be associated with the following parameters: one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the first message, and the second message. The above message may be the entire message or part of the data in the message. The following are several possible ways to calculate the second authentication information:
[0471] Calculation method 1: the second authentication information AUTHg satisfies: AUTHg = AUF(K KE ), where K KE is the first key. Of course, in addition to K KE , other parameters may also be involved in generating AUTHg, such as fresh parameters, messages, etc. Exemplarily, AUTHg satisfies: AUTHg = AUF (K KE , NONCEg), or satisfy: AUTHg=AUF(K KE , NONCEt), or satisfy: AUTHg=AUF(K KE , NONCEt, NONCEg).
[0472] Calculation method 2: the second authentication information AUTHg satisfies: AUTHg=AUF(PSK), where PSK is the PSK between the second node and the first node. Alternatively, PSK may also be the PSK stored in the second node and corresponding to the identity of the first node.
[0473] Of course, in addition to PSK, other parameters may also be involved in generating AUTHg, such as fresh parameters, messages, etc. Exemplarily, AUTHg satisfies: AUTHg=AUF(PSK, NONCEg), or satisfies: AUTHg=AUF(PSK, NONCEt), or satisfies: AUTHg=AUF(PSK, NONCEt, NONCEg).
[0474] Calculation method 3, the second authentication information AUTHg satisfies: AUTHg = AUF (PSK, K KE , NONCEg, first message), related parameters can refer to the above.
[0475] Calculation method 4: Since the number of bits of the output value of the AUF algorithm may be relatively long, the second node can take some bits of the output value to make the second authentication information have a uniform and relatively short number of data bits, thereby reducing the data size of the second message and improving the transmission efficiency. For example, AUTHg = AUF (PSK) | N比特 .
[0476] Among them, N bits can be predefined or preconfigured by the OEM, manufacturer, standard or user. For example, N bits can be the upper 32 bits, that is, AUTHg satisfies: AUTHg = AUF (PSK, K KE ,NONCEg,First News)| 高32比特 For example, N bits may be the lower 16 bits, and AUTHg satisfies: AUTHg = AUF (PSK, NONCEg) | 低16比特 .
[0477] Calculation method 5, based on the first key K KE Get the authentication information key Kauth, that is: Kauth = KDF (K KE ), optionally, the parameters involved in generating Kauth may also include one or more of a fresh parameter (such as NONCEt, or NONCEg, etc.), a random number, a PSK, or the identity of the first node, etc.
[0478] The identity authentication key can be used to generate the second authentication information. Of course, other parameters may also be used to generate the second authentication information, such as freshness parameters, messages, etc. As a possible solution, the second authentication information AUTHg satisfies: AUTHg = AUF (Kauth, NONCEg, first message) | N比特 .
[0479] It should be understood that the order of parameters in the algorithm of this application is only an example, and the input order of each parameter can be changed during the specific implementation. Alternatively, the AUF algorithm used to generate the authentication information can also be replaced by other cryptographic algorithms, such as KDF algorithm, encryption algorithm, authentication algorithm, etc.
[0480] In the above, the second node uses PSK in some schemes for obtaining the second authentication information and the second key negotiation parameter. The following are two exemplary methods for obtaining PSK:
[0481] Method 1: There is a correspondence between the PSK and the identity of the first node in the second node. That is, in the second node, the PSK between the first node and the second node can correspond to the identity of the first node. The second node can obtain the corresponding PSK based on the identity of the first node and the correspondence (which can also be called the first correspondence for easy distinction).
[0482] Optionally, the correspondence between the PSK and the identity of the first node may be a correspondence pre-configured and pre-defined in the second node, or a correspondence saved after the first node and the second node generate the PSK through negotiation. The correspondence may be in the form of one or more of a correspondence set, a data table, a database, etc., which is not limited in the present application. Referring to Table 2, Table 2 is a possible correspondence set between the PSK and the identity of the first node provided in an embodiment of the present application, and the correspondence set includes the identities of multiple first nodes, the corresponding PSK, and the type of PSK. For example, for the first node with the identity "ID1", the second node can determine that its corresponding PSK is "PSK1" based on the temporary ID "ID1.1". Furthermore, the type of "PSK1" is pre-configured.
[0483] Table 2 Correspondence between PSK and the identity of the second node
[0484] Identity PSK type ID1 (temporary ID1.1) PSK1 Pre-configuration ID2 (temporary ID2.1) PSK2 generate ID3 (Provisional ID3.1) PSK3 generate
[0485] It should be noted that, in the case of pre-configured correspondence, the PSK pre-configured between the second node and the first node and the PSK pre-configured between the first node and the second node are the same. In the case of saving the correspondence after generating the PSK, the method for generating the PSK and the parameters used by the first node and the second node are also the same.
[0486] Method 2: The second node generates a PSK with the first node. Optionally, the parameters for generating the PSK may include one or more of the first password, the first fresh parameter, the second fresh parameter, the identity of the first node, or the identity of the second node. It should be understood that the parameters for generating the PSK by the second node and the first node should be consistent.
[0487] In some scenarios, the second message may be referred to as a security context request message (or security context request information).
[0488] Step S404 (optional): the first node obtains the second key according to the second key negotiation parameter and the first private key.
[0489] The second key corresponds to the second key negotiation parameter and the first private key, and is the key obtained by the first node during the key negotiation process.
[0490] Specifically, the first private key is a private key determined by the first node. In step S401, the first key negotiation parameter is obtained. The first private key may be a random number generated by the first node. Optionally, when the first node and the second node negotiate the key through the TBPEKE algorithm, the value range of the first private key is: [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm, or p is the order of a group, which is related to the elliptic curve.
[0491] As a possible solution, the first node obtains the second key in the following manner: second key = SKt*KEg, where SKt is the first private key and KEg is the second key negotiation parameter. Since the second key negotiation parameter KEg satisfies the following formula: KEg = SKg*(U+s*V), the second key K KE (In order to facilitate the first key K KE The distinction is referred to as K KE ′) can satisfy the following formula:
[0492] K KE ′=SKt*KEg=(SKt.SKg)*(U+s*V).
[0493] Due to K KE =(SKt.SKg)*(U+s*V)=K KE ′, so the first node and the second node obtain the same key K by exchanging key negotiation parameters KE .
[0494] For the convenience of description, the process of determining the second private key and calculating the second key are described separately. However, in some specific designs, the above calculation process can be encapsulated into a calculation process, the input of which is the second key negotiation parameter, and the output is the second key.
[0495] As another possible solution, the process of obtaining the second key is indicated by the TBPEKE algorithm, so the above steps can also be expressed as: the first node obtains the second key based on the TBPEKE algorithm and the second key negotiation parameters.
[0496] Optionally, the second key can be used to obtain one or more keys. As a possible solution, the second key can be used to obtain an encryption key, an integrity key, an identity authentication key, etc.
[0497] For example, the first node may calculate the key Kgt based on the second key. For example, Kgt=KDF(K KE ′,NONCEt,NONCEg),
[0498] Among them, NONCEt is a fresh parameter provided by the first node, and NONCEg is a fresh parameter provided by the second node.
[0499] As a possible implementation, the first key may be used to participate in generating identity authentication information to authenticate the identities of both parties in communication, as shown in step S405 and step S406.
[0500] Step S405 (optional): The first node sends a third message to the second node. Correspondingly, the second node receives the third message from the first node. The third message includes the first authentication information.
[0501] The first authentication information is used to authenticate the identity of the first node, and / or is used by the second node to verify whether the key obtained by negotiation between the second node and the first node is consistent. The first authentication information is associated with the second key.
[0502] In some possible designs, the optional parameters involved in generating the first authentication information may also include one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the first message, and the second message. The above message may be the entire message or part of the data in the message. The following are several possible ways to calculate the first authentication information:
[0503] Calculation method 1: the first authentication information AUTHt satisfies: AUTHt = AUF(K KE ′), where K KE ′ is the second key. Of course, in addition to K KE , other parameters may also be involved in generating AUTHt, such as fresh parameters, messages, etc. Exemplarily, AUTHt satisfies: AUTHt=AUF(K KE ′, NONCEt), or satisfies: AUTHt=AUF(K KE ′, NONCEg), or satisfies: AUTHt=AUF(KKE ′, NONCEt, NONCEg).
[0504] Calculation method 2: the first authentication information AUTHt satisfies: AUTHt=AUF(PSK), where PSK is the PSK between the second node and the first node. Alternatively, PSK may also be the PSK stored in the first node and corresponding to the identity of the second node.
[0505] Of course, in addition to PSK, other parameters may also be involved in generating AUTHt, such as fresh parameters, messages, etc. Exemplarily, AUTHt satisfies: AUTHt=AUF(PSK, NONCEg), or satisfies: AUTHt=AUF(PSK, NONCEt), or satisfies: AUTHt=AUF(PSK, NONCEt, NONCEg).
[0506] Calculation method 3, the first authentication information AUTHt satisfies: AUTHt = AUF (PSK, K KE ′, second message, NONCEt, key negotiation algorithm capability of the first node), related parameters can refer to the above.
[0507] Calculation method 4: Since the number of bits of the output value of the AUF algorithm may be relatively long, the first node can take some bits of the output value to make the first authentication information have a uniform and relatively short number of data bits, thereby reducing the data size of the third message and improving the transmission efficiency. For example, AUTHt = AUF (PSK) | N比特 .
[0508] Among them, N bits can be predefined or preconfigured by the OEM, manufacturer, standard or user. For example, N bits can be the upper 32 bits, that is, AUTHt satisfies: AUTHt = AUF (PSK, K KE ′, second message, NONCEt, key agreement algorithm capability of the first node)| 高32比特 For example, N bits may be the lower 16 bits, and AUTHt satisfies: AUTHt = AUF (PSK, NONCEg) | 低16比特 .
[0509] Calculation method 5, based on the second key K KE 'Get the authentication information key Kauth, that is: Kauth = KDF (K KE ′), optionally, the parameters involved in generating Kauth may also include one or more of a fresh parameter (such as NONCEt, or NONCEg, etc.), a random number, a PSK, or the identity of the first node, etc.
[0510] The identity authentication key can be used to generate the first authentication information. Of course, other parameters may also be used to generate the first authentication information, such as freshness parameters, messages, etc. As a possible solution, the first authentication information AUTHt satisfies: AUTHt = AUF (Kauth, NONCEt, second message, key negotiation algorithm capability of the first node) | N比特 .
[0511] Alternatively, the AUF algorithm used to generate the authentication information mentioned above may also be replaced by other cryptographic algorithms, such as a KDF algorithm, an encryption algorithm, an authentication algorithm, and the like.
[0512] Optionally, when the second message includes the second authentication information AUTHg, the first node may verify the second authentication information AUTHg according to the second key. If the first node verifies that the second authentication information AUTHg is correct, the first node generates the first authentication information AUTHt.
[0513] As a possible solution, the second node uses the same parameters it obtains to generate verification information as the parameters used to generate AUTHg. If the verification information is consistent with AUTHg, the first node verifies that the second authentication information AUTHg is correct. If the verification information is inconsistent with AUTHg, the first node fails to verify the second authentication information AUTHg.
[0514] Furthermore, the second message may also include integrity verification information, and the first node may verify the integrity of the second message according to the integrity verification information. If the integrity of the second message and the second authentication information are verified successfully, the first node generates authentication information AUTHt.
[0515] The first node may obtain the PSK by obtaining the PSK through a corresponding relationship or generating the PSK through parameters. For related descriptions, please refer to the description of the second node side in step S402, which will not be repeated here.
[0516] In some scenarios, the third message may be referred to as a security context response message (or security context response information).
[0517] Step S406 (optional): The second node verifies the first authentication information according to the first key.
[0518] In an optional solution, the second node should use the same parameters to generate verification information as the first node uses to generate the first authentication information. If the verification information is the same as the first authentication information, the verification is successful.
[0519] For example, if the first authentication information AUTHt satisfies: AUTHt=AUF(PSK, K KE',NONCEt,second message)| 高32比特 , then the second node generates the check information check1 = AUF (PSK, K KE ,NONCEt,Second Message)| 高32比特 If the verification information check1 is the same as AUTHt, the verification is successful.
[0520] As a possible solution, if the first authentication information is verified, the second node sends an association establishment message to the first node. Correspondingly, the first node receives the association establishment message and can establish an association with the second node.
[0521] As another possible solution, if the first authentication information fails to be verified, the second node may disconnect the communication connection with the first node, discard the first message, or discard the third message. For example, if the first authentication information fails to be verified, it means that the first key K in the second node is KE and the second key K of the first node KE ’ is different, so the identity of the first node is untrustworthy, and the first node may be a node disguised by the attacker, so the communication connection with the first node is disconnected to avoid accessing the untrustworthy node.
[0522] Optionally, one or more of the first message, the second message, the third message, the association establishment message, etc. may include a message authentication code (MAC). The message authentication code is information (or a small piece of information) generated by a specific algorithm, which can be used to check the integrity of a certain message, and optionally, identity verification. Therefore, the recipient can check the message integrity based on the message authentication code.
[0523] Optionally, when the second node determines an encryption key, the association establishment message can also be encrypted by the encryption key to obtain a ciphertext. Accordingly, the second node also determines a decryption key corresponding to the encryption key, and the decryption key can decrypt the ciphertext to obtain the content of the association establishment message.
[0524] exist Figure 4 In the illustrated embodiment, the second node first obtains the intermediate parameter based on the security parameter and the public parameter, and uses the intermediate parameter to participate in the generation of the first key negotiation parameter. The security parameter is not directly used to generate the key, nor is the key negotiation parameter directly used. Therefore, even if the number of bits of the security parameter is short, the confidentiality of the security parameter can be improved through the public parameter, thereby reducing the possibility of the security parameter being cracked. The security of the first key is correspondingly improved, the possibility of an attacker accessing the second node can be reduced, and the communication security and data security of the node are improved.
[0525] Furthermore, the security parameters obtained by the first node need to be consistent with the security parameters in the second node, so that the first node and the second node can participate in generating a consistent key through consistent security parameters. Specifically, when the second node generates the first key, the parameters used include the second private key, the security parameter (in the first node), the public parameter and the first private key; when the first node generates the second key, the parameters used include the first private key, the security parameter (in the second node), the public parameter and the second private key. Since the parameters used to generate the first key and the second key are the same, if the security parameters in the first node and the second node are consistent, the generated first key and the second key are consistent.
[0526] The first node can obtain the first authentication information based on the second key, and the second node can verify the authentication information based on the first key. If the verification is successful, it means that the first key and the second key are consistent, that is, the second node and the first node have the same security parameters, which means that the identity of the second node is credible.
[0527] When an attacker requests to access the second node, since the attacker does not have security parameters consistent with the second node, the attacker cannot generate a shared key consistent with the second node, making it impossible for the attacker to access the second node. Therefore, the attacker can be prevented from accessing the second node and preventing the second node from successfully associating with an attacker whose identity is untrustworthy.
[0528] above Figure 4 The method embodiment shown includes many possible implementation schemes. Figure 6 , Figure 7 Some of the implementation schemes are illustrated with examples. It should be noted that: Figure 5 For related concepts, operations or logical relationships that are not explained, please refer to Figure 4 The corresponding description in the illustrated embodiment.
[0529] See also Figure 6 , Figure 6 is a method flow chart of a possible communication method provided by an embodiment of the present application. Further, the method can be based on Figure 2 The architecture shown in the figure is used to implement this. Figure 6 The communication method shown may include steps S601 to S611. It should be understood that for the convenience of description, this application describes the sequence of S601 to S611, and is not intended to limit the execution to the above sequence. The embodiment of the application does not limit the execution sequence, execution time, execution number, etc. of the above one or more steps. S601 to S611 are as follows:
[0530] Step S601: The first node selects the TPP EKE algorithm.
[0531] Specifically, the first node determines the key agreement algorithm used for key agreement with the second node from one or more key agreement algorithms. Exemplarily, the available key agreement algorithms are: SM2, ECDH (elliptic curve based on curve25519), TBPEKE (elliptic curve based on SM2), and TBPEKE (elliptic curve based on curve25519).
[0532] As a possible solution, the key agreement algorithm selected by the first node includes the TPPEEKE algorithm, that is, the TPPEEKE algorithm is used as the algorithm for negotiating the key between the first node and the second node. The elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: the elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: the TBPEKE algorithm using the elliptic curve defined by SM2, the TBPEKE algorithm using Curve25519, etc. It should be understood that this is an exemplary description made for the convenience of describing the TBPEKE algorithm using different elliptic curves. In the specific implementation process, other elliptic curves can also be used, which are not listed here one by one.
[0533] Optionally, when the selected key agreement algorithm is the TBPEKE algorithm, at least one public parameter includes: a group of order p (or some elements in the group), and / or two base points in the group, such as the first base point and the second base point mentioned above. The group is related to the elliptic curve used by the TBPEKE algorithm.
[0534] In one possible design, the second node carries the key agreement algorithm it supports in the broadcast message. The key agreement algorithms it supports are arranged in order of priority, with the algorithm with the highest priority being at the front. The first node selects a key agreement algorithm based on the key agreement algorithm capability of the second node. In some possible designs, the algorithm selected by the first node is a key agreement algorithm supported by both the first node and the second node, and has the highest priority among the key agreement algorithms supported by the second node.
[0535] Step S602: The first node generates a first private key SKt and calculates a public key PKt, wherein the public key PKt is used as a first key negotiation parameter KEt.
[0536] Specifically, the first node generates a random number as the private key SKt, where 1≤SKt <p。
[0537] The first node calculates b (intermediate parameter) based on pw (first password), U and V (public parameter), where: b = (U + pw * V). The first node calculates the public key PKt according to b and the private key SKt, where: PKt = SKt * b.
[0538] The first node uses the public key PKt as the first key negotiation parameter KEt.
[0539] Step S603: The first node sends an association request message to the second node. The association request message carries the ID of the T node, the algorithm indication information KE alg, the first key negotiation parameter KEt and the random number NONCEt.
[0540] KE alg is used to indicate the key agreement algorithm selected by the first node. NONCEt is a random number determined by the first node.
[0541] Correspondingly, the second node receives the association request message from the first node.
[0542] Step S604: The second node generates a private key SKg and calculates a public key PKg, wherein the public key PKg is used as a second key negotiation parameter KEg.
[0543] Specifically, the second node generates a random number as the private key SKg, where 1≤SKg <p。
[0544] The second node calculates b (intermediate parameter) based on pw (first password), U and V (public parameter), where: b = (U + pw * V). The second node calculates the public key PKg according to b and the private key SKg, where: PKg = SKg * b.
[0545] The first node uses the public key PKg as the first key negotiation parameter KEg.
[0546] Step S605: The second node determines the first key K according to the private key SKg and the first key negotiation parameter KEt KE .
[0547] Specifically, the second node obtains the first key in the following manner: first key = SKg*KEt. Since the first key negotiation parameter KEt satisfies the following formula: KEt = SKt*(U+pw*V), the first key K KE The following formula can be satisfied:
[0548] K KE =SKg*KEt=(SKt.SKg)*(U+pw*V).
[0549] Optionally, the second node may also be based on the first key K KE For example, the second node obtains other derived keys based on the first key K KE , random number NONCEt and random number NONCEg calculate the shared key Kgt, that is: shared key Kgt = KDF (K KE , NONCEt, NONCEg).
[0550] Step S606: The second node is based on K KE The second authentication information AUTHg is calculated using the PSK.
[0551] The PSK is a shared key between the second node and the first node, which can be generated according to parameters such as a password, or can be pre-configured.
[0552] As a possible solution, the second authentication information is calculated as follows: AUTHg = AUF (PSK, K KE )|High 32 bits.
[0553] As another possible solution, the optional parameters involved in generating the second authentication information may also include one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the association request message, and the security context request message. Exemplarily, the second authentication information is calculated in the following manner: AUTHg = AUF (PSK, Kgt) KE ,NONCEg,association request message)| 高32比特 .
[0554] Optionally, the second node may also generate a random number NONCEg.
[0555] Step S607: The second node sends a security context request message to the first node. The security context request message carries the second key negotiation parameter KEg, the random number NONCEg, and the second authentication information AUTHg.
[0556] Correspondingly, the first node receives the security context request message from the second node.
[0557] Step S608: The first node determines the second key K according to the private key SKt and the second key negotiation parameter KEg KE .
[0558] Specifically, the first node obtains the second key in the following manner: second key = SKt * KEg. Since the second key negotiation parameter KEg satisfies the following formula: KEg = SKg * (U + pw * V), the second key K KE The following formula can be satisfied:
[0559] K KE =SKt*KEg=(SKt.SKg)*(U+pw*V).
[0560] Since the first key K KE =(SKt.SKg)*(U+pw*V)=second key K KE Therefore, the first node and the second node obtain the same key K by exchanging key negotiation parameters. KE.
[0561] Optionally, the first node may also be based on the second key K KE For example, the first node obtains other derived keys based on the second key K KE , random number NONCEt and random number NONCEg calculate the shared key Kgt, that is: shared key Kgt = KDF (K KE , NONCEt, NONCEg).
[0562] Step S609: The first node is based on K KE The first authentication information AUTHt is calculated using the PSK.
[0563] The PSK is a shared key between the second node and the first node, which can be generated according to parameters such as a password, or can be pre-configured.
[0564] As a possible solution, the first authentication information is calculated as follows: AUTHt=AUF(PSK, K KE )|High 32 bits.
[0565] As another possible solution, the optional parameters involved in generating the first authentication information may also include one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the association request message, and the security context request message. Exemplarily, the first authentication information is calculated in the following manner:
[0566] AUTHt=AUF(PSK, KKE, security context request message, NONCEt, key negotiation algorithm capability of the second node)|high 32 bits.
[0567] As a possible solution, the first node verifies whether the second authentication information AUTHg is correct, and if correct, the first node generates the first authentication information AUTHt.
[0568] Optionally, the security context request message includes integrity verification information. If the first node verifies the integrity of the security context request message and the second authentication information AUTHg, the first authentication information AUTHt is generated.
[0569] Step S610: The first node sends a security context response message to the second node. The security context response message carries the first authentication information AUTHt.
[0570] Correspondingly, the second node receives the security context response message from the first node.
[0571] The second node verifies the first authentication information AUTHt, and if it is correct, executes step S611.
[0572] Step S611: the second node sends an association establishment message to the first node.
[0573] As a possible solution, the security context response message includes integrity verification information. When the second node verifies the integrity of the security context response message and the first authentication information AUTHt, it sends an association establishment message to the first node.
[0574] exist Figure 6 In the illustrated embodiment, when the first node requests access to the second node, the first node can select the TBPEKE algorithm based on the elliptic curve theory to perform key negotiation, and the public parameters selected in the key negotiation process are located on the elliptic curve. Due to the discrete logarithm problem on the elliptic curve, it is relatively easy to calculate the intermediate parameters through the security parameters and the public parameters, but it is difficult to crack the security parameters by obtaining the first key negotiation parameters and the public parameters. Therefore, through the TBPEKE algorithm and the public parameters, the possibility of the security parameters being cracked can be reduced, and the security of the node can be improved.
[0575] When an attacker requests to access the second node, a consistent shared key cannot be generated without consistent security parameters, so the attacker cannot access the second node. Therefore, the attacker can be prevented from accessing the second node and preventing the second node from successfully associating with an untrustworthy attacker.
[0576] See also Figure 7 , Figure 7 is a flow chart of another possible communication method provided by an embodiment of the present application. Further, the method can be based on Figure 2 The architecture shown in the figure is used to implement this. Figure 7 The communication method shown may include steps S701 to S717. It should be understood that for the convenience of description, this application describes the sequence of S701 to S717, and is not intended to limit the execution to the above sequence. The embodiment of the application does not limit the execution sequence, execution time, number of executions, etc. of the above one or more steps. S701 to S717 are as follows:
[0577] Step S701 (optional): The first node selects a key agreement algorithm.
[0578] Specifically, the first node determines the key agreement algorithm used for key agreement with the second node from one or more key agreement algorithms. Exemplarily, the available key agreement algorithms are: SM2, ECDH (elliptic curve based on curve25519), TBPEKE (elliptic curve based on SM2), and TBPEKE (elliptic curve based on curve25519).
[0579] As a possible solution, the key agreement algorithm selected by the first node includes the TPPEEKE algorithm, that is, the TPPEEKE algorithm is used as the algorithm for negotiating the key between the first node and the second node. The elliptic curve used by the TBPEKE algorithm includes one or more of the following elliptic curves: the elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: the TBPEKE algorithm using the elliptic curve defined by SM2, the TBPEKE algorithm using Curve25519, etc. It should be understood that this is an exemplary description made for the convenience of describing the TBPEKE algorithm using different elliptic curves. In the specific implementation process, other elliptic curves can also be used, which are not listed here one by one.
[0580] Optionally, when the selected key agreement algorithm is the TBPEKE algorithm, at least one public parameter includes: a group of order p (or some elements in the group), and / or two base points in the group, such as the first base point and the second base point mentioned above. The group is related to the elliptic curve used by the TBPEKE algorithm.
[0581] In one possible design, the second node carries the key agreement algorithm it supports in the broadcast message. The key agreement algorithms it supports are arranged in order of priority, with the algorithm with the highest priority being at the front. The first node selects a key agreement algorithm based on the key agreement algorithm capability of the second node. In some possible designs, the algorithm selected by the first node is a key agreement algorithm supported by both the first node and the second node, and has the highest priority among the key agreement algorithms supported by the second node.
[0582] Step S702: The first node generates a random number x and calculates X=x*U.
[0583] Optionally, step S703 is performed when the key agreement algorithm is the TPP EKE algorithm, wherein U is a predefined base point.
[0584] Optionally, U belongs to a group of order p (p can be a prime number), and the elliptic curve corresponding to the group is the elliptic curve used by the key agreement algorithm selected by the first node. For example, when the first node selects the TBPEKE (SM2-based elliptic curve) algorithm, U belongs to a point in the group of order p associated with the SM2 elliptic curve (i.e., the second base point).
[0585] Optionally, the first node may send information of a selected elliptic curve to the second node, which is used to describe the elliptic curve related to the first public parameter.
[0586] Step S703 (optional): the first node sends indication information of the key agreement algorithm to the second node. Correspondingly, the second node receives the indication information of the key agreement algorithm from the first node.
[0587] For example, KEalg is used to indicate the key agreement algorithm selected by the first node.
[0588] Alternatively, the first node may send the key agreement algorithm supported by itself to the second node, and accordingly, the second node may obtain the key agreement algorithm selected by the first node based on the same selection method as the first node.
[0589] Step S704: the first node sends X to the second node. Correspondingly, the second node receives X from the first node.
[0590] Optionally, the indication information of the key agreement algorithm and X may be carried in the same message or sent in different messages.
[0591] Step S705: The second node generates a random number y, calculates Y=y*U, and calculates V=y*X.
[0592] Step S706: The second node generates a private key SKg and calculates a public key PKg, wherein the public key PKg is used as a second key negotiation parameter KEg.
[0593] Specifically, the second node generates a random number as the private key SKg, where 1≤SKg <p。
[0594] The second node calculates b (intermediate parameter) based on pw (first password), U and V (public parameter), where: b = (U + pw * V). The second node calculates the public key PKg according to b and the private key SKg, where: PKg = SKg * b.
[0595] The first node uses the public key PKg as the first key negotiation parameter KEg.
[0596] Step S707: the second node sends Y to the first node. Correspondingly, the first node receives Y from the second node.
[0597] Step S708: The first node calculates V=x*Y.
[0598] Step S709: Generate a private key SKt and calculate a public key PKt, wherein the public key PKt serves as a first key negotiation parameter KEt.
[0599] Specifically, the first node generates a random number as the private key SKt, where 1≤SKt <p。
[0600] The first node calculates b (intermediate parameter) based on pw (first password), U and V (public parameter), where: b = (U + pw * V). The first node calculates the public key PKt according to b and the private key SKt, where: PKt = SKt * b.
[0601] The first node uses the public key PKt as the first key negotiation parameter KEt.
[0602] Step S710: The first node sends an association request message to the second node. The association request message carries the first key negotiation parameter KEt, the random number NONCEt, the ID of the T node (optional) and the algorithm indication information KE alg (optional).
[0603] Wherein, NONCEt is a random number determined by the first node.
[0604] Correspondingly, the second node receives the association request message from the first node.
[0605] Step S711: The second node determines the first key K according to the private key SKg and the first key negotiation parameter KEt KE .
[0606] Specifically, the second node obtains the first key in the following manner: first key = SKg*KEt. Since the first key negotiation parameter KEt satisfies the following formula: KEt = SKt*(U+pw*V), the first key K KE The following formula can be satisfied:
[0607] K KE =SKg*KEt=(SKt.SKg)*(U+pw*V).
[0608] Optionally, the second node may also be based on the first key K KE For example, the second node obtains other derived keys based on the first key K KE , random number NONCEt and random number NONCEg calculate the shared key Kgt, that is: shared key Kgt = KDF (K KE , NONCEt, NONCEg).
[0609] Optionally, the above step S706 may be executed when (or after) executing step S711.
[0610] Step S712: The second node is based on K KE The second authentication information AUTHg is calculated using the PSK.
[0611] The PSK is a shared key between the second node and the first node, which can be generated according to parameters such as a password, or can be pre-configured.
[0612] As a possible solution, the second authentication information is calculated as follows: AUTHg = AUF (PSK, K KE )|High 32 bits.
[0613] As another possible solution, the optional parameters involved in generating the second authentication information may also include one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the association request message, and the security context request message. Exemplarily, the second authentication information is calculated in the following manner: AUTHg = AUF (PSK, KKE, NONCEg, association request message) | 高32比特 .
[0614] Optionally, the second node may also generate a random number NONCEg.
[0615] Step S713: The second node sends a security context request message to the first node. The security context request message carries the second key negotiation parameter KEg, the random number NONCEg, and the second authentication information AUTHg.
[0616] Correspondingly, the first node receives the security context request message from the second node.
[0617] Step S714: The first node determines the second key K according to the private key SKt and the second key negotiation parameter KEg KE .
[0618] Specifically, the first node obtains the second key in the following manner: second key = SKt * KEg. Since the second key negotiation parameter KEg satisfies the following formula: KEg = SKg * (U + pw * V), the second key K KE The following formula can be satisfied:
[0619] K KE =SKt*KEg=(SKt.SKg)*(U+pw*V).
[0620] Since the first key K KE =(SKt.SKg)*(U+pw*V)=second key K KE Therefore, the first node and the second node obtain the same key K by exchanging key negotiation parameters. KE .
[0621] Optionally, the first node may also be based on the second key K KE For example, the first node obtains other derived keys based on the second key K KE , random number NONCEt and random number NONCEg calculate the shared key Kgt, that is: shared key Kgt = KDF (K KE , NONCEt, NONCEg).
[0622] Step S715: The first node is based on K KE The first authentication information AUTHt is calculated using the PSK.
[0623] The PSK is a shared key between the second node and the first node, which can be generated according to parameters such as a password, or can be pre-configured.
[0624] As a possible solution, the first authentication information is calculated as follows: AUTHt=AUF(PSK, K KE )| 高32比特 .
[0625] As another possible solution, the optional parameters involved in generating the first authentication information may also include one or more of the key Kgt, PSK, the first fresh parameter, the second fresh parameter, the association request message, and the security context request message. Exemplarily, the first authentication information is calculated in the following manner:
[0626] AUTHt=AUF(PSK, KKE, security context request message, NONCEt, key agreement algorithm capability of the second node)| 高32比特 .
[0627] As a possible solution, the first node verifies whether the second authentication information AUTHg is correct, and if correct, the first node generates the first authentication information AUTHt.
[0628] Optionally, the security context request message includes integrity verification information. If the first node verifies the integrity of the security context request message and the second authentication information AUTHg, the first authentication information AUTHt is generated.
[0629] Step S716: The first node sends a security context response message to the second node. The security context response message carries the first authentication information AUTHt.
[0630] Correspondingly, the second node receives the security context response message from the first node.
[0631] The second node verifies the first authentication information AUTHt, and if it is correct, executes step S717.
[0632] Step S717 (optional): the second node sends an association establishment message to the first node.
[0633] As a possible solution, the security context response message includes integrity verification information. When the second node verifies the integrity of the security context response message and the first authentication information AUTHt, it sends an association establishment message to the first node.
[0634] exist Figure 7In the illustrated embodiment, the first node and the second node obtain public parameters U and V by exchanging random numbers based on the elliptic curve defined by the TBPEKE algorithm. When the first node requests access to the second node, the first node can select the TBPEKE algorithm based on the elliptic curve theory to perform key negotiation, and use U and V to participate in the generation of key negotiation parameters during the key negotiation process. Due to the discrete logarithm problem on the elliptic curve, it is relatively easy to calculate the intermediate parameters through the security parameters and the public parameters, but it is difficult to crack the security parameters by obtaining the first key negotiation parameters and the public parameters. Therefore, through the TBPEKE algorithm and public parameters, the possibility of security parameters being cracked can be reduced and the security of the node can be improved.
[0635] When an attacker requests to access the second node, a consistent shared key cannot be generated without consistent security parameters, so the attacker cannot access the second node. Therefore, the attacker can be prevented from accessing the second node and preventing the second node from successfully associating with an untrustworthy attacker.
[0636] Above Figure 6 , Figure 7 In the illustrated embodiment, the first password pw can be replaced by PSK.
[0637] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0638] It is understandable that the multiple devices provided in the embodiments of the present application, such as communication devices, include hardware structures, software units, or combinations of hardware structures and software structures corresponding to the execution of each function in order to implement the functions in the above-mentioned method embodiments. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different device implementations to implement the aforementioned method embodiments in different usage scenarios, and different implementations of the device should not be considered to exceed the scope of the embodiments of the present application.
[0639] The embodiments of the present application may divide the device into functional units. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one functional unit. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0640] Several possible arrangements are listed below.
[0641] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0642] See also Figure 8 , Figure 8 80 is a schematic diagram of the structure of a communication device 80 provided in an embodiment of the present application. Optionally, the communication device 80 may be an independent device, such as a node. Alternatively, the communication device 80 may also be a device in an independent device (such as a node), such as a chip or an integrated circuit.
[0643] The communication device 80 may include one or more of a receiving unit 801, a sending unit 802 and a processing unit 803. The communication device 80 is used to implement the aforementioned communication method, for example Figure 4 , Figure 6 ,or Figure 7 The communication method shown.
[0644] In one possible design, the communication device 80 includes a receiving unit 801, a sending unit 802 and a processing unit 803, and the communication device 80 is used to implement the method on the second node side in the aforementioned embodiment.
[0645] In a possible implementation, the receiving unit 801 is configured to receive a first message from a first node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node;
[0646] The sending unit 802 is further configured to send a second message to the first node, where the second message includes a second key negotiation parameter, where the second key negotiation parameter is associated with a second private key and the intermediate parameter;
[0647] The processing unit 803 is configured to obtain a first key according to the first key negotiation parameter and the second private key.
[0648] In another possible implementation, the receiving unit 801 is further configured to receive a third message from the first node, where the third message includes first authentication information, where the first authentication information is associated with a second key, and where the second key is associated with the second key negotiation parameter and the first private key;
[0649] The processing unit 803 is further configured to verify the first authentication information according to the first key.
[0650] In yet another possible implementation, the first key is used to obtain one or more keys.
[0651] As a possible solution, the first key is used to derive an encryption key, an integrity key, or an identity authentication key, etc.
[0652] In yet another possible implementation, the sending unit 802 is further configured to:
[0653] If the first authentication information is verified successfully, an association establishment message is sent to the first node.
[0654] In yet another possible implementation, the sending unit 802 is further configured to:
[0655] When the integrity of the third message and the first authentication information are verified, an association establishment message is sent to the first node.
[0656] In yet another possible implementation, the receiving unit 801 is further configured to:
[0657] Receive indication information of a key negotiation algorithm sent by the first node, where the key negotiation algorithm includes a TBPEKE algorithm.
[0658] Optionally, the indication information of the key agreement algorithm includes indication information of a first key agreement algorithm, and the indication information of the first key agreement algorithm is used to indicate a TBPEKE algorithm.
[0659] In yet another possible implementation, the at least one common parameter includes: a first common parameter and a second common parameter;
[0660] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0661] In yet another possible implementation, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0662] In another possible implementation, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0663] In a possible implementation, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0664] Optionally, the group may be a cyclic group or a cyclic subgroup with respect to the operation on the first elliptic curve.
[0665] Optionally, the base points in some scenarios can also be replaced by generators.
[0666] In yet another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: some or all elements in a group of order p, where p is a prime number.
[0667] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0668] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p-1].
[0669] In yet another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p.
[0670] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0671] In yet another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include: a cyclic group whose order is a prime number p, and two independent base points U and V in the group.
[0672] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit the relationship between U and V to no correlation.
[0673] In another possible implementation, the receiving unit 801 is further configured to receive a first calculated value from the first node, where the first calculated value is related to a first random number and a first public parameter, where the first random number is determined by the first node, and the first public parameter is predefined based on a TBPEKE algorithm;
[0674] The processing unit 803 is further configured to determine the second public parameter according to the second random number and the first calculated value;
[0675] The sending unit 802 is further configured to send a second calculated value to the first node, where the second calculated value is related to the second random number and the first public parameter, and the second calculated value is used by the first node to determine the second public parameter.
[0676] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned second base point.
[0677] In another possible implementation, the intermediate parameter satisfies the following formula:
[0678] b=U+s*V,
[0679] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0680] In a possible implementation, U is the first base point, and V is the second base point. Further, U and V belong to a group of order p, where p is a prime number. The operation related to the group is an operation on the first elliptic curve.
[0681] The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. For example, taking the selected key agreement algorithm as the TBPEKE algorithm, the first elliptic curve may be: an elliptic curve defined by SM2, or Curve25519, etc.
[0682] In another possible implementation, the first key negotiation parameter KEt satisfies the following formula:
[0683] KEt=SKt*b,
[0684] The first key satisfies the following formula:
[0685] First key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V),
[0686] The second key negotiation parameter KEg satisfies the following formula:
[0687] KEg=SKg*b,
[0688] The second key satisfies the following formula:
[0689] Second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V);
[0690] Among them, SKt is the first private key, SKg is the second private key, and “.” is a multiplication operation.
[0691] In another possible implementation, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0692] In yet another possible implementation, the sending unit 802 is further configured to:
[0693] The key agreement algorithm capability of the second node is broadcasted, where the key agreement algorithm capability of the second node represents the key agreement algorithm supported by the second node.
[0694] In yet another possible implementation, the key agreement algorithms supported by the first node are arranged in order of priority.
[0695] In another possible implementation, the first message also includes a first fresh parameter, and the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0696] In yet another possible implementation, the processing unit 803 is further configured to:
[0697] The first authentication information is verified according to the PSK between the first node and the second node, the first key, the second message, the first fresh parameter, and the key negotiation algorithm capability of the second node.
[0698] In yet another possible implementation, the second message further includes second authentication information and a second fresh parameter, and the processing unit is further configured to:
[0699] The second authentication information is obtained through the PSK between the first node and the second node, the first key, the second fresh parameter and the first message.
[0700] In another possible implementation, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the processing unit 803 is further configured to:
[0701] A third key is obtained according to the first key, the first fresh parameter and the second fresh parameter.
[0702] In yet another possible implementation, the PSK is preconfigured, predefined, or obtained according to the first password.
[0703] In yet another possible implementation, the processing unit 803 is further configured to:
[0704] A PSK between the first node and the second node is obtained according to the first corresponding relationship.
[0705] It can be seen that the second node can store the corresponding relationship between the PSK and the first node in the form of a corresponding relationship. Therefore, the PSK between the first node and the second node can be obtained according to the corresponding relationship.
[0706] In yet another possible implementation, the processing unit is further configured to:
[0707] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0708] In one possible design, the PSK is determined based on the first password, the first key, the first fresh parameter, and the second fresh parameter.
[0709] In one possible design, the communication device 80 includes a receiving unit 801 and a sending unit 802, and the communication device 80 is used to implement the method on the first node side in the aforementioned embodiment.
[0710] In a possible implementation, the sending unit 802 is configured to send a first message to the second node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node;
[0711] The receiving unit 801 is further configured to receive a second message from the second node, where the second message includes a second key negotiation parameter, where the second key negotiation parameter is associated with a second private key and the intermediate parameter;
[0712] The processing unit 803 is configured to obtain a second key according to the second key negotiation parameter and the first private key.
[0713] In a possible implementation, the sending unit 802 is further configured to send a third message to the first node, where the third message includes the first authentication information, and the first authentication information is associated with a second key.
[0714] In a possible implementation manner, the second key is used to obtain one or more keys.
[0715] As a possible solution, the second key is used to derive an encryption key, an integrity key, or an identity authentication key, etc.
[0716] In yet another possible implementation, the receiving unit 801 is further configured to:
[0717] An association establishment message is received from the second node.
[0718] In yet another possible implementation, the communication device further includes a processing unit 803, and the processing unit 803 is configured to:
[0719] A first key agreement algorithm is selected according to the key agreement algorithm capability of the second node, wherein the key agreement algorithm capability of the second node can indicate one or more key agreement algorithms supported by the second node.
[0720] In another possible implementation, the sending unit 802 is further used to send indication information of a key agreement algorithm to the second node, where the indication information of the key agreement algorithm is used to indicate a double-base cryptographic exponential function key exchange TBPEKE algorithm.
[0721] Optionally, due to different elliptic curves used, there may be multiple TBPEKE algorithms. For example, TBPEKEe includes one or more of the following elliptic curves: an elliptic curve defined by SM2, or Curve25519, etc. Therefore, the TBPEKE algorithm may include: a TBPEKE algorithm using an elliptic curve defined by SM2, a TBPEKE algorithm using Curve25519, etc.
[0722] In yet another possible implementation, the at least one common parameter includes: a first common parameter and a second common parameter;
[0723] The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a key agreement algorithm, and the key agreement algorithm includes the TBPEKE algorithm.
[0724] In yet another possible implementation, the first public parameter and the second public parameter belong to points on the first elliptic curve.
[0725] In another possible implementation, the first public parameter is predefined, and the second public parameter is determined by the first public parameter, a first random number, and a second random number, the first random number comes from the first node, and the second random number comes from the second node.
[0726] In a possible implementation, the at least one common parameter includes at least one base point, and the at least one base point belongs to a group of order p, where p is a prime number.
[0727] Optionally, the group may be a cyclic group or a cyclic subgroup with respect to the operation on the first elliptic curve.
[0728] Optionally, the base points in some scenarios can also be replaced by generators.
[0729] In yet another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: some or all elements in a group of order p, where p is a prime number.
[0730] The base point (or generator) of the subgroup of order p is U. For a selected number d, the value range of d is [1, p-1], then dU is included in the group.
[0731] Optionally, at least one common parameter includes a base point U. Further optionally, at least one common parameter also includes V obtained by operating U, where V=dU, and the range of d is [1, p-1].
[0732] In yet another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the at least one public parameter includes: two points in a group of order p.
[0733] Optionally, the two points may be two base points. Alternatively, one of the two points is the base point, and the other is a second base point calculated based on the base point. For ease of description, this application uniformly refers to the first base point and the second base point.
[0734] In another possible implementation, when the selected key agreement algorithm is the TBPEKE algorithm, the public parameters of TBPEKE include:
[0735] A cyclic group of order prime number p, and two independent basis points U and V in the group.
[0736] It should be understood that “independent” means that U and V are two points with different values, and is not intended to limit the relationship between U and V to no correlation.
[0737] In yet another possible implementation, the sending unit 802 is further configured to send a first calculated value to the second node, where the first calculated value is related to a first random number and a first public parameter, where the first random number is determined by the first node, and the first public parameter is predefined;
[0738] The receiving unit 801 is further configured to receive a second calculated value from the second node, where the second calculated value is related to the second random number and the first public parameter;
[0739] The processing unit 803 is configured to determine the second public parameter according to a second random number and the first calculated value.
[0740] Optionally, the first common parameter is the aforementioned first base point, and the second common parameter is the aforementioned second base point. In another possible implementation, the intermediate parameter satisfies the following formula:
[0741] b=U+s*V,
[0742] Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, "*" is the elliptic curve point multiplication operation, and "+" is the elliptic curve point addition operation.
[0743] In a possible implementation, U is the first base point, and V is the second base point. Further, U and V belong to a group of order p, where p is a prime number. The operation related to the group is an operation on the first elliptic curve.
[0744] The first elliptic curve is an elliptic curve used by the selected key agreement algorithm. For example, taking the selected key agreement algorithm as the TBPEKE algorithm, the first elliptic curve may be: an elliptic curve defined by SM2, or Curve25519, etc.
[0745] In another possible implementation, the first key negotiation parameter KEt satisfies the following formula:
[0746] KEt=SKt*b,
[0747] The first key satisfies the following formula:
[0748] First key = SKg*KEt = SKg*(SKt*b) = (SKt.SKg)*(U+s*V),
[0749] The second key negotiation parameter KEg satisfies the following formula:
[0750] KEg=SKg*b,
[0751] The second key satisfies the following formula:
[0752] Second key = SKt*KEg = SKt*(SKg*b) = (SKt.SKg)*(U+s*V);
[0753] Among them, SKt is the first private key, SKg is the second private key, and “.” is a multiplication operation.
[0754] In another possible implementation, the value range of the first private key (SKt) is [1, p), and the value range of the second private key (SKg) is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
[0755] In yet another possible implementation, the receiving unit 801 is further configured to:
[0756] A key negotiation algorithm capability of the second node sent by the second node is received, where the key negotiation algorithm capability of the second node represents a key negotiation algorithm supported by the second node.
[0757] In yet another possible implementation, the key agreement algorithms supported by the first node are arranged in order of priority.
[0758] In another possible implementation, the first message also includes a first fresh parameter, and the first authentication information is associated with a pre-shared key PSK between the first node and the second node, the second key, the second message, the first fresh parameter and the key negotiation algorithm capability of the second node.
[0759] In yet another possible implementation, the second message further includes second authentication information and a second fresh parameter, where the second authentication information is associated with the PSK between the first node and the second node, the first key, the second fresh parameter, and the first message.
[0760] In yet another possible implementation, the processing unit 803 is further configured to:
[0761] verifying the second authentication information according to the PSK between the first node and the second node, the second key, the second fresh parameter, and the first message;
[0762] When the integrity of the second message and the second authentication information are verified, the first authentication information is generated.
[0763] In a possible implementation manner, the first message further includes a first fresh parameter, and the second message further includes a second fresh parameter; and the processing unit 803 is further configured to:
[0764] A fourth key is obtained according to the second key, the first fresh parameter and the second fresh parameter.
[0765] In a possible implementation manner, the PSK is preconfigured, predefined, or obtained according to the first password.
[0766] In yet another possible implementation, the processing unit 803 is further configured to:
[0767] The PSK between the first node and the second node is obtained according to the second corresponding relationship.
[0768] In yet another possible implementation, the processing unit 803 is further configured to:
[0769] A PSK between the first node and the second node is determined according to the first password, a first fresh parameter, and a second fresh parameter.
[0770] See also Fig. 9 , Fig. 9 It is a schematic diagram of the structure of a possible communication device 90 provided in an embodiment of the present application.
[0771] The communication device 90 can be an independent device such as a vehicle, a drone, a robot, or a device included in an independent device, such as a chip, a software module, or an integrated circuit. The communication device 90 may include at least one processor 901 and a communication interface 902. Optionally, it may also include at least one memory 903. Further optionally, it may also include a connection line 904, wherein the processor 901, the communication interface 902 and / or the memory 903 are connected via the connection line 904, and communicate with each other via the connection line 904 to transmit control and / or data signals. Optionally, the communication device 90 may also include one or more of a perception module, an output module, etc. (not shown in the figure).
[0772] in:
[0773] (1) The processor 901 is a module that performs arithmetic operations and / or logical operations, and may specifically include one or more of the following devices: CPU, MCU, GPU, MPU, ASIC, FPGA, CPLD, coprocessor (to assist the central processor in completing corresponding processing and applications), and / or NPU, etc.
[0774] (2) The communication interface 902 may be used to provide information input or output for the at least one processor. In some possible scenarios, the communication interface 902 may include an interface circuit. And / or, the communication interface 902 may be used to receive data sent externally and / or send data to the outside. For example, the communication interface 902 may include a wired link interface such as an Ethernet cable, or may be a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 902 may also include a transmitter (such as a radio frequency transmitter, an antenna, etc.) coupled to the interface, or a receiver, etc.
[0775] Optionally, if the communication device 90 is an independent device, the communication interface 902 may include a receiver and a transmitter. The receiver and the transmitter may be the same component or different components. When the receiver and the transmitter are the same component, the component may be referred to as a transceiver.
[0776] Optionally, if the communication device 90 is a chip or a circuit, the communication interface 902 may include an input interface and an output interface, and the input interface and the output interface may be the same interface, or may be different interfaces.
[0777] Optionally, the function of the communication interface 902 may be implemented by a transceiver circuit or a dedicated transceiver chip. The processor 901 may be implemented by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.
[0778] (3) The memory 903 is used to provide a storage space, in which data such as an operating system and a computer program can be stored. The memory 903 can be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), or a portable read only memory (CD-ROM), etc., or a combination of multiple thereof.
[0779] The functions and actions of the modules or units in the communication device 90 listed above are only for illustrative purposes.
[0780] Each functional unit in the communication device 90 can be used to implement the aforementioned communication method, for example Figure 4 , Figure 6 or Figure 7 In order to avoid redundancy, the detailed description is omitted here.
[0781] Optionally, the processor 901 may be a processor specifically used to execute the aforementioned method (for convenience of distinction, referred to as a dedicated processor), or may be a processor that executes the aforementioned method by calling a computer program (for convenience of distinction, referred to as a dedicated processor). Optionally, the at least one processor may include both a dedicated processor and a general-purpose processor.
[0782] Optionally, in the case where the communication device 90 includes at least one memory 903 , if the processor 901 implements the aforementioned communication method by calling a computer program, the computer program may be stored in the memory 903 .
[0783] The present application also provides a chip system, which includes a processor and a communication interface, wherein the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor. The chip system is used to implement the aforementioned communication method, for example Figure 4 , Figure 6 or Figure 7 The method described.
[0784] The embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on at least one processor, the aforementioned communication method is implemented, for example Figure 4 , Figure 6 or Figure 7 The method described.
[0785] The present application also provides a computer program product, which includes computer instructions, and the computer instructions are used to implement the aforementioned communication method, for example Figure 4 , Figure 6 or Figure 7 The method described.
[0786] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0787] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items.
[0788] For example, at least one of a, b, or c can be represented by: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0789] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" used in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first device and the second device are only for the convenience of description, and do not represent the difference in structure, importance, etc. between the first device and the second device. In some embodiments, the first device and the second device can also be the same device.
[0790] As used in the above embodiments, the term "when" may be interpreted to mean "if" or "when" depending on the context.
[0791] "After" or "in response to determining..." or "in response to detecting...". The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.
[0792] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
Claims
1. A communication method, characterized in that: The method comprises: Sending a first message to the second node, where the first message includes a first key negotiation parameter, where the first key negotiation parameter is associated with a first private key and an intermediate parameter, where the intermediate parameter is associated with a security parameter and at least one public parameter, where the security parameter is a first password or a pre-shared key PSK between the first node and the second node, and where the first password is an agreed access password between the first node and the second node; receiving a second message from the second node, the second message comprising a second key negotiation parameter, the second key negotiation parameter being associated with a second private key and the intermediate parameter; A second key is obtained according to the second key negotiation parameter and the first private key.
2. The method according to claim 1, characterized in that The second key is used to obtain one or more of an encryption key, an integrity key or an identity authentication key.
3. The method according to claim 1, characterized in that The method further comprises: A third message is sent to the first node, where the third message includes first authentication information, where the first authentication information is associated with the second key.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: An association establishment message is received from the second node.
5. The method according to any one of claims 1 to 4, characterized in that: Before sending the first message to the second node, the method further includes: Selecting a first key agreement algorithm according to the key agreement algorithm capability of the second node; Send indication information of a first key agreement algorithm to the second node, where the indication information of the first key agreement algorithm is used to indicate a double-base cryptographic exponential function key exchange TBPEKE algorithm.
6. The method according to any one of claims 1 to 5, characterized in that: The at least one common parameter includes a first common parameter and a second common parameter; The first public parameter and the second public parameter are related to the first elliptic curve, the first elliptic curve is an elliptic curve corresponding to a first key agreement algorithm, and the first key agreement algorithm is a TBPEKE algorithm.
7. The method according to claim 6, characterized in that The method further comprises: Sending a first calculated value to the second node, the first calculated value being related to a first random number and a first public parameter, the first random number being determined by the first node, and the first public parameter being predefined; receiving a second calculated value from the second node, the second calculated value being related to a second random number and the first public parameter; The second public parameter is determined according to the second random number and the first calculated value.
8. The method according to any one of claims 5 to 7, characterized in that: The first key agreement algorithm is a key agreement algorithm supported by the first node, and the first key agreement algorithm has the highest priority among the key agreement algorithms supported by the second node.
9. The method according to any one of claims 5 to 8, characterized in that: The intermediate parameters satisfy the following formula: b=U+s*V, Among them, b is the intermediate parameter, U and V are the at least one public parameter, s is the security parameter, * is the elliptic curve point multiplication operation, and + is the elliptic curve point addition operation.
10. The method according to any one of claims 5 to 9, characterized in that: U is the first base point, V is the second base point, U and V belong to a cyclic group of order p, where p is a prime number.
11. The method according to claim 9 or 10, characterized in that: The first key negotiation parameter KEt satisfies the following formula: KEt=SKt*b, The first key satisfies the following formula: First key = SKg*KEt, The second key negotiation parameter KEg satisfies the following formula: KEg=SKg*b, The second key satisfies the following formula: Second key = SKt*KEg; Among them, SKt is the first private key, and SKg is the second private key.
12. The method according to any one of claims 5 to 11, characterized in that: The value range of the first private key is [1, p), and the value range of the second private key is [1, p), where p is the order of the elliptic curve used by the TBPEKE algorithm.
13. The method according to any one of claims 1 to 12, characterized in that: Before sending the first message to the second node, the method further includes: A key negotiation algorithm capability of the second node sent by the second node is received, where the key negotiation algorithm capability of the second node represents a key negotiation algorithm supported by the second node.
14. The method according to claim 13, characterized in that The key agreement algorithms supported by the second node are arranged in order of priority.
15. The method according to any one of claims 1 to 14, characterized in that: The first message further includes a first fresh parameter, and the first authentication information is associated with the PSK, the second key, the second message, the first fresh parameter, and a key agreement algorithm capability of the second node.
16. The method according to claim 3, characterized in that The second message further includes second authentication information and a second fresh parameter, the second authentication information being associated with the PSK, the first key, the second fresh parameter, and the first message; The method further comprises: verifying the second authentication information according to the PSK, the second key, the second fresh parameter, and the first message; When the integrity of the second message and the second authentication information are verified, the first authentication information is generated.
17. A communication device, characterized in that: The communication device comprises a receiving unit, a sending unit and a processing unit, and the communication device is used to implement the method according to any one of claims 1 to 16.
18. A communication device, characterized in that: The communication device includes a processor and a communication interface, wherein the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor, and the processor is used to call a computer program stored in a memory to implement the method described in any one of claims 1-16.
19. A chip system, characterized in that: The chip system includes at least one processor and a communication interface, the communication interface is used to send and / or receive data, and the at least one processor is used to call a computer program stored in at least one memory, so that the chip system implements the method described in any one of claims 1-16.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 16.
21. A vehicle, characterized in that: The vehicle comprises a first node, wherein: The first node includes the communication device according to claim 17 or 18, or the first node is a node implementing the method according to any one of claims 1-16.
Citation Information
Patent Citations
System and method for configuring a wireless device for wireless network access
CN109923830A
Secure access method and device
CN112740733A
Communication method and device
CN113545115A