Software updating method and device for vehicle controller, digital signature system, and computer program product

By managing key pairs online, the problem of low efficiency in digital signatures during vehicle controller software upgrades is solved, enabling an efficient and secure software upgrade process.

WO2026007945A1PCT designated stage Publication Date: 2026-01-08CHERY AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/106408
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-04
Filing Date
2025-07-01
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

In existing technologies, digital signatures are inefficient during vehicle controller software upgrades, offline management of key pairs leads to frequent upgrades that affect development progress, and there is a risk of key leakage.

Method used

By adopting an online key pair management approach, key pairs for different controllers and digital signature algorithms are stored in a first database. The private key is then used to generate a signature file by finding the target controller and algorithm identifier, thereby improving the efficiency of signature file generation.

Benefits of technology

It improves the efficiency of signature file generation, reduces the impact of software upgrades on vehicle development progress, and enhances security, avoiding the risk of unauthorized tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025106408_08012026_PF_FP_ABST
    Figure CN2025106408_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vehicles, and discloses a software updating method and device for a vehicle controller, a digital signature system, and a computer program product. The method comprises: acquiring an identifier of a target controller, an identifier of a target digital signature algorithm, and a digest of a software update package of target software; on the basis of the identifier of the target controller and the identifier of the target digital signature algorithm, searching a first database for a private key in a first key pair, wherein the first database is used for storing private keys in key pairs applied for different controllers and different digital signature algorithms; and generating a first signature file on the basis of the digest of the software update package of the target software and the private key in the first key pair. By performing unified online management on key pairs, private keys in key pairs can be queried online when signature files are generated. Compared with offline management and private key query, the present application improves the efficiency of searching for key pairs, thereby improving the efficiency of generating signature files.
Need to check novelty before this filing date? Find Prior Art

Description

Software updating method and device of vehicle controller, digital signature system and computer program product

[0001] The present disclosure claims priority to the Chinese patent application No. 202410893881.8, filed on July 4, 2024, and entitled "Software updating method and device of vehicle controller and digital signature system", the entire content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of vehicles, and in particular to a software updating method and device of a vehicle controller, a digital signature system and a computer program product. BACKGROUND

[0003] With the increasing requirements of power, economy and comfort of vehicles, the electronic and electrical systems integrated in vehicles are becoming more and more complex, such as engine systems, power distribution box systems, instrument systems, etc. Each electronic and electrical system includes a controller and software installed in the controller. In some cases, these software may be illegally tampered with, maliciously attacked, etc. during the upgrading process, therefore, a reasonable method is needed to update the software to ensure the security of software upgrading.

[0004] In the related art, the authenticity and integrity of the software package are verified by using a digital signature, but since the key pair used by the digital signature is generated and managed offline, the software may be frequently upgraded during the development of the vehicle, and the offline management of the key pair often leads to low efficiency of the digital signature, which affects the development progress of the vehicle. SUMMARY

[0005] The present application provides a software updating method and device of a vehicle controller, a digital signature system and a computer program product, which can improve the efficiency of generating a signature file, and even if the software is frequently upgraded, the efficiency of the digital signature can be improved, and the development progress of the vehicle will not be affected. The technical solution is as follows:

[0006] In one aspect, a software updating method of a vehicle controller is provided, the method comprising:

[0007] obtaining an identifier of a target controller, an identifier of a target digital signature algorithm and a digest of a software updating package of a target software, the target controller being a controller for installing the target software;

[0008] finding, based on the identification of the target controller and the identification of the target digital signature algorithm, a private key in a first key pair in a first database, the first database being configured to store private keys in key pairs applied for different controllers and different digital signature algorithms, the first key pair being a key pair applied for the target controller and the target digital signature algorithm;

[0009] generating, based on the digest of the software update package of the target software and the private key in the first key pair, a first signature file, the first signature file being configured to verify authenticity and integrity of the software update package before the target controller updates the target software.

[0010] Optionally, the obtaining of the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software comprises:

[0011] displaying a digital signature interface, the digital signature interface being configured to obtain a digest of an update package of a software to be signed currently, an identification of a controller for installing the software to be signed currently, and an identification of a digital signature algorithm to be used;

[0012] obtaining, from the digital signature interface, the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software.

[0013] Optionally, before the obtaining of the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software, the method further comprises:

[0014] obtaining a key application request, the key application request carrying the identification of the target controller and the identification of the target digital signature algorithm;

[0015] finding, based on the identification of the target controller and the identification of the target digital signature algorithm, whether the first database stores the private key in the first key pair;

[0016] if the first database does not store the private key in the first key pair, generating the first key pair by calling a hardware encryption machine, and storing the private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm.

[0017] Optionally, after the generating of the first key pair by calling the hardware encryption machine, the method further comprises: encrypting the private key in the first key pair by calling the hardware encryption machine, and obtaining an encryption algorithm of the private key in the first key pair;

[0018] The storing the private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm comprises: storing the encrypted private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0019] The generating the first signature file based on the digest of the software update package of the target software and the private key in the first key pair comprises: decrypting the encrypted private key based on an encryption algorithm of the private key in the first key pair; and generating the first signature file based on the digest of the software update package of the target software and the decrypted private key.

[0020] Optionally, the method further comprises:

[0021] receiving a data compression package sent by the post-sale upgrade system, the data compression package carrying the software update package of the target software and the first signature file;

[0022] generating a second key pair corresponding to the data compression package, and generating a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package;

[0023] sending the second signature file and a public key in the second key pair to the post-sale upgrade system, so that the post-sale upgrade system sends the public key in the second key pair, the second signature file and the data compression package to a diagnostic device, thereby causing the diagnostic device to instruct the target controller to update the target software after the diagnostic device verifies the data compression package.

[0024] In another aspect, a software update method of a vehicle controller is provided, the method comprising:

[0025] obtaining a software update task, the software update task carrying an identifier of a target controller and an update version of target software, the target controller being a controller used to install the target software;

[0026] obtaining a software update package of the target software and a first signature file based on the identifier of the target controller and the update version of the target software, the first signature file being used to verify authenticity and integrity of the software update package of the target software before the target controller updates the target software;

[0027] sending the software update package of the target software and the first signature file to the target controller through a diagnostic device, so that the target controller updates the target software according to the software update package after the target controller verifies the software update package based on the first signature file.

[0028] Optionally, before the sending, by the diagnostic device, the software update package and the first signature file of the target software to the target controller, the method further comprises:

[0029] compressing the software update package and the first signature file to obtain a data compression package;

[0030] sending the data compression package to a digital signature system, so that the digital signature system generates a second key pair corresponding to the data compression package and generates a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package;

[0031] receiving the second signature file and a public key in the second key pair sent by the digital signature system;

[0032] The sending, by the diagnostic device, the software update package and the first signature file of the target software to the target controller comprises:

[0033] sending the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software update package and the first signature file of the target software to the target controller after verifying the data compression package by using the public key in the second key pair and the second signature file.

[0034] In another aspect, a software updating apparatus of a vehicle controller is provided, and the apparatus comprises:

[0035] a first obtaining module configured to obtain an identifier of a target controller, an identifier of a target digital signature algorithm and a digest of a software update package of a target software, the target controller being a controller used to install the target software;

[0036] a first searching module configured to search for a private key in a first key pair from a first database based on the identifier of the target controller and the identifier of the target digital signature algorithm, the first database being used to store private keys in key pairs applied for different controllers and different digital signature algorithms, the first key pair being a key pair applied for the target controller and the target digital signature algorithm;

[0037] a first generating module configured to generate a first signature file based on the digest of the software update package of the target software and the private key in the first key pair, the first signature file being used to verify authenticity and integrity of the software update package before the target controller updates the target software.

