A vehicle key updating method, device, electronic device and storage medium
By using random numbers and private key verification mechanisms in the vehicle key management system, the problem of low security of vehicle key management is solved, the risk of key leakage is reduced, and the security of key management is improved.
Patent Information
- Application Number
- CN202210570061.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-05-24
AI Technical Summary
The existing vehicle key management method has low security and is vulnerable to attacks, which increases the risk of the vehicle being attacked.
Generate random numbers through the manufacturer's terminal, match the function control unit key, and transfer it between the gateway control unit and the electronic control unit, combine the manufacturer's private key and the supplier's private key for signature verification, update the key in the database, and enhance Security of key management.
It reduces the risk of key leakage, reduces the possibility of key being stolen during transmission and update, and improves the security of key management and update of the functional control unit.
Smart Images

Figure CN114978505B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a vehicle-mounted key updating method, device, electronic equipment and storage medium. Background Art
[0002] With the rapid development of sensor technology and the rapid iteration and optimization of networking technology, as well as the advantages of vehicle networking technology in effectively preventing traffic collisions, reducing the impact of traffic on the environment, and providing the best travel solutions for operators and users, the vehicle networking market has been rapidly expanding and developing in recent years. At the same time, the automotive industry has undergone large-scale transformation and upgrading in recent years, shifting its focus from mechanical manufacturing processes to intelligent manufacturing, and launching smart vehicles with better performance.
[0003] Electrification, intelligence and connectivity are becoming the development trend of modern cars. However, connectivity will increase the risk of vehicles being attacked. The targets of these attacks are the operation and control functions of the vehicle, or the information about the privacy and intellectual property in the vehicle.
[0004] Therefore, key management is extremely important for vehicles. For the complex and evolving vehicle electrical system consisting of dozens of electronic control units, it is necessary to strengthen on-board key management. Summary of the invention
[0005] The present invention provides a vehicle-mounted key updating method, device, electronic equipment and storage medium, which are used to solve the technical problem that the existing vehicle-mounted key management method has low security.
[0006] The present invention provides a vehicle key update method, which is applied to a vehicle key management system. The vehicle key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit and a database. The method includes:
[0007] Generate a first random number through the manufacturer terminal, match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0008] The function control unit obtains the electronic control unit key based on the function control unit key, and sends the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence;
[0009] The manufacturer terminal generates the nth key of the function control unit based on the electronic control unit key, and sends the nth key, a preset manufacturer private key, and a preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0010] The function control unit performs manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key. When the verification is passed, the function control unit obtains the target electronic control unit key corresponding to the response of the function control unit through the nth key, and sends the target electronic control unit key to the electronic control unit;
[0011] When the function control unit responds successfully, the function control unit response and the target random number corresponding to the electronic control unit response are obtained through the electronic control unit, and the gateway control unit key corresponding to the target random number is obtained, and the gateway control unit key is sent to the gateway control unit;
[0012] The gateway control unit sends the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key;
[0013] When the manufacturer terminal successfully verifies the function control unit response and the electronic control unit response, the nth key is updated to the database according to the manufacturer private key.
[0014] Optionally, the step of generating a first random number through the manufacturer terminal, matching a function control unit key corresponding to the first random number, and sending the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence includes:
[0015] Generate a first random number through the manufacturer terminal, and match the function control unit key corresponding to the first random number;
[0016] Encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit;
[0017] decrypting the first encrypted data by the gateway control unit to obtain the function control unit key, encrypting the function control unit key to obtain second encrypted data, and sending the second encrypted data to the electronic control unit;
[0018] The second encrypted data is decrypted by the electronic control unit to obtain the function control unit key, the function control unit key is encrypted to obtain third encrypted data, and the third encrypted data is sent to the function control unit.
[0019] Optionally, the step of the function control unit acquiring an electronic control unit key based on the function control unit key, and sending the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence includes:
[0020] The function control unit generates a second random number responsive to the function control unit based on the function control unit key, and matches the electronic control unit key corresponding to the second random number;
[0021] The electronic control unit key is sent to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence.
[0022] Optionally, the step of sending the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence includes:
[0023] The function control unit encrypts the electronic control unit key to obtain fourth encrypted data, and sends the fourth encrypted data to the electronic control unit;
[0024] The electronic control unit decrypts the fourth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain fifth encrypted data, and sends the fifth encrypted data to the gateway control unit;
[0025] The gateway control unit decrypts the fifth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain sixth encrypted data, and sends the sixth encrypted data to the manufacturer terminal.
[0026] The present invention also provides a vehicle-mounted key update device, which is applied to a vehicle-mounted key management system. The vehicle-mounted key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit and a database. The device includes:
[0027] a function control unit key generation module, configured to generate a first random number through the manufacturer terminal, match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0028] An electronic control unit key generation module, used for the function control unit to obtain an electronic control unit key based on the function control unit key, and send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence;
[0029] An n-th key generation module, used for the manufacturer terminal to generate an n-th key of the function control unit based on the electronic control unit key, and send the n-th key and a preset manufacturer private key and a preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0030] A target electronic control unit key acquisition module, used for the function control unit to perform manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key, and when the verification is passed, obtain the target electronic control unit key corresponding to the function control unit response through the nth key, and send the target electronic control unit key to the electronic control unit;
[0031] A gateway control unit key acquisition module, used for acquiring the function control unit response and the target random number corresponding to the electronic control unit response through the electronic control unit when the function control unit responds successfully, acquiring the gateway control unit key corresponding to the target random number, and sending the gateway control unit key to the gateway control unit;
[0032] A sending module, used for the gateway control unit to send the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key;
[0033] An updating module is used for updating the nth key to the database according to the manufacturer private key when the manufacturer terminal verifies the function control unit response and the electronic control unit response successfully.
[0034] Optionally, the function control unit key generation module includes:
[0035] a function control unit key matching submodule, configured to generate a first random number through the manufacturer terminal, and match a function control unit key corresponding to the first random number;
[0036] A first encryption submodule, used for encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit;
[0037] A second encryption submodule, configured to decrypt the first encrypted data through the gateway control unit to obtain the function control unit key, encrypt the function control unit key to obtain second encrypted data, and send the second encrypted data to the electronic control unit;
[0038] The third encryption submodule is used to decrypt the second encrypted data through the electronic control unit to obtain the function control unit key, encrypt the function control unit key to obtain third encrypted data, and send the third encrypted data to the function control unit.
[0039] Optionally, the electronic control unit key generation module includes:
[0040] an electronic control unit key matching submodule, used for the function control unit to generate a second random number responsive to the function control unit based on the function control unit key, and match the electronic control unit key corresponding to the second random number;
[0041] The sending submodule is used to send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence.
[0042] Optionally, the sending submodule includes:
[0043] A fourth encryption submodule, used for the functional control unit to encrypt the electronic control unit key to obtain fourth encrypted data, and send the fourth encrypted data to the electronic control unit;
[0044] a fifth encryption submodule, configured for the electronic control unit to decrypt the fourth encrypted data to obtain the electronic control unit key, encrypt the electronic control unit key to obtain fifth encrypted data, and send the fifth encrypted data to the gateway control unit;
[0045] The sixth encryption submodule is used for the gateway control unit to decrypt the fifth encrypted data to obtain the electronic control unit key, and to encrypt the electronic control unit key to obtain the sixth encrypted data, and send the sixth encrypted data to the manufacturer terminal.
[0046] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0047] The memory is used to store program code and transmit the program code to the processor;
[0048] The processor is used to execute any of the above vehicle key update methods according to the instructions in the program code.
[0049] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the vehicle-mounted key updating method as described in any one of the above items.
[0050] It can be seen from the above technical scheme that the present invention has the following advantages: the present invention associates the electronic control unit response, the functional control unit response, the manufacturer's private key, the supplier's private key, the random number and the key generation of each unit, so that the association between the units is closer, the risk of key leakage is reduced, and the possibility of the key being stolen during the transmission and update process is reduced, thereby improving the security of the key of the functional control unit in management and update. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0052] Figure 1 A flowchart of a method for updating a vehicle key provided by an embodiment of the present invention;
[0053] Figure 2 This is a structural block diagram of a vehicle-mounted key updating device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The embodiments of the present invention provide a vehicle-mounted key updating method, device, electronic device and storage medium, which are used to solve the technical problem that the existing vehicle-mounted key management method has low security.
[0055] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] See also Figure 1 , Figure 1 A flowchart of the steps of a vehicle key updating method provided by an embodiment of the present invention.
[0057] The present invention provides a vehicle key update method, which is applied to a vehicle key management system. The vehicle key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit and a database. The method may specifically include the following steps:
[0058] Step 101, generating a first random number through a manufacturer terminal, matching a function control unit key corresponding to the first random number, and sending the function control unit key to the function control unit through a gateway control unit and an electronic control unit in sequence;
[0059] In an embodiment of the present invention, first, the manufacturer can generate a first random number through the manufacturer terminal, then match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence.
[0060] In one example, the steps of generating a first random number through a manufacturer terminal, matching a function control unit key corresponding to the first random number, and sending the function control unit key to the function control unit through a gateway control unit and an electronic control unit in sequence include:
[0061] S11, generating a first random number through a manufacturer terminal, and matching a function control unit key corresponding to the first random number;
[0062] S12, encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit;
[0063] S13, decrypting the first encrypted data through the gateway control unit to obtain a function control unit key, encrypting the function control unit key to obtain second encrypted data, and sending the second encrypted data to the electronic control unit;
[0064] S14, decrypting the second encrypted data by the electronic control unit to obtain a function control unit key, encrypting the function control unit key to obtain third encrypted data, and sending the third encrypted data to the function control unit.
[0065] In a specific implementation, in order to reduce the possibility of key leakage, when the function control unit key is transmitted, it can be firstly encrypted to obtain first encrypted data, and then the first encrypted data is sent to the gateway control unit.
[0066] After obtaining the first encrypted data, the gateway control unit can decrypt the first encrypted data to obtain the function control unit key, and then encrypt the function control unit key to obtain the second encrypted data. Then, the second encrypted data is sent to the electronic control unit.
[0067] After acquiring the second encrypted data, the electronic control unit can decrypt the second encrypted data to obtain the function control unit key, then encrypt the function control unit key to obtain the third encrypted data, and then send the third encrypted data to the function control unit.
[0068] In one example, the AES-CCM algorithm may be selected as an encryption algorithm to encrypt the function control unit key during the above data transmission process. The AES-CCM algorithm is a commonly used encryption algorithm in wireless communication systems and has high efficiency and security.
[0069] Table 1 below shows the step logic of the AES-CCM algorithm provided in an embodiment of the present invention.
[0070] In the AES-CCM algorithm involved in the embodiment of the present invention, when j=2, steps (1) and (2) are performed in the sender control unit, and after the receiver control unit receives C||T, steps (3), (2), and (4) are performed in sequence. In the case of j=2, the security requirements are data confidentiality and entity authentication.
[0071] (1) The plaintext P corresponds to the key generation and encryption process.
[0072] (2) The plaintext P corresponds to the label generation and encryption process.
[0073] (3) Perform the decryption verification process of the key corresponding to the plaintext P.
[0074] (4) If the verification of the P tag is successful, the key P is accepted; otherwise, an error is returned.
[0075]
[0076]
[0077] Table 1
[0078] Step 102, the function control unit obtains the electronic control unit key based on the function control unit key, and sends the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence;
[0079] After receiving the third encrypted data, the function control unit can obtain the corresponding electronic unit key based on the function control unit key, and send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence.
[0080] In one example, the function control unit obtains the electronic control unit key based on the function control unit key, and sends the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence, including:
[0081] S21, the function control unit generates a second random number that responds to the function control unit based on the function control unit key, and matches the electronic control unit key corresponding to the second random number;
[0082] S22, sending the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence.
[0083] In a specific implementation, after receiving the third encrypted data, the function control unit can generate a second random number that responds to the function control unit, match it with the corresponding electronic control unit key, and then send it to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence.
[0084] In one example, the step of sending the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence includes:
[0085] S221, the function control unit encrypts the electronic control unit key to obtain fourth encrypted data, and sends the fourth encrypted data to the electronic control unit;
[0086] S222, the electronic control unit decrypts the fourth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain fifth encrypted data, and sends the fifth encrypted data to the gateway control unit;
[0087] S223, the gateway control unit decrypts the fifth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain the sixth encrypted data, and sends the sixth encrypted data to the manufacturer terminal.
[0088] In the embodiment of the present invention, after receiving the third encrypted data, the function control unit may decrypt the third encrypted data and then encrypt it to obtain fourth encrypted data, and then send the fourth encrypted data to the electronic control unit.
[0089] After receiving the fourth encrypted data, the electronic control unit can decrypt the fourth encrypted data to obtain the electronic control unit key, then encrypt the electronic control unit key to obtain the fifth encrypted data, and then send the fifth encrypted data to the gateway control unit.
[0090] After receiving the fifth encrypted data, the gateway control unit can decrypt the fifth encrypted data to obtain the electronic control unit key, and then encrypt the electronic control unit key to obtain the sixth encrypted data, and then send the sixth encrypted data to the manufacturer terminal.
[0091] Step 103, the manufacturer terminal generates the nth key of the function control unit based on the electronic control unit key, and sends the nth key, the preset manufacturer private key, and the preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0092] After receiving the sixth encrypted data, the manufacturer can generate the nth key (long-term key) of the functional control unit, and after successfully verifying the manufacturer and supplier, encrypt the hashed manufacturer's private key, supplier's private key and the nth key of the gateway control unit and send them to the gateway control unit.
[0093] After receiving the encrypted data and successfully verifying the manufacturer and supplier signatures, the gateway control unit encrypts the hashed manufacturer private key, supplier private key and the nth key of the electronic control unit and sends them to the electronic control unit.
[0094] After receiving the encrypted data and successfully verifying the supplier's signature, the electronic control unit decrypts the n-th key of the functional control unit, encrypts the hashed supplier's private key and the n-th key of the electronic control unit, and sends them to the functional control unit.
[0095] Step 104, the function control unit performs manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key. When the verification is passed, the function control unit obtains the target electronic control unit key corresponding to the response of the function control unit through the nth key, and sends the target electronic control unit key to the electronic control unit;
[0096] In the embodiment of the present invention, after receiving the encrypted data and successfully verifying the supplier's signature, the function control unit decrypts the received n-th key and sends the target electronic control unit key corresponding to the air-energy control unit response to the electronic control unit.
[0097] Step 105, when the function control unit responds successfully, the function control unit response and the target random number corresponding to the electronic control unit response are obtained through the electronic control unit, and the gateway control unit key corresponding to the target random number is obtained, and the gateway control unit key is sent to the gateway control unit;
[0098] In an embodiment of the present invention, after the electronic control unit receives the encrypted data and confirms that the functional control unit responds successfully, it converts the control control unit response and the electronic control unit response into a gateway control unit key corresponding to the target random number, and sends the gateway control unit key to the gateway control unit.
[0099] Step 106, the gateway control unit sends the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key;
[0100] After the gateway control unit receives the encrypted data and decrypts it successfully, it encrypts the function control unit response, the electronic control unit response and the manufacturer's private key and sends them to the manufacturer's terminal.
[0101] Step 107 , when the manufacturer terminal verifies the functional control unit response and the electronic control unit response successfully, the nth key is updated to the database according to the manufacturer private key.
[0102] After receiving the encrypted data and verifying that the function control unit and the electronic control unit respond successfully, the manufacturer terminal updates the nth key of the function control unit in the database.
[0103] The above steps 103-107 realize the transmission and update of the nth key of the functional control unit.
[0104] Based on the above principles, if an automobile manufacturer, supplier or telematics service provider claims that its certificate is invalid, its certificate can also be revoked by updating the certification revocation list in the vehicle gateway.
[0105] The present invention associates the electronic control unit response, the functional control unit response, the manufacturer's private key, the supplier's private key, the random number and the key generation of each unit, so that the association between the units is closer, reducing the risk of key leakage. At the same time, during the transmission of the key, the transmission data is encrypted, reducing the possibility of the key being stolen during the transmission and update process, thereby improving the security of the key of the functional control unit in management and update.
[0106] See also Figure 2 , Figure 2 This is a structural block diagram of a vehicle-mounted key updating device provided by an embodiment of the present invention.
[0107] An embodiment of the present invention provides a vehicle-mounted key update device, which is applied to a vehicle-mounted key management system. The vehicle-mounted key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit, and a database. The device includes:
[0108] The function control unit key generation module 201 is used to generate a first random number through the manufacturer terminal, match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0109] An electronic control unit key generation module 202 is used for the function control unit to obtain the electronic control unit key based on the function control unit key, and send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence;
[0110] The nth key generation module 203 is used for the manufacturer terminal to generate the nth key of the function control unit based on the electronic control unit key, and send the nth key and the preset manufacturer private key and the preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence;
[0111] The target electronic control unit key acquisition module 204 is used for the function control unit to perform manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key. When the verification is passed, the function control unit responds to the corresponding target electronic control unit key through the nth key, and sends the target electronic control unit key to the electronic control unit;
[0112] The gateway control unit key acquisition module 205 is used to acquire the function control unit response and the target random number corresponding to the electronic control unit response through the electronic control unit when the function control unit responds successfully, and acquire the gateway control unit key corresponding to the target random number, and send the gateway control unit key to the gateway control unit;
[0113] A sending module 206, for the gateway control unit to send the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key;
[0114] The updating module 207 is used to update the nth key to the database according to the manufacturer's private key when the manufacturer terminal verifies the function control unit response and the electronic control unit response successfully.
[0115] In the embodiment of the present invention, the function control unit key generation module 201 includes:
[0116] A function control unit key matching submodule, used to generate a first random number through a manufacturer terminal, and match a function control unit key corresponding to the first random number;
[0117] A first encryption submodule, used for encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit;
[0118] A second encryption submodule, used for decrypting the first encrypted data through the gateway control unit to obtain a function control unit key, encrypting the function control unit key to obtain second encrypted data, and sending the second encrypted data to the electronic control unit;
[0119] The third encryption submodule is used to decrypt the second encrypted data through the electronic control unit to obtain the function control unit key, encrypt the function control unit key to obtain the third encrypted data, and send the third encrypted data to the function control unit.
[0120] In the embodiment of the present invention, the electronic control unit key generation module 202 includes:
[0121] The electronic control unit key matching submodule is used for the function control unit to generate a second random number that responds to the function control unit based on the function control unit key, and match the electronic control unit key corresponding to the second random number;
[0122] The sending submodule is used to send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence.
[0123] In an embodiment of the present invention, the sending submodule includes:
[0124] A fourth encryption submodule, used for the functional control unit to encrypt the electronic control unit key to obtain fourth encrypted data, and send the fourth encrypted data to the electronic control unit;
[0125] a fifth encryption submodule, configured for the electronic control unit to decrypt the fourth encrypted data to obtain the electronic control unit key, encrypt the electronic control unit key to obtain the fifth encrypted data, and send the fifth encrypted data to the gateway control unit;
[0126] The sixth encryption submodule is used for the gateway control unit to decrypt the fifth encrypted data to obtain the electronic control unit key, and encrypt the electronic control unit key to obtain the sixth encrypted data, and send the sixth encrypted data to the manufacturer terminal.
[0127] An embodiment of the present invention further provides an electronic device, the device comprising a processor and a memory:
[0128] The memory is used to store the program code and transmit the program code to the processor;
[0129] The processor is used to execute the vehicle key update method of the embodiment of the present invention according to the instructions in the program code.
[0130] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the vehicle-mounted key update method of the embodiment of the present invention.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0132] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0133] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0134] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0137] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0138] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0139] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle key update method, It is characterized in that Applied to a vehicle key management system, the vehicle key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit and a database, and the method includes: Generate a first random number through the manufacturer terminal, match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence; The function control unit obtains the electronic control unit key based on the function control unit key, and sends the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence; The manufacturer terminal generates the nth key of the function control unit based on the electronic control unit key, and sends the nth key, a preset manufacturer private key, and a preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence; The function control unit performs manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key. When the verification is passed, the function control unit obtains the target electronic control unit key corresponding to the response of the function control unit through the nth key, and sends the target electronic control unit key to the electronic control unit; When the function control unit responds successfully, the function control unit response and the target random number corresponding to the electronic control unit response are obtained through the electronic control unit, and the gateway control unit key corresponding to the target random number is obtained, and the gateway control unit key is sent to the gateway control unit; The gateway control unit sends the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key; When the manufacturer terminal successfully verifies the function control unit response and the electronic control unit response, the nth key is updated to the database according to the manufacturer private key to update the nth key of the function control unit with the nth key.
2. The method according to claim 1, It is characterized in that The step of generating a first random number through the manufacturer terminal, matching a function control unit key corresponding to the first random number, and sending the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence includes: Generate a first random number through the manufacturer terminal, and match the function control unit key corresponding to the first random number; Encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit; decrypting the first encrypted data by the gateway control unit to obtain the function control unit key, encrypting the function control unit key to obtain second encrypted data, and sending the second encrypted data to the electronic control unit; The second encrypted data is decrypted by the electronic control unit to obtain the function control unit key, the function control unit key is encrypted to obtain third encrypted data, and the third encrypted data is sent to the function control unit.
3. The method according to claim 1, It is characterized in that The step of the function control unit acquiring the electronic control unit key based on the function control unit key, and sending the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence includes: The function control unit generates a second random number responsive to the function control unit based on the function control unit key, and matches the electronic control unit key corresponding to the second random number; The electronic control unit key is sent to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence.
4. The method according to claim 3, It is characterized in that The step of sending the electronic control unit key to the manufacturer terminal via the electronic control unit and the gateway control unit in sequence includes: The function control unit encrypts the electronic control unit key to obtain fourth encrypted data, and sends the fourth encrypted data to the electronic control unit; The electronic control unit decrypts the fourth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain fifth encrypted data, and sends the fifth encrypted data to the gateway control unit; The gateway control unit decrypts the fifth encrypted data to obtain the electronic control unit key, encrypts the electronic control unit key to obtain sixth encrypted data, and sends the sixth encrypted data to the manufacturer terminal.
5. A vehicle key update device, It is characterized in that Applied to a vehicle key management system, the vehicle key management system includes a manufacturer terminal, a gateway control unit, an electronic control unit, a function control unit and a database, and the device includes: a function control unit key generation module, configured to generate a first random number through the manufacturer terminal, match the function control unit key corresponding to the first random number, and send the function control unit key to the function control unit through the gateway control unit and the electronic control unit in sequence; An electronic control unit key generation module, used for the function control unit to obtain an electronic control unit key based on the function control unit key, and send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence; An n-th key generation module, used for the manufacturer terminal to generate an n-th key of the function control unit based on the electronic control unit key, and send the n-th key and a preset manufacturer private key and a preset supplier private key to the function control unit through the gateway control unit and the electronic control unit in sequence; A target electronic control unit key acquisition module, used for the function control unit to perform manufacturer signature verification through the manufacturer private key and supplier signature verification through the supplier private key, and when the verification is passed, obtain the target electronic control unit key corresponding to the function control unit response through the nth key, and send the target electronic control unit key to the electronic control unit; A gateway control unit key acquisition module, used for acquiring the function control unit response and the target random number corresponding to the electronic control unit response through the electronic control unit when the function control unit responds successfully, acquiring the gateway control unit key corresponding to the target random number, and sending the gateway control unit key to the gateway control unit; A sending module, used for the gateway control unit to send the function control unit response, the electronic control unit response and the manufacturer private key to the manufacturer terminal based on the gateway control unit key; An update module is used to update the nth key to the database according to the manufacturer's private key when the manufacturer terminal verifies the response of the function control unit and the response of the electronic control unit successfully, so as to update the nth key of the function control unit with the nth key.
6. The device according to claim 5, It is characterized in that The function control unit key generation module includes: a function control unit key matching submodule, configured to generate a first random number through the manufacturer terminal, and match a function control unit key corresponding to the first random number; A first encryption submodule, used for encrypting the function control unit key to obtain first encrypted data, and sending the first encrypted data to the gateway control unit; A second encryption submodule, configured to decrypt the first encrypted data through the gateway control unit to obtain the function control unit key, encrypt the function control unit key to obtain second encrypted data, and send the second encrypted data to the electronic control unit; The third encryption submodule is used to decrypt the second encrypted data through the electronic control unit to obtain the function control unit key, encrypt the function control unit key to obtain third encrypted data, and send the third encrypted data to the function control unit.
7. The device according to claim 5, It is characterized in that The electronic control unit key generation module comprises: an electronic control unit key matching submodule, configured for the function control unit to generate a second random number responsive to the function control unit based on the function control unit key, and to match the electronic control unit key corresponding to the second random number; The sending submodule is used to send the electronic control unit key to the manufacturer terminal through the electronic control unit and the gateway control unit in sequence.
8. The device according to claim 7, It is characterized in that The sending submodule comprises: A fourth encryption submodule, used for the functional control unit to encrypt the electronic control unit key to obtain fourth encrypted data, and send the fourth encrypted data to the electronic control unit; a fifth encryption submodule, configured for the electronic control unit to decrypt the fourth encrypted data to obtain the electronic control unit key, and to encrypt the electronic control unit key to obtain fifth encrypted data, and to send the fifth encrypted data to the gateway control unit; The sixth encryption submodule is used for the gateway control unit to decrypt the fifth encrypted data to obtain the electronic control unit key, and to encrypt the electronic control unit key to obtain the sixth encrypted data, and send the sixth encrypted data to the manufacturer terminal.
9. An electronic device, It is characterized in that The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the vehicle key update method according to any one of claims 1-4 according to the instructions in the program code.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store program code, and when the program code is executed by the processor, the vehicle-mounted key update method according to any one of claims 1 to 4 is implemented.
