Verification method and device of vehicle control system, vehicle and storage medium
By performing hash calculation and digital signature in the vehicle control system, combined with cloud private key management, the complex and lack of signature verification of signature private key management in the ECU gateway system is solved, and multi-level data verification and dynamics of signature private keys are realized Updated significantly improves the security and management efficiency of the system.
Patent Information
- Application Number
- CN202411271940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-27
AI Technical Summary
The existing vehicle electronic control unit (ECU) gateway system has complexity and security risks in the management and verification of signature private keys. It lacks effective signature and verification technology, making it difficult to prevent various potential security threats.
By obtaining the signature private key of the vehicle control system and the system data to be signed, the hash calculation is performed to obtain the initial hash tree, and digitally sign the system description data based on the preset hash algorithm, the system mirror data is built for data verification, and combined with Cloud private key management and hash tree verification realize multi-level data verification and dynamic update of signed private keys.
It improves the data integrity and legality verification efficiency of the vehicle control system, effectively prevents data tampering, enhances the system's security and management efficiency, and significantly improves the protection level of signed private keys.
Smart Images

Figure CN119203113A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle safety technology, and in particular to a verification method, device, vehicle and storage medium for a vehicle control system. Background Art
[0002] At present, the electronic control unit (ECU) gateway system of vehicles faces a series of technical challenges and security risks in ensuring the integrity and legitimacy of equipment. As a key component of the vehicle, the safety and reliability of ECU are directly related to the operation status and driving safety of the whole vehicle. However, the existing technology has the following significant shortcomings in device integrity verification and legitimacy assurance: the management of signature private keys is complex, and the technology developed based on the Linux kernel lacks signature and verification technology for ECU.
[0003] The existing ECU gateway system usually stores the signature private key locally, which is vulnerable to physical attacks and software vulnerabilities. Once the signature private key is leaked, it may cause serious security accidents. In addition, the management of the locally stored signature private key is complicated, which increases the maintenance cost and operation difficulty of the system. The existing verification mechanism is powerless in the face of increasingly complex attack methods; traditional hash verification and signature technology is difficult to fully guarantee the security of the ECU system and cannot effectively prevent various potential security threats. Summary of the invention
[0004] The present application provides a verification method, device, vehicle and storage medium for a vehicle control system to solve the above-mentioned technical problems of complex signature private key management and lack of signature and verification for the vehicle control system.
[0005] In one embodiment of the present application, the present application provides a method for verifying a vehicle control system, including: obtaining a signature private key and system data to be signed of a vehicle control system; performing hash calculation on the system data to be signed to obtain an initial hash tree; determining system description data based on the system data to be signed, the initial hash tree, and a preset hash algorithm corresponding to the initial hash tree, and digitally signing the system description data according to the signature private key to obtain target metadata; constructing system image data to perform data verification based on the system image data, the system image data including the system data to be signed, the initial hash tree, and the target metadata.
[0006] In one embodiment of the present application, data verification is performed according to the system image data, including: obtaining the image data to be verified corresponding to the system image data, the image data to be verified includes metadata to be verified, a hash tree to be verified and system data to be verified, and the metadata to be verified includes description data to be verified and a signature to be verified; digitally signing the description data to be verified according to the signature private key to obtain a current signature, and comparing the signature to be verified with the current signature to obtain a first verification result; if the first verification result is passed, performing a hash calculation on the system data to be verified according to the verified description data to be verified to obtain a current hash tree, and comparing the hash tree to be verified with the current hash tree to obtain a second verification result; if the second verification result is passed, running the system data to be verified.
[0007] In one embodiment of the present application, a hash calculation is performed on the system data to be signed to obtain an initial hash tree, including: dividing the system data to be signed into multiple data blocks; performing hash calculations on each of the data blocks according to a first hash algorithm to obtain multiple initial hash values; and aggregating each of the initial hash values layer by layer based on a second hash algorithm to obtain an initial hash tree; wherein the preset hash algorithm includes the first hash algorithm and the second hash algorithm.
[0008] In one embodiment of the present application, obtaining the signature private key of the vehicle control system includes: generating a private key issuance request and sending it to a cloud server, so that the cloud server sends the signature private key to the vehicle control system through a secure channel; receiving the signature private key through the secure channel; and encrypting and storing the signature private key.
[0009] In one embodiment of the present application, data verification is performed based on the system image data, and then the method further includes: receiving a new signature private key through the secure channel, the new signature private key being actively issued by the cloud server based on at least one of detecting the presence of a security event, reaching a preset update cycle, and the presence of a manual update process; and updating the signature of the system image data based on the new signature private key.
[0010] In one embodiment of the present application, the system description data includes at least one of a preset hash algorithm, error correction information, hash metadata of the initial hash tree, and system metadata of the system data to be signed.
[0011] In one embodiment of the present application, constructing system image data includes: storing the initial hash tree after the system data to be signed; appending the target metadata after the initial hash tree, the target metadata sequentially including a digital signature and the system description data.
[0012] In one embodiment of the present application, the present application provides a verification device for a vehicle control system, including: an acquisition module, used to obtain a signature private key and system data to be signed of a vehicle control system; a hash tree generation module, used to perform hash calculation on the system data to be signed to obtain an initial hash tree; a data signature module, used to determine system description data based on the system data to be signed, the initial hash tree, and a preset hash algorithm corresponding to the initial hash tree, and digitally sign the system description data according to the signature private key to obtain target metadata; a data combination module, used to construct system image data to perform data verification based on the system image data, the system image data including the system data to be signed, the initial hash tree, and the target metadata.
[0013] In one embodiment of the present application, the present application provides a vehicle, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the vehicle implements the vehicle control system verification method as described in any one of the above embodiments.
[0014] In one embodiment of the present application, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer executes the vehicle control system verification method described in any one of the above embodiments.
[0015] Beneficial effects of the embodiments of the present application: The present application provides a verification method, device, vehicle and storage medium for a vehicle control system. The embodiments of the present application obtain an initial hash tree by performing hash calculation on the system data to be signed, and the verification efficiency can be improved through hash tree verification; the target metadata is obtained by digitally signing the system description data, and multi-level data verification is implemented through the initial hash tree and the target metadata, thereby improving the integrity and legality of the data, effectively preventing data tampering, and improving the security of the vehicle control system.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0018] Figure 1A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;
[0019] Figure 2 A schematic diagram showing a flow chart of a verification method of a vehicle control system according to an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a data signature process according to an embodiment of the present application is shown;
[0021] Figure 4 A block diagram of a verification device of a vehicle control system according to an embodiment of the present application is shown;
[0022] Figure 5 A schematic diagram of the structure of a computer system of a vehicle suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0024] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0025] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0026] See also Figure 1 , Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied is shown. Figure 1 As shown, the system architecture may include a computer device 101 and a cloud server 102. The computer device 101 may be at least one of a microcomputer, an embedded computer, etc., and the vehicle control system is located in the computer device 101.
[0027] Exemplarily, the computer device 101 obtains the signature private key of the vehicle control system and the system data to be signed; performs hash calculation on the system data to be signed to obtain an initial hash tree; determines the system description data based on the system data to be signed, the initial hash tree, and a preset hash algorithm corresponding to the initial hash tree, and digitally signs the system description data according to the signature private key to obtain target metadata; constructs system image data to perform data verification based on the system image data, and the system image data includes the system data to be signed, the initial hash tree, and the target metadata.
[0028] In the related technologies, the existing technologies have the following significant shortcomings in terms of device integrity verification and legality assurance: the management of signature private keys is complex, and the technology developed based on the Linux kernel lacks signature and verification technology for ECU.
[0029] In order to solve the above technical problems, the present application provides a verification method, device, vehicle and storage medium for a vehicle control system. The implementation details of the technical solution of the embodiment of the present application are elaborated in detail below.
[0030] See also Figure 2 , Figure 2 FIG. 1 is a flow chart showing a method for verifying a vehicle control system according to an embodiment of the present application. Figure 2 As shown, in an exemplary embodiment, the verification method of the vehicle control system includes at least steps S210 to S240, which are described in detail as follows:
[0031] Step S210, obtaining the signature private key of the vehicle control system and the system data to be signed.
[0032] In one embodiment of the present application, the vehicle control system includes an Electronic Control Unit (ECU) gateway system of the vehicle.
[0033] In one embodiment of the present application, the system data to be signed includes partition data to be signed and upgrade data to be signed.
[0034] In one embodiment of the present application, the partition data to be signed is used to represent the mirror backup data to be signed corresponding to the original partition data.
[0035] In one embodiment of the present application, in a Linux system, after starting the vehicle control system, the application is started by mounting different partitions.
[0036] In one embodiment of the present application, obtaining the signature private key of the vehicle control system includes: generating a private key issuance request and sending it to a cloud server, so that the cloud server sends the signature private key to the vehicle control system through a secure channel; receiving the signature private key through the secure channel; and encrypting and storing the signature private key.
[0037] In one embodiment of the present application, the cloud server includes a cloud public key infrastructure (PKI) system. The cloud PKI system is used to generate signature private keys, signature private key management, and signature private key distribution. Generate signature private keys: Ensure the security of the signature private key generation process through a high-intensity encryption algorithm. Signature private key management: The signature private key is securely stored in the cloud and is regularly updated and managed to ensure the long-term security and effectiveness of the signature private key. Signature private key distribution: Distribute the private key to the hardware security module (HSM) of the ECU gateway system through a secure channel to ensure security during transmission.
[0038] In one embodiment of the present application, after receiving the private key issuance request, the cloud PKI system generates a signature private key according to the Public-Key Cryptography Standards (PKCS), and uses a high-strength encryption algorithm to ensure the security of the signature private key. The generated signature private key is transmitted to the HSM through a secure channel and stored.
[0039] In one embodiment of the present application, the secure channel is implemented by encrypting the Transport Layer Security (TLS) protocol.
[0040] In one embodiment of the present application, the HSM uses a dedicated interface to store and encrypt the signature private key to prevent the signature private key from being leaked. The storage area of the HSM cannot be read using conventional means, and chip manufacturers will design common interfaces to support data transmission and storage of signature private keys.
[0041] In one embodiment of the present application, the present application generates and manages signature private keys through a cloud-based PKI system, and combines the vehicle-side HSM to store and encrypt signature private keys, thereby significantly improving the protection level of signature private keys, preventing the leakage and abuse of signature private keys, and enhancing security.
[0042] Step S220, performing hash calculation on the system data to be signed to obtain an initial hash tree.
[0043] In one embodiment of the present application, a hash calculation is performed on the system data to be signed to obtain an initial hash tree, including: dividing the system data to be signed into multiple data blocks; performing a hash calculation on each data block according to a first hash algorithm to obtain multiple initial hash values; and aggregating each initial hash value layer by layer based on a second hash algorithm to obtain an initial hash tree; wherein the preset hash algorithms include a first hash algorithm and a second hash algorithm.
[0044] In one embodiment of the present application, the first Hash algorithm and the second Hash algorithm may be the same or different.
[0045] In one embodiment of the present application, the preset hash algorithm includes a SHA256 hash algorithm.
[0046] In one embodiment of the present application, the entire content of the partition data to be signed is hashed using the SHA256 hash algorithm to generate multiple basic hash values; based on these basic hash values, layer-by-layer aggregation is performed using the hash tree algorithm and the SHA256 hash algorithm to form an initial hash tree containing a summary of the overall information of the partition, and the integrity and security of the hash tree are ensured by secure hash algorithms such as the SHA256 hash algorithm.
[0047] Step S230, determining the system description data based on the system data to be signed, the initial hash tree, and the preset hash algorithm corresponding to the initial hash tree, and digitally signing the system description data according to the signature private key to obtain target metadata.
[0048] In one embodiment of the present application, the system description data includes at least one of a preset hash algorithm, error correction information, hash metadata of an initial hash tree, and system metadata of the system data to be signed.
[0049] In one embodiment of the present application, the hash metadata includes at least one of the offset and the data volume of the initial hash tree, and the system metadata includes at least one of the name and the data volume of the system data to be signed.
[0050] In one embodiment of the present application, the system description data is used to describe the verification information of the system data to be signed. The system description data includes a verification table.
[0051] In one embodiment of the present application, the verity table includes the offset and data volume of the initial hash tree, the name and data volume of the system data to be signed, the preset hash algorithm and error correction information, wherein the error correction information includes forward error correction (FEC) information.
[0052] In one embodiment of the present application, the verity table is digitally signed using a signature private key generated by a cloud PKI system. During the digital signature process, a secure preset signature algorithm such as RSA-PSS is used to ensure the security and anti-counterfeiting of the signature.
[0053] In one embodiment of the present application, the target metadata includes a digital signature and system description data.
[0054] Step S240: constructing system image data to perform data verification according to the system image data.
[0055] The system image data includes the system data to be signed, the initial hash tree and the target metadata.
[0056] In one embodiment of the present application, constructing system image data includes: storing the initial hash tree after the system data to be signed; appending the target metadata after the initial hash tree, the target metadata sequentially including a digital signature and the system description data.
[0057] In one embodiment of the present application, the signed verity table is attached to the initial hash tree to form a complete system image data including the system data to be signed, the initial hash tree and the target metadata. During the generation process, the security and integrity of the initial hash tree and the signature data are ensured. Among them, the target metadata includes the digital signature and the verity table.
[0058] In one embodiment of the present application, see Figure 3 , Figure 3 FIG. 2 shows a schematic diagram of a data signature process according to an embodiment of the present application. Figure 3As shown, the device mapping integrity check (Device-mapper Verity, dm-verity) includes multiple partitions, such as the system partition, other partition 1 and other partition 2. Among them, the system partition includes the img file format of the partition data to be signed, and generates the initial hash tree (img hash tree) and verity table corresponding to the img file format, and the digital signature (signature) obtained after digitally signing the verity table according to the preset signature algorithm (Signature algorithm) and private key (private key) is placed after the img hash tree. This application ensures the integrity and legitimacy of the partition by performing hash calculation and signing on the partition, effectively preventing the tampering of the partition data, and completes the signing and verification process at a faster speed through the hash tree and signature algorithm generated by the preset hash algorithm.
[0059] In one embodiment of the present application, data verification is performed according to the system image data, including: obtaining image data to be verified corresponding to the system image data, the image data to be verified includes metadata to be verified, a hash tree to be verified and system data to be verified, and the metadata to be verified includes description data to be verified and a signature to be verified; digitally signing the description data to be verified according to a signature private key to obtain a current signature, and comparing the signature to be verified with the current signature to obtain a first verification result; if the first verification result is passed, performing a hash calculation on the system data to be verified according to the verified description data to be verified to obtain a current hash tree, and comparing the hash tree to be verified with the current hash tree to obtain a second verification result; if the second verification result is passed, running the system data to be verified.
[0060] In one embodiment of the present application, when the vehicle control system is started, the integrity and legitimacy of the verity table are verified by digital signature, and the hash tree of the partition is verified based on the verified verity table to ensure that the partition data has not been tampered with. Through a multi-level verification mechanism, the security and stability of the ECU gateway system are ensured.
[0061] In one embodiment of the present application, after performing data verification based on the system image data, the method also includes: receiving a new signature private key through a secure channel, the new signature private key is actively issued by the cloud server based on at least one of detecting the presence of a security incident, reaching a preset update cycle, and the presence of a manual update process; and updating the signature of the system image data based on the new signature private key.
[0062] In one embodiment of the present application, if at least one of a security incident, arrival of a preset update cycle, and a manual update process is detected, a new signature private key is actively generated by the cloud server and sent to the vehicle control system.
[0063] In one embodiment of the present application, security events include new security vulnerabilities being disclosed and systems being attacked. The cloud PKI system can immediately trigger an update process to ensure that the device can quickly obtain protection capabilities against the security event.
[0064] In one embodiment of the present application, the administrator can manually trigger the update process when necessary to deal with special situations or perform emergency repairs.
[0065] In one embodiment of the present application, the preset update cycle includes daily update, weekly update, and monthly update. When the preset update cycle is reached, the update process is automatically triggered, which helps the system to keep up to date and respond to potential security threats in a timely manner.
[0066] In one embodiment of the present application, the present application ensures the long-term security of the device by supporting dynamic updates of signature private keys and regular verification of partitions. Through real-time updates of the cloud PKI system, the device can obtain the latest security verification information in a timely manner to cope with ever-changing security threats.
[0067] In one embodiment of the present application, the present application provides an improved system integrity and legitimacy verification method by introducing cloud private key management, hash tree verification and signature technology, which is particularly suitable for the vehicle's ECU gateway system. Combined with the two-way verification mechanism on the cloud and the vehicle side, dynamic verification and key management of the vehicle control system during startup and operation are realized, significantly improving the security and management efficiency of the system.
[0068] See also Figure 4 , Figure 4 A block diagram of a verification device for a vehicle control system according to an embodiment of the present application is shown. The device can be applied to Figure 1 The implementation environment shown in the figure is specifically configured in the computer device 101. The device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applied.
[0069] like Figure 4 As shown, a verification device 400 for a vehicle control system according to an embodiment of the present application includes: an acquisition module 401, a hash tree generation module 402, a data signature module 403 and a data combination module 404.
[0070] The acquisition module 401 is used to acquire the signature private key and the system data to be signed of the vehicle control system;
[0071] A hash tree generation module 402 is used to perform hash calculation on the system data to be signed to obtain an initial hash tree;
[0072] The data signature module 403 is used to determine the system description data based on the system data to be signed, the initial hash tree, and the preset hash algorithm corresponding to the initial hash tree, and digitally sign the system description data according to the signature private key to obtain the target metadata;
[0073] The data combination module 404 is used to construct system image data to perform data verification based on the system image data, where the system image data includes the system data to be signed, the initial hash tree, and the target metadata.
[0074] It should be noted that the verification device of the vehicle control system provided in the above embodiment and the verification method of the vehicle control system provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the verification device of the vehicle control system provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0075] An embodiment of the present application also provides a vehicle, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the vehicle implements the verification method of the vehicle control system provided in the above-mentioned embodiments.
[0076] See also Figure 5 , Figure 5 The structure diagram of the computer system of the vehicle suitable for implementing the embodiment of the present application is shown. It should be noted that: Figure 5 The vehicle computer system 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0077] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method in the above embodiment. In the random access memory 503, various programs and data required for system operation are also stored. The central processing unit 501, the read-only memory 502 and the random access memory 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0078] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0079] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0080] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0081] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0082] The units involved in the embodiments described in the present application can be implemented by software or by hardware, and the units described can also be set in a processor. Among them, the names of these units do not constitute a limitation on the units themselves under certain circumstances. Therefore, the technical solution according to the implementation mode of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation mode of the present application.
[0083] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of a computer, causes the computer to execute the vehicle control system verification method provided in the above-mentioned embodiments. The computer-readable storage medium may be included in the vehicle described in the above-mentioned embodiments, or may exist independently without being assembled into the vehicle.
[0084] In the above embodiments, unless otherwise specified, describing common objects by using serial numbers such as "first" and "second" only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must adopt a given order, whether in time, space, sorting or any other way.
[0085] The above embodiments are merely illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for verifying a vehicle control system, characterized in that: The method comprises: Obtain the signature private key of the vehicle control system and the system data to be signed; Performing hash calculation on the system data to be signed to obtain an initial hash tree; Determine the system description data based on the system data to be signed, the initial hash tree, and a preset hash algorithm corresponding to the initial hash tree, and digitally sign the system description data according to the signature private key to obtain target metadata; System image data is constructed to perform data verification according to the system image data, wherein the system image data includes the system data to be signed, the initial hash tree, and the target metadata.
2. The vehicle control system verification method according to claim 1, characterized in that: Performing data verification according to the system image data includes: Acquire image data to be verified corresponding to the system image data, the image data to be verified includes metadata to be verified, a hash tree to be verified, and system data to be verified, and the metadata to be verified includes description data to be verified and a signature to be verified; Digitally signing the description data to be verified according to the signature private key to obtain a current signature, and comparing the signature to be verified with the current signature to obtain a first verification result; If the first verification result is passed, hash calculation is performed on the system data to be verified according to the verified description data to be verified to obtain a current hash tree, and the hash tree to be verified is compared with the current hash tree to obtain a second verification result; If the second verification result is passed, the system data to be verified is run.
3. The vehicle control system verification method according to claim 1, characterized in that: Perform hash calculation on the system data to be signed to obtain an initial hash tree, including: Dividing the to-be-signed system data into a plurality of data blocks; Perform hash calculations on each of the data blocks according to a first hash algorithm to obtain multiple initial hash values; Aggregate each of the initial hash values layer by layer based on a second hash algorithm to obtain an initial hash tree; The preset hash algorithm includes the first hash algorithm and the second hash algorithm.
4. The vehicle control system verification method according to claim 1, characterized in that: Get the signature private key of the vehicle control system, including: Generate a private key issuance request and send it to a cloud server, so that the cloud server sends the signed private key to the vehicle control system through a secure channel; Receive the signing private key via a secure channel; The signature private key is encrypted and stored.
5. The vehicle control system verification method according to claim 4, characterized in that: After building the system image data, the method further includes: receiving a new signature private key through the secure channel, the new signature private key being actively issued by the cloud server based on at least one of detecting a security event, reaching a preset update period, and having a manual update process; The system image data is signed and updated according to the new signature private key.
6. The vehicle control system verification method according to any one of claims 1 to 5, characterized in that: The system description data includes at least one of a preset hash algorithm, error correction information, hash metadata of the initial hash tree, and system metadata of the system data to be signed.
7. The vehicle control system verification method according to any one of claims 1 to 5, characterized in that: Build system image data, including: Storing the initial hash tree after the system data to be signed; The target metadata is appended after the initial hash tree, and the target metadata includes a digital signature and the system description data in sequence.
8. A verification device for a vehicle control system, characterized in that: The device comprises: An acquisition module is used to obtain the signature private key of the vehicle control system and the system data to be signed; A hash tree generation module, used to perform hash calculation on the system data to be signed to obtain an initial hash tree; A data signature module, configured to determine system description data based on the system data to be signed, the initial hash tree, and a preset hash algorithm corresponding to the initial hash tree, and digitally sign the system description data according to the signature private key to obtain target metadata; The data combination module is used to construct system image data to perform data verification according to the system image data, wherein the system image data includes the system data to be signed, the initial hash tree and the target metadata.
9. A vehicle, characterized in that: The vehicle comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the vehicle to implement the verification method of the vehicle control system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the verification method of a vehicle control system according to any one of claims 1 to 7.