[0038] Optionally, the first obtaining module comprises:

[0039] a display submodule, configured to display a digital signature interface, the digital signature interface being used to obtain an identification of a controller used to install the current software to be signed, an identification of a target digital signature algorithm, and a digest of a software update package of the target software to be signed;

[0040] an obtaining submodule, configured to obtain the identification of the target controller, the identification of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface.

[0041] Optionally, the apparatus further comprises:

[0042] a second obtaining module, configured to obtain a key application request, the key application request carrying the identification of the target controller and the identification of the target digital signature algorithm;

[0043] a second searching module, configured to search, based on the identification of the target controller and the identification of the target digital signature algorithm, whether the private key in the first key pair is stored in the first database;

[0044] a second generating module, configured to, if the private key in the first key pair is not stored in the first database, generate the first key pair by invoking a hardware encryption machine, and store the private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm.

[0045] Optionally, the apparatus further comprises:

[0046] an encryption module, configured to encrypt the private key in the first key pair by invoking the hardware encryption machine, and obtain an encryption algorithm of the private key in the first key pair;

[0047] the second generating module comprises:

[0048] a storage submodule, configured to store the encrypted private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm;

[0049] the first generating module comprises:

[0050] a decryption submodule, configured to decrypt the encrypted private key based on the encryption algorithm of the private key in the first key pair, and generate the first signature file based on the digest of the software update package of the target software and the decrypted private key.

[0051] Optionally, the apparatus further comprises:

[0052] The receiving module is configured to receive a data compression package sent by the after-sales upgrading system, wherein the data compression package carries a software update package of the target software and the first signature file;

[0053] The third generating module is configured to generate a second key pair corresponding to the data compression package, and generate a second signature file based on the data compression package and a private key in the second key pair, wherein the second signature file is used to verify authenticity and integrity of the data compression package;

[0054] The sending module is configured to send the second signature file and a public key in the second key pair to the after-sales upgrading system, so that the after-sales upgrading system sends the public key in the second key pair, the second signature file and the data compression package to a diagnostic device, thereby instructing the target controller to update the target software after the diagnostic device verifies the data compression package.

[0055] In another aspect, a software updating apparatus of a vehicle controller is provided, and the apparatus comprises:

[0056] The first obtaining module is configured to obtain a software updating task, wherein the software updating task carries an identifier of a target controller and an update version of target software, and the target controller refers to a controller used to install the target software;

[0057] The second obtaining module is configured to obtain a software update package of the target software and a first signature file based on the identifier of the target controller and the update version of the target software, wherein the first signature file is used to verify authenticity and integrity of the software update package of the target software before the target controller updates the target software;

[0058] The first sending module is configured to send the software update package of the target software and the first signature file to the target controller through a diagnostic device, so that the target controller updates the target software according to the software update package after verifying the software update package based on the first signature file.

[0059] Optionally, the apparatus further comprises:

[0060] The compression module is configured to compress the software update package and the first signature file to obtain a data compression package;

[0061] The second sending module is configured to send the data compression package to a digital signature system, so that the digital signature system generates a second key pair corresponding to the data compression package, and generates a second signature file based on the data compression package and a private key in the second key pair, wherein the second signature file is used to verify authenticity and integrity of the data compression package;

[0062] receive the second signature file and the public key in the second key pair sent by the digital signature system;

[0063] The first sending module comprises:

[0064] The sending sub-module is configured to send the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software update package of the target software and the first signature file to the target controller after the data compression package is verified and passed by the public key in the second key pair and the second signature file.

[0065] In another aspect, a digital signature system is provided, comprising a memory and a processor, the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory to implement the steps of the software update method of the vehicle controller.

[0066] In another aspect, an after-sales upgrade system is provided, comprising a memory and a processor, the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory to implement the steps of the software update method of the vehicle controller.

[0067] In another aspect, a computer readable storage medium is provided, the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the software update method of the vehicle controller.

[0068] In another aspect, a computer program product comprising instructions is provided, when the instructions are executed on a computer, the computer is caused to perform the steps of the software update method of the vehicle controller.

[0069] The technical scheme provided in the application can at least bring the following beneficial effects:

[0070] The private key in the first key pair applied for different controllers and different digital signature algorithms is stored in the first database, so that when the digital signature system needs to generate a signature file for the software update package of the target software, the private key in the first key pair can be found from the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm, and then the first signature file is generated through the digest of the software update package of the target software and the private key in the first key pair. That is, by uniformly managing the key pair online, the private key in the key pair can be queried online when generating the signature file, which improves the efficiency of finding the key pair and the efficiency of generating the signature file, and even if the software is upgraded frequently, the efficiency of digital signature can also be improved, and the development progress of the vehicle will not be affected. BRIEF DESCRIPTION OF DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0072] FIG. 1 is a structural schematic diagram of an implementation environment provided by an embodiment of the present application;

[0073] FIG. 2 is a structural schematic diagram of another implementation environment provided by an embodiment of the present application;

[0074] FIG. 3 is a flowchart of a software update method of a vehicle controller provided by an embodiment of the present application;

[0075] FIG. 4 is a flowchart of a software update method of a vehicle controller provided by an embodiment of the present application;

[0076] FIG. 5 is a flowchart of a software update method of a vehicle controller provided by an embodiment of the present application;

[0077] FIG. 6 is a flowchart of a software update method of a vehicle controller provided by an embodiment of the present application;

[0078] FIG. 7 is a structural schematic diagram of a software update device of a vehicle controller provided by an embodiment of the present application;

[0079] FIG. 8 is a structural schematic diagram of a software update device of a vehicle controller provided by an embodiment of the present application;

[0080] FIG. 9 is a structural schematic diagram of a server provided by an embodiment of the present application. DETAILED DESCRIPTION

[0081] In order to make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the following further describes the embodiments of the present application with reference to the drawings.

[0082] Before the software updating method of the vehicle controller provided by the embodiments of the present application is explained in detail, the application scenarios and implementation environments involved in the embodiments of the present application are introduced.

[0083] With the increasing requirements for the power, economy, and comfort of vehicles, the electronic and electrical systems integrated in vehicles are becoming more and more complex, such as engine systems, power distribution box systems, instrument systems, and the like. Each electronic and electrical system includes a controller and software installed in the controller. Various third-party devices are available, including third-party on-board devices that can obtain important information of the vehicle or third-party devices in vehicle repair shops. These third-party devices may be illegally tampered with or maliciously attacked during software upgrading. Therefore, in order to avoid security risks caused by third-party devices to software upgrading, a reasonable method needs to be used for software updating to ensure the security of software upgrading.

[0084] In the related art, the authenticity and integrity of a software package are verified by using a digital signature. However, since the key pair used by the digital signature is generated and managed offline, there is a risk of key pair leakage. Moreover, during the development of a vehicle, the software may be frequently upgraded. By using the offline management of keys, the efficiency of the digital signature is often low, which affects the development progress of the vehicle.

[0085] Based on this, the embodiments of the present application provide a software updating method of a vehicle controller. The digital signature system can generate and manage key pairs online while improving the efficiency of the digital signature.

[0086] Please refer to FIG. 1, which is a schematic diagram of an implementation environment according to an exemplary embodiment. The implementation environment includes a digital signature system 101 and a first database 102. The digital signature system 101 can be in communication connection with the first database 102. The communication connection can be wired or wireless connection, or the digital signature system 101 can include the first database 102. The embodiments of the present application do not limit this.

[0087] The digital signature system 101 is configured to obtain an identifier of a target controller, an identifier of a target digital signature algorithm, and a digest of a software updating package of target software, and find a private key in a first key pair from private keys in key pairs applied for different controllers and different digital signature algorithms stored in the first database 102 based on the identifier of the target controller and the identifier of the target digital signature algorithm, and then generate a first signature file based on the digest of the software updating package of the target software and the private key in the first key pair.

[0088] In some embodiments, referring to FIG. 2, the implementation environment can further include an after-sales upgrade system 103, a diagnostic device 104 and a target controller 105, the after-sales upgrade system 103 can be communicatively connected with the digital signature system 101 and the diagnostic device 104 respectively, the diagnostic device 104 can be communicatively connected with the target controller 105, the communication connection can be wired or wireless connection, and the embodiments of the present application do not limit this.

[0089] The after-sales upgrade system 103 is configured to obtain a software update task, and based on the identification of the target controller 105 and the update version of the target software, obtain a software update package and a first signature file of the target software, and send the update package and the first signature file of the target software to the diagnostic device 104. The diagnostic device 104 is configured to send the software update package and the first signature file of the target software to the target controller 105. The target controller 105 is configured to verify the software update package based on the first signature file, and update the target software according to the software update package after verification.

[0090] The digital signature system 101 and the after-sales upgrade system 103 can be a single independent server, a server cluster composed of multiple physical servers, or a distributed system, and can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, or a cloud computing service center.

[0091] The diagnostic device 104 can be a vehicle diagnostic instrument, a host computer or any external device capable of instructing the controller to update the software.

[0092] The target controller 105 can be any kind of controller installed with software, such as an engine controller, a body controller, a chassis controller, etc.

[0093] Those skilled in the art should understand that the above-mentioned digital signature system 101, after-sales upgrade system 103, diagnostic device 104 and target controller 105 are only examples, and other existing or future digital signature systems, after-sales upgrade systems, diagnostic devices and target controllers, such as those applicable to the embodiments of the present application, should also be included in the protection scope of the embodiments of the present application, and are hereby incorporated by reference.

[0094] It should be noted that the application scenarios and implementation environments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the appearance of new application scenarios and the evolution of implementation environments, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0095] Next, a software updating method of a vehicle controller provided by the embodiments of the present application is explained in detail.

[0096] FIG. 3 is a flow chart of a software updating method of a vehicle controller provided by the embodiments of the present application, which is applied to a digital signature system. Please refer to FIG. 3, the method comprises the following steps.

[0097] Step 301: The digital signature system acquires an identification of a target controller, an identification of a target digital signature algorithm and a digest of a software updating package of a target software, the target controller refers to a controller used for installing the target software.

[0098] The implementation of step 301 can refer to step 501 in the subsequent embodiment of FIG. 5, which is not expanded here.

[0099] Step 302: The digital signature system finds a private key in a first key pair based on the identification of the target controller and the identification of the target digital signature algorithm from a first database, the first database is used for storing private keys in key pairs applied for different controllers and different digital signature algorithms, the first key pair is a key pair applied for the target controller and the target digital signature algorithm.

[0100] In addition, the implementation of step 302 can refer to step 502 in the subsequent embodiment of FIG. 5, which is not expanded here.

[0101] Step 303: The digital signature system generates a first signature file based on the digest of the software updating package of the target software and the private key in the first key pair, the first signature file is used for verifying the authenticity and integrity of the software updating package before the target controller updates the target software.

[0102] The implementation of step 303 can refer to step 503 in the subsequent embodiment of FIG. 5, which is not expanded here.

[0103] In the embodiment of the present application, the private key in the key pair applied for different controllers and different digital signature algorithms is stored in the first database, so that when the digital signature system needs to generate a signature file for the software update package of the target software, the private key in the first key pair can be found from the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm, and then the first signature file is generated by the digest of the software update package of the target software and the private key in the first key pair. That is, by uniformly managing the key pair online, the private key in the key pair can be queried online when generating the signature file, which improves the efficiency of finding the key pair and the efficiency of generating the signature file, and even if the software is upgraded frequently, the efficiency of digital signature can also be improved, which does not affect the development progress of the vehicle.

[0104] FIG. 4 is a flowchart of a software update method of a vehicle controller provided by an embodiment of the present application, and the method is applied to an after-sales upgrade system. Please refer to FIG. 4, and the method includes the following steps.

[0105] Step 401: The after-sales upgrade system acquires a software update task, and the software update task carries an identifier of a target controller and an update version of target software, where the target controller refers to a controller used to install the target software.

[0106] The implementation manner of step 401 can refer to step 504 in the subsequent embodiment of FIG. 5, and will not be expanded here.

[0107] Step 402: The after-sales upgrade system acquires a software update package of the target software and a first signature file based on the identifier of the target controller and the update version of the target software, and the first signature file is used to verify the authenticity and integrity of the software update package of the target software before the target controller updates the target software.

[0108] In addition, the implementation manner of step 402 can refer to step 505 in the subsequent embodiment of FIG. 5, and will not be expanded here.

[0109] Step 403: The after-sales upgrade system sends the software update package of the target software and the first signature file to the target controller through a diagnostic device, so that the target controller updates the target software according to the software update package of the target software after passing the verification of the software update package of the target software based on the first signature file.

[0110] The implementation manner of step 403 can refer to step 506 in the subsequent embodiment of FIG. 5, and will not be expanded here.

[0111] In the embodiment of the present application, the after-sales upgrading system sends the software update package and the first signature file of the target software to the target controller through the diagnostic device, and then the target controller updates the software according to the software update package after the software update package is verified by the first signature file. Since the first signature file is generated by using the private key in the key pair to query online, compared with offline management and query of the private key, the efficiency of finding the key pair is improved, and the efficiency of generating the signature file is improved, so that even if the software is upgraded frequently, the efficiency of digital signature can be improved, and the development progress of the vehicle is not affected. Moreover, the software update package is verified by the first signature file, which can avoid the security risks in software upgrading caused by illegal tampering of the software update package.

[0112] FIG. 5 is a flowchart of a software updating method of a vehicle controller according to an embodiment of the present application. Referring to FIG. 5, the method comprises the following steps.

[0113] In step 501, the digital signature system obtains the identifier of the target controller, the identifier of the target digital signature algorithm, and the digest of the software update package of the target software. The target controller refers to the controller for installing the target software.

[0114] In some embodiments, when the software in the controller has a new version, in order to avoid the software update package of the software being illegally tampered, the digital signature system can first digitally sign the software update package of the software. Since the digital signature system needs to specify the controller to which the software with the new version belongs, the identifier of the target controller can be obtained. Moreover, the digital signature system also needs to specify the algorithm used when digitally signing, so the identifier of the target digital signature algorithm can also be obtained. In addition, the digital signature system also needs to obtain the digest of the software update package of the target software.

[0115] The identifier of the target controller is used to uniquely identify the target controller, which can be the name, number, etc. of the target controller, such as an engine controller, a body controller, a chassis controller, etc. The identifier of the target digital signature algorithm is used to uniquely identify the target digital signature algorithm, which can be the name of the target digital signature algorithm, such as RSA (Rivest-Shamir-Adleman, derived from the names of the three inventors Ron Rivest, Adi Shamir and Leonard Adleman) 256, RSA 512, RSA 1024, etc. The numbers in the RSA algorithm are used to represent the key length, and the longer the key length, the better the security. The digest of the software update package of the target software is used to indicate the main information of the software update package.

[0116] The target controller refers to a controller for installing the target software, that is, the target controller is a controller that needs to be updated with software. For example, assume that a vehicle has an engine controller, a body controller, and a chassis controller, and currently the software of the engine controller needs to be updated, while the software of the body controller and the chassis controller does not need to be updated, then the target controller is the engine controller.

[0117] In some embodiments, the digital signature system obtains the identification of the target controller, the identification of the target digital signature algorithm, and the digest of the software update package of the target software in the following manner: displaying a digital signature interface, the digital signature interface being configured to obtain the digest of the software update package of the software to be currently signed, the identification of the controller for installing the software to be currently signed, and the identification of the digital signature algorithm to be used; and obtaining the identification of the target controller, the identification of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface.

[0118] For example, the digital signature interface can include a software update package digest input box, a controller identification input box, a digital signature algorithm identification input box, and a "Confirm" option. The software update package digest input box is configured to obtain the digest of the software update package of the software to be currently signed, that is, the user can input or upload the digest of the software update package of the software to be currently signed in the software update package digest input box. The controller identification input box is configured to obtain the identification of the controller for installing the software to be currently signed, that is, the user can input the identification of the controller for installing the software to be currently signed in the controller identification input box. The digital signature algorithm identification input box is configured to obtain the identification of the digital signature algorithm to be used, that is, the user can input the identification of the digital signature algorithm to be used in the digital signature algorithm identification input box. Thus, after the user inputs the digest of the software update package of the software to be currently signed, the identification of the controller for installing the software to be currently signed, and the identification of the digital signature algorithm to be used in the corresponding input boxes and clicks the "Confirm" option, the digital signature system can obtain the identification of the target controller, the identification of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface. Of course, the digital signature interface can also not include the "Confirm" option, so that after the user inputs the digest of the software update package of the software to be currently signed, the identification of the controller for installing the software to be currently signed, and the identification of the digital signature algorithm to be used in the corresponding input boxes, the digital signature system can automatically obtain the identification of the target controller, the identification of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface after X seconds.

[0119] In some embodiments, if the size of the update package of the software to be signed currently does not exceed the threshold value, it indicates that the size of the update package of the software to be signed currently does not exceed the upper limit requirement of the digital signature system, so that the digital signature system can directly obtain the digest of the update package of the software according to the update package of the software to be signed currently. In this way, the user does not need to obtain the digest of the update package of the software to be signed in advance, but only needs to pack the update package of the software to be signed currently, the identifier of the controller of the software to be signed currently, and the identifier of the digital signature algorithm used into a data analysis package, and upload the data analysis package to the digital signature interface, thereby saving the time of the user. Moreover, the package header of the data analysis package carries the identifier of the controller of the software to be signed currently and the identifier of the digital signature algorithm used, so that the digital signature system can obtain the identifier of the target controller, the identifier of the target digital signature algorithm, and the software update package of the target software based on the data analysis package, and then obtain the digest of the software update package of the target software according to the software update package of the target software.

[0120] For example, the digital signature system can obtain the digest of the software update package of the target software based on the update package of the software to be signed currently by using a hash algorithm, that is, the digest of the software update package can be obtained by performing hash operation on the software update package. Since the hash function has the characteristic of collision resistance, the digest of the software update package obtained by the hash algorithm can detect whether the software update package is tampered. Of course, in actual application, the digest of the software update package of the target software can also be obtained by other ways, which are not limited in the embodiments of the present application.

[0121] In some embodiments, if the size of the update package of the software to be signed currently exceeds the threshold value, if the data analysis package is directly uploaded to the digital signature system, since the size of the update package of the software to be signed exceeds the upper limit requirement of the digital signature system, it may cause the digital signature interface or the digital signature system to malfunction. Therefore, in the case that the size of the update package of the software to be signed currently exceeds the threshold value, the digest of the software update package of the target software can be directly input in the digital signature interface. Of course, when the size of the update package of the software to be signed exceeds the threshold value, the digest of the software update package of the target software can also be directly input in the digital signature interface.

[0122] It should be noted that the above is described in the user in the digital signature interface input current to be signed software update package of the summary, for installing the current to be signed software controller identification, and the identification of the digital signature algorithm used, so that the digital signature system obtains the identification of the target controller, the identification of the target digital signature algorithm and the summary of the software update package of the target software. That is, the above is the digital signature system to provide a web interface to obtain the identification of the target controller, the identification of the target digital signature algorithm and the summary of the software update package of the target software. Of course, the digital signature system can also obtain the identification of the target controller, the identification of the target digital signature algorithm and the summary of the software update package of the target software through other ways, for example, the vehicle also includes a business system, which can directly send the identification of the target controller, the identification of the target digital signature algorithm and the summary of the software update package of the target software to the digital signature system, and the embodiments of the present application are not limited thereto.

[0123] Step 502: The digital signature system finds the private key of the first key pair in the first database based on the identification of the target controller and the identification of the target digital signature algorithm, the first database is used to store the private keys of the key pairs applied for different controllers and different digital signature algorithms, and the first key pair is the key pair applied for the target controller and the target digital signature algorithm.

[0124] Since the first database stores the private keys of the key pairs applied for different controllers and different digital signature algorithms, the private key of the first key pair can be found in the first database based on the obtained identification of the target controller and the identification of the target digital signature algorithm.

[0125] In some embodiments, before the digital signature system obtains the identification of the target controller, the identification of the target digital signature algorithm and the summary of the software update package of the target software, the digital signature system can also obtain a key application request, the key application request carries the identification of the target controller and the identification of the target digital signature algorithm; based on the identification of the target controller and the identification of the target digital signature algorithm, it is found whether the first database stores the private key of the first key pair; if the first database does not store the private key of the first key pair, the first key pair is generated by calling the hardware encryption machine, and the private key of the first key pair is stored in the first database according to the identification of the target controller and the identification of the target digital signature algorithm.

[0126] Since the key application request carries the identifier of the target controller and the identifier of the target digital signature algorithm, and the first database stores the private key in the key pair applied for different controllers and different digital signature algorithms, after the digital signature system obtains the key application request, the digital signature system can first search the first database based on the key application request to find whether there is a private key corresponding to the identifier of the target controller and the identifier of the target digital signature algorithm carried in the key application request.

[0127] If the corresponding private key is found in the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm carried in the key application request, it indicates that the key pair corresponding to the target controller and the target digital signature algorithm has been applied for previously, and it is not necessary to apply again. Therefore, it can be seen that as long as the controller and the digital signature algorithm are the same, the key pair used to digitally sign the digest of the software update package of different software of the controller in the subsequent process is the same.

[0128] If the corresponding private key is not found in the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm carried in the key application request, it indicates that the key pair corresponding to the target controller and the target digital signature algorithm has not been applied for. At this time, the digital signature system can call the hardware encryption machine to generate the first key pair corresponding to the target controller and the target digital signature algorithm, and store the private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm. In this way, in the subsequent process, the private key in the first key pair can be found in the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0129] In some embodiments, the public key in the first key pair can also be stored in the first database, and anyone or device can directly obtain the public key in the first key pair from the first database according to the identifier of the target controller and the identifier of the target signature algorithm. That is, the public key in the first key pair is public.

[0130] In addition, in some embodiments, since the hardware encryption machine implements the encryption algorithm by using hardware, and the algorithm at the hardware level is not easily affected by software attacks, the generation of the key pair by the hardware encryption machine can generate a high-quality random key pair in a secure environment, thereby ensuring the strength of the key pair.

[0131] In some embodiments, after the digital signature system generates the first key pair by calling the hardware encryption machine, the digital signature system can also encrypt the private key in the first key pair by calling the hardware encryption machine, and obtain the encryption algorithm of the private key in the first key pair. Then, the encrypted private key in the first key pair is stored into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0132] That is, in order to improve the security of the stored private key, after the digital signature system invokes the hardware encryption machine to generate the first key pair, the hardware encryption machine can be invoked again to encrypt the private key in the first key pair, and the encrypted private key can be stored in the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0133] Moreover, in order to decrypt the encrypted private key in the first key pair from the first database based on the identifier of the target controller and the identifier of the target digital signature algorithm in the subsequent process, the hardware encryption machine can send the encryption algorithm of the private key in the first key pair to the digital signature system after the hardware encryption machine encrypts the private key in the first key pair, so that the digital signature system can know the encryption algorithm.

