Key negotiation method and system and computer equipment
By introducing post-quantum cryptography algorithms and physically non-cloning response values, the security problem of car digital keys in a quantum computing environment is solved, key negotiation resistant to quantum attacks is achieved, and the security and computational efficiency of session keys are improved.
Patent Information
- Application Number
- CN202511345216.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-11-11
AI Technical Summary
Existing car digital keys are vulnerable to quantum attacks when negotiating session keys with the vehicle. Furthermore, the security of the ECDHE algorithm is difficult to guarantee in a quantum computing environment. Session keys are easily leaked, computational overhead is high, and user experience is negatively impacted.
Key negotiation is performed using post-quantum cryptography algorithms (such as the Kyber algorithm). The post-quantum public and private keys are used for encapsulation operations, and the session key is updated in combination with vehicle driving information. Physically unclonable response values are used to enhance security, replacing the traditional ECDHE algorithm.
It improves the security of session keys, avoids key leakage, reduces computational overhead, meets the requirements for resistance to quantum attacks, and enhances the user experience.
Smart Images

Figure CN120934754A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle information security technology, and in particular to a key negotiation method, system and computer equipment. Background Technology
[0002] A car digital key is a system that uses modern wireless communication technology to digitize the functions of a traditional physical car key, enabling vehicle unlocking, starting, and authorized control via smartphones, smartwatches, smart cards, or other wearable devices. Car digital keys are gradually replacing traditional physical keys and have become a core security component of intelligent connected vehicles.
[0003] Current technologies typically employ ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) for session key negotiation between car digital keys and the vehicle. This method uses elliptic curve cryptography (ECC) to exchange temporary keys. However, with the development of quantum computing, Shor's algorithm can break ECC in polynomial time, exposing ECDHE to quantum attack risks. Therefore, the security of the negotiated session key is difficult to guarantee in current technologies, posing a risk of session key leakage. Summary of the Invention
[0004] Therefore, it is necessary to provide a key negotiation method, system, and computer device to address the aforementioned technical problems.
[0005] In a first aspect, this application provides a key negotiation method applied to a vehicle key. The method includes: if the vehicle key and the vehicle terminal are not connected for the first time, obtaining first vehicle driving information and a post-quantum public key; the first vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle terminal last connected; performing encapsulation operations based on the post-quantum public key and a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key; transmitting the key encapsulation information to the vehicle terminal so that the vehicle terminal obtains a second key based on the post-quantum private key and the key encapsulation information, and updates a second session key based on the second key and the first vehicle driving information; and updating a first session key based on the first key and the first vehicle driving information.
[0006] In one embodiment, the vehicle key is provided with a first identifier; the vehicle terminal is provided with a second identifier; the first identifier and the second identifier are used to indicate the number of connections between the vehicle key and the vehicle terminal; updating the first session key according to the first key and the first vehicle driving information includes: obtaining the first identifier information corresponding to the first identifier; performing a hash operation according to the first vehicle driving information and the first identifier information to obtain a first hash value; updating the first session key according to the first hash value and the first key through a key derivation algorithm.
[0007] In one embodiment, the second session key is updated by the vehicle terminal using a key derivation algorithm based on the second hash value and the second key; the second hash value is generated by the vehicle terminal through hash operation based on the first vehicle driving information and the second identifier information corresponding to the second identifier.
[0008] In one embodiment, the method further includes: acquiring second vehicle driving information transmitted by the vehicle terminal when the vehicle is in a preset vehicle state; the second vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle terminal are connected this time; sending a successful reception message to the vehicle terminal and updating the first identifier information corresponding to the first identifier; so that the vehicle terminal updates the second identifier information corresponding to the second identifier according to the successful reception message; the first identifier information corresponding to the first identifier is the same as the second identifier information corresponding to the second identifier.
[0009] In one embodiment, obtaining the second vehicle driving information transmitted by the vehicle terminal in a preset vehicle state includes: obtaining encrypted driving information transmitted by the vehicle terminal in a preset vehicle state; the encrypted driving information is obtained by encrypting the second vehicle driving information by the vehicle terminal based on a second session key; and decrypting the encrypted driving information according to the first session key to obtain the second vehicle driving information.
[0010] In one embodiment, the method further includes: if the vehicle key and the vehicle terminal are connected for the first time, obtaining and storing the post-quantum public key transmitted by the vehicle terminal; the vehicle terminal stores a post-quantum private key; performing encapsulation operations based on the post-quantum public key and a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key; transmitting the key encapsulation information to the vehicle terminal so that the vehicle terminal obtains a second key based on the post-quantum private key and the key encapsulation information, and generates a second session key based on the second key; and generating a first session key based on the first key.
[0011] In one embodiment, the method further includes: acquiring encrypted response information transmitted by the vehicle terminal, and decrypting the encrypted response information using a first key to obtain a physically unclonable response value; the encrypted response information is generated by the vehicle terminal based on the second key and the physically unclonable response value of the vehicle terminal communication module, and a second session key is generated based on the second key and the physically unclonable response value; a first session key is generated based on the first key and the physically unclonable response value.
[0012] In one embodiment, the method further includes: if the vehicle key is connecting to the vehicle for the first time, obtaining a list of post-quantum algorithms transmitted by the vehicle; and determining a post-quantum encapsulation algorithm based on the list of post-quantum algorithms.
[0013] Secondly, this application also provides a key negotiation method, which is applied to a vehicle-side device. The method includes: if the vehicle key and the vehicle-side device are not connected for the first time, obtaining a post-quantum private key and first vehicle driving information; the first vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle-side device were last connected; obtaining key encapsulation information transmitted by the vehicle key; the key encapsulation information is obtained by the vehicle key based on the post-quantum public key and a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key, and updating a first session key based on the first key and the first vehicle driving information; obtaining a second key based on the post-quantum private key and the key encapsulation information; and updating a second session key based on the second key and the first vehicle driving information.
[0014] In one embodiment, the vehicle key is provided with a first identifier; the vehicle terminal is provided with a second identifier; the first identifier and the second identifier are used to indicate the number of connections between the vehicle key and the vehicle terminal; updating the second session key according to the second key and the first vehicle driving information includes: obtaining the second identifier information corresponding to the second identifier; performing a hash operation according to the first vehicle driving information and the second identifier information to generate a second hash value; updating the second session key according to the second hash value and the second key through a key derivation algorithm.
[0015] In one embodiment, the first session key is updated by the vehicle key using a key derivation algorithm based on the first hash value and the first key; the first hash value is generated by the vehicle key through a hash operation based on the first vehicle driving information and the first identifier information corresponding to the first identifier.
[0016] In one embodiment, the method further includes: in a preset vehicle state, acquiring second vehicle driving information; the second vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle terminal are connected this time; sending the second vehicle driving information to the vehicle key, so that the vehicle key sends a successful reception message to the vehicle terminal and updates the first identifier information corresponding to the first identifier; acquiring the successful reception message and updating the second identifier information corresponding to the second identifier; the first identifier information corresponding to the first identifier is the same as the second identifier information corresponding to the second identifier.
[0017] In one embodiment, sending the second vehicle driving information to the vehicle key includes: encrypting the second vehicle driving information according to the second session key to obtain encrypted driving information; transmitting the encrypted driving information to the vehicle key; and enabling the vehicle key to decrypt the encrypted driving information according to the first session key to obtain the second vehicle driving information.
[0018] In one embodiment, the method further includes: if the vehicle key and the vehicle terminal are connected for the first time, generating a post-quantum public key and a post-quantum private key based on a post-quantum key generation algorithm, and storing them; transmitting the post-quantum public key to the vehicle key so that the vehicle key stores the post-quantum public key; obtaining key encapsulation information transmitted by the vehicle key; the key encapsulation information is obtained by the vehicle key based on the post-quantum public key, performing encapsulation operations based on a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key, and generating a first session key based on the first key; obtaining a second key based on the post-quantum private key and the key encapsulation information; and generating a second session key based on the second key.
[0019] In one embodiment, the method further includes: generating encrypted response information based on the second key and the physically unclonable response value of the vehicle-side communication module, and transmitting the encrypted response information to the vehicle key; enabling the vehicle key to decrypt the encrypted response information using the first key to obtain the physically unclonable response value, and generating a first session key based on the first key and the physically unclonable response value; and generating a second session key based on the second key and the physically unclonable response value.
[0020] In one embodiment, the method further includes: if the vehicle key is connecting to the vehicle for the first time, obtaining a list of post-quantum algorithms; transmitting the list of post-quantum algorithms to the vehicle key; and enabling the vehicle key to determine a post-quantum encapsulation algorithm based on the list of post-quantum algorithms.
[0021] Thirdly, this application also provides a key negotiation system, which includes: a vehicle key and a vehicle terminal; if the vehicle key and the vehicle terminal are not connected for the first time, the vehicle key obtains first vehicle driving information and a post-quantum public key; based on the post-quantum public key, it performs encapsulation operations based on a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key; it transmits the key encapsulation information to the vehicle terminal, and updates a first session key based on the first key and the first vehicle driving information; the first vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle terminal last connected; the vehicle terminal obtains a post-quantum private key and the first vehicle driving information; it obtains the key encapsulation information transmitted by the vehicle key; it obtains a second key based on the post-quantum private key and the key encapsulation information; and it updates a second session key based on the second key and the first vehicle driving information.
[0022] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any one of the key negotiation methods described in the first and second aspects above.
[0023] In the aforementioned key negotiation method, system, and computer equipment, if the vehicle key and the vehicle terminal are not connecting for the first time, the vehicle key obtains the first vehicle driving information and the post-quantum public key. Based on the post-quantum public key, a encapsulation operation is performed using a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key. The vehicle key transmits the key encapsulation information to the vehicle terminal. The vehicle terminal obtains a second key based on the post-quantum private key and the key encapsulation information, and updates the second session key based on the second key and the first vehicle driving information. After generating the first key, the vehicle key updates the first session key based on the first key and the first vehicle driving information. The post-quantum key has the characteristic of resisting quantum attacks. By transmitting the first and second keys through the post-quantum key and combining them with the first vehicle driving information to update the first and second session keys, the security of negotiating the session key is improved, and leakage of the session key is avoided. Attached Figure Description
[0024] Figure 1 This is a schematic diagram illustrating the application environment of the key negotiation method in one embodiment;
[0025] Figure 2 This is a flowchart illustrating a key negotiation method applied to a vehicle key in one embodiment;
[0026] Figure 3 This is a flowchart illustrating the first session key update method in one embodiment;
[0027] Figure 4This is a flowchart illustrating a method for updating identification information in one embodiment;
[0028] Figure 5 This is a flowchart illustrating a key negotiation method applied to a vehicle key in another embodiment;
[0029] Figure 6 This is a flowchart illustrating a key negotiation method applied to the vehicle side in one embodiment;
[0030] Figure 7 This is a flowchart illustrating the second session key update method in one embodiment;
[0031] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0033] A car digital key is a system that digitizes the functions of a traditional physical car key using modern wireless communication technology, enabling vehicle unlocking, starting, and authorized control via smartphones, smartwatches, smart cards, or other wearable devices. Car digital keys have gradually replaced traditional physical keys, becoming a core security component of intelligent connected vehicles. Key negotiation between the car digital key and the vehicle relies on short-range wireless communication technology and cryptographic security protocols. Short-range wireless communication technologies include Near Field Communication (NFC), Bluetooth BLE, and Ultra Wideband (UWB). Current mainstream digital key specifications (such as the CCC Alliance and ICCE Alliance standards) require the security of key storage and computation to be ensured through a Secure Execution Environment (SE) or Trusted Execution Environment (TEE), and the use of asymmetric encryption systems (such as RSA, SM2, and ECDSA) for authentication and key negotiation.
[0034] Currently, in related technologies, ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) is typically used for session key negotiation between the car digital key and the vehicle. It achieves temporary key exchange through Elliptic Curve Cryptography (ECC). However, with the development of quantum computing technology, Shor's algorithm can break ECC in polynomial time, making ECDHE vulnerable to quantum attacks. Furthermore, directly increasing the ECC key length, for example from 256 bits to 512 bits, to improve resistance to quantum attacks leads to a significant increase in computational overhead and poor performance. The computational complexity of the ECC algorithm is exponentially related to the key length. As the key length increases, the number of iterations for point multiplication surges, while the computing power and memory capacity of in-vehicle devices are limited, making it difficult to support the real-time requirements of high-intensity ECC operations. In environments with limited in-vehicle hardware resources, the latency of the key negotiation process may exceed system timing requirements, affecting user experience. Therefore, in current related technologies, the security of the negotiated session key is difficult to guarantee, posing a risk of session key leakage, and generating the session key incurs high computational overhead.
[0035] The embodiments of this application are applied to, for example, Figure 1 In the application environment shown, the key negotiation system includes: vehicle key and vehicle terminal.
[0036] A vehicle key, also known as a digital car key, is implemented by deploying a corresponding application on a smartphone, smartwatch, smart card, or other wearable device. A car key enables remote control of the vehicle. For example, it allows for contactless unlocking and starting, as well as remote vehicle control. Contactless unlocking and starting means that when a user approaches the vehicle with an authorized key, the vehicle automatically recognizes the key and unlocks; and after entering the vehicle, it can be started without a physical key. Remote vehicle control allows users to remotely unlock / lock the vehicle, remotely start the air conditioning / seat heating, remotely check vehicle status, and remotely schedule charging, among other functions. It's important to understand that the vehicle key control described above is just an example; in actual applications, it can include many more control functions.
[0037] The vehicle-side component can be the vehicle itself, with the vehicle key connecting to its communication module. This communication module can be any wireless communication module, such as NFC, Bluetooth, or UWB.
[0038] During key negotiation between the vehicle key and the vehicle terminal, when the connection is first established, the vehicle terminal generates and stores a post-quantum public key and a post-quantum private key based on a post-quantum key generation algorithm. The vehicle terminal transmits the post-quantum public key to the vehicle key, which then stores it. The vehicle key uses the post-quantum public key and a post-quantum encapsulation algorithm to perform encapsulation operations, obtaining key encapsulation information and a first key, which it then transmits to the vehicle terminal. The vehicle terminal uses the post-quantum private key to decapsulate the key encapsulation information, obtaining a second key. Based on the second key and the physically unclonable response value of the vehicle terminal's communication module, it generates encrypted response information and sends it to the vehicle key. The vehicle key decrypts the encrypted response information using the first key, obtaining a physically unclonable response value; based on the first key and the physically unclonable response value, it generates a first session key. The vehicle terminal generates a second session key based on the second key and the physically unclonable response value.
[0039] When the vehicle key and the vehicle terminal are not connecting for the first time, the vehicle key obtains the first vehicle driving information and the post-quantum public key; based on the post-quantum public key, it performs encapsulation operations using the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key; it transmits the key encapsulation information to the vehicle terminal and updates the first session key based on the first key and the first vehicle driving information. The vehicle terminal obtains the post-quantum private key and the first vehicle driving information; it obtains the key encapsulation information transmitted by the vehicle key; based on the post-quantum private key and the key encapsulation information, it obtains the second key; and based on the second key and the first vehicle driving information, it updates the second session key.
[0040] In one embodiment, such as Figure 2 As shown, a key negotiation method is provided, which is applied to vehicle keys and includes the following steps:
[0041] Step 201: Obtain the first vehicle's driving information and the subsequent quantum public key.
[0042] After the vehicle key establishes a communication connection with the vehicle terminal, the first step is to determine whether this is the first connection. This connection can be established between the vehicle key and the vehicle terminal's communication module. The connection method can be NFC, Bluetooth, or UWB (Ultra-Wideband). When the connection method is NFC, the vehicle terminal's communication module is the NFC module; when the connection method is Bluetooth, the vehicle terminal's communication module is the Bluetooth module; and when the connection method is UWB, the vehicle terminal's communication module is the UWB module. This implementation does not impose specific restrictions on the connection method, as long as wireless connectivity is achieved. To determine whether this is the first connection, the vehicle key can access historical connection records. These records can be used to determine if it's the first time connecting. For example, the historical connection record can be the number of connections corresponding to a vehicle terminal identifier; for the first connection, this number is 0. Alternatively, the historical connection record can be a connection log for each connection. The presence of a corresponding vehicle terminal identifier in the connection log determines whether it's the first connection; if no corresponding vehicle terminal identifier exists, it's considered the first connection.
[0043] When it is determined that the connection between the vehicle key and the vehicle terminal is not the first time, the first vehicle driving information and the subsequent quantum public key are obtained. The first vehicle driving information can be the driving information corresponding to the vehicle during the previous connection between the vehicle key and the vehicle terminal; it can also be the driving information corresponding to the vehicle during the connection two days before that; or it can be a combination of the driving information corresponding to the previous two connections between the vehicle key and the vehicle terminal. This embodiment does not specifically limit the first vehicle driving information, only requiring that the number of connections corresponding to the first vehicle driving information corresponds to the number of connections during the current connection. Preferably, the first vehicle driving information is the driving information corresponding to the vehicle during the previous connection between the vehicle key and the vehicle terminal. Before the previous connection between the vehicle key and the vehicle terminal is disconnected, the vehicle terminal will send the driving information corresponding to the vehicle during the previous connection to the vehicle key. The vehicle key stores the first vehicle driving information, and the vehicle terminal also stores the first vehicle driving information. It is understood that during vehicle operation, the vehicle terminal will collect vehicle driving information in real time through the vehicle CAN bus or OBD interface and store it in a secure storage area. Before the vehicle key and the vehicle terminal disconnect, the collected vehicle driving information will be transmitted to the vehicle key. The vehicle driving information includes one or more of the following: vehicle location coordinates, driving route, average speed, timestamp, mileage data, average fuel consumption, and average electricity consumption. This vehicle driving information can also be replaced with vehicle control information or driving mode adjustment information, such as vehicle air conditioning control information. The post-quantum public key is generated by the vehicle terminal based on a post-quantum key generation algorithm when the vehicle key and the vehicle device first connect. The vehicle terminal stores the post-quantum private key and transmits the post-quantum public key to the vehicle key, which then stores the post-quantum public key. The post-quantum key generation algorithm can be a lattice-based cryptography (PQC) algorithm, which generates post-quantum key pairs resistant to quantum attacks. The PQC algorithm can be the NTRU algorithm, the Kyber algorithm, or the SABER algorithm, etc., and this embodiment does not impose specific limitations. Preferably, the Kyber algorithm is used.
[0044] Step 202: Based on the post-quantum public key, perform encapsulation operations using the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key.
[0045] After obtaining the post-quantum public key, the vehicle key performs a post-quantum encapsulation algorithm based on the post-quantum public key to encapsulate the key, thereby obtaining the key encapsulation information and the first key. The post-quantum encapsulation algorithm can be a key encapsulation mechanism algorithm based on quantum computing attack resistance. The post-quantum encapsulation algorithm can include one or more of the KyberKEM algorithm, NTRUKEM algorithm, and SABERKEM algorithm. The preferred post-quantum encapsulation algorithm is the KyberKEM algorithm. Specifically, using the post-quantum public key, a random symmetric key and a corresponding encapsulated ciphertext are generated based on the Encapsulate(QPK) function; the random symmetric key is also the first key; the corresponding encapsulated ciphertext is the key encapsulation information. This key encapsulation information can be decapsulated using the post-quantum private key to obtain a second key that is identical to the first key. The Encapsulate(QPK) function is one of the core functions of the Key Encapsulation Mechanism (KEM), where QPK is the post-quantum public key.
[0046] Step 203: Transmit the key encapsulation information to the vehicle.
[0047] After generating the key encapsulation information, the vehicle key needs to transmit the key encapsulation information to the vehicle.
[0048] After receiving the key encapsulation information, the vehicle-mounted device retrieves its stored post-quantum private key. Based on the post-quantum private key and the key encapsulation information, the vehicle-mounted device obtains the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information to obtain the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information using the `Decapsulate(QSK, C)` function. Here, `QSK` is the post-quantum private key, and `C` is the key encapsulation information. `Decapsulate(QSK, C)` is another core function of the Key Encapsulation Mechanism (KEM), used in conjunction with the `Encapsulate(QPK)` function. At this point, the first key and the second key are symmetric keys, meaning they are identical.
[0049] After obtaining the second key through decapsulation, the vehicle-side device updates the second session key based on the second key and the first vehicle driving information. The second session key is the encryption key used by the vehicle-side device when the vehicle key and the vehicle-side device interact. The vehicle-side device generates the second session key upon the first connection between the vehicle key and the vehicle-side device, and updates it using the second key and the first vehicle driving information on subsequent connections. Specifically, the second session key can be generated using a key derivation algorithm based on the second key and the first vehicle driving information, and the original second session key can be updated. The key derivation function (KDF) is a type of cryptographic algorithm whose core function is to securely generate one or more encryption keys from a secret value (such as a master key, shared key, or cipher). Examples of key derivation algorithms include HKDF, PBKDF, and Argon2. This implementation does not specifically limit the key derivation algorithm; it only needs to be able to generate the second session key based on the second key and the first vehicle driving information.
[0050] Step 204: Update the first session key based on the first key and the first vehicle driving information.
[0051] After generating the first key, the vehicle key needs to update the first session key based on the first key and the first vehicle driving information. The first session key is the encryption key used by the vehicle key when interacting with the vehicle. It is generated when the vehicle key first connects to the vehicle and updates itself using the first key and the first vehicle driving information during subsequent connections. Specifically, the first session key can be generated using a key derivation algorithm based on the first key and the first vehicle driving information, and the original first session key can be updated accordingly. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first key and the first vehicle driving information. Specifically, the key derivation algorithm used to update the first session key is the same as the key derivation algorithm used to update the second session key. It is understandable that since the first key and the second key are symmetric keys, that is, the first key and the second key are exactly the same; and the key derivation algorithm used to update the first session key is the same as the key derivation algorithm used to update the second session key, therefore, the updated first session key and the updated second session key are exactly the same.
[0052] Once the vehicle key obtains the first session key and the vehicle terminal obtains the second session key, they exchange information using these keys during the current connection. Understandably, when the vehicle key and vehicle terminal disconnect and reconnect, they need to update the first and second session keys using the aforementioned key negotiation method. That is, the updated first and second session keys can only be used as session keys for information exchange during the current connection.
[0053] In this embodiment, the vehicle key acquires first vehicle driving information and a post-quantum public key. Based on the post-quantum public key, a post-quantum encapsulation algorithm is used to perform encapsulation operations, yielding key encapsulation information and a first key. The vehicle key transmits the key encapsulation information to the vehicle. The vehicle obtains a second key based on the post-quantum private key and the key encapsulation information, and updates the second session key based on the second key and the first vehicle driving information. After generating the first key, the vehicle key updates the first session key based on the first key and the first vehicle driving information. The post-quantum key possesses resistance to quantum attacks. Transmitting the first and second keys via the post-quantum key, and combining it with the first vehicle driving information to update the first and second session keys, improves the security of session key negotiation and prevents session key leakage. Furthermore, using the post-quantum key pair and the post-quantum encapsulation algorithm for session key negotiation reduces the computational load during session key negotiation.
[0054] This embodiment replaces the core key negotiation algorithm from the elliptic curve Diffie-Hellman (ECDHE) method with the lattice-based post-quantum cryptography algorithm Kyber. This algorithm is built upon the modular lattice mathematical problem, and its security strength can withstand Shor's algorithm attack, fundamentally eliminating the threat of quantum computing to the session key. By directly replacing the cryptographic primitives, no modification to the overall architecture of the digital key system is required; only the Kyber algorithm library (PQC SDK) needs to be integrated into the vehicle chip to achieve quantum attack resistance.
[0055] In one embodiment, such as Figure 3 As shown, a method for updating the first session key is provided, which specifically includes the following steps:
[0056] The vehicle key is equipped with a first identifier; the vehicle terminal is equipped with a second identifier; the first identifier and the second identifier are used to indicate the number of times the vehicle key and the vehicle terminal are connected.
[0057] When the vehicle key first connects to the vehicle, the vehicle key sets a first identifier, and the vehicle sets a second identifier. Both the first and second identifiers are used to record the number of connections between the vehicle key and the vehicle. For example, when the vehicle key first connects to the vehicle, the vehicle key sets the first identifier and sets the corresponding first identifier information to 0. When the connection is broken, the first identifier information is incremented by 1, and so on, thus recording the number of connections between the vehicle key and the vehicle. When the vehicle key first connects to the vehicle, the vehicle sets the second identifier and sets the corresponding second identifier information to 0. When the connection is broken, the second identifier information is incremented by 1, and so on, thus recording the number of connections between the vehicle key and the vehicle. The first and second identifier information are completely identical.
[0058] Step 301: Obtain the first identifier information corresponding to the first identifier.
[0059] When updating the first session key, the first identifier information corresponding to the first identifier of the vehicle key is first obtained. This first identifier information records which connection the vehicle key has made to the vehicle. For example, if this is the 10th connection between the vehicle key and the vehicle, the first identifier information is 10; if this is the 340th connection, the first identifier information is 340.
[0060] Step 302: Perform a hash operation based on the first vehicle driving information and the first identification information to obtain the first hash value.
[0061] After obtaining the first identification information, the first vehicle driving information and the first identification information are input into a hash algorithm to obtain the first hash value. When the first vehicle driving information is stored in the vehicle key, it is stored in binary data form. When the first vehicle driving information includes multiple parameters, such as driving route, average speed, and average fuel consumption, the binary data corresponding to the driving route, average speed, and average fuel consumption are concatenated sequentially, then concatenated with the first identification information, and input into the hash algorithm to obtain the first hash value. The hash algorithm can be any method capable of performing hash operations; this embodiment does not impose a specific limitation. For example, the hash algorithm can be the SHA256 algorithm.
[0062] Step 303: Update the first session key based on the first hash value and the first key using a key derivation algorithm.
[0063] After obtaining the first hash value, the first hash value and the first key are input into the key derivation algorithm to generate the first session key and update the original first session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first hash value and the first key.
[0064] This embodiment introduces a first identifier as a dynamic parameter, enabling the key derivation process to have a time-series correlation. By using hash operations to bind the first vehicle driving information with the first identifier information, a dual dynamic parameter constraint is formed, thereby further enhancing the security of the session key.
[0065] In one embodiment, the second session key is updated by the vehicle-side using a key derivation algorithm based on the second hash value and the second key. The second hash value is generated by the vehicle-side through a hash operation based on the first vehicle driving information and the second identifier information corresponding to the second identifier.
[0066] When updating the second session key, the vehicle terminal first obtains the second identifier information corresponding to the second identifier. This second identifier information records the number of times the vehicle key has connected to the vehicle terminal. For example, if this is the 10th connection, the second identifier information is 10; if it's the 340th connection, it's 340. After obtaining the second identifier information, the vehicle terminal inputs the first vehicle driving information and the second identifier information into a hash algorithm to obtain the second hash value. The first vehicle driving information is stored in the vehicle terminal as binary data. When the first vehicle driving information includes multiple parameters, such as driving route, average speed, and average fuel consumption, the binary data corresponding to the driving route, average speed, and average fuel consumption are concatenated sequentially, then concatenated with the second identifier information, and input into the hash algorithm to obtain the second hash value. It is understood that the hash algorithm used to generate the first hash value is the same as the hash algorithm used to generate the second hash value. The hash algorithm can be any method capable of performing hash operations; this embodiment does not impose specific limitations. For example, the hash algorithm can be the SHA256 algorithm. After obtaining the second hash value, the vehicle-side inputs the second hash value and the second key into a key derivation algorithm to generate a second session key and update the original second session key. Understandably, the key derivation algorithm for updating the first session key is the same as the key derivation algorithm for updating the second session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm; it only needs to be able to generate the second session key based on the second hash value and the second key.
[0067] Understandably, since the first and second identifiers are identical, the hash algorithm used to generate the first hash value is the same as the hash algorithm used to generate the second hash value, the first and second keys are completely identical, and the key derivation algorithm used to update the first session key is the same as the key derivation algorithm used to update the second session key. Therefore, the final updated first session key and the updated second session key are also completely identical.
[0068] This embodiment introduces a second identifier as a dynamic parameter, giving the key derivation process a time-series correlation. By using hash operations to bind the first vehicle driving information with the second identifier information, a dual dynamic parameter constraint is formed, thereby further enhancing the security of the session key.
[0069] In one embodiment, such as Figure 4 As shown, a method for updating identification information is provided, which specifically includes the following steps:
[0070] Step 401: Obtain the second vehicle driving information transmitted by the vehicle terminal when the vehicle is in a preset vehicle state.
[0071] When the vehicle is in a preset vehicle state, the vehicle terminal acquires second vehicle driving information. This second vehicle driving information can be the driving information corresponding to the vehicle during the current connection between the vehicle key and the vehicle terminal; it can also be the driving information corresponding to the vehicle during the previous connection between the vehicle key and the vehicle terminal; or it can be a combination of driving information from two consecutive connections between the vehicle key and the vehicle terminal. This embodiment does not specifically limit the second vehicle driving information, only requiring a correspondence between the number of connections corresponding to the first vehicle driving information and the number of connections corresponding to the second vehicle driving information. Preferably, the second vehicle driving information is the driving information corresponding to the vehicle during the current connection between the vehicle key and the vehicle terminal. The preset vehicle state can be the vehicle being parked and ignited, the vehicle being parked and locked, etc., that is, the preset vehicle state is any action that is about to disconnect the current connection between the vehicle key and the vehicle terminal; this embodiment does not specifically limit this. When the vehicle terminal is detected to have reached the preset vehicle state, the second vehicle driving information generated during the current connection is transmitted to the vehicle key. The vehicle key acquires the second vehicle driving information, which can be used as the first vehicle driving information after the next connection between the vehicle key and the vehicle terminal.
[0072] Step 402: Send a successful reception message to the vehicle terminal and update the first identifier information corresponding to the first identifier.
[0073] After obtaining the second vehicle's driving information, the vehicle key sends a successful reception message to the vehicle terminal. Simultaneously, it updates its own first identifier information. For example, updating the first identifier information means incrementing the first identifier by 1; the updated first identifier information indicates the next connection count between the vehicle key and the vehicle terminal.
[0074] After receiving the successful reception information, the vehicle updates the second identifier information corresponding to the second identifier. For example, updating the second identifier information means incrementing it by 1. The updated second identifier information indicates the next connection count between the vehicle key and the vehicle. It's understandable that the first identifier information corresponding to the first identifier and the second identifier information corresponding to the second identifier are the same.
[0075] This embodiment acquires second vehicle driving information transmitted by the vehicle terminal in a preset vehicle state, updates the first identification information based on the second vehicle driving information, and sends a reception success message back to the vehicle terminal. The vehicle terminal then updates the second identification information based on the reception success message. This ensures that the first and second identification information can accurately record the number of connections between the vehicle key and the vehicle terminal. Furthermore, by acquiring the second vehicle driving information, preparation is made for negotiating the session key during the next connection between the vehicle key and the vehicle terminal, further improving the security of the session key.
[0076] In one embodiment, when the vehicle-mounted terminal sends the second vehicle driving information to the vehicle key, it can do so in an encrypted manner. Specifically, the vehicle-mounted terminal obtains the second vehicle driving information when the vehicle is in a preset vehicle state. After obtaining the second vehicle driving information, the vehicle-mounted terminal encrypts the second vehicle driving information based on a second session key to obtain encrypted driving information. The encryption of the second vehicle driving information using the second session key can use any symmetric encryption algorithm; for example, symmetric encryption algorithms can be AES encryption and SM4 encryption, etc., but this embodiment does not impose specific limitations. After generating the encrypted driving information, the vehicle-mounted terminal sends the encrypted driving information to the vehicle key.
[0077] The vehicle key obtains encrypted driving information transmitted by the vehicle terminal when the vehicle is in a preset vehicle state. It then decrypts the encrypted driving information using a first session key to obtain second vehicle driving information. The decryption algorithm used by the first session key to decrypt the encrypted driving information is the same as the encryption algorithm used by the second session key to encrypt the second vehicle driving information. This can be AES encryption, SM4 encryption, etc., and is not specifically limited in this embodiment. Since the first session key and the second session key are the same, the first session key can be used to decrypt the encrypted driving information to obtain the second vehicle driving information.
[0078] This embodiment transmits the second vehicle's driving information using a first session key and a second session key, which ensures the security of the second vehicle's driving information, prevents the leakage of user privacy, and further improves the security of the session key.
[0079] In one embodiment, such as Figure 5 As shown, another key negotiation method is provided, which specifically includes the following steps:
[0080] Step 501: Obtain the post-quantum public key transmitted by the vehicle and store it.
[0081] If this is the first connection between the vehicle key and the vehicle terminal, the vehicle terminal generates a post-quantum public key and a post-quantum private key based on a post-quantum key generation algorithm, stores the post-quantum private key, and transmits the post-quantum public key to the vehicle key, which then stores the post-quantum public key. The key generation algorithm can be a lattice-based cryptography post-quantum cryptography (PQC) algorithm, which generates post-quantum key pairs resistant to quantum attacks. The post-quantum cryptography (PQC) algorithm can be the NTRU algorithm, the Kyber algorithm, or the SABER algorithm, etc., and this embodiment does not impose specific limitations. Preferably, the post-quantum cryptography (PQC) algorithm is the Kyber algorithm.
[0082] Step 502: Based on the post-quantum public key, perform encapsulation operations using the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key.
[0083] After receiving the post-quantum public key, the vehicle key performs encapsulation operations based on the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key. The method of performing encapsulation operations based on the post-quantum public key and the post-quantum encapsulation algorithm to obtain the key encapsulation information and the first key in this step is the same as in step 202; a detailed description is provided in step 202 and will not be repeated here.
[0084] Step 503: Transmit the key encapsulation information to the vehicle.
[0085] After generating the key encapsulation information, the vehicle key needs to transmit the key encapsulation information to the vehicle.
[0086] After receiving the key encapsulation information, the vehicle-mounted device retrieves its stored post-quantum private key. Based on the post-quantum private key and the key encapsulation information, the vehicle-mounted device obtains the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information to obtain the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information using the `Decapsulate(QSK, C)` function. Here, `QSK` is the post-quantum private key, and `C` is the key encapsulation information. `Decapsulate(QSK, C)` is another core function of the Key Encapsulation Mechanism (KEM), used in conjunction with the `Encapsulate(QPK)` function. At this point, the first key and the second key are symmetric keys, meaning they are identical.
[0087] After obtaining the second key through decapsulation, the vehicle-side device generates a second session key based on the second key. The second key can be used directly as the second session key, or it can be input into a key derivation algorithm to generate the second session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the second session key from the second key.
[0088] Step 504: Generate the first session key based on the first key.
[0089] After obtaining the first key, the vehicle key generates a first session key based on it. This can be done by directly using the first key as the first session key, or by inputting the first key into a key derivation algorithm to generate the first session key. Understandably, the key derivation algorithm used to generate the first session key is the same as the key derivation algorithm used to generate the second session key. The key derivation algorithm can be the HKDF algorithm, PBKDF algorithm, or Argon2 algorithm, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key from the first key.
[0090] In one embodiment, generating the first session key specifically includes: obtaining encrypted response information transmitted by the vehicle and decrypting the encrypted response information using the first key to obtain a physically unclonable response value; and generating the first session key based on the first key and the physically unclonable response value.
[0091] The vehicle-side device acquires the physically unclonable response value of the vehicle-side communication module. The physically unclonable response value is a unique identifier generated based on the Physically Unclonable Function (PUF). Specifically, the vehicle-side hardware PUF module generates a unique response for the vehicle-side communication module under specific input conditions; this unique response is the physically unclonable response value of the vehicle-side communication module. The physically unclonable response value can be an optical PUF response value, a delayed PUF response value, etc., and this embodiment does not impose specific limitations. After acquiring the physically unclonable response value, the vehicle-side device generates encrypted response information based on the second key and the physically unclonable response value of the vehicle-side communication module. The vehicle-side device encrypts the physically unclonable response value based on the second key to obtain encrypted response information. The encryption of the physically unclonable response value using the second key can employ any symmetric encryption algorithm; for example, symmetric encryption algorithms can be AES encryption and SM4 encryption, etc., and this embodiment does not impose specific limitations. After generating the encrypted response information, the vehicle-side device sends the encrypted response information to the vehicle key. Simultaneously, after decapsulating and obtaining the second key, the vehicle generates a second session key based on the second key and the physically unclonable response value. Specifically, the second key and the physically non-clonable response value are input into the key derivation algorithm to generate the second session key. The key derivation algorithm can be the HKDF algorithm, PBKDF algorithm, or Argon2 algorithm, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the second session key based on the second key and the physically non-clonable response value.
[0092] The vehicle key receives the encrypted response information transmitted from the vehicle and decrypts it using a first key to obtain a physically unclonable response value. The decryption algorithm used by the first key to decrypt the encrypted response information is the same as the encryption algorithm used by the second key to encrypt the physically unclonable response value. This can be AES encryption, SM4 encryption, etc., and is not specifically limited in this embodiment. Since the first key and the second key are the same, the first key can be used to decrypt the encrypted response information, thus obtaining the physically unclonable response value.
[0093] After the vehicle key decrypts to obtain a physically unclonable response value, a first session key is generated based on the first key and the physically unclonable response value. Specifically, the first key and the physically unclonable response value are input into a key derivation algorithm to generate the first session key. Understandably, the key derivation algorithm for generating the first session key is the same as the key derivation algorithm for generating the second session key. The key derivation algorithm can be the HKDF algorithm, PBKDF algorithm, or Argon2 algorithm, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first key and the physically unclonable response value.
[0094] Understandably, since the first key and the second key are the same, the key derivation algorithm for generating the first session key is the same as the key derivation algorithm for generating the second session key. Therefore, the first session key generated by the vehicle key is the same as the second session key generated by the vehicle.
[0095] This embodiment generates a first key and a second key using a post-quantum key pair and a post-quantum encapsulation algorithm. Furthermore, a physically non-cloning response value is incorporated during the generation of the first and second session keys. The post-quantum key possesses resistance to quantum attacks. Transmitting the first and second keys via the post-quantum key, combined with the physically non-cloning response value, and generating the first and second session keys improves the security of session key negotiation and prevents session key leakage.
[0096] In one embodiment, if the vehicle key and the vehicle are connecting for the first time, the vehicle obtains its stored list of post-quantum algorithms. This list contains all post-quantum encapsulation algorithms that the vehicle can use. Examples include Kyber512, Kyber768, and Kyber1024. It is understood that these examples are for illustrative purposes only, and the actual list of post-quantum algorithms will contain many more types of post-quantum encapsulation algorithms. After obtaining the list, the vehicle sends it to the vehicle key.
[0097] The vehicle key obtains the list of post-quantum algorithms transmitted from the vehicle terminal and determines the post-quantum encapsulation algorithm based on this list. After obtaining the list, the vehicle key first determines the post-quantum encapsulation algorithms it supports, and then selects from the list the post-quantum encapsulation algorithm that is supported by both the vehicle key and the vehicle terminal, as the post-quantum encapsulation algorithm to be used during the final key negotiation.
[0098] This embodiment improves the algorithm compatibility and negotiation flexibility between the vehicle key and the vehicle terminal by negotiating a post-quantum encapsulation algorithm jointly supported by the vehicle key and the vehicle terminal, thereby enhancing the unpredictability of the key negotiation process.
[0099] Based on the same inventive concept, this application also provides a key negotiation method. This method is applied to the vehicle end, and the solution provided by this method is similar to the implementation scheme described in the key negotiation method for vehicle keys. Therefore, the specific limitations of the key negotiation method for vehicle ends provided below can be found in the limitations of the key negotiation method for vehicle keys described above. Figure 6 As shown, a key negotiation method is provided, which is applied to the vehicle end and includes the following steps:
[0100] Step 601: Obtain the post-quantum private key and the first vehicle's driving information.
[0101] After the vehicle key establishes a communication connection with the vehicle terminal, the first step is to determine whether this is the first connection. To determine this, the vehicle key can access historical connection records. These records can be used to determine if it's the first time connecting. For example, the historical connection record could be a record of the number of connections corresponding to a vehicle terminal identifier; for the first connection, this number would be 0. Alternatively, the historical connection record could be a connection log for each connection. The presence or absence of a corresponding vehicle terminal identifier in the connection log determines whether it's the first connection; if no corresponding vehicle terminal identifier exists, it's considered the first connection.
[0102] When it is determined that the vehicle key and the vehicle terminal are not connecting for the first time, the vehicle terminal obtains the subsequent quantum private key and the first vehicle driving information.
[0103] The first vehicle driving information is the driving information corresponding to the vehicle at the time of the last connection between the vehicle key and the vehicle terminal. Before the vehicle key and the vehicle terminal disconnect from the last connection, the vehicle terminal will send the driving information corresponding to the vehicle at the time of the last connection to the vehicle key. The vehicle key stores the first vehicle driving information, and the vehicle terminal will also store the first vehicle driving information. It can be understood that during the vehicle's operation, the vehicle terminal will collect vehicle driving information in real time through the vehicle's CAN bus or OBD interface and store it in a secure storage area. Before the vehicle key and the vehicle terminal disconnect from the last connection, the collected vehicle driving information will be transmitted to the vehicle key. The vehicle driving information includes one or more of the following: vehicle location coordinates, driving route, average speed, timestamp, mileage data, average fuel consumption, and average electricity consumption.
[0104] When the vehicle key and the vehicle are connected for the first time, the vehicle generates a post-quantum public key and a post-quantum private key based on the post-quantum key generation algorithm, stores the post-quantum private key, and transmits the post-quantum public key to the vehicle key, which then stores the post-quantum public key.
[0105] When it is determined that the vehicle key and the vehicle terminal are not making their first connection, the vehicle key obtains the post-quantum public key and the first vehicle driving information. Based on the post-quantum public key, it performs a post-quantum encapsulation algorithm to encapsulate the key, thereby obtaining the key encapsulation information and the first key. The post-quantum encapsulation algorithm can be a key encapsulation mechanism algorithm based on quantum computing attack resistance. The post-quantum encapsulation algorithm can include one or more of the KyberKEM algorithm, NTRUKEM algorithm, and SABERKEM algorithm. The preferred post-quantum encapsulation algorithm is the KyberKEM algorithm. Specifically, using the post-quantum public key, a random symmetric key and a corresponding encapsulated ciphertext are generated based on the Encapsulate(QPK) function; the random symmetric key is also the first key; the corresponding encapsulated ciphertext is the key encapsulation information. This key encapsulation information can be decapsulated using the post-quantum private key to obtain a second key that is identical to the first key. The Encapsulate(QPK) function is one of the core functions of the Key Encapsulation Mechanism (KEM), where QPK is the post-quantum public key. The vehicle key transmits the key encapsulation information to the vehicle terminal.
[0106] Step 602: Obtain the key encapsulation information transmitted by the vehicle key.
[0107] Step 603: Obtain the second key based on the post-quantum private key and the key encapsulation information.
[0108] After receiving the key encapsulation information, the vehicle-mounted device retrieves its stored post-quantum private key. Based on the post-quantum private key and the key encapsulation information, the vehicle-mounted device obtains the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information to obtain the second key. Specifically, the vehicle-mounted device uses the post-quantum private key to decapsulate the key encapsulation information using the `Decapsulate(QSK, C)` function. Here, `QSK` is the post-quantum private key, and `C` is the key encapsulation information. `Decapsulate(QSK, C)` is another core function of the Key Encapsulation Mechanism (KEM), used in conjunction with the `Encapsulate(QPK)` function. At this point, the first key and the second key are symmetric keys, meaning they are identical.
[0109] Step 604: Update the second session key based on the second key and the first vehicle driving information.
[0110] After obtaining the second key through decapsulation, the vehicle-side device updates the second session key based on the second key and the first vehicle driving information. The second session key is the encryption key used by the vehicle-side device when the vehicle key and the vehicle-side device interact. The vehicle-side device generates the second session key upon the first connection between the vehicle key and the vehicle-side device, and updates it using the second key and the first vehicle driving information on subsequent connections. Specifically, the second session key can be generated using a key derivation algorithm based on the second key and the first vehicle driving information, and the original second session key can be updated. The key derivation function (KDF) is a type of cryptographic algorithm whose core function is to securely generate one or more encryption keys from a secret value (such as a master key, shared key, or cipher). Examples of key derivation algorithms include HKDF, PBKDF, and Argon2. This implementation does not specifically limit the key derivation algorithm; it only needs to be able to generate the second session key based on the second key and the first vehicle driving information.
[0111] After generating the first key, the vehicle key needs to update the first session key based on the first key and the first vehicle driving information. The first session key is the encryption key used by the vehicle key when interacting with the vehicle. It is generated when the vehicle key first connects to the vehicle and updates itself using the first key and the first vehicle driving information during subsequent connections. Specifically, the first session key can be generated using a key derivation algorithm based on the first key and the first vehicle driving information, and the original first session key can be updated accordingly. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first key and the first vehicle driving information. Specifically, the key derivation algorithm used to update the first session key is the same as the key derivation algorithm used to update the second session key. It is understandable that since the first key and the second key are symmetric keys, that is, the first key and the second key are exactly the same; and the key derivation algorithm used to update the first session key is the same as the key derivation algorithm used to update the second session key, therefore, the updated first session key and the updated second session key are exactly the same.
[0112] Once the vehicle key obtains the first session key and the vehicle terminal obtains the second session key, they exchange information using these keys during the current connection. Understandably, when the vehicle key and vehicle terminal disconnect and reconnect, they need to update the first and second session keys using the aforementioned key negotiation method. That is, the updated first and second session keys can only be used as encryption keys for information exchange during the current connection.
[0113] In this embodiment, the post-quantum key exhibits resistance to quantum attacks. The first and second keys are transmitted via the post-quantum key, and combined with the first vehicle's driving information, the first and second session keys are updated, thereby improving the security of session key negotiation and preventing leakage. Furthermore, the use of post-quantum key pairs and post-quantum encapsulation algorithms for session key negotiation reduces the computational load.
[0114] In one embodiment, such as Figure 7 As shown, a second session key update method is provided, which specifically includes the following steps:
[0115] The vehicle key is equipped with a first identifier; the vehicle terminal is equipped with a second identifier; the first identifier and the second identifier are used to indicate the number of times the vehicle key and the vehicle terminal are connected.
[0116] Step 701: Obtain the second identifier information corresponding to the second identifier.
[0117] When updating the second session key, the vehicle first obtains the second identifier information corresponding to the second identifier. This second identifier information records the number of times the vehicle key has connected to the vehicle. For example, if this is the 10th connection between the vehicle key and the vehicle, the second identifier information is 10; if this is the 340th connection, the second identifier information is 340.
[0118] Step 702: Perform a hash operation based on the first vehicle driving information and the second identification information to generate a second hash value.
[0119] After obtaining the second identification information, the vehicle-side device inputs the first vehicle driving information and the second identification information into a hash algorithm to obtain a first hash value. The first vehicle driving information is stored in the vehicle-side device as binary data. When the first vehicle driving information includes multiple parameters, such as driving route, average speed, and average fuel consumption, the binary data corresponding to the driving route, average speed, and average fuel consumption are concatenated sequentially, then concatenated with the second identification information, and input into the hash algorithm to obtain the second hash value. The hash algorithm can be any method capable of performing hash operations; this embodiment does not impose specific limitations. For example, the hash algorithm can be the SHA256 algorithm.
[0120] Step 703: Update the second session key using a key derivation algorithm based on the second hash value and the second key.
[0121] After obtaining the second hash value, the vehicle inputs the second hash value and the second key into a key derivation algorithm to generate a second session key and update the original second session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm; it only needs to be able to generate a second session key based on the second hash value and the second key.
[0122] This embodiment introduces a second identifier as a dynamic parameter, giving the key derivation process a time-series correlation. By using hash operations to bind the first vehicle driving information with the second identifier information, a dual dynamic parameter constraint is formed, thereby further enhancing the security of the session key.
[0123] In one embodiment, the first session key is updated by the vehicle key using a key derivation algorithm based on the first hash value and the first key; the first hash value is generated by the vehicle key through hash operation based on the first vehicle driving information and the first identifier information corresponding to the first identifier.
[0124] When updating the first session key, the first identifier information corresponding to the first identifier of the vehicle key is first obtained. This first identifier information records the number of times the vehicle key has connected to the vehicle. For example, if this is the 10th connection, the first identifier information is 10; if it's the 340th connection, it's 340. After obtaining the first identifier information, the first vehicle driving information and the first identifier information are input into a hash algorithm to obtain the first hash value. The first vehicle driving information is stored in the vehicle key in binary data form. When the first vehicle driving information includes multiple parameters, such as driving route, average speed, and average fuel consumption, the binary data corresponding to the driving route, average speed, and average fuel consumption are concatenated sequentially, then concatenated with the first identifier information, and input into the hash algorithm to obtain the first hash value. It is understood that the hash algorithm used to generate the first hash value is the same as the hash algorithm used to generate the second hash value. The hash algorithm can be any method capable of performing hash operations; this embodiment does not impose specific limitations. For example, the hash algorithm can be the SHA256 algorithm. After obtaining the first hash value, the first hash value and the first key are input into the key derivation algorithm to generate the first session key, and the original first session key is updated. It is understood that the key derivation algorithm for updating the first session key is the same as the key derivation algorithm for updating the second session key. The key derivation algorithm can be the HKDF algorithm, PBKDF algorithm, Argon2 algorithm, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first hash value and the first key.
[0125] This embodiment introduces a first identifier as a dynamic parameter, enabling the key derivation process to have a time-series correlation. By using hash operations to bind the first vehicle driving information with the first identifier information, a dual dynamic parameter constraint is formed, thereby further enhancing the security of the session key.
[0126] In one embodiment, a method for updating identification information is provided, specifically including the following steps:
[0127] Step 1: Under the preset vehicle status, obtain the driving information of the second vehicle.
[0128] When the vehicle is in a preset vehicle state, the vehicle terminal acquires second vehicle driving information. This second vehicle driving information is the driving information corresponding to the vehicle at the time of the current connection between the vehicle key and the vehicle terminal. The preset vehicle state can be any action such as parking and turning off the engine, parking and locking the doors, etc. In other words, the preset vehicle state is any action that is about to disconnect the current connection between the vehicle key and the vehicle terminal; this embodiment does not impose specific limitations. When the vehicle terminal detects that it has reached the preset vehicle state, it transmits the second vehicle driving information generated during this connection to the vehicle key. The vehicle key acquires the second vehicle driving information, which can be used as the first vehicle driving information after the next connection between the vehicle key and the vehicle terminal.
[0129] Step 2: Send the second vehicle driving information to the vehicle key so that the vehicle key sends a successful reception message to the vehicle and updates the first identifier information corresponding to the first identifier.
[0130] After obtaining the second vehicle's driving information, the vehicle key sends a successful reception message to the vehicle terminal. Simultaneously, it updates its own first identifier information. For example, updating the first identifier information means incrementing the first identifier by 1; the updated first identifier information indicates the next connection count between the vehicle key and the vehicle terminal.
[0131] Step 3: Obtain the successful reception information and update the second identifier information corresponding to the second identifier; the first identifier information corresponding to the first identifier is the same as the second identifier information corresponding to the second identifier.
[0132] After receiving the successful reception information, the vehicle updates the second identifier information corresponding to the second identifier. For example, updating the second identifier information means incrementing it by 1. The updated second identifier information indicates the next connection count between the vehicle key and the vehicle. It's understandable that the first identifier information corresponding to the first identifier and the second identifier information corresponding to the second identifier are the same.
[0133] This embodiment acquires second vehicle driving information transmitted by the vehicle terminal in a preset vehicle state, updates the first identification information based on the second vehicle driving information, and sends a reception success message back to the vehicle terminal. The vehicle terminal then updates the second identification information based on the reception success message. This ensures that the first and second identification information can accurately record the number of connections between the vehicle key and the vehicle terminal. Furthermore, by acquiring the second vehicle driving information, preparation is made for negotiating the session key during the next connection between the vehicle key and the vehicle terminal, further improving the security of the session key.
[0134] In one embodiment, when the vehicle sends the second vehicle driving information to the vehicle key, it can do so in an encrypted manner. Specifically, the vehicle acquires the second vehicle driving information when the vehicle is in a preset vehicle state. It then encrypts the second vehicle driving information using a second session key to obtain encrypted driving information. This encrypted driving information is then transmitted to the vehicle key. After acquiring the second vehicle driving information, the vehicle encrypts it again using the second session key to obtain encrypted driving information. The encryption of the second vehicle driving information using the second session key can use any symmetric encryption algorithm; for example, symmetric encryption algorithms could be AES or SM4, etc., but this embodiment does not impose specific limitations. After generating the encrypted driving information, the vehicle sends it to the vehicle key.
[0135] The vehicle key obtains encrypted driving information transmitted by the vehicle terminal when the vehicle is in a preset vehicle state. It then decrypts the encrypted driving information using a first session key to obtain second vehicle driving information. The decryption algorithm used by the first session key to decrypt the encrypted driving information is the same as the encryption algorithm used by the second session key to encrypt the second vehicle driving information. This can be AES encryption, SM4 encryption, etc., and is not specifically limited in this embodiment. Since the first session key and the second session key are the same, the first session key can be used to decrypt the encrypted driving information to obtain the second vehicle driving information.
[0136] This embodiment transmits the second vehicle's driving information using a first session key and a second session key, which ensures the security of the second vehicle's driving information, prevents the leakage of user privacy, and further improves the security of the session key.
[0137] In one embodiment, another key negotiation method is provided, which specifically includes the following steps:
[0138] Step 1: Generate a post-quantum public key and a post-quantum private key based on the post-quantum key generation algorithm, and store them.
[0139] Step 2: Transmit the post-quantum public key to the vehicle key so that the vehicle key stores the post-quantum public key.
[0140] If this is the first connection between the vehicle key and the vehicle terminal, the vehicle terminal generates a post-quantum public key and a post-quantum private key based on a post-quantum key generation algorithm, stores the post-quantum private key, and transmits the post-quantum public key to the vehicle key, which then stores the post-quantum public key. The key generation algorithm can be a lattice-based cryptography post-quantum cryptography (PQC) algorithm, which generates post-quantum key pairs resistant to quantum attacks. The post-quantum cryptography (PQC) algorithm can be the NTRU algorithm, the Kyber algorithm, or the SABER algorithm, etc., and this embodiment does not impose specific limitations. Preferably, the post-quantum cryptography (PQC) algorithm is the Kyber algorithm.
[0141] After receiving the post-quantum public key, the vehicle key performs encapsulation operations based on the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key. After generating the key encapsulation information, the vehicle key needs to transmit the key encapsulation information to the vehicle.
[0142] After obtaining the first key, the vehicle key generates a first session key based on it. The first key can be used directly as the first session key, or it can be input into a key derivation algorithm to generate the first session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key from the first key.
[0143] Step 3: Obtain the key encapsulation information transmitted by the vehicle key.
[0144] Step 4: Obtain the second key based on the post-quantum private key and the key encapsulation information.
[0145] After receiving the key encapsulation information, the vehicle-mounted device retrieves its own stored post-quantum private key. Based on the post-quantum private key and the key encapsulation information, the vehicle-mounted device obtains the second key.
[0146] Step 5: Generate a second session key based on the second key.
[0147] After obtaining the second key through decapsulation, the vehicle-side device generates a second session key based on it. This can be done by directly using the second key as the second session key, or by inputting the second key into a key derivation algorithm to generate the second session key. Understandably, the key derivation algorithm used to generate the first session key is the same as the one used to generate the second session key. The key derivation algorithm can be HKDF, PBKDF, or Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the second session key from the second key.
[0148] In one embodiment, generating the second session key specifically includes: generating encrypted response information based on the second key and the physically unclonable response value of the vehicle-side communication module, and transmitting the encrypted response information to the vehicle key; generating the second session key based on the second key and the physically unclonable response value.
[0149] The vehicle-side terminal obtains the physically unclonable response value of the vehicle-side communication module. The physically unclonable response value is a unique identifier generated based on the Physically Unclonable Function (PUF). Specifically, the vehicle-side hardware PUF module generates a unique response for the vehicle-side communication module under specific input conditions; this unique response is the physically unclonable response value of the vehicle-side communication module. The physically unclonable response value can be an optical PUF response value, a delayed PUF response value, etc., and this embodiment does not impose specific limitations. After obtaining the physically unclonable response value, the vehicle-side terminal generates encrypted response information based on the second key and the physically unclonable response value of the vehicle-side communication module. The vehicle-side terminal encrypts the physically unclonable response value based on the second key to obtain encrypted response information. The encryption of the physically unclonable response value using the second key can use any symmetric encryption algorithm; for example, the symmetric encryption algorithm can be AES encryption algorithm or SM4 encryption algorithm, etc., and this embodiment does not impose specific limitations. After generating the encrypted response information, the vehicle-side terminal sends the encrypted response information to the vehicle key.
[0150] After obtaining the second key through decapsulation, the vehicle-side device generates a second session key based on the second key and the physically non-clonable response value. Specifically, the second key and the physically non-clonable response value are input into a key derivation algorithm to generate the second session key. The key derivation algorithm can be HKDF, PBKDF, Argon2, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the second session key based on the second key and the physically non-clonable response value.
[0151] The vehicle key receives the encrypted response information transmitted from the vehicle and decrypts it using a first key to obtain a physically unclonable response value. The decryption algorithm used by the first key to decrypt the encrypted response information is the same as the encryption algorithm used by the second key to encrypt the physically unclonable response value. This can be AES encryption, SM4 encryption, etc., and is not specifically limited in this embodiment. Since the first key and the second key are the same, the first key can be used to decrypt the encrypted response information, thus obtaining the physically unclonable response value.
[0152] After the vehicle key decrypts to obtain a physically unclonable response value, a first session key is generated based on the first key and the physically unclonable response value. Specifically, the first key and the physically unclonable response value are input into a key derivation algorithm to generate the first session key. Understandably, the key derivation algorithm for generating the first session key is the same as the key derivation algorithm for generating the second session key. The key derivation algorithm can be the HKDF algorithm, PBKDF algorithm, or Argon2 algorithm, etc. This implementation does not specifically limit the key derivation algorithm, as long as it can generate the first session key based on the first key and the physically unclonable response value.
[0153] Understandably, since the first key and the second key are the same, the key derivation algorithm for generating the first session key is the same as the key derivation algorithm for generating the second session key. Therefore, the first session key generated by the vehicle key is the same as the second session key generated by the vehicle.
[0154] This embodiment generates a first key and a second key using a post-quantum key pair and a post-quantum encapsulation algorithm. Furthermore, a physically non-cloning response value is incorporated during the generation of the first and second session keys. The post-quantum key possesses resistance to quantum attacks. Transmitting the first and second keys via the post-quantum key, combined with the physically non-cloning response value, and generating the first and second session keys improves the security of session key negotiation and prevents session key leakage.
[0155] In one embodiment, if the vehicle key and the vehicle terminal are connecting for the first time, the vehicle terminal obtains a list of post-quantum algorithms. This list contains all post-quantum encapsulation algorithms that the vehicle terminal can use. Examples include Kyber512, Kyber768, and Kyber1024. It is understood that these examples are for illustrative purposes only, and the actual post-quantum algorithm list will contain many more types of post-quantum encapsulation algorithms. After obtaining the post-quantum algorithm list, the vehicle terminal sends it to the vehicle key. The vehicle key obtains the post-quantum algorithm list transmitted by the vehicle terminal and determines the post-quantum encapsulation algorithm based on it. After obtaining the post-quantum algorithm list, the vehicle key first determines the post-quantum encapsulation algorithms it supports, and then selects a post-quantum encapsulation algorithm that both the vehicle key and the vehicle terminal support from the list as the post-quantum encapsulation algorithm to be used during the final key negotiation.
[0156] This embodiment improves the algorithm compatibility and negotiation flexibility between the vehicle key and the vehicle terminal by negotiating a post-quantum encapsulation algorithm jointly supported by the vehicle key and the vehicle terminal, thereby enhancing the unpredictability of the key negotiation process.
[0157] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0158] Based on the same inventive concept, this application also provides a key negotiation system. The solution provided by this system is similar to the solution described in the key negotiation method above. Therefore, the specific limitations of the key negotiation system provided below can be found in the limitations of the key negotiation method above, and will not be repeated in this embodiment.
[0159] like Figure 1 As shown, the key negotiation system includes a vehicle key and a vehicle terminal. If the vehicle key and the vehicle terminal are not connecting for the first time, the vehicle key obtains first vehicle driving information and a post-quantum public key; based on the post-quantum public key, it performs encapsulation operations using a post-quantum encapsulation algorithm to obtain key encapsulation information and a first key; it transmits the key encapsulation information to the vehicle terminal and updates the first session key based on the first key and the first vehicle driving information; the first vehicle driving information is the driving information corresponding to the vehicle during the last connection between the vehicle key and the vehicle terminal. The vehicle terminal obtains the post-quantum private key and the first vehicle driving information; it obtains the key encapsulation information transmitted by the vehicle key; based on the post-quantum private key and the key encapsulation information, it obtains a second key; and based on the second key and the first vehicle driving information, it updates the second session key.
[0160] In one specific embodiment, when the vehicle key and the vehicle terminal are connecting for the first time, a wireless connection is established between the vehicle key and the vehicle terminal. The vehicle key and the vehicle terminal exchange certificates and verify each other's certificates. The vehicle terminal sends a list of post-quantum algorithms to the vehicle key, and the vehicle key determines the post-quantum algorithm based on the list. The vehicle terminal generates a Kyber768 post-quantum key pair, which is also a post-quantum public key and a post-quantum private key, and sends the post-quantum public key to the vehicle key. The vehicle key receives and stores the post-quantum public key. The vehicle key obtains the post-quantum public key and generates key encapsulation information and a symmetric key, which is the first key and is 256 bits long. The vehicle key stores the first key. The vehicle key sends the key encapsulation information to the vehicle terminal, which decapsulates the key encapsulation information using the post-quantum private key to obtain the symmetric key, which is the second key and is 256 bits long. The vehicle terminal stores the second key. The vehicle-side device activates the Hardware Unclonable Function (PUF), obtains the response value R (i.e., the physically unclonable response value), and calculates AES256(TmpKey, R), where TmpKey is the symmetric key. The vehicle-side device sends the ciphertext to the vehicle key, which decrypts it using TmpKey to obtain the response value R. Both the vehicle key and the vehicle-side device use the same key derivation algorithm to calculate ss = KDF(TmpKey, R), where ss calculated by the vehicle key is the first session key, and ss calculated by the vehicle-side device is the second session key. After the vehicle key and vehicle-side device complete key negotiation, both parties use ss as the session key for message encryption.
[0161] When the vehicle key and the vehicle terminal connect for the first time, both the vehicle key and the vehicle terminal are assigned a CTR identifier to record the number of connections between them. The CTR identifier assigned to the vehicle key is the first identifier; the CTR identifier assigned to the vehicle terminal is the second identifier.
[0162] When the vehicle key and the vehicle terminal are not connecting for the first time, the vehicle key uses the post-quantum public key to execute the KEM encapsulation algorithm to obtain key encapsulation information and a symmetric key, which is also the first key. The vehicle key sends the key encapsulation information to the vehicle terminal, which decapsulates the key encapsulation information using the post-quantum private key to obtain the symmetric key, which is also the second key. Both the vehicle key and the vehicle terminal use the SHA256 algorithm to calculate the hash value h of the first vehicle driving information and CTR. Both the vehicle key and the vehicle terminal use the Key Derivation Algorithm (KDF) to calculate the symmetric key and hash value h, updating the first session key and the second session key. After the session key negotiation is completed, the session messages after the vehicle key and the vehicle terminal connect are encrypted using the updated first session key and the updated second session key. When the vehicle is parked and the ignition is turned off, the vehicle terminal uses the current second session key to encrypt the second vehicle driving information and transmits the encrypted information to the vehicle key. The vehicle key decrypts the encrypted information using the first session key to obtain the second vehicle driving information. The second vehicle driving information can be used as the first vehicle driving information for the next connection between the vehicle key and the vehicle terminal. After the vehicle key receives the second vehicle driving information, the CTR indicator is incremented by 1. After the vehicle receives the successful reception information of the vehicle key, the CTR indicator is incremented by 1.
[0163] Current related technologies employ the ECDHE algorithm, whose security is based on the Elliptic Curve Discrete Logarithm Problem (ECDLP). Shor's quantum algorithm can solve this problem in polynomial time, leading to a quantum attack risk on the session key. This application replaces this with the Kyber768 algorithm, whose security relies on the Shortest Vector Problem (SVP) and Learning Error Problem (LWE) in lattice-based cryptography. Kyber768 achieves NIST Level 3 security (128-bit quantum security) under a quantum attack model, representing a generational improvement over ECDHE. Even with the large-scale application of quantum computers, attackers will still be unable to crack the session key through intercepted historical communication data, thus ensuring the security of the session key and avoiding the risk of loss of vehicle control due to key leakage.
[0164] In related technologies, extending the ECC key length to improve session key security leads to an exponential increase in computational overhead. This application's embodiment employs the Kyber768 algorithm, achieving a session key generation rate of at least 4Gbps and improving PQC key encapsulation efficiency by at least 50%. Simultaneously, it requires a minimum memory footprint of only 5MB, adapting to the SRAM limitations of low-power MCUs. This efficiency optimization enables the system to maintain quantum-resistant security while meeting automotive real-time requirements, avoiding a decline in user experience due to computational latency.
[0165] In one embodiment, a computer device is provided, which may be a vehicle key or a vehicle-mounted controller, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a key negotiation method applied to vehicle keys or a key negotiation method applied to the vehicle itself.
[0166] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0167] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the key negotiation methods applied to vehicle keys or applied to the vehicle end in the above embodiments.
[0168] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements any of the key negotiation methods applied to a vehicle key or applied to a vehicle end as described above.
[0169] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0170] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0171] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A key negotiation method, characterized in that, The method is applied to a vehicle key, and the method includes: If the vehicle key is not the first time it has been connected to the vehicle, then the first vehicle driving information and the subsequent quantum public key are obtained. Based on the post-quantum public key, encapsulation operations are performed using the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key; The key encapsulation information is transmitted to the vehicle terminal, so that the vehicle terminal obtains the second key based on the post-quantum private key and the key encapsulation information, and updates the second session key based on the second key and the first vehicle driving information. Update the first session key based on the first key and the first vehicle driving information.
2. The method according to claim 1, characterized in that, The vehicle key is provided with a first identifier; the vehicle terminal is provided with a second identifier; the first identifier and the second identifier are used to indicate the number of connections between the vehicle key and the vehicle terminal; The step of updating the first session key based on the first key and the first vehicle driving information includes: Obtain the first identifier information corresponding to the first identifier; A hash value is obtained by performing a hash operation based on the first vehicle driving information and the first identification information; Based on the first hash value and the first key, the first session key is updated using a key derivation algorithm.
3. The method according to claim 2, characterized in that, The second session key is updated by the vehicle terminal based on the second hash value and the second key using a key derivation algorithm; The second hash value is generated by the vehicle terminal through a hash operation based on the first vehicle driving information and the second identifier information corresponding to the second identifier.
4. The method according to claim 2, characterized in that, The method further includes: Acquire the second vehicle driving information transmitted by the vehicle terminal when the vehicle is in a preset vehicle state; The system sends a successful reception message to the vehicle terminal and updates the first identifier information corresponding to the first identifier; so that the vehicle terminal updates the second identifier information corresponding to the second identifier based on the successful reception message; the first identifier information corresponding to the first identifier is the same as the second identifier information corresponding to the second identifier.
5. The method according to claim 4, characterized in that, The acquisition of the second vehicle driving information transmitted by the vehicle terminal in a preset vehicle state includes: The encrypted driving information transmitted by the vehicle terminal in a preset vehicle state is obtained; the encrypted driving information is obtained by the vehicle terminal encrypting the second vehicle driving information based on the second session key. The encrypted driving information is decrypted using the first session key to obtain the second vehicle driving information.
6. The method according to claim 1, characterized in that, The method further includes: If the vehicle key is connecting to the vehicle for the first time, the vehicle acquires and stores the post-quantum public key transmitted by the vehicle; the vehicle stores the post-quantum private key. Based on the post-quantum public key, encapsulation operations are performed using the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key; The key encapsulation information is transmitted to the vehicle terminal, so that the vehicle terminal obtains the second key based on the post-quantum private key and the key encapsulation information, and generates a second session key based on the second key; A first session key is generated based on the first key.
7. The method according to claim 6, characterized in that, The method further includes: The encrypted response information transmitted by the vehicle is obtained, and the encrypted response information is decrypted using the first key to obtain a physically unclonable response value; the encrypted response information is generated by the vehicle based on the second key and the physically unclonable response value of the vehicle communication module, and a second session key is generated based on the second key and the physically unclonable response value. A first session key is generated based on the first key and the physically unclonable response value.
8. The method according to claim 6, characterized in that, The method further includes: If the vehicle key is connecting to the vehicle for the first time, obtain the list of post-quantum algorithms transmitted by the vehicle. Based on the list of post-quantum algorithms, determine the post-quantum encapsulation algorithm.
9. A key negotiation method, characterized in that, The method is applied to the vehicle end, and the method includes: If the vehicle key is not connected to the vehicle terminal for the first time, obtain the subsequent quantum private key and the first vehicle driving information; Obtain the key encapsulation information transmitted by the vehicle key; the key encapsulation information is obtained by the vehicle key based on the post-quantum public key and the post-quantum encapsulation algorithm to perform encapsulation operations and the first key; the vehicle key updates the first session key based on the first key and the first vehicle driving information. Based on the post-quantum private key and the key encapsulation information, a second key is obtained; Update the second session key based on the second key and the first vehicle driving information.
10. The method according to claim 9, characterized in that, The vehicle key is provided with a first identifier; the vehicle terminal is provided with a second identifier; the first identifier and the second identifier are used to indicate the number of connections between the vehicle key and the vehicle terminal; Updating the second session key based on the second key and the first vehicle driving information includes: Obtain the second identifier information corresponding to the second identifier; A hash operation is performed based on the first vehicle driving information and the second identification information to generate a second hash value; Based on the second hash value and the second key, the second session key is updated using a key derivation algorithm.
11. The method according to claim 10, characterized in that, The first session key is updated by the vehicle key using a key derivation algorithm based on the first hash value and the first key; The first hash value is generated by hashing the vehicle key based on the first vehicle driving information and the first identifier information corresponding to the first identifier.
12. The method according to claim 10, characterized in that, The method further includes: Under the preset vehicle status, obtain the driving information of the second vehicle; The second vehicle driving information is sent to the vehicle key, so that the vehicle key sends a successful reception message to the vehicle terminal and updates the first identifier information corresponding to the first identifier; Obtain the successful reception information and update the second identifier information corresponding to the second identifier; the first identifier information corresponding to the first identifier is the same as the second identifier information corresponding to the second identifier.
13. The method according to claim 12, characterized in that, Sending the second vehicle driving information to the vehicle key includes: The second vehicle's driving information is encrypted using the second session key to obtain encrypted driving information; The encrypted driving information is transmitted to the vehicle key, so that the vehicle key can decrypt the encrypted driving information according to the first session key to obtain the second vehicle driving information.
14. The method according to claim 9, characterized in that, The method further includes: If the vehicle key is connecting to the vehicle for the first time, a post-quantum public key and a post-quantum private key are generated based on the post-quantum key generation algorithm and stored. The post-quantum public key is transmitted to the vehicle key so that the vehicle key stores the post-quantum public key; Obtain the key encapsulation information transmitted by the vehicle key; the key encapsulation information is obtained by the vehicle key through encapsulation operation based on the post-quantum public key and the post-quantum encapsulation algorithm, and a first key is generated based on the first key; Based on the post-quantum private key and the key encapsulation information, the second key is obtained; A second session key is generated based on the second key.
15. The method according to claim 14, characterized in that, The method further includes: Based on the second key and the physically unclonable response value of the vehicle-side communication module, an encrypted response information is generated and transmitted to the vehicle key; so that the vehicle key can decrypt the encrypted response information using the first key to obtain the physically unclonable response value, and generate a first session key based on the first key and the physically unclonable response value. A second session key is generated based on the second key and the physically unclonable response value.
16. The method according to claim 14, characterized in that, The method further includes: If the vehicle key is connecting to the vehicle for the first time, obtain the list of subsequent quantum algorithms; The list of post-quantum algorithms is transmitted to the vehicle key, so that the vehicle key determines the post-quantum encapsulation algorithm based on the list of post-quantum algorithms.
17. A key negotiation system, characterized in that, The key negotiation system includes: a vehicle key and a vehicle terminal; If the vehicle key and the vehicle terminal are not connected for the first time, the vehicle key obtains the first vehicle driving information and the post-quantum public key; based on the post-quantum public key, it performs encapsulation operations based on the post-quantum encapsulation algorithm to obtain key encapsulation information and the first key; it transmits the key encapsulation information to the vehicle terminal, and updates the first session key based on the first key and the first vehicle driving information; the first vehicle driving information is the driving information corresponding to the vehicle when the vehicle key and the vehicle terminal last connected. The vehicle terminal obtains the post-quantum private key and the first vehicle driving information; obtains the key encapsulation information transmitted by the vehicle key; obtains the second key based on the post-quantum private key and the key encapsulation information; and updates the second session key based on the second key and the first vehicle driving information.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8 or 9-16.
Citation Information
Cited By
Post-quantum key negotiation method, device and system and computer equipment
CN121792073A