A method and system for OTA upgrading of vehicle controller
By using private protocols and encryption technology in OTA upgrades, the security of the upgrade package of the vehicle controller is ensured, the security risks of OTA upgrades in the existing technology are solved, and higher information security performance is achieved.
Patent Information
- Application Number
- CN202210112368.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-01-29
AI Technical Summary
In the prior art, OTA upgraded vehicle controllers pose safety risks, especially lacking effective guarantees in terms of information security.
The controller upgrade package organized by a private protocol is implemented, and the PKI server is used to encrypt symmetric algorithms and sign asymmetric algorithms. The vehicle terminal networking device communicates with the OTA server through SSL standard link protocol, and uses the SubMaster device's service certificate and Encrypted IDs are used for key management and verification to ensure the integrity and security of the upgrade package.
It effectively improves the information security performance of OTA upgrades, ensures the security upgrade process of vehicle controllers, ensures the integrity and confidentiality of the upgrade package, and reduces information security risks.
Smart Images

Figure CN114398064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of OTA upgrade of vehicles, and in particular to the technology of OTA upgrade of vehicle controllers. Background Art
[0002] The full name of OTA technology in English is Over the Air Technology, which is the air download technology, that is, the system upgrade is carried out through mobile communication technology. The OTA of the vehicle-side system refers to the upgrade of vehicle-related systems and controllers.
[0003] The number of controllers in cars is increasing, and their functions are becoming more and more complex. It is inevitable that some controllers will be found to have software defects after the vehicle leaves the factory or during user use. Upgrading and fixing defects in related controllers of vehicles that have left the factory through OTA technology can improve user experience and reduce operating costs for manufacturers. OTA upgrades of vehicle controllers are becoming more frequent, and models equipped with whole-vehicle OTA are constantly emerging. However, the laws and regulations related to OTA have not yet been perfected. Automobiles need to be particularly cautious about safety issues, which are directly related to the safety of customers' lives and property. The information security risks of OTA upgrades are gradually emerging in applications. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for OTA upgrading of a vehicle controller, and to solve the technical problem that there are safety hazards in upgrading a vehicle controller via OTA in the related technology.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows: A method for OTA upgrading a vehicle controller comprises the following steps:
[0006] S01: The OTA server uploads the controller upgrade package organized by a private protocol;
[0007] S02: The PKI server encrypts the controller upgrade package using a symmetric algorithm;
[0008] S03: The PKI server calculates the HASH value of the controller upgrade package, and encrypts the HASH value using the asymmetric algorithm private key corresponding to the corresponding business certificate ID as the signature of the upgrade package according to the HASH value;
[0009] S04: The vehicle-side network device collects the relevant version information of the vehicle controller, and communicates with the OTA server through the configured private network according to the SSL standard link protocol;
[0010] S05: The vehicle-side network device sends the vehicle controller-related version information to the OTA server;
[0011] S06: The OTA server determines whether the version information related to the vehicle controller is the latest version. If not, the vehicle-side network device is notified to download the controller upgrade package.
[0012] S07: The vehicle-side network device verifies the integrity of the controller upgrade package;
[0013] S08: The vehicle-side networked device queries the SubMaster service certificate information corresponding to the controller to be upgraded according to the configuration topology information;
[0014] S09: The vehicle-side network device deploys the controller upgrade package to the corresponding SubMaster device, and the SubMaster device verifies the signature of the controller upgrade package using the public key of the asymmetric algorithm of the corresponding business certificate;
[0015] S10: The vehicle-side network device queries the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required for decrypting the controller upgrade package, the vehicle-side network device updates the key and the corresponding initial value information to the SubMaster, and the key is verified by the public key of the business certificate of the SubMaster device;
[0016] S11: When the controller upgrade package and key verification pass, the SubMaster device notifies the vehicle-side network device to prepare for the upgrade, and the vehicle-side network device checks the vehicle upgrade conditions and then notifies the SubMaster device to upgrade;
[0017] S12: The SubMaster device decrypts the controller upgrade package and parses the controller upgrade package content according to a private upgrade package organization and parsing protocol, and flashes and upgrades the controller to be upgraded.
[0018] Preferably,
[0019] In S02, the PKI server encrypts the controller upgrade package using a symmetric algorithm, and records and saves the corresponding key ID.
[0020] Preferably,
[0021] In S08, if the SubMaster device currently does not have the business certificate required for the controller upgrade package signature verification, the vehicle-side networking device updates the business certificate to the SubMaster device, and the business certificate is verified by the root certificate public key built into the SubMaster.
[0022] Preferably,
[0023] In the S11, the vehicle upgrade conditions include vehicle speed, engine status, vehicle power gear, handbrake status and battery power.
[0024] Preferably,
[0025] In S12, the private upgrade package organization parsing protocol includes version information, flash type, baud rate, diagnostic ID, data block size, receiving, sending and waiting delay of the controller upgrade package.
[0026] The present invention also provides a system for OTA upgrading a vehicle controller, comprising:
[0027] Upload module, used by the OTA server to upload controller upgrade packages organized by private protocols;
[0028] A first encryption module, used for the PKI server to perform symmetric algorithm encryption on the controller upgrade package;
[0029] A calculation module, used for the PKI server to calculate the HASH value of the controller upgrade package;
[0030] The second encryption module is used to encrypt the HASH value as the signature of the upgrade package through the asymmetric algorithm private key corresponding to the corresponding business certificate ID according to the HASH value;
[0031] The collection module is used by the vehicle-side networked device to collect the relevant version information of the vehicle controller;
[0032] A sending module, used for the vehicle-side network device to send the vehicle controller related version information to the OTA server;
[0033] The first judgment module is used for the OTA server to judge whether the relevant version information of the vehicle controller is the latest version. If not, the vehicle-side network device is notified to download the controller upgrade package;
[0034] A verification module, used for the vehicle-side network device to verify the integrity of the controller upgrade package;
[0035] The first query module is used for the vehicle-side networked device to query the SubMaster service certificate information corresponding to the controller to be upgraded according to the topology information;
[0036] The signature verification module is used by the SubMaster device to verify the signature of the controller upgrade package using the public key of the asymmetric algorithm of the corresponding business certificate;
[0037] The second query module is used for the vehicle-side network device to query the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required for the controller upgrade package parsing, the vehicle-side network device updates the key and the corresponding initial value information to the SubMaster, and the key passes the verification of the business certificate public key of the SubMaster device;
[0038] The second judgment module is used by the vehicle-side network device to check the vehicle upgrade conditions and then notify the SubMaster device to upgrade;
[0039] A decryption module, used by the SubMaster device to decrypt the controller upgrade package;
[0040] The parsing module is used to parse the controller upgrade package content according to a private upgrade package organization parsing protocol.
[0041] Preferably,
[0042] In the first encryption module, the PKI server encrypts the controller upgrade package using a symmetric algorithm, and records and saves the corresponding key ID.
[0043] Preferably,
[0044] In the first query module, if the SubMaster device currently does not have the business certificate required for the controller upgrade package verification, the vehicle-side network device updates the business certificate to the SubMaster device, and the business certificate passes the verification of the SubMaster's built-in root certificate public key.
[0045] Preferably,
[0046] In the second judgment module, the vehicle upgrade conditions include vehicle speed, engine status, vehicle power gear, handbrake status and battery power.
[0047] Preferably,
[0048] In the analysis module, the private upgrade package organization analysis protocol includes the version information, flash type, baud rate, diagnostic ID, data block size, reception, transmission and waiting delay of the controller upgrade package.
[0049] By adopting the above technical scheme, the present invention can achieve the following beneficial technical effects: In the present invention, the security upgrade of the vehicle side requires the cooperation of the OTA server side, and the OTA server side provides the following services for the overall solution: generation and update of business certificates; generation and update of symmetric keys, and symmetric encryption of controller upgrade packages; the vehicle side and the OTA server side communicate through a private network under the operator network, and the vehicle side and the OTA server side are connected using the standard SSL protocol. Security chips are deployed in the vehicle-side networked devices and SubMaster devices, and a root public key certificate is built into the security chip, which cannot be changed. The root certificate is used to verify and replace the updated business certificate, and uploaded to the OTA server side. After the controller upgrade package is uploaded, the OTA server uses a symmetric algorithm to encrypt the controller upgrade package. The symmetric key is stored in the encryption chip of the SubMaster device. The symmetric key can be encrypted and decrypted for update through the asymmetric encryption algorithm of the verified business certificate. The initial value of the symmetric encryption and decryption is updated each time. Each upgrade package generates a signature on the OTA server. After the transmission is completed, the business certificate is used to verify the signature on the SubMaster device. The format of the package uploaded on the OTA server is organized using a private protocol and parsed and written on the SubMaster device, which effectively improves the information security performance of OTA and ensures the security of the vehicle's OTA upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a system security architecture diagram of the present invention;
[0051] Figure 2 This is a schematic diagram of the controller safety startup verification principle of the present invention. DETAILED DESCRIPTION
[0052] The present invention will be further described below in conjunction with the accompanying drawings.
[0053] like Figure 1 As shown, the OTA server / PKI server and the vehicle-side connected device / Master communicate with each other through 4G / WiFi, the vehicle-side connected device / Master has a built-in HSM, and the vehicle-side connected device / Master is connected to each controller through CAN / CANFD / Ethernet.
[0054] Specifically, the present invention provides a method for OTA upgrading a vehicle controller, comprising the following steps:
[0055] In the first step, the OTA server uploads the controller upgrade package organized by the private protocol. The OTA server / PKI server encrypts the controller upgrade package with a symmetric algorithm, records and saves the corresponding key ID and other information; the PKI server calculates the HASH value of the controller upgrade package and encrypts the HASH value with the asymmetric algorithm private key corresponding to the corresponding business certificate ID as the signature of the controller upgrade package.
[0056] In the second step, the vehicle-side connected device collects relevant version information of the vehicle controller, communicates with the OTA server through a configured private network according to the SSL standard link protocol, and sends the vehicle-side version information to the OTA server.
[0057] In the third step, the OTA server receives and compares the version information of the background and the vehicle. If it is found that the version information is not the latest, the vehicle-side connected device is notified to download the controller upgrade package to be upgraded.
[0058] In the fourth step, the vehicle-side connected device downloads the controller upgrade package and verifies the integrity of the controller upgrade package. If the verification fails, it needs to be downloaded again.
[0059] In the fifth step, the vehicle-side network device will query the SubMaster business certificate information corresponding to the upgraded controller based on the configured topology information. If the SubMaster device currently does not have the business certificate required for the controller upgrade package verification, the vehicle-side networked device will update the business certificate of SubMaster. The business certificate must pass the verification of the built-in root certificate public key of SubMater. The vehicle-side networked device will deploy the controller upgrade package to the corresponding SubMaster device. The SubMaster device will verify the controller upgrade package with the public key of the asymmetric algorithm of the corresponding business certificate. If the verification fails, the controller upgrade package needs to be redeployed and re-verified.
[0060] In the sixth step, the vehicle-side connected device queries the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required to decrypt the upgrade package, the vehicle-side connected device will update the SubMaster key and the corresponding initial value and other information. The key must be verified by the SubMaster's business certificate public key.
[0061] Step 7. After the controller upgrade package and key are verified, the SubMaster device prepares for the upgrade through the Master device. The Master device checks the vehicle upgrade conditions. The specific conditions are set according to the vehicle type, including vehicle speed, engine status, vehicle power gear, parking brake status, battery power, etc. If the conditions are met, the SubMaster device is notified to upgrade.
[0062] In the eighth step, the SubMaster device decrypts the controller upgrade package and parses the contents of the controller upgrade package according to the private upgrade package organization and parsing protocol, and flashes and upgrades the controller to be upgraded. The private upgrade package organization and parsing protocol includes the version information of the controller upgrade package, the flash type, baud rate, diagnostic ID, data block size, receiving, sending, waiting delay and other information. It can modify the configuration file according to different needs, flexibly build versions, parse version contents, and control the flashing rhythm. It is highly scalable and configurable.
[0063] In the ninth step, after the controller is started, the authenticity and integrity of the Bootloader and application are verified.
[0064] like Figure 2 As shown, specifically, the controller verifies the authenticity and integrity of the Bootloader through the bootable program, and then verifies the authenticity and integrity of the application based on a sampling mechanism. The application can be started only after the verification passes.
[0065] The present invention also provides a system for OTA upgrading a vehicle controller, comprising:
[0066] Upload module, used by the OTA server to upload controller upgrade packages organized by private protocols;
[0067] The first encryption module is used for the PKI server to perform symmetric algorithm encryption on the controller upgrade package;
[0068] The calculation module is used by the PKI server to calculate the HASH value of the controller upgrade package;
[0069] The second encryption module is used to encrypt the HASH value as the signature of the upgrade package through the asymmetric algorithm private key corresponding to the corresponding business certificate ID according to the HASH value;
[0070] The collection module is used by the vehicle-side networked device to collect the relevant version information of the vehicle controller;
[0071] The sending module is used for the vehicle-side connected device to send the vehicle controller related version information to the OTA server;
[0072] The first judgment module is used for the OTA server to judge whether the relevant version information of the vehicle controller is the latest version. If not, the vehicle-side network device is notified to download the controller upgrade package;
[0073] Verification module, used for vehicle-side connected devices to verify the integrity of controller upgrade packages;
[0074] The first query module is used for the vehicle-side networked device to query the SubMaster business certificate information corresponding to the controller to be upgraded according to the topology information;
[0075] The signature verification module is used by the SubMaster device to verify the signature of the controller upgrade package using the public key of the asymmetric algorithm of the corresponding business certificate;
[0076] The second query module is used for the vehicle-side networked device to query the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required for the controller upgrade package parsing, the vehicle-side networked device updates the key and the corresponding initial value information to the SubMaster, and the key passes the verification of the business certificate public key of the SubMaster device;
[0077] The second judgment module is used by the vehicle-side network device to check the vehicle upgrade conditions and then notify the SubMaster device to upgrade;
[0078] A decryption module, used for the SubMaster device to decrypt the controller upgrade package;
[0079] The parsing module is used to parse the controller upgrade package content according to the private upgrade package organization parsing protocol.
[0080] Specifically,
[0081] In the first encryption module, the PKI server encrypts the controller upgrade package using a symmetric algorithm, and records and saves the corresponding key ID.
[0082] Specifically,
[0083] In the first query module, if the SubMaster device currently does not have the business certificate required for the controller upgrade package verification, the vehicle-side networking device updates the business certificate to the SubMaster device, and the business certificate passes the verification of the SubMaster's built-in root certificate public key.
[0084] Specifically,
[0085] In the second judgment module, the vehicle upgrade conditions include vehicle speed, engine status, vehicle power gear, handbrake status and battery power.
[0086] Specifically,
[0087] In the parsing module, the private upgrade package organization parsing protocol includes the controller upgrade package version information, flash type, baud rate, diagnostic ID, data block size, receiving, sending and waiting delay.
Claims
1. A method for OTA upgrading a vehicle controller, characterized in that: The following steps are involved: S01: The OTA server uploads the controller upgrade package organized by a private protocol; S02: The PKI server encrypts the controller upgrade package using a symmetric algorithm; S03: The PKI server calculates the HASH value of the controller upgrade package, and encrypts the HASH value using the asymmetric algorithm private key corresponding to the corresponding business certificate ID as the signature of the upgrade package according to the HASH value; S04: The vehicle-side network device collects the relevant version information of the vehicle controller, and communicates with the OTA server through the configured private network according to the SSL standard link protocol; S05: The vehicle-side network device sends the vehicle controller-related version information to the OTA server; S06: The OTA server determines whether the version information related to the vehicle controller is the latest version. If not, the vehicle-side network device is notified to download the controller upgrade package. S07: The vehicle-side network device verifies the integrity of the controller upgrade package; S08: The vehicle-side networked device queries the SubMaster service certificate information corresponding to the controller to be upgraded according to the configuration topology information; S09: The vehicle-side network device deploys the controller upgrade package to the corresponding SubMaster device, and the SubMaster device verifies the signature of the controller upgrade package using the public key of the asymmetric algorithm of the corresponding business certificate; S10: The vehicle-side network device queries the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required for decrypting the controller upgrade package, the vehicle-side network device updates the key and the corresponding initial value information to the SubMaster, and the key is verified by the public key of the business certificate of the SubMaster device; S11: When the controller upgrade package and key verification pass, the SubMaster device notifies the vehicle-side network device to prepare for the upgrade, and the vehicle-side network device checks the vehicle upgrade conditions and then notifies the SubMaster device to upgrade; S12: The SubMaster device decrypts the controller upgrade package and parses the controller upgrade package content according to a private upgrade package organization and parsing protocol, and flashes and upgrades the controller to be upgraded.
2. The method for OTA upgrading of a vehicle controller according to claim 1, characterized in that: In S02, the PKI server encrypts the controller upgrade package using a symmetric algorithm, and records and saves the corresponding key ID.
3. The method for OTA upgrading of a vehicle controller according to claim 1, characterized in that: In S08, if the SubMaster device currently does not have the business certificate required for the controller upgrade package signature verification, the vehicle-side networking device updates the business certificate to the SubMaster device, and the business certificate is verified by the root certificate public key built into the SubMaster.
4. The method for OTA upgrading of a vehicle controller according to claim 1, characterized in that: In the S11, the vehicle upgrade conditions include vehicle speed, engine status, vehicle power gear, handbrake status and battery power.
5. The method for OTA upgrading of a vehicle controller according to claim 1, characterized in that: In S12, the private upgrade package organization parsing protocol includes version information, flash type, baud rate, diagnostic ID, data block size, receiving, sending and waiting delay of the controller upgrade package.
6. A system for OTA upgrading of vehicle controller, characterized in that: include: Upload module, used by the OTA server to upload controller upgrade packages organized by private protocols; A first encryption module, used for the PKI server to perform symmetric algorithm encryption on the controller upgrade package; A calculation module, used for the PKI server to calculate the HASH value of the controller upgrade package; The second encryption module is used to encrypt the HASH value as the signature of the upgrade package through the asymmetric algorithm private key corresponding to the corresponding business certificate ID according to the HASH value; The collection module is used by the vehicle-side networked device to collect the relevant version information of the vehicle controller; A sending module, used for the vehicle-side network device to send the vehicle controller related version information to the OTA server; The first judgment module is used for the OTA server to judge whether the relevant version information of the vehicle controller is the latest version. If not, the vehicle-side network device is notified to download the controller upgrade package; A verification module, used for the vehicle-side network device to verify the integrity of the controller upgrade package; The first query module is used for the vehicle-side networked device to query the SubMaster business certificate information corresponding to the controller to be upgraded according to the topology information; The signature verification module is used by the SubMaster device to verify the signature of the controller upgrade package using the public key of the asymmetric algorithm of the corresponding business certificate; The second query module is used for the vehicle-side network device to query the encryption ID of the corresponding SubMaster. If the SubMaster device currently does not have the key required for the controller upgrade package parsing, the vehicle-side network device updates the key and the corresponding initial value information to the SubMaster, and the key passes the verification of the business certificate public key of the SubMaster device; The second judgment module is used by the vehicle-side network device to check the vehicle upgrade conditions and then notify the SubMaster device to upgrade; A decryption module, used by the SubMaster device to decrypt the controller upgrade package; The parsing module is used to parse the controller upgrade package content according to a private upgrade package organization parsing protocol.
7. The system for OTA upgrading of vehicle controller according to claim 6, characterized in that: In the first encryption module, the PKI server encrypts the controller upgrade package using a symmetric algorithm, and records and saves the corresponding key ID.
8. The system for OTA upgrading of vehicle controller according to claim 6, characterized in that: In the first query module, if the SubMaster device currently does not have the business certificate required for the controller upgrade package verification, the vehicle-side network device updates the business certificate to the SubMaster device, and the business certificate passes the verification of the SubMaster's built-in root certificate public key.
9. The system for OTA upgrading of vehicle controller according to claim 6, characterized in that: In the second judgment module, the vehicle upgrade conditions include vehicle speed, engine status, vehicle power gear, handbrake status and battery power.
10. The system for OTA upgrading of vehicle controller according to claim 6, characterized in that: In the analysis module, the private upgrade package organization analysis protocol includes the version information, flash type, baud rate, diagnostic ID, data block size, reception, transmission and waiting delay of the controller upgrade package.