[0134] It should be noted that the encryption algorithm of the private key in the first key pair by the hardware encryption machine can be a DES (Data Encryption Standard) algorithm, or an MD5 (Message-Digest Algorithm 5) algorithm, or other encryption algorithms, which are not limited by the embodiments of the present application.

[0135] The above is described by the digital signature system invoking the hardware encryption machine to generate a key pair and encrypt the private key in the key pair. Of course, in actual applications, the digital signature system can generate a key pair by other ways or encrypt the private key in the key pair by other ways, which are not limited by the embodiments of the present application.

[0136] In some embodiments, the digital signature system can display a key application interface, and a user can trigger a key application request through the key application interface.

[0137] For example, the key application interface can include an identifier input box of the controller and an identifier input box of the digital signature algorithm, and a confirmation option of key application. Wherein, the user can input the identifier of the target controller, such as the name of the target controller, in the identifier input box of the controller; the user can input the identifier of the digital signature, such as the name of the target digital signature algorithm, in the identifier input box of the digital signature algorithm. After the user completes the input, the user can click the “confirm to apply for the key” option, so that the digital signature system can obtain the key application request carrying the identifier of the target controller and the identifier of the target signature algorithm.

[0138] It should be noted that the above is described in that the key application request carries the identifier of the target controller, the identifier of the target digital signature algorithm, of course, in actual application, in order to make the digital signature system can more detailed record the related information of the key application request, the key application request can also carry the identifier of the supplier of the target controller, the vehicle type installed with the target controller, the applicant, the writing flow, the application time and the note, etc., and the above several characteristics and the private key in the first key pair are stored into the first database, so that after the user submits the key application application, if it is determined that the private key in the first key pair has been stored in the first database through the key application request, the identifier of the supplier of the target controller corresponding to the private key in the first key pair, the vehicle type installed with the target controller, the applicant, the writing flow, the application time and the note, etc. Information can be displayed on the key application application interface, so that the user can more detailedly understand the application information of the first key pair.

[0139] Step 503: The digital signature system generates a first signature file based on the digest of the software update package of the target software and the private key in the first key pair, and the first signature file is used to verify the authenticity and integrity of the software update package before the target controller updates the target software.

[0140] In some embodiments, the digital signature system can use the private key in the first key pair to encrypt the digest of the target software update package, thereby obtaining the first signature file.

[0141] Based on the above description, the digital signature system can also call the hardware encryption machine to encrypt the private key in the first key pair, and store the encrypted private key into the first database, and the digital signature system can know the encryption algorithm of the hardware encryption machine for encrypting the private key, so that the implementation process of generating the first signature file based on the digest of the software update package of the target software and the private key in the first key pair includes: decrypting the encrypted private key based on the encryption algorithm of the private key in the first key pair; generating the first signature file based on the digest of the software update package of the target software and the decrypted private key.

[0142] That is, since the first database stores the encrypted private key in the first key pair, the digital signature system needs to first decrypt the private key in the first key pair according to the known encryption algorithm, and then use the decrypted private key to encrypt the digest of the software update package of the target software to generate the first signature file.

[0143] In some embodiments, after the digital signature system generates the first signature file, the technician can download the first signature file and store the first signature file and the software update package into the second database according to the identification of the target controller and the software update package version of the target software. Alternatively, in the case that the digital signature system is connected with the second database, after the digital signature system generates the first signature file, the first signature file can also be sent to the second database, so that the second database stores the first signature file according to the identification of the target controller and the software update package version of the target software.

[0144] Step 504: The after-sales upgrade system acquires a software update task, and the software update task carries the identification of the target controller and the update version of the target software.

[0145] In some embodiments, when it is necessary to update the version of the target software in the target controller, the after-sales personnel can configure a software update task according to the version of the target software that needs to be updated, and issue the configured software update task to the after-sales upgrade system, so that the after-sales upgrade system acquires the software update task. In order to determine the target controller from a plurality of controllers, therefore, the software update task can carry the identification of the target controller; and since the target software can include a plurality of update versions, the software update task can also carry the update version of the target software, so as to determine the version of the target software that needs to be updated by the target controller, and thus acquire the corresponding software update package in the subsequent process.

[0146] Step 505: The after-sales upgrade system acquires the software update package of the target software and the first signature file based on the identification of the target controller and the update version of the target software.

[0147] Based on the above description, the software update package of the target software and the first signature file are stored in the second database according to the identification of the target controller and the software update package version of the target software, therefore, after the after-sales upgrade system acquires the software update task, the first signature file and the software update package of the target software can be acquired from the second database based on the identification of the target controller and the update version of the target software.

[0148] Step 506: The after-sales upgrade system sends the software update package of the target software and the first signature file to the target controller through the diagnostic device, so that the target controller updates the target software according to the software update package of the target software after passing the verification of the software update package of the target software based on the first signature file.

[0149] In some embodiments, the diagnostic device can be externally connected to the vehicle, so that the after-sales upgrading system can send the software update package of the target software and the first signature file to the target controller through the diagnostic device, and since the diagnostic device is externally connected to the vehicle, the technician can view the software updating progress of the target controller in real time through the display interface of the diagnostic device during the updating of the target controller according to the software update package of the target software, and can also determine whether the target controller will fail during the software updating; in addition, when the target controller fails, the technician can also determine the cause of the failure in time through the diagnostic device.

[0150] Based on the above description, the public key in the first key pair is public, so after the target controller receives the first signature file, the user can directly obtain the public key in the first key pair based on the identifier of the target controller and the identifier of the target digital signature algorithm through the query module in the digital signature interface, and then make the target controller decrypt the software update package of the target software and verify the authenticity and integrity of the software update package of the target software by using the public key in the first key pair.

[0151] In some embodiments, in order to further ensure the security of the target controller during the updating process of the target software, the method can further include steps (1)-(7) as follows:

[0152] (1) The after-sales upgrading system compresses the software update package and the first signature file to obtain a data compression package.

[0153] In some embodiments, after obtaining the update package of the target software and the first signature file, the after-sales upgrading system will compress the update package of the target software and the first signature file to obtain a data compression package, and send the data compression package to the digital signature system, so that the digital signature system can receive the data compression package.

[0154] (2) The after-sales upgrading system sends the data compression package to the digital signature system.

[0155] (3) The digital signature system receives the data compression package sent by the after-sales upgrading system, and the data compression package carries the software update package of the target software and the first signature file.

[0156] Since the data compression package is obtained by compressing the update package of the target software and the first signature file by the after-sales upgrading system, the data compression package carries the software update package of the target software and the first signature file.

[0157] (4) The digital signature system generates a second key pair corresponding to the data compression package, and generates a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package.

[0158] After receiving the data compression package, the digital signature system can directly generate a corresponding second key pair according to the data compression package, or the digital signature system can also call a hardware cryptographic machine to generate the second key pair.

[0159] In some embodiments, the digital signature system can also obtain a digest of the data compression package based on the data compression package, and encrypt the digest of the data compression package using the private key in the second key pair to generate the second signature file.

[0160] In addition, in some embodiments, since the second key pair is generated in real time according to different data compression packages, and in subsequent processes, the digital signature system will send the public key in the second key pair to the after-sales upgrade system, therefore, the digital signature system does not need to store the second key pair.

[0161] (5) The digital signature system sends the second signature file and the public key in the second key pair to the after-sales upgrade system.

[0162] (6) The after-sales upgrade system receives the second signature file and the public key in the second key pair sent by the digital signature system.

[0163] (7) The after-sales upgrade system sends the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software update package of the target software and the first signature file to the target controller after the data compression package is verified by the public key in the second key pair and the second signature file.

[0164] Based on the above description, after generating the second signature file, the digital signature system can send the second signature file and the public key in the second key pair to the after-sales upgrade system, so that when the target controller needs to update the target software with the help of the diagnostic device, the after-sales upgrade system can send the public key in the second key pair, the second signature file and the data compression package to the diagnostic device, so that the diagnostic device uses the public key in the second key pair to decrypt the second signature file to obtain the first digest of the data compression package, the first digest being the digest of the data compression package carried in the second signature file; then, the diagnostic device can also generate a second digest of the data compression package according to the received data compression package, and compare the first digest and the second digest of the data compression package to verify the received data compression package.

[0165] That is, if the first digest of the data compression package is consistent with the second digest, it indicates that the data compression package passes the verification, and if the first digest of the data compression package is inconsistent with the second digest, it indicates that the data compression package fails the verification.

[0166] After the data compression package passes the verification, the diagnostic device can further decompress the data compression package to obtain the update package of the target software and the first signature file, and send the update package of the target software and the first signature file to the target controller. In this way, the target controller can use the public key in the first key pair to decrypt the first signature file to obtain the digest of the software update package of the target software; then, the target controller can also obtain the digest of the software update package of the target software according to the update package of the target software, and compare the decrypted digest of the software update package of the target software with the digest of the software update package of the target software obtained by the target controller to verify the authenticity and integrity of the received update package of the target software.

[0167] That is, if the digest of the software update package of the target software obtained by the target controller after decryption is consistent with the digest of the software update package of the target software obtained by the target controller, it indicates that the authenticity and integrity of the received software update package of the target software pass the verification, and thus the target controller can update the target software based on the received software update package of the target software; if the digest of the software update package of the target software obtained by the target controller after decryption is inconsistent with the digest of the software update package of the target software obtained by the target controller, it indicates that the software update package of the target software received by the target controller may be illegally tampered with, and thus the target controller will not upgrade the target software according to the received software update package of the target software.

[0168] Based on the above description, the second signature file can be generated by directly interfacing the digital signature system with the after-sales upgrade system. Therefore, after the mutual authentication of the digital signature system and the after-sales upgrade system passes, the first signature file can also be obtained by directly interfacing the digital signature system with the after-sales upgrade system, that is, the identifier of the target controller, the identifier of the target digital signature algorithm and the digest of the software update package of the target software obtained by the digital signature system are based on the data package sent by the after-sales upgrade system. In this way, the digital signature system can use the private key in the first key pair to encrypt the digest of the software update package of the target software sent by the after-sales upgrade system, thereby generating the first signature file.

[0169] The software update method of the vehicle controller provided by the embodiments of the present application will be introduced as a whole.

[0170] Referring to FIG. 6, FIG. 6 is a flowchart of a software updating method of a vehicle controller according to an embodiment of the present application. As shown in the figure, the after-sales personnel can first issue a configured software updating task to the after-sales upgrading system. The after-sales upgrading system sends a data acquisition request to the second database according to the identifier of the target controller and the update version of the target software carried by the software updating task, so as to acquire the first signature file and the software updating package of the target software. After the after-sales upgrading system acquires the first signature file and the software updating package of the target software, the software updating package and the first signature file are compressed to obtain a data compression package, and the data compression package is sent to the digital signature system. The digital signature system generates a second key pair corresponding to the data compression package, generates a second signature file based on the data compression package and the private key in the second key pair, and sends the second signature file and the public key in the second key pair to the after-sales upgrading system. Then, the after-sales upgrading system sends the data compression package, the second signature file and the public key in the second key pair to the diagnostic device. The diagnostic device verifies the data compression package. After the verification is passed, the diagnostic device decompresses the data compression package to obtain the software updating package of the target software and the first signature file, and sends the software updating package of the target software and the first signature file to the target controller. Then, the target controller verifies the software updating package of the target software. After the verification is passed, the target controller updates the target software according to the software updating package of the target software.

[0171] In the embodiment of the present application, the private key in the key pair applied for different controllers and different digital signature algorithms is stored in the first database, so that when the digital signature system needs to generate a signature file for the software update package of the target software, the private key in the first key pair can be found from the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm, and then the first signature file can be generated by the digest of the software update package of the target software and the private key in the first key pair. That is, the method provided in the embodiment of the present application can improve the efficiency of finding the key pair by uniformly managing the key pair online, and the private key in the key pair can be queried online when generating the signature file, compared with offline management and query of the private key, thereby improving the efficiency of generating the signature file, and even if the software is upgraded frequently, the efficiency of digital signature can also be improved, and the development progress of the vehicle will not be affected. Moreover, the private key in the first key pair can be encrypted by the digital signature system, which can further ensure the security when performing digital signature. In addition, the software update and the first signature file can be compressed by the after-sales upgrade system to obtain a data compression package, and the data compression package is sent to the digital signature system, so that the digital signature system generates a second signature file based on the data compression package and the private key in the second key pair. Therefore, the security of the target controller in the process of updating the target software can be further ensured, and the security risk of the target controller caused by illegal tampering of the software update package of the target software can be avoided.

[0172] FIG. 7 is a structural schematic diagram of a software update device of a vehicle controller provided in an embodiment of the present application. The software update device of the vehicle controller can be realized by software, hardware or a combination of both as part or all of a digital signature system, and the digital signature system can be a server shown in FIG. 9. Please refer to FIG. 7, the device comprises a first acquisition module 701, a first finding module 702 and a first generation module 703.

[0173] The first acquisition module 701 is configured to acquire an identifier of a target controller, an identifier of a target digital signature algorithm and a digest of a software update package of a target software, wherein the target controller refers to a controller for installing the target software.

[0174] The first finding module 702 is configured to find a private key in a first key pair from a first database based on the identifier of the target controller and the identifier of the target digital signature algorithm, wherein the first database is configured to store private keys in key pairs applied for different controllers and different digital signature algorithms, and the first key pair is a key pair applied for the target controller and the target digital signature algorithm.

[0175] The first generation module 703 is configured to generate a first signature file based on the digest of the software update package of the target software and the private key in the first key pair, and the first signature file is used to verify the authenticity and integrity of the software update package before the target controller updates the target software.

[0176] Optionally, the first acquisition module 701 comprises:

[0177] The display sub-module is configured to display a digital signature interface, and the digital signature interface is used to acquire the digest of the update package of the software to be signed currently, the identifier of the controller for installing the software to be signed currently, and the identifier of the digital signature algorithm to be adopted.

[0178] The acquisition sub-module is configured to acquire the identifier of the target controller, the identifier of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface.

[0179] Optionally, the apparatus further comprises:

[0180] The second acquisition module is configured to acquire a key application request, and the key application request carries the identifier of the target controller and the identifier of the target digital signature algorithm.

[0181] The second search module is configured to search, based on the identifier of the target controller and the identifier of the target digital signature algorithm, whether the private key in the first key pair is stored in the first database.

[0182] The second generation module is configured to, if the private key in the first key pair is not stored in the first database, generate the first key pair by calling the hardware encryption machine, and store the private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0183] Optionally, the apparatus further comprises:

[0184] The encryption module is configured to encrypt the private key in the first key pair by calling the hardware encryption machine, and acquire the encryption algorithm of the private key in the first key pair.

[0185] The second generation module comprises:

[0186] The storage sub-module is configured to store the encrypted private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

[0187] The first generation module comprises:

[0188] The decryption sub-module is configured to decrypt the encrypted private key based on the encryption algorithm of the private key in the first key pair, and generate the first signature file based on the digest of the software update package of the target software and the decrypted private key.

[0189] Optionally, the apparatus further comprises:

[0190] a receiving module, configured to receive a data compression package sent by the after-sales upgrading system, the data compression package carrying a software update package of the target software and a first signature file;

[0191] a third generating module, configured to generate a second key pair corresponding to the data compression package, and generate a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package;

[0192] a sending module, configured to send the second signature file and a public key in the second key pair to the after-sales upgrading system, so that the after-sales upgrading system sends the public key in the second key pair, the second signature file and the data compression package to the diagnostic device, so that the diagnostic device instructs the target controller to update the target software after the data compression package is verified.

[0193] In the embodiments of the present application, the private keys in the key pairs applied for different controllers and different digital signature algorithms are stored in the first database, so that when the digital signature system needs to generate a signature file for the software update package of the target software, the private key in the first key pair can be found from the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm, and then the first signature file is generated through the digest of the software update package of the target software and the private key in the first key pair. That is, by uniformly managing the key pairs online, the private key in the key pair can be queried online when generating the signature file, which improves the efficiency of finding the key pair and the efficiency of generating the signature file, and even if the software is upgraded frequently, the efficiency of digital signature can also be improved, which will not affect the development progress of the vehicle.

[0194] It should be noted that: the software updating apparatus of the vehicle controller provided in the above embodiments is only exemplified by the division of the above functional modules when updating the software of the controller, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the software updating apparatus of the vehicle controller and the software updating method of the vehicle controller provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0195] Figure 8 is a structural schematic diagram of a software updating device of a vehicle controller according to an embodiment of the present application. The software updating device of the vehicle controller can be implemented by software, hardware or a combination of both, and can be part or all of an after-sales upgrading system. The after-sales upgrading system can be a server shown in Figure 9. Referring to Figure 8, the device comprises a first obtaining module 801, a second obtaining module 802 and a first sending module 803.

[0196] The first obtaining module 801 is configured to obtain a software updating task, the software updating task carrying an identifier of a target controller and an updated version of target software, the target controller being a controller for installing the target software.

[0197] The second obtaining module 802 is configured to obtain, based on the identifier of the target controller and the updated version of the target software, a software updating package of the target software and a first signature file, the first signature file being used to verify the authenticity and integrity of the software updating package of the target software before the target controller updates the target software.

[0198] The first sending module 803 is configured to send, through a diagnostic device, the software updating package of the target software and the first signature file to the target controller, so that the target controller updates the target software according to the software updating package after the software updating package is verified by the target controller based on the first signature file.

[0199] Optionally, the device further comprises:

[0200] A compression module is configured to compress the software updating package and the first signature file to obtain a data compression package.

[0201] A second sending module is configured to send the data compression package to a digital signature system, so that the digital signature system generates a second key pair corresponding to the data compression package, and generates a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify the authenticity and integrity of the data compression package.

[0202] A receiving module is configured to receive the second signature file and a public key in the second key pair sent by the digital signature system.

[0203] The first sending module 803 comprises:

[0204] A sending sub-module is configured to send the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software updating package of the target software and the first signature file to the target controller after the data compression package is verified by the diagnostic device through the public key in the second key pair and the second signature file.

[0205] In the embodiment of the present application, the after-sales upgrading system sends the software update package and the first signature file of the target software to the target controller through the diagnostic device, and then the target controller updates the software according to the software update package after the software update package is verified by the first signature file. Since the first signature file is generated by using the private key in the key pair to query online, compared with offline management and query of the private key, the efficiency of finding the key pair is improved, and the efficiency of generating the signature file is improved, so that even if the software upgrading is frequently performed, the efficiency of digital signature can be improved, and the development progress of the vehicle is not affected. Moreover, the software update package is verified by the first signature file, so that the security risk in software upgrading caused by illegal tampering of the software update package can be avoided.

[0206] It should be noted that the vehicle controller software updating apparatus provided in the above embodiments is only used as an example for the division of the above functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the vehicle controller software updating apparatus and the vehicle controller software updating method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be described here.

[0207] FIG. 9 is a structural schematic diagram of a server according to an embodiment of the present application. The server 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The server 900 further includes a basic input / output system (I / O system) 906 helping to transmit information between various devices in the computer, and a mass storage device 907 for storing an operating system 913, application programs 914, and other program modules 915.

[0208] The basic input / output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse, a keyboard, or the like for inputting information by a user. The display 908 and the input device 909 are both connected to the central processing unit 901 through an input / output controller 910 connected to the system bus 905. The basic input / output system 906 can also include the input / output controller 910 for receiving and processing input from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus, and the like. Similarly, the input / output controller 910 also provides output to a display screen, a printer, or other types of output devices.

[0209] The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer readable media provide nonvolatile storage for the server 900. That is, the mass storage device 907 can include a computer readable medium (not shown) such as a hard drive or a CD-ROM drive.

[0210] Without loss of generality, computer readable media can include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Computer storage media does not, however, include communication media. The system memory 904 and mass storage device 907 described above can collectively be referred to as memory.

[0211] According to various embodiments of the present application, the server 900 can also operate in a networking environment using logical connections to one or more remote computers, such as a host computer. The server 900 can connect to the network 912 through a network interface unit 911 connected to the system bus 905, or can connect to another type of network or remote computer system (not shown) using the network interface unit 911.

[0212] The above-mentioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0213] In some embodiments, a computer readable storage medium is also provided, in which a computer program is stored, and the computer program is executed by a processor to implement the steps of the software updating method of the vehicle controller in the above-mentioned embodiments. For example, the computer readable storage medium can be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0214] It is worth noting that the computer readable storage medium mentioned in the embodiments of the present application can be a non-volatile storage medium, in other words, can be a non-transitory storage medium.

[0215] It should be understood that all or part of the steps of the above-mentioned embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, it can be realized in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. The computer instructions can be stored in the computer readable storage medium described above.

[0216] That is, in some embodiments, a computer program product including instructions which, when run on a computer, cause the computer to perform the steps of the software update method of the vehicle controller described above is also provided.

[0217] It should be understood that "at least one" referred to herein means one or more, and "multiple" means two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second" and the like. The skilled in the art can understand that "first", "second" and the like do not limit the quantity and execution order, and "first", "second" and the like do not necessarily mean different.

[0218] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0219] The above describes the embodiments provided by the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A software update method of a vehicle controller, characterized by, The method is applied to a digital signature system, and the method comprises the following steps: obtaining the identification of a target controller, the identification of a target digital signature algorithm and the digest of a software update package of a target software, wherein the target controller refers to a controller used for installing the target software; based on the identification of the target controller and the identification of the target digital signature algorithm, searching for a private key in a first key pair from a first database, wherein the first database is used for storing private keys in key pairs applied for different controllers and different digital signature algorithms, and the first key pair is a key pair applied for the target controller and the target digital signature algorithm; based on the digest of the software update package of the target software and the private key in the first key pair, generating a first signature file, wherein the first signature file is used for verifying the authenticity and integrity of the software update package before the target controller updates the target software.

2. The method of claim 1, wherein, The step of obtaining the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software comprises the following steps: displaying a digital signature interface, wherein the digital signature interface is used for obtaining the digest of an update package of a software to be signed currently, the identification of a controller used for installing the software to be signed currently and the identification of a digital signature algorithm used; obtaining the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software from the digital signature interface.

3. The method of claim 1, wherein, Before the step of obtaining the identification of the target controller, the identification of the target digital signature algorithm and the digest of the software update package of the target software, the method further comprises the following steps: obtaining a key application request, wherein the key application request carries the identification of the target controller and the identification of the target digital signature algorithm; based on the identification of the target controller and the identification of the target digital signature algorithm, searching for whether the private key in the first key pair is stored in the first database; if the private key in the first key pair is not stored in the first database, generating the first key pair by calling a hardware encryption machine, and storing the private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm.

4. The method of claim 3, wherein, After the step of generating the first key pair by calling the hardware encryption machine, the method further comprises the following steps: encrypting the private key in the first key pair by calling the hardware encryption machine, and obtaining an encryption algorithm of the private key in the first key pair; the step of storing the private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm comprises the following step: storing the encrypted private key in the first key pair into the first database according to the identification of the target controller and the identification of the target digital signature algorithm; the step of generating the first signature file based on the digest of the software update package of the target software and the private key in the first key pair comprises the following steps: decrypting the encrypted private key based on the encryption algorithm of the private key in the first key pair; and generating the first signature file based on the digest of the software update package of the target software and the decrypted private key.

5. The method of claim 1, wherein, The method further comprises the following steps: receive a data compression package sent by the after-sales upgrading system, the data compression package carrying a software update package of the target software and the first signature file; generate a second key pair corresponding to the data compression package, and generate a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package; send the second signature file and a public key in the second key pair to the after-sales upgrading system, so that the after-sales upgrading system sends the public key in the second key pair, the second signature file and the data compression package to a diagnostic device, thereby causing the diagnostic device to instruct the target controller to update the target software after the diagnostic device verifies the data compression package.

6. A software update method of a vehicle controller characterized by, The method is applied to an after-sales upgrading system, and the method comprises: obtaining a software update task, the software update task carrying an identifier of a target controller and an update version of target software, the target controller being a controller used to install the target software; obtaining a software update package of the target software and a first signature file based on the identifier of the target controller and the update version of the target software, the first signature file being used to verify authenticity and integrity of the software update package of the target software before the target controller updates the target software; sending the software update package of the target software and the first signature file to the target controller through a diagnostic device, so that the target controller updates the target software according to the software update package after the target controller verifies the software update package based on the first signature file.

7. The method of claim 6, wherein, Before the sending of the software update package of the target software and the first signature file to the target controller through the diagnostic device, the method further comprises: compressing the software update package and the first signature file to obtain a data compression package; sending the data compression package to a digital signature system, so that the digital signature system generates a second key pair corresponding to the data compression package, and generates a second signature file based on the data compression package and a private key in the second key pair, the second signature file being used to verify authenticity and integrity of the data compression package; receiving the second signature file and a public key in the second key pair sent by the digital signature system; The sending of the software update package of the target software and the first signature file to the target controller through the diagnostic device comprises: sending the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software update package of the target software and the first signature file to the target controller after the diagnostic device verifies the data compression package through the public key in the second key pair and the second signature file.

8. A software updating apparatus of a vehicle controller characterized by comprising: The apparatus comprises: a first obtaining module configured to obtain an identifier of a target controller, an identifier of a target digital signature algorithm and a digest of a software update package of target software, the target controller being a controller used to install the target software; The first searching module is configured to search, based on the identifier of the target controller and the identifier of the target digital signature algorithm, a private key in a first key pair from a first database, the first database being configured to store private keys in key pairs applied for different controllers and different digital signature algorithms, and the first key pair being a key pair applied for the target controller and the target digital signature algorithm. The first generating module is configured to generate a first signature file based on the digest of the software update package of the target software and the private key in the first key pair, the first signature file being configured to verify authenticity and integrity of the software update package before the target controller updates the target software.

9. The software updating apparatus according to claim 8, wherein The first obtaining module comprises: The display submodule is configured to display a digital signature interface, the digital signature interface being configured to obtain a digest of an update package of current software to be signed, an identifier of a controller for installing the current software to be signed, and an identifier of a digital signature algorithm to be used; The obtaining submodule is configured to obtain the identifier of the target controller, the identifier of the target digital signature algorithm, and the digest of the software update package of the target software from the digital signature interface.

10. The software updating apparatus according to claim 8, wherein The device further comprises: The second obtaining module is configured to obtain a key application request, the key application request carrying the identifier of the target controller and the identifier of the target digital signature algorithm; The second searching module is configured to search, based on the identifier of the target controller and the identifier of the target digital signature algorithm, whether the private key in the first key pair is stored in the first database; The second generating module is configured to, if the private key in the first key pair is not stored in the first database, generate a first key pair by calling a hardware encryption machine, and store the private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm.

11. The software updating apparatus according to claim 10, wherein The device further comprises: The encryption module is configured to encrypt the private key in the first key pair by calling the hardware encryption machine, and obtain an encryption algorithm of the private key in the first key pair; The second generating module comprises: The storage submodule is configured to store the encrypted private key in the first key pair into the first database according to the identifier of the target controller and the identifier of the target digital signature algorithm; The first generating module comprises: The decryption submodule is configured to decrypt the encrypted private key based on the encryption algorithm of the private key in the first key pair, and generate the first signature file based on the digest of the software update package of the target software and the decrypted private key.

12. The software updating apparatus according to claim 8, wherein The device further comprises: The receiving module is configured to receive a data compression package sent by an after-sales upgrading system, the data compression package carrying the software update package of the target software and the first signature file; The third generating module is configured to generate a second key pair corresponding to the data compression package, and generate a second signature file based on the data compression package and a private key in the second key pair, the second signature file being configured to verify authenticity and integrity of the data compression package; The sending module is configured to send the second signature file and the public key in the second key pair to the post-sale upgrade system, so that the post-sale upgrade system sends the public key in the second key pair, the second signature file and the data compression package to the diagnostic device, and instructs the target controller to update the target software after the diagnostic device verifies the data compression package.

13. A software updating apparatus of a vehicle controller characterized by comprising: The device comprises: The first obtaining module is configured to obtain a software update task, wherein the software update task carries an identifier of a target controller and an update version of target software, and the target controller refers to a controller used to install the target software. The second obtaining module is configured to obtain a software update package of the target software and a first signature file based on the identifier of the target controller and the update version of the target software, and the first signature file is used to verify the authenticity and integrity of the software update package of the target software before the target controller updates the target software. The first sending module is configured to send the software update package of the target software and the first signature file to the target controller through a diagnostic device, so that the target controller updates the target software according to the software update package after verifying the software update package based on the first signature file.

14. The software updating apparatus according to claim 13, wherein The device further comprises: The compression module is configured to compress the software update package and the first signature file to obtain a data compression package. The second sending module is configured to send the data compression package to a digital signature system, so that the digital signature system generates a second key pair corresponding to the data compression package, and generates a second signature file based on the data compression package and a private key in the second key pair, and the second signature file is used to verify the authenticity and integrity of the data compression package. The receiving module is configured to receive the second signature file and the public key in the second key pair sent by the digital signature system. The first sending module comprises: The sending submodule is configured to send the data compression package, the second signature file and the public key in the second key pair to the diagnostic device, so that the diagnostic device sends the software update package of the target software and the first signature file to the target controller after verifying the data compression package through the public key in the second key pair and the second signature file.

15. A digital signature system characterized by The computer device comprises a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to realize the steps of the software update method of the vehicle controller in any one of claims 1-5.

16. A computer program product comprising instructions, characterized in that, When the instructions run on the computer, the computer is caused to execute the steps of the software update method of the vehicle controller in any one of claims 1-5.

Citation Information

Patent Citations

  • Device and method for updating vehicle controller firmware

    CN110187904A

  • Method and device for safely flashing ECU (Electronic Control Unit) of vehicle

    CN116578315A

  • Software updating method and device of vehicle controller and digital signature system

    CN118885190A

  • Method, apparatus, and storage medium for updating vehicle software

    EP4318217A1

  • Software authentication before software update

    US20180048473A1