WO2023092958A1 - 车辆安全启动方法、装置,电子控制单元及存储介质 - Google Patents

车辆安全启动方法、装置,电子控制单元及存储介质 Download PDF

Info

Publication number
WO2023092958A1
WO2023092958A1 PCT/CN2022/093129 CN2022093129W WO2023092958A1 WO 2023092958 A1 WO2023092958 A1 WO 2023092958A1 CN 2022093129 W CN2022093129 W CN 2022093129W WO 2023092958 A1 WO2023092958 A1 WO 2023092958A1
Authority
WO
WIPO (PCT)
Prior art keywords
firmware
hash value
updated
control unit
signature value
Prior art date
Application number
PCT/CN2022/093129
Other languages
English (en)
French (fr)
Inventor
兰椿树
林挺达
王超
Original Assignee
宁德时代新能源科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宁德时代新能源科技股份有限公司 filed Critical 宁德时代新能源科技股份有限公司
Priority to JP2022551382A priority Critical patent/JP7508571B2/ja
Priority to EP22757193.2A priority patent/EP4213051A4/en
Priority to KR1020227029527A priority patent/KR102680666B1/ko
Priority to US18/185,213 priority patent/US20230221949A1/en
Publication of WO2023092958A1 publication Critical patent/WO2023092958A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R25/00Fittings or systems for preventing or indicating unauthorised use or theft of vehicles
    • B60R25/20Means to switch the anti-theft system on or off
    • B60R25/24Means to switch the anti-theft system on or off using electronic identifiers containing a code not memorised by the user
    • B60R25/248Electronic key extraction prevention
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • B60R16/0231Circuits relating to the driving or the functioning of the vehicle
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R25/00Fittings or systems for preventing or indicating unauthorised use or theft of vehicles
    • B60R25/01Fittings or systems for preventing or indicating unauthorised use or theft of vehicles operating on vehicle systems or fittings, e.g. on doors, seats or windscreens
    • B60R25/04Fittings or systems for preventing or indicating unauthorised use or theft of vehicles operating on vehicle systems or fittings, e.g. on doors, seats or windscreens operating on the propulsion system, e.g. engine or drive motor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R25/00Fittings or systems for preventing or indicating unauthorised use or theft of vehicles
    • B60R25/20Means to switch the anti-theft system on or off
    • B60R25/209Remote starting of engine
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R25/00Fittings or systems for preventing or indicating unauthorised use or theft of vehicles
    • B60R25/20Means to switch the anti-theft system on or off
    • B60R25/24Means to switch the anti-theft system on or off using electronic identifiers containing a code not memorised by the user
    • B60R25/246Means to switch the anti-theft system on or off using electronic identifiers containing a code not memorised by the user characterised by the challenge triggering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/84Vehicles

Definitions

  • the present application relates to the technical field of vehicle control, in particular, to a method and device for safely starting a vehicle, an electronic control unit and a storage medium.
  • the safe start of the vehicle is mainly used to ensure the integrity and authenticity of the system software and prevent important image files in the system from being destroyed or replaced.
  • the current mainstream security verification method uses a symmetric encryption algorithm.
  • the specific process of the symmetric encryption algorithm is: after the electronic control unit (Electronic Control Unit, ECU) is powered on, use the stored symmetric key to sign the firmware to obtain the temporary signature value, and then compare the temporary signature value with the stored firmware signature value Whether they are consistent, if they are consistent, control the vehicle to start safely.
  • ECU Electronic Control Unit
  • the inventor found in practical research that the symmetric key stored in the electronic control unit is transmitted through the host computer. During the process of transmitting the symmetric key by the host computer, the risk of leakage of the symmetric key is increased. Once the symmetric key is leaked, the security The start-up function is easy to be broken by hackers, and meanwhile, this method also requires the manufacturer of the electronic control unit to invest a lot of manpower and material resources in managing the symmetric key.
  • the purpose of the embodiments of the present application is to provide a method and device for securely starting a vehicle, an electronic control unit and a storage medium, so as to solve the problem of leakage of the symmetric key and the management of the symmetric key.
  • the embodiment of the present application provides a method for safely starting a vehicle, which is applied to an electronic control unit of a vehicle.
  • the method includes: after the vehicle is powered on, based on a preset symmetric encryption algorithm and a symmetric key pair The stored first firmware is signed to obtain a first signature value; wherein, the symmetric key is generated based on a random number generation algorithm when the firmware is received for the first time; the first signature value is combined with the stored first signature value Compare the two signature values, and when the first signature value is the same as the second signature value, control the vehicle to perform safe startup; wherein, when the second signature value receives the first firmware, based on generated after the preset symmetric encryption algorithm and the symmetric key are encrypted.
  • the random number generation algorithm is configured in the electronic control unit.
  • the electronic control unit receives the firmware for the first time (such as during the configuration process of the manufacturer)
  • the random number generation algorithm is triggered to generate a randomly generated symmetric key. key, and then store the symmetric key for subsequent safe start control of the vehicle.
  • the symmetric key can be generated by the electronic control unit, thereby avoiding the transmission of the symmetric key from the outside of the electronic control unit, causing There is a problem of leakage of the symmetric key.
  • the symmetric key is randomly generated by the electronic control unit according to the received firmware, there is no need for the manufacturer of the electronic control unit to invest a lot of manpower and material resources in managing the symmetric key.
  • the method further includes: when the vehicle is powered on and receives the firmware to be updated sent by the host computer, and the firmware to be updated is secure firmware, based on the preset symmetric encryption algorithm And the symmetric key signs the firmware to be updated, obtains the second signature value, stores the second signature value, and replaces the firmware stored last time with the firmware to be updated ; Wherein, the stored firmware to be updated is the first firmware.
  • the update of the signature value is triggered only when the firmware to be updated is determined to be safe firmware, which further improves the safety when the car is started, and prevents malicious firmware from triggering the vehicle to perform a firmware update.
  • the electronic control unit pre-stores the hash value of the preset public key, and the firmware to be updated is determined to be secure firmware through the following steps: receiving the firmware to be updated, the target signature value, and the target public key sent by the host computer; calculating the hash value of the target public key to obtain a first hash value; when the first hash value and the target public key When the hash values of the preset public keys are the same, decrypt the target signature value based on the target public key to obtain a second hash value; wherein, when the first hash value is the same as the preset public key If the hash value of the key is the same, it means that the target public key is the same as the preset public key; the second hash value is obtained by calculating the target firmware through a hash algorithm; The private key corresponding to the preset public key is obtained after encrypting the second hash value; calculating the hash value of the firmware to be updated to obtain a third has
  • the security of the firmware is verified through an asymmetric encryption algorithm (and at the same time the firmware and public key to be updated sent by the host computer are verified).
  • the risk that the second signature value of the safe start is updated further improves the safety when the car is started.
  • the electronic control unit pre-stores the hash value of the preset public key, and the firmware to be updated is determined to be the security key through the following steps: Firmware: obtain the firmware to be updated and the target public key; calculate the hash value of the target public key to obtain a first hash value; when the first hash value and the hash value of the preset public key When the values are the same, it is determined that the firmware to be updated is the secure firmware.
  • the security of the public key is verified through an asymmetric encryption algorithm, which can determine the legitimacy of the public key sent by the host computer, thereby improving the security of the car when starting to a certain extent, and avoiding illegal public keys. Trigger the vehicle to perform a firmware update. At the same time, this method can also reduce the processing pressure of the electronic control unit.
  • the electronic control unit includes a processor; the processor is embedded with a hardware security module; the preset symmetric encryption algorithm is stored in the In the hardware security module: storing the second signature value, and replacing the firmware stored last time with the firmware to be updated includes: storing the second signature value in the hardware security module , and replacing the firmware stored last time in the hardware security module with the firmware to be updated.
  • a hardware security module is embedded in the processor of the electronic control unit. Since the security level of the storage area of the hardware security module is higher than that of a common storage unit, the second signature value, the to-be-updated Storage of firmware and symmetric keys to the hardware security module can make data storage more secure.
  • the preset encryption algorithm is an AES-CMAC algorithm.
  • the embodiment of the present application provides a vehicle safety starting device, which is applied to the electronic control unit of the vehicle, and the device includes: a signature module, used to, after the vehicle is powered on, based on a preset symmetric encryption algorithm and the symmetric key to sign the stored first firmware to obtain the first signature value; wherein, the symmetric key is generated based on a random number generation algorithm when the firmware is received for the first time; the control module is used to The first signature value is compared with the stored second signature value, and when the first signature value is the same as the second signature value, the vehicle is controlled to perform a safe start; wherein the second signature value When the first firmware is received, it is generated after being encrypted based on the preset symmetric encryption algorithm and the symmetric key.
  • a signature module used to, after the vehicle is powered on, based on a preset symmetric encryption algorithm and the symmetric key to sign the stored first firmware to obtain the first signature value
  • the symmetric key is generated based on a random number generation algorithm when the firmware is received for the first time
  • the embodiment of the present application provides an electronic control unit, including: a processor and a memory, the processor is connected to the memory; the memory is used to store programs; the processor is used to run the program stored in the The program in the memory executes the method provided in the embodiment of the first aspect above and/or in combination with some possible implementation manners of the embodiment of the first aspect above.
  • the processor is embedded with a hardware security module; the preset symmetric encryption algorithm, the second signature value, the first firmware And the symmetric key is stored in the hardware security module.
  • the embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned embodiment of the first aspect and/or in combination with the above-mentioned first aspect Some possible implementations of the embodiments provide methods.
  • FIG. 1 is a schematic flow chart of a vehicle security startup based on a symmetric key in the prior art.
  • FIG. 2 is a block diagram of an electronic control unit provided by an embodiment of the present application.
  • Fig. 3 is a flow chart of a method for safely starting a vehicle provided by an embodiment of the present application.
  • FIG. 4 is a flow chart of another method for safely starting a vehicle provided by an embodiment of the present application.
  • FIG. 5 is a flow chart of verifying firmware to be updated according to an embodiment of the present application.
  • FIG. 6 is a schematic flow chart of a symmetric key-based vehicle secure startup provided by an embodiment of the present application.
  • Fig. 7 is a block diagram of a vehicle safety starting device provided by an embodiment of the present application.
  • the reference numerals in the specific implementation are as follows: 100-electronic control unit; 110-processor; 120-memory; 300-vehicle safety starting device; 310-signature module; 320-control module.
  • multiple refers to more than two (including two), similarly, “multiple groups” refers to more than two groups (including two), and “multiple pieces” refers to More than two pieces (including two pieces).
  • FIG. 1 is a schematic flow chart of a symmetric key-based vehicle secure startup in the prior art.
  • Step S1 Generate a symmetric key in a secure development environment.
  • Step S2 Use the preset symmetric encryption algorithm and symmetric key to calculate the signature value of the firmware, denoted as sign1.
  • Step S3 Send the signature value sign1, the symmetric key, and the firmware to the electronic control unit through the host computer.
  • the establishment of the above trust chain can occur in the configuration process when the manufacturer prepares the electronic control unit, and can also occur in the subsequent firmware upgrade process of the electronic control unit.
  • Step S4 After the vehicle is powered on, the electronic control unit signs the firmware based on the preset encryption algorithm and symmetric key, denoted as sign2.
  • Step S5 The electronic control unit compares the signature value sign1 and the signature value sign2, if they are equal, the verification is passed, otherwise, the verification fails, and the vehicle is prohibited from starting.
  • this method needs to share a symmetric key between the manufacturer and the electronic control unit, which inevitably involves the management of the symmetric key by the manufacturer.
  • this method needs to share a symmetric key between the manufacturer and the electronic control unit, which inevitably involves the management of the symmetric key by the manufacturer.
  • different car brands and different car models All require different symmetric keys, which further increases the difficulty of symmetric key management.
  • FIG. 2 is a schematic structural block diagram of an electronic control unit 100 applying a method and device for safely starting a vehicle provided by an embodiment of the present application.
  • the electronic control unit 100 is also called the “driving computer” of the automobile, and its purpose is to control the driving state of the vehicle and realize its various functions.
  • the electronic control unit 100 may include a processor 110 and a memory 120 .
  • the processor 110 and the memory 120 are electrically connected directly or indirectly to realize data transmission or interaction. For example, these components may be electrically connected to each other through one or more communication buses or signal lines.
  • the vehicle safety starting device includes at least one software module that can be stored in the memory 120 in the form of software or firmware (Firmware) or solidified in the operating system (Operating System, OS) of the electronic control unit 100 .
  • the processor 110 is configured to execute executable modules stored in the memory 120 , for example, software function modules and computer programs included in the vehicle safety starting device, so as to realize the vehicle safety starting method.
  • the processor 110 may execute the computer program after receiving the execution instruction.
  • processor 110 may be an integrated circuit chip with signal processing capability.
  • Processor 110 can also be a general-purpose processor, for example, can be a central processing unit (Central Processing Unit, CPU), a micro control unit (Microcontroller Unit, MCU), a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), discrete gate or transistor logic devices, and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general-purpose processor may be a microprocessor or any conventional processor or the like.
  • a hardware security module (Hardware Security Module, HSM) may also be embedded in the processor 110 to implement a vehicle security start function.
  • HSM Hardware Security Module
  • Memory 120 can be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), and Electric Erasable Programmable Read-Only Memory (EEPROM).
  • RAM Random Access Memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electric Erasable Programmable Read-Only Memory
  • FIG. 2 is only for illustration, and the electronic control unit 100 provided in the embodiment of the present application may also have fewer or more components than that shown in FIG. 2 , or have a different configuration from that shown in FIG. 2 .
  • each component shown in FIG. 2 may be implemented by software, hardware or a combination thereof.
  • FIG. 3 is a flow chart of steps of a method for safely starting a vehicle provided in an embodiment of the present application, and the method is applied to the electronic control unit 100 shown in FIG. 2 . It should be noted that the method for safely starting a vehicle provided in the embodiment of the present application is not limited to the sequence shown in Fig. 3 and below, and the method includes: Step S101-Step S102.
  • Step S101 After the vehicle is powered on, sign the stored first firmware based on the preset symmetric encryption algorithm and symmetric key to obtain the first signature value; where the symmetric key is when the firmware is received for the first time, Generated based on a random number generation algorithm.
  • the electronic control unit is used to receive firmware from the host computer.
  • the electronic control unit receives the firmware from the upper computer for the first time (such as during the configuration process of the manufacturer), the electronic control unit will randomly generate a symmetric key based on the random number generation algorithm at this time, so as to facilitate subsequent secure boot control.
  • the electronic control unit When the electronic control unit is powered on, if it does not receive the firmware sent by the host computer, it will perform vehicle safety start control. First, based on the preset symmetric encryption algorithm and symmetric key, the stored first firmware is signed to obtain the first Signature value.
  • the above-mentioned upper computer may refer to a server, a computer, upper computer software, terminal equipment of a manufacturer, etc., which is not limited in this application.
  • the preset symmetric encryption algorithm is the AES-CMAC algorithm.
  • the preset encryption algorithm can also be HMAC (Hash-based Message Authentication Code, hash message authentication code ) and other symmetric encryption algorithms, which are not limited in this application. Since the above-mentioned symmetric encryption algorithms are all well-known algorithms in the art, this application does not make too many descriptions.
  • Step S102 Compare the first signature value with the stored second signature value, and when the first signature value is the same as the second signature value, control the vehicle to start safely; wherein, the second signature value is when receiving the first firmware , generated after encryption based on the preset symmetric encryption algorithm and symmetric key.
  • the electronic control unit compares the first signature value temporarily generated after power-on with the stored second signature value, and when the two are the same, controls the vehicle to start safely. When the two are different, the verification fails and the vehicle is prohibited from starting.
  • the second signature value is generated when the electronic control unit encrypts the first firmware based on a preset symmetric encryption algorithm and a symmetric key after receiving the first firmware sent by the host computer.
  • the second signature value is stored in the electronic control unit.
  • a random number generation algorithm is configured in the electronic control unit, and when the electronic control unit receives firmware for the first time (such as during the configuration process of the manufacturer), the random number generation algorithm is triggered to generate a randomly generated Symmetric key, and then store the symmetric key for subsequent safe start control of the vehicle.
  • the symmetric key can be generated by the electronic control unit, thereby avoiding the transmission of the symmetric key from outside the electronic control unit , leading to the leakage of the symmetric key.
  • the symmetric key is randomly generated by the electronic control unit according to the received firmware, there is no need for the manufacturer of the electronic control unit to invest a lot of manpower and material resources in managing the symmetric key. At the same time, it can Realize the effect of one machine and one secret.
  • triggering an update process of the electronic control unit specifically includes: Step S201.
  • Step S201 When the vehicle is powered on and receives the firmware to be updated from the host computer, and the firmware to be updated is secure firmware, sign the firmware to be updated based on the preset symmetric encryption algorithm and symmetric key to obtain the second signature value, and store the second signature value, and replace the last stored firmware with the firmware to be updated; wherein, the stored firmware to be updated is the first firmware.
  • the host machine will send the firmware to be updated to the electronic control unit after the vehicle is powered on.
  • the manufacturer burns the firmware into the electronic control unit through the host computer.
  • the electronic control unit signs the firmware to be updated based on a preset symmetric encryption algorithm and a symmetric key to obtain a second signature value. Finally, the second signature value, the firmware to be updated and the symmetric key are stored. The firmware to be updated stored this time is the first firmware.
  • the update of the signature value is triggered only when the firmware to be updated is determined to be safe firmware, which further improves the safety when the car is started, and prevents malicious firmware from triggering the vehicle to perform firmware update.
  • the preset symmetric encryption algorithm is pre-configured in the electronic control unit.
  • the processor in the electronic control unit is embedded with a hardware security module.
  • the preset symmetric encryption algorithm is configured in the hardware security module.
  • the electronic control unit may also store the second signature value, the firmware to be updated and the symmetric key in the hardware security module.
  • the firmware to be updated and the symmetric key in the hardware security module can make data storage more secure.
  • the use of embedded hardware security modules can reduce the configuration requirements of the processor and reduce the time for starting the vehicle. It should be noted that each time the firmware to be updated is received, the firmware stored last time is replaced to ensure that the received firmware to be updated is stored.
  • the electronic control unit pre-stores the hash value of the preset public key; wherein the preset public key is a legal public key, and the step of verifying the firmware to be updated can be It includes: step S301 to step S305.
  • Step S301 Receive the firmware to be updated, the target signature value and the target public key sent by the host computer.
  • the host computer When the host computer needs to update the firmware of the vehicle, it will first configure the target firmware and the preset asymmetric key.
  • the preset asymmetric key includes a preset public key and a private key corresponding to the preset public key.
  • the target firmware is the firmware that needs to be updated. Then use a hash algorithm to calculate the target firmware to obtain a second hash value, and encrypt the second hash value based on the private key corresponding to the preset public key to obtain the target signature value.
  • the verification process is to verify whether the firmware to be updated is the target firmware and whether the target public key is a valid public key.
  • the firmware to be updated is the same as the target firmware, it indicates that the firmware to be updated is safe, and if the firmware to be updated is different from the target firmware, it indicates that the firmware to be updated is firmware tampered by hackers. If the target public key is the same as the preset public key, it indicates that the target public key is a legal public key, otherwise, the target public key is invalid.
  • Step S302 Calculate the hash value of the target public key to obtain a first hash value.
  • the electronic control unit first verifies the target public key, calculates a hash value of the target public key based on a hash algorithm, and then obtains a first hash value.
  • Step S303 When the first hash value is the same as the hash value of the preset public key, decrypt the target signature value based on the target public key to obtain a second hash value.
  • the first hash value is the hash value of the preset public key
  • the target public key is the same as the preset public key
  • the target public key is a legal public key.
  • the verification of the target public key is passed, and then based on the target public key
  • the target signature value is decrypted to obtain a second hash value after decryption.
  • the first hash value is not the same as the hash value of the preset public key, it indicates that the target public key is an illegal public key, and the subsequent steps will not be executed here, nor will it trigger the update of the symmetric key and signature value update.
  • Step S304 Calculate a hash value of the firmware to be updated to obtain a third hash value.
  • the electronic control unit then verifies the firmware to be updated, calculates a hash value of the firmware to be updated based on a hash algorithm, and then obtains a third hash value.
  • Step S305 When the third hash value is the same as the second hash value, it is determined that the firmware to be updated is secure firmware.
  • the firmware to be updated is the same as the target firmware, that is, the firmware to be updated has not been tampered with by hackers.
  • the third hash value is different from the second hash value, it means that the firmware to be updated has been tampered with by a hacker, and at this time, the update of the symmetric key and the update of the signature value will not be triggered.
  • the security of the firmware is verified through an asymmetric encryption algorithm (and at the same time, the firmware and the public key to be updated sent by the host computer are verified). , leading to the risk that the second signature value of the safe startup is updated, further improving the safety when the vehicle is started.
  • the electronic control unit pre-stores the hash value of the preset public key; wherein the preset public key is a legal public key, and the step of verifying the firmware to be updated may include: obtaining the firmware to be updated and The target public key; calculating the hash value of the target public key to obtain a first hash value; when the first hash value is the same as the hash value of the preset public key, it is determined that the firmware to be updated is a secure firmware.
  • this method only verifies the validity of the target public key. After the verification of the validity of the target public key is passed, it is directly determined that the firmware to be updated is a secure firmware.
  • This method can also be used to a certain extent. Improve the security when the car is started, and avoid illegal public keys from triggering the firmware update of the vehicle. At the same time, this method can also reduce the processing pressure of the electronic control unit.
  • Step S1 Generate a preset asymmetric key in a secure development environment, the preset asymmetric key includes a preset public key and a private key corresponding to the preset public key.
  • Step S2 Use a hash algorithm to calculate the hash value of the target firmware, denoted as HASH1.
  • Step S3 Use a hash algorithm to calculate the hash value of the preset public key, denoted as HASH2.
  • Step S4 Use the private key corresponding to the preset public key to encrypt the hash value HASH1 of the target firmware to obtain the target signature value, denoted as Sign1.
  • Step S5 Write the hash value HASH2 of the public key into the electronic control unit. (The disclosure of the public key of the asymmetric key does not affect the security of the electronic control unit).
  • Step S6 When the electronic control unit is powered on, it will first enter the Bootloader.
  • BootLoader is a boot program that runs before the operating system kernel runs.
  • the hardware device can be initialized, and the memory space map can be established, so as to bring the system's software and hardware environment to a suitable state, so as to prepare the correct environment for the final call of the operating system kernel.
  • Step S7 The Bootloader receives the firmware to be updated, the target signature value and the target public key sent by the host computer.
  • Step S8 The Bootloader calculates the hash value of the target public key, denoted as HASH3. Then compare whether HASH3 is equal to the stored HASH2. If they are equal, it means that the target public key is the same as the preset public key, and the target public key is a legal public key. At this time, the verification of the target public key is passed, and step S9 is executed. If HASH3 is not equal to the stored HASH2, it indicates that the target public key is an illegal public key, and no further processing will be performed at this time.
  • Step S9 The Bootloader uses the target public key to decrypt the target signature value to obtain the target firmware hash value HASH1.
  • Step S10 The Bootloader calculates the hash value HASH4 of the firmware to be updated based on the hash algorithm.
  • Step S11 The Bootloader judges whether HASH4 is equal to HASH1. If they are equal, the firmware to be updated has not been tampered with by hackers, and the source of the firmware to be updated is reliable. At this time, step S12 is executed. On the contrary, it indicates that the firmware to be updated has been tampered with by hackers, and no subsequent processing will be performed at this time.
  • Step S12 The Bootloader generates a symmetric key through a random number generation algorithm and stores it.
  • step S12 is only executed when the firmware is received for the first time, that is, it is executed once during the configuration process of the electronic control unit prepared by the manufacturer. Subsequent firmware updates skip step S12 and directly execute step S13.
  • Step S13 The Bootloader calculates the firmware to be updated based on the preset symmetric encryption algorithm and symmetric key, obtains a second signature value, denoted as Sign2, and stores the firmware to be updated and the second signature value. At this point, the chain of trust is built.
  • steps S1 to S5 and S12 in the process of building the chain of trust above occur during the configuration process of the electronic control unit prepared by the manufacturer.
  • Steps S6 to S11 and S13 can occur during the configuration process of the electronic control unit prepared by the manufacturer.
  • the manufacturer configures the firmware for the first time, it can also occur during the upgrade process of the subsequent firmware of the electronic control unit. in the process of upgrading.
  • Step S14 After the vehicle is powered on again, the electronic control unit signs the stored firmware based on the preset encryption algorithm and symmetric key, denoted as sign3.
  • Step S15 the electronic control unit compares the signature value sign3 with the stored second signature value sign2, if the two are equal, the verification is passed; otherwise, the verification fails, and the vehicle is prohibited from starting.
  • the electronic control unit obtains new firmware to be updated, it will replace the previous firmware.
  • the first firmware is deleted, and the obtained firmware to be updated is stored.
  • the firmware to be updated is used as the second firmware, and so on, the third firmware, the fourth firmware, and the fifth firmware are stored.
  • the embodiment of the present application also provides a vehicle safety starting device 300 , which includes: a signature module 310 and a control module 320 .
  • the signature module 310 is used to sign the stored first firmware based on a preset symmetric encryption algorithm and a symmetric key to obtain a first signature value after the vehicle is powered on; wherein the symmetric key is when the first Generated based on a random number generation algorithm when the firmware is received for the first time.
  • a control module 320 configured to compare the first signature value with a stored second signature value, and when the first signature value is the same as the second signature value, control the vehicle to perform a safe start; wherein The second signature value is generated after encryption based on the preset symmetric encryption algorithm and the symmetric key when receiving the first firmware.
  • the vehicle safety starting device 300 further includes a storage module.
  • the storage module is used for when the vehicle is powered on and receives the firmware to be updated sent by the host computer, and the firmware to be updated is secure firmware, based on the preset symmetric encryption algorithm and the symmetric key, the Sign the firmware to be updated, obtain the second signature value, store the second signature value, and replace the firmware stored last time with the firmware to be updated; wherein, the stored firmware to be updated
  • the updated firmware is the first firmware.
  • a hash value of a preset public key is pre-stored in the electronic control unit, and the vehicle safety starting device 300 further includes a verification module.
  • the verification module is used to receive the firmware to be updated, the target signature value and the target public key sent by the host computer; calculate the hash value of the target public key to obtain a first hash value; when the first hash When the hash value is the same as the hash value of the preset public key, decrypt the target signature value based on the target public key to obtain a second hash value; wherein, when the first hash value is the same as the If the hash value of the preset public key is the same, it means that the target public key is the same as the preset public key; the second hash value is obtained after calculating the target firmware through a hash algorithm; the target signature The value is obtained after encrypting the second hash value with the private key corresponding to the preset public key; calculating the hash value of the firmware to be updated to obtain a third hash value; when the third hash When the value is the same as the second hash value, it is determined that the firmware to be updated is the secure firmware; wherein, when the second hash value is the
  • the verification module can also be used to obtain the firmware to be updated and the target public key; calculate the hash value of the target public key to obtain a first hash value; when the first hash value is the same as the target public key When the hash values of the preset public keys are the same, it is determined that the firmware to be updated is the secure firmware.
  • the electronic control unit includes a processor; the processor is embedded with a hardware security module; the preset symmetric encryption algorithm is stored in the hardware security module; correspondingly, the storage module specifically uses and storing the second signature value in the hardware security module, and replacing the last stored firmware in the hardware security module with the firmware to be updated.
  • an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the method provided in the above-mentioned embodiments is executed.
  • the storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)).
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种车辆安全启动方法、装置,电子控制单元及存储介质。该方法包括:在车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,对称密钥为当第一次接收到固件时,基于随机数生成算法生成的;将第一签名值与存储的第二签名值进行比对,当第一签名值与第二签名值相同时,控制车辆进行安全启动。通过该方式,可以使得对称密钥由电子控制单元生成,进而避免出现对称密钥从电子控制单元外部传输,导致对称密钥出现泄漏的问题,此外,由于对称密钥是电子控制单元根据接收的固件随机生成的,因此,也无需制备电子控制单元的厂商投入大量的人力物力管理对称密钥。

Description

车辆安全启动方法、装置,电子控制单元及存储介质
相关申请的交叉引用
本申请要求享有于2021年11月29日提交的名称为“车辆安全启动方法、装置,电子控制单元及存储介质”的中国专利申请2021114369990的优先权。
技术领域
本申请涉及车辆控制技术领域,具体而言,涉及一种车辆安全启动方法、装置,电子控制单元及存储介质。
背景技术
车辆的安全启动主要用于保证***软件的完整性和真实性,防止***中的重要镜像文件被破坏或替换。
目前主流的安全验证方法采用对称加密算法。对称加密算法的具体过程为:电子控制单元(Electronic Control Unit,ECU)在上电后,使用存储的对称密钥对固件进行签名,得到临时签名值,然后比较临时签名值与存储的固件签名值是否一致,若一致,则控制车辆安全启动。发明人在实践研究中发现,电子控制单元存储的对称密钥是通过上位机传输的,在上位机传输对称密钥的过程中,增加了对称密钥的泄露风险,一旦对称密钥泄露,安全启动功能就很容易被黑客攻破,同时,该方式还需要制备电子控制单元的厂商投入大量的人力物力管理对称密钥。
发明内容
本申请实施例的目的在于提供一种车辆安全启动方法、装置,电子控制单元及存储介质,以解决对称密钥的泄露问题及对称密钥的管理问题。
本发明是这样实现的:
第一方面,本申请实施例提供一种车辆安全启动方法,应用于车辆的电子控制单元中,所述方法包括:在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,所述对称密钥为当第一次接收到固件时,基于随机数生成算法生成的;将所述第一签名值与存储的第二签名值进行比对,当所述第一签名值与所述第二签名值相同时,控制所述车辆进行安全启动;其中,所述第二签名值为接收所述第一固件时,基于所述预设的对称加密算法及所述对称密钥进行加密后生成的。
在本申请实施例中,电子控制单元中配置随机数生成算法,在电子控制单元第一次接收固件时(如在厂商配置过程中),触发随机数生成算法,进而产生一个随机生成的对称密钥,然后将对称密钥进行存储,以用于后续对车辆的安全启动控制,通过该方式,可以使得对称密钥由电子控制单元生成,进而避免出现对称密钥从电子控制单元外部传输,导致对称密钥出现泄漏的问题,此外,由于对称密钥是电子控制单元根据接收的固件随机生成的,因此,也无需制备电子控制单元的厂商投入大量的人力物力管理对称密钥。
结合上述第一方面提供的技术方案,在一些可能的实现方式中,在所述在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值之前,所述方法还包括:当所述车辆上电接收到上位机发送的待更新的固件,且所述待更新的固件为安全固件时,基于所述预设的对称加密算法以及所述对称密钥对所述待更新的固件进行签名,得到所述第二签名值,并将所述第二签名值进行存储,以及将上一次存储的固件替换为所述待更新的固件;其中,存储的所述待更新的固件为所述第一固件。
在本申请实施例中,只有在确定待更新的固件为安全固件时,才触发签名值的更新,进一步地提高汽车启动时的安全性,避免恶意固件触发车辆进行固件更新。
结合上述第一方面提供的技术方案,在一些可能的实现方式中,所述电子控制单元中 预先存储有预设公钥的哈希值,通过如下步骤确定所述待更新的固件为安全固件:接收所述上位机发送的所述待更新的固件、目标签名值以及目标公钥;计算所述目标公钥的哈希值,得到第一哈希值;当所述第一哈希值与所述预设公钥的哈希值相同时,基于所述目标公钥对所述目标签名值进行解密,得到第二哈希值;其中,当所述第一哈希值与所述预设公钥的哈希值相同,则表征所述目标公钥与所述预设公钥相同;所述第二哈希值通过哈希算法对目标固件进行计算后得到;所述目标签名值通过与所述预设公钥对应的私钥对所述第二哈希值进行加密后得到;计算所述待更新的固件的哈希值,得到第三哈希值;当所述第三哈希值与所述第二哈希值相同时,则确定所述待更新的固件为所述安全固件;其中,当所述第二哈希值与所述第三哈希值相同时,则表征所述待更新的固件与所述目标固件相同。
在本申请实施例中,通过非对称加密算法对固件的安全性进行验证(且同时对上位机发送的待更新的固件和公钥进行验证),通过该方式可以降低当固件被黑客攻击,导致安全启动的第二签名值被更新的风险,进一步地提高汽车启动时的安全性。
结合上述第一方面提供的技术方案,在一些可能的实现方式中,所述电子控制单元中预先存储有预设公钥的哈希值,通过如下步骤确定所述待更新的固件为所述安全固件:获取所述待更新的固件以及目标公钥;计算所述目标公钥的哈希值,得到第一哈希值;当所述第一哈希值与所述预设公钥的哈希值相同时,则确定所述待更新的固件为所述安全固件。
在本申请实施例中,通过非对称加密算法对公钥的安全性进行验证,可以确定上位机发送的公钥的合法性,进而在一定程度上提高汽车启动时的安全性,避免非法公钥触发车辆进行固件更新。同时该方式也能够降低电子控制单元的处理压力。
结合上述第一方面提供的技术方案,在一些可能的实现方式中,所述电子控制单元包括处理器;所述处理器内嵌有硬件安全模块;所述预设的对称加密算法存储于所述硬件安全模块中;所述将所述第二签名值进行存储,以及将上一次存储的固件替换为所述待更新的固件,包括:将所述第二签名值存储至所述硬件安全模块中,以及将所述硬件安全模块中上一次存储的固件替换为所述待更新的固件。
在本申请实施例中,在电子控制单元的处理器中内嵌有硬件安全模块,由于硬件安全模块的存储区域的安全级别高于普通的存储单元,因此,将第二签名值、待更新的固件及对称密钥存储至硬件安全模块可以使得数据存储更加安全。
结合上述第一方面提供的技术方案,在一些可能的实现方式中,所述预设的加密算法为AES-CMAC算法。
第二方面,本申请实施例提供一种车辆安全启动装置,应用于车辆的电子控制单元中,所述装置包括:签名模块,用于在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,所述对称密钥为当第一次接收到固件时,基于随机数生成算法生成的;控制模块,用于将所述第一签名值与存储的第二签名值进行比对,当所述第一签名值与所述第二签名值相同时,控制所述车辆进行安全启动;其中,所述第二签名值为接收所述第一固件时,基于所述预设的对称加密算法及所述对称密钥进行加密后生成的。
第三方面,本申请实施例提供一种电子控制单元,包括:处理器和存储器,所述处理器和所述存储器连接;所述存储器用于存储程序;所述处理器用于运行存储在所述存储器中的程序,执行如上述第一方面实施例和/或结合上述第一方面实施例的一些可能的实现方式提供的方法。
结合上述第三方面提供的技术方案,在一些可能的实现方式中,所述处理器内嵌有硬件安全模块;所述预设的对称加密算法、所述第二签名值、所述第一固件及所述对称密钥存储于所述硬件安全模块中。
第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器运行时执行如上述第一方面实施例和/或结合上述第一方面实施例的一些可能的实现方式提供的方法。
附图说明
通过阅读对下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在全部附图中,用相同的附图标号表示相同的部件。在附图中:
图1为现有技术中的一种基于对称密钥的车辆安全启动的流程示意图。
图2为本申请实施例提供的一种电子控制单元的模块框图。
图3为本申请实施例提供的一种车辆安全启动方法的流程图。
图4为本申请实施例提供的另一种车辆安全启动方法的流程图。
图5为本申请实施例提供的一种对待更新的固件进行验证的流程图。
图6为本申请实施例提供的一种基于对称密钥的车辆安全启动的流程示意图。
图7为本申请实施例提供的一种车辆安全启动装置的模块框图。
具体实施方式中的附图标号如下:100-电子控制单元;110-处理器;120-存储器;300-车辆安全启动装置;310-签名模块;320-控制模块。
具体实施方式
下面将结合附图对本申请技术方案的实施例进行详细的描述。以下实施例仅用于更加清楚地说明本申请的技术方案,因此只作为示例,而不能以此来限制本申请的保护范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。
在本申请实施例的描述中,技术术语“第一”“第二”等仅用于区别不同对象,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量、特定顺序或主次关系。在本申请实施例的描述中,“多个”的含义是两个以上,除非另有明确具体的限定。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本申请实施例的描述中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在本申请实施例的描述中,术语“多个”指的是两个以上(包括两个),同理,“多组”指的是两组以上(包括两组),“多片”指的是两片以上(包括两片)。
请参阅图1,图1为现有技术中的一种基于对称密钥的车辆安全启动的流程示意图。
下面对现有的基于对称密钥的车辆安全启动的过程进行说明。
首先构建信任链:
步骤S1:在安全的开发环境中生成一个对称密钥。
步骤S2:使用预设的对称加密算法及对称密钥计算固件的签名值,记作sign1。
步骤S3:通过上位机将签名值sign1、对称密钥、固件发送至电子控制单元中。
需要说明的是,上述信任链的构建可以发生在厂商制备电子控制单元时的配置过程,也可以发生在电子控制单元后续固件的升级过程。
车辆安全启动过程:
步骤S4:车辆上电后,电子控制单元基于预设的加密算法及对称密钥对固件进行签名,记作sign2。
步骤S5:电子控制单元比较签名值sign1和签名值sign2,如果二者相等,则验证通过,反之,则验证失败,禁止车辆启动。
发明人经过实践研究发现,电子控制单元存储的对称密钥是通过上位机传输的,在上位机传输对称密钥的过程中,增加了对称密钥的泄露风险,一旦对称密钥泄露,安全启动功能就很容易被黑客攻破。
同时,该方式需要在厂商和电子控制单元中共享一个对称密钥,必然涉及厂商对对称密钥的管理,随着汽车行业的发展,为了信息安全的考虑,不同的汽车品牌、不同汽车的型号均需要不同的对称密钥,这也进一步地增加了对称密钥的管理难度。
鉴于上述问题,提出以下实施例以解决上述问题。
请参阅图2,本申请实施例提供的一种应用车辆安全启动方法及装置的电子控制单元100的示意性结构框图。
需要说明的是,电子控制单元100又称为汽车的“行车电脑”、它的用途是控制车辆的行驶状态以及实现其各种功能。
在结构上,电子控制单元100可以包括处理器110和存储器120。
处理器110与存储器120直接或间接地电性连接,以实现数据的传输或交互,例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。车辆安全启动装置包括至少一个可以软件或固件(Firmware)的形式存储在存储器120中或固化在电子控制单元100的操作***(Operating System,OS)中的软件模块。处理器110用于执行存储器120中存储的可执行模块,例如,车辆安全启动装置所包括的软件功能模块及计算机程序等,以实现车辆安全启动方法。处理器110可以在接收到执行指令后,执行计算机程序。
其中,处理器110可以是一种集成电路芯片,具有信号处理能力。处理器110也可以是通用处理器,例如,可以是中央处理器(Central Processing Unit,CPU)、微控制单元(Microcontroller Unit、MCU)、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、分立门或晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。此外,通用处理器可以是微处理器或者任何常规处理器等。
此外,处理器110中还可以内嵌硬件安全模块(Hardware Security Module,HSM),用以实现车辆安全启动功能。
存储器120可以是,但不限于,随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦可编程序只读存储器(Erasable Programmable Read-Only Memory,EPROM),以及电可擦编程只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)。存储器120用于存储程序,处理器110在接收到执行指令后,执行该程序。
需要说明的是,图2所示的结构仅为示意,本申请实施例提供的电子控制单元100还可以具有比图2更少或更多的组件,或是具有与图2所示不同的配置。此外,图2所示的各组件可以通过软件、硬件或其组合实现。
请参阅图3,图3为本申请实施例提供的车辆安全启动方法的步骤流程图,该方法应用于图2所示的电子控制单元100。需要说明的是,本申请实施例提供的车辆安全启动方法不以图 3及以下所示的顺序为限制,该方法包括:步骤S101~步骤S102。
步骤S101:在车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,对称密钥为当第一次接收到固件时,基于随机数生成算法生成的。
需要说明的是,电子控制单元用于从上位机接收固件。当电子控制单元从上位机第一次接收到固件时(如在厂商配置过程中),此时电子控制单元会基于随机数生成算法随机生成一个对称密钥,以便于后续进行安全启动控制。
电子控制单元在上电时,若未接收到上位机发送的固件,则进行车辆安全启动控制,首先,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值。
上述的上位机可以指的服务器、计算机、上位机软件、厂商的终端设备等,本申请不作限定。
于本申请实施例中,预设的对称加密算法为AES-CMAC算法,当然在其他实施例中,预设的对此加密算法也可以为HMAC(Hash-based Message Authentication Code,哈希消息认证码)等对称加密算法,对此,本申请不作限定。由于上述的对称加密算法均为本领域所熟知的算法,本申请不作过多说明。
步骤S102:将第一签名值与存储的第二签名值进行比对,当第一签名值与第二签名值相同时,控制车辆进行安全启动;其中,第二签名值为接收第一固件时,基于预设的对称加密算法及对称密钥进行加密后生成的。
然后,电子控制单元将上电后临时生成的第一签名值与存储的第二签名值进行比对,当二者相同时,控制车辆进行安全启动。当二者不相同时,则验证失败,禁止车辆启动。
需要说明的是,第二签名值为当电子控制单元在接收到上位机发送的第一固件,基于预设的对称加密算法及对称密钥对第一固件进行加密后生成的。第二签名值存储于电子控制单元中。
可见,在本申请实施例中,电子控制单元中配置随机数生成算法,在电子控制单元第一次接收固件时(如在厂商配置过程中),触发随机数生成算法,进而产生一个随机生成的对称密钥,然后将对称密钥进行存储,以用于后续对车辆的安全启动控制,通过该方式,可以使得对称密钥由电子控制单元生成,进而避免出现对称密钥从电子控制单元外部传输,导致对称密钥出现泄漏的问题,此外,由于对称密钥是电子控制单元根据接收的固件随机生成的,因此,也无需制备电子控制单元的厂商投入大量的人力物力管理对称密钥,同时能够实现一机一密的效果。
请参阅图4,作为一种可选的实施方式,触发电子控制单元的更新过程具体包括:步骤S201。
步骤S201:当车辆上电接收到上位机发送的待更新的固件,且待更新的固件为安全固件时,基于预设的对称加密算法以及对称密钥对待更新的固件进行签名,得到第二签名值,并将第二签名值进行存储,以及将上一次存储的固件替换为待更新的固件;其中,存储的待更新的固件为第一固件。
当车辆的固件需要升级时,上位机会在车辆上电后向电子控制单元发送待更新的固件。而电子控制单元在第一次上电时,由厂商通过上位机将固件烧录在电子控制单元中。
然后,电子控制单元基于预设的对称加密算法以及对称密钥对待更新的固件进行签名,得到第二签名值。最后,将第二签名值、待更新的固件及对称密钥进行存储。此次存储的待更新的固件即为第一固件。
在上述实施例中,只有在确定待更新的固件为安全固件时,才触发签名值的更新,进一步地提高汽车启动时的安全性,避免恶意固件触发车辆进行固件更新。
需要说明的是,预设的对称加密算法为预先配制在电子控制单元中的,作为一种实施 方式,电子控制单元中的处理器中内嵌有硬件安全模块。预设的对称加密算法配制在硬件安全模块中。相应的,电子控制单元也可以将第二签名值、待更新的固件及对称密钥存储在硬件安全模块中。
由于硬件安全模块的存储区域的安全级别高于普通的存储单元,因此,将第二签名值、待更新的固件及对称密钥存储至硬件安全模块可以使得数据存储更加安全。同时,采用内嵌硬件安全模块的方式,可以降低处理器的配置需求,且降低车辆启动的时间。需要说明的是,每次再接收到待更新的固件后,将上一次存储的固件进行替换,以保证存储接收到的待更新的固件。
请参阅图5,可选地,作为一种实施方式,电子控制单元中预先存储有预设公钥的哈希值;其中预设公钥为合法的公钥,验证待更新的固件的步骤可以包括:步骤S301~步骤S305。
步骤S301:接收上位机发送的待更新的固件、目标签名值以及目标公钥。
当上位机需要对车辆的固件的进行更新时,会先配置目标固件及预设非对称密钥,预设非对称密钥包括预设公钥以及与该预设公钥对应的私钥,该目标固件为需要更新的固件。然后使用哈希算法对目标固件进行计算得到第二哈希值,以及基于与预设公钥所对应的私钥对第二哈希值进行加密得到目标签名值。
电子控制单元在接收到待更新的固件、目标签名值以及目标公钥的验证过程即为验证待更新的固件是否为目标固件以及验证目标公钥是否为合法公钥。
若待更新的固件与目标固件相同,则表征待更新的固件安全,待更新的固件与目标固件不相同,则表征待更新的固件为黑客篡改后的固件。若目标公钥与预设公钥相同,则表征目标公钥为合法公钥,反之,则目标公钥不合法。
步骤S302:计算目标公钥的哈希值,得到第一哈希值。
电子控制单元首先对目标公钥进行验证,基于哈希算法计算目标公钥的哈希值,进而得到第一哈希值。
步骤S303:当第一哈希值与预设公钥的哈希值相同时,基于目标公钥对目标签名值进行解密,得到第二哈希值。
当第一哈希值与预设公钥的哈希值,则表征目标公钥与预设公钥相同,目标公钥为合法公钥,此时目标公钥的验证通过,然后基于目标公钥对目标签名值进行解密,解密后得到的第二哈希值。
当然,若第一哈希值与预设公钥的哈希值不相同,则表征目标公钥为非法公钥,此处不会执行后续步骤,也不会触发对称密钥的更新,及签名值的更新。
步骤S304:计算待更新的固件的哈希值,得到第三哈希值。
电子控制单元再对待更新的固件验证,基于哈希算法计算待更新的固件的哈希值,进而得到第三哈希值。
步骤S305:当第三哈希值与第二哈希值相同时,则确定待更新的固件为安全固件。
其中,当第二哈希值与第三哈希值相同时,则表征待更新的固件与目标固件相同,即待更新的固件未被黑客篡改。反之,若第三哈希值与第二哈希值不相同,则表征待更新的固件被黑客篡改,此时不会触发对称密钥的更新,及签名值的更新。
可见,在本申请实施例中,通过非对称加密算法对固件的安全性进行验证(且同时对上位机发送的待更新的固件和公钥进行验证),通过该方式可以降低当固件被黑客攻击,导致安全启动的第二签名值被更新的风险,进一步地提高汽车启动时的安全性。
作为又一种实施方式,电子控制单元中预先存储有预设公钥的哈希值;其中预设公钥为合法的公钥,验证待更新的固件的步骤可以包括:获取待更新的固件以及目标公钥;计算目标公钥的哈希值,得到第一哈希值;当第一哈希值与预设公钥的哈希值相同时,则确定待更新的固件为安全固件。
需要说明的是,该方式为仅对目标公钥的合法性进行验证,当目标公钥的合法性验证通过后,则直接确定待更新的固件为安全固件,通过该方式也能够在一定程度上提高汽车启动时的安全性,避免非法公钥触发车辆进行固件更新。同时该方式也能够降低电子控制单元的处理压力。
请参阅图6,下面结合完整的示例对本申请实施例所提供的车辆安全启动方法进行说明。
首先构建信任链:
步骤S1:在安全的开发环境中生成一个预设非对称密钥,预设非对称密钥包括预设公钥以及与该预设公钥对应的私钥。
步骤S2:使用哈希算法计算目标固件的哈希值,记作HASH1。
步骤S3:使用哈希算法计算预设公钥的哈希值,记作HASH2。
步骤S4:使用与该预设公钥对应的私钥加密目标固件的哈希值HASH1,得到目标签名值,记作Sign1。
步骤S5:将公钥的哈希值HASH2写入电子控制单元中。(非对称密钥的公钥泄露并不影响电子控制单元的安全性)。
步骤S6:电子控制单元上电,会先进入Bootloader。需要说的是,在嵌入式操作***中,BootLoader是在操作***内核运行之前运行的引导程序。可以初始化硬件设备、建立内存空间映射图,从而将***的软硬件环境带到一个合适状态,以便为最终调用操作***内核准备好正确的环境。
步骤S7:Bootloader接收上位机发送的待更新的固件、目标签名值以及目标公钥。
步骤S8:Bootloader计算目标公钥的哈希值,记作HASH3。然后比较HASH3与存储的HASH2是否相等,如果相等,则表征目标公钥与预设公钥相同,目标公钥为合法公钥,此时目标公钥的验证通过,执行步骤S9。若是HASH3与存储的HASH2不相等时,则表征目标公钥为非法公钥,此时不再进行后续处理。
步骤S9:Bootloader使用目标公钥对目标签名值进行解密,得到目标固件的哈希值HASH1。
步骤S10:Bootloader基于哈希算法计算待更新的固件的哈希值HASH4。
步骤S11:Bootloader判断HASH4与HASH1是否相等,如果相等,则待更新的固件未被黑客篡改,待更新的固件来源可靠,此时执行步骤S12。反之,则表征待更新的固件被黑客篡改,此时不再进行后续处理。
步骤S12:Bootloader通过随机数生成算法,产生一个对称密钥,并进行存储。
需要说明的是,步骤S12仅在第一次接受到固件时执行,也即,在厂商制备电子控制单元的配置过程中执行一次。后续固件的更新则跳过步骤S12直接执行步骤S13。
步骤S13:Bootloader基于预设的对称加密算法及对称密钥计算待更新的固件,得到第二签名值,记作Sign2,并将待更新的固件、第二签名值进行存储。至此,信任链构建完成。
需要说明的是,上述信任链的构建过程中的步骤S1~步骤S5及步骤S12发生在厂商制备电子控制单元的配置过程中。而步骤S6~步骤S11及步骤S13可以发生在厂商制备电子控制单元的配置过程中,如厂商第一次配置固件时,也可以发生在电子控制单元后续固件的升级过程中,如后续厂商对固件进行升级的过程中。
车辆安全启动过程:
步骤S14:车辆再次上电后,电子控制单元基于预设的加密算法及对称密钥对存储的固件进行签名,记作sign3。
步骤S15:电子控制单元比较签名值sign3和存储的第二签名值sign2,如果二者相等,则验证通过,反之,则验证失败,禁止车辆启动。
需要说明的是,电子控制单元每次获取到新的待更新的固件时,会将前一次的固件进行替换,如当前存储的为第一固件,若后续获取到待更新的固件后,则将第一固件删除,并存储获取的待更新的固件,此时,待更新的固件作为第二固件,以此类推,存储第三固件、第四固件、第五固件。
请参阅图7,基于同一发明构思,本申请实施例还提供一种车辆安全启动装置300,该装置包括:签名模块310及控制模块320。
签名模块310用于在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,所述对称密钥为当第一次接收到固件时,基于随机数生成算法生成的。
控制模块320,用于将所述第一签名值与存储的第二签名值进行比对,当所述第一签名值与所述第二签名值相同时,控制所述车辆进行安全启动;其中,所述第二签名值为接收所述第一固件时,基于所述预设的对称加密算法及所述对称密钥进行加密后生成的。
可选地,车辆安全启动装置300还包括存储模块。
存储模块用于当所述车辆上电接收到上位机发送的待更新的固件,且所述待更新的固件为安全固件时,基于所述预设的对称加密算法以及所述对称密钥对所述待更新的固件进行签名,得到所述第二签名值,并将所述第二签名值进行存储,以及将上一次存储的固件替换为所述待更新的固件;其中,存储的所述待更新的固件为所述第一固件。
可选地,电子控制单元中预先存储有预设公钥的哈希值,车辆安全启动装置300还包括验证模块。
验证模块用于接收所述上位机发送的所述待更新的固件、目标签名值以及目标公钥;计算所述目标公钥的哈希值,得到第一哈希值;当所述第一哈希值与所述预设公钥的哈希值相同时,基于所述目标公钥对所述目标签名值进行解密,得到第二哈希值;其中,当所述第一哈希值与所述预设公钥的哈希值相同,则表征所述目标公钥与所述预设公钥相同;所述第二哈希值通过哈希算法对目标固件进行计算后得到;所述目标签名值通过与所述预设公钥对应的私钥对第二哈希值进行加密后得到;计算所述待更新的固件的哈希值,得到第三哈希值;当所述第三哈希值与所述第二哈希值相同时,则确定所述待更新的固件为所述安全固件;其中,当所述第二哈希值与所述第三哈希值相同时,则表征所述待更新的固件与所述目标固件相同。
可选地,验证模块还可以用于获取所述待更新的固件以及目标公钥;计算所述目标公钥的哈希值,得到第一哈希值;当所述第一哈希值与所述预设公钥的哈希值相同时,则确定所述待更新的固件为所述安全固件。
可选地,所述电子控制单元包括处理器;所述处理器内嵌有硬件安全模块;所述预设的对称加密算法存储于所述硬件安全模块中;相应的,所述存储模块具体用于将所述第二签名值存储至所述硬件安全模块中,以及将所述硬件安全模块中上一次存储的固件替换为所述待更新的固件。
需要说明的是,由于所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
基于同一发明构思,本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被运行时执行上述实施例中提供的方法。
该存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
在本申请所提供的实施例中,应该理解到,所揭露装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
再者,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围,其均应涵盖在本申请的权利要求和说明书的范围当中。尤其是,只要不存在结构冲突,各个实施例中所提到的各项技术特征均可以任意方式组合起来。本申请并不局限于文中公开的特定实施例,而是包括落入权利要求的范围内的所有技术方案。

Claims (10)

  1. 一种车辆安全启动方法,其特征在于,应用于车辆的电子控制单元中,所述方法包括:
    在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,所述对称密钥为当第一次接收到固件时,基于随机数生成算法生成的;
    将所述第一签名值与存储的第二签名值进行比对,当所述第一签名值与所述第二签名值相同时,控制所述车辆进行安全启动;其中,所述第二签名值为接收所述第一固件时,基于所述预设的对称加密算法及所述对称密钥进行加密后生成的。
  2. 根据权利要求1所述的方法,其特征在于,在所述在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值之前,所述方法还包括:
    当所述车辆上电接收到上位机发送的待更新的固件,且所述待更新的固件为安全固件时,基于所述预设的对称加密算法以及所述对称密钥对所述待更新的固件进行签名,得到所述第二签名值,并将所述第二签名值进行存储,以及将上一次存储的固件替换为所述待更新的固件;其中,存储的所述待更新的固件为所述第一固件。
  3. 根据权利要求2所述的方法,其特征在于,所述电子控制单元中预先存储有预设公钥的哈希值,通过如下步骤确定所述待更新的固件为安全固件:
    接收所述上位机发送的所述待更新的固件、目标签名值以及目标公钥;
    计算所述目标公钥的哈希值,得到第一哈希值;
    当所述第一哈希值与所述预设公钥的哈希值相同时,基于所述目标公钥对所述目标签名值进行解密,得到第二哈希值;其中,当所述第一哈希值与所述预设公钥的哈希值相同,则表征所述目标公钥与所述预设公钥相同;所述第二哈希值通过哈希算法对目标固件进行计算后得到;所述目标签名值通过与所述预设公钥对应的私钥对所述第二哈希值进行加密后得到;
    计算所述待更新的固件的哈希值,得到第三哈希值;
    当所述第三哈希值与所述第二哈希值相同时,则确定所述待更新的固件为所述安全固件;其中,当所述第二哈希值与所述第三哈希值相同时,则表征所述待更新的固件与所述目标固件相同。
  4. 根据权利要求2所述的方法,其特征在于,所述电子控制单元中预先存储有预设公钥的哈希值,通过如下步骤确定所述待更新的固件为所述安全固件:
    获取所述待更新的固件以及目标公钥;
    计算所述目标公钥的哈希值,得到第一哈希值;
    当所述第一哈希值与所述预设公钥的哈希值相同时,则确定所述待更新的固件为所述安全固件。
  5. 根据权利要求2所述的方法,其特征在于,所述电子控制单元包括处理器;所述处理器内嵌有硬件安全模块;所述预设的对称加密算法存储于所述硬件安全模块中;
    所述将所述第二签名值进行存储,以及将上一次存储的固件替换为所述待更新的固件,包括:
    将所述第二签名值存储至所述硬件安全模块中,以及将所述硬件安全模块中上一次存储的固件替换为所述待更新的固件。
  6. 根据权利要求1所述的方法,其特征在于,所述预设的加密算法为AES-CMAC算法。
  7. 一种车辆安全启动装置,其特征在于,应用于车辆的电子控制单元中,所述装置包括:
    签名模块,用于在所述车辆上电后,基于预设的对称加密算法及对称密钥对存储的第一固件进行签名,得到第一签名值;其中,所述对称密钥为当第一次接收到固件时,基于随机数生成算法生成的;
    控制模块,用于将所述第一签名值与存储的第二签名值进行比对,当所述第一签名值与所述第二签名值相同时,控制所述车辆进行安全启动;其中,所述第二签名值为接收所述第一固件时,基于所述预设的对称加密算法及所述对称密钥进行加密后生成的。
  8. 一种电子控制单元,其特征在于,包括:处理器和存储器,所述处理器和所述存储器连接;
    所述存储器用于存储程序;
    所述处理器用于运行存储在所述存储器中的程序,执行如权利要求1-6中任一项所述的方法。
  9. 根据权利要求8所述的电子控制单元,其特征在于,所述处理器内嵌有硬件安全模块;所述预设的对称加密算法、所述第二签名值、所述第一固件及所述对称密钥存储于所述硬件安全模块 中。
  10. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序在被计算机运行时执行如权利要求1-6中任一项所述的方法。
PCT/CN2022/093129 2021-11-29 2022-05-16 车辆安全启动方法、装置,电子控制单元及存储介质 WO2023092958A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022551382A JP7508571B2 (ja) 2021-11-29 2022-05-16 車両の安全始動方法、安全始動装置、電子制御ユニット及び記憶媒体
EP22757193.2A EP4213051A4 (en) 2021-11-29 2022-05-16 VEHICLE SAFE STARTING METHOD AND APPARATUS, ELECTRONIC CONTROL UNIT AND STORAGE MEDIA
KR1020227029527A KR102680666B1 (ko) 2021-11-29 2022-05-16 차량 보안 시동 방법, 장치, 전자 제어 유닛 및 저장 매체
US18/185,213 US20230221949A1 (en) 2021-11-29 2023-03-16 Vehicle secure start method and apparatus, electronic control unit and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111436999.0 2021-11-29
CN202111436999.0A CN115828273B (zh) 2021-11-29 2021-11-29 车辆安全启动方法、装置,电子控制单元及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/185,213 Continuation US20230221949A1 (en) 2021-11-29 2023-03-16 Vehicle secure start method and apparatus, electronic control unit and storage medium

Publications (1)

Publication Number Publication Date
WO2023092958A1 true WO2023092958A1 (zh) 2023-06-01

Family

ID=83995192

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/093129 WO2023092958A1 (zh) 2021-11-29 2022-05-16 车辆安全启动方法、装置,电子控制单元及存储介质

Country Status (6)

Country Link
US (1) US20230221949A1 (zh)
EP (1) EP4213051A4 (zh)
JP (1) JP7508571B2 (zh)
KR (1) KR102680666B1 (zh)
CN (1) CN115828273B (zh)
WO (1) WO2023092958A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230082388A (ko) * 2021-12-01 2023-06-08 현대자동차주식회사 차량 제어기의 부트로더 검증 장치 및 그 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027260A (zh) * 2016-05-12 2016-10-12 成都信息工程大学 基于密钥预分配的汽车ecu完整性验证和加密通信方法
CN106484457A (zh) * 2015-08-25 2017-03-08 福特全球技术公司 多阶段的安全的车辆软件更新
US20190187971A1 (en) * 2017-12-20 2019-06-20 Nio Usa, Inc. Method and system for providing secure over-the-air vehicle updates
CN110221852A (zh) * 2019-05-15 2019-09-10 深兰科技(上海)有限公司 一种固件升级方法及装置
CN110555309A (zh) * 2019-09-10 2019-12-10 深圳市英博超算科技有限公司 启动方法、装置、终端以及计算机可读存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6197000B2 (ja) 2015-07-03 2017-09-13 Kddi株式会社 システム、車両及びソフトウェア配布処理方法
US10728249B2 (en) * 2016-04-26 2020-07-28 Garrett Transporation I Inc. Approach for securing a vehicle access port
US10171478B2 (en) * 2016-06-30 2019-01-01 Faraday & Future Inc. Efficient and secure method and apparatus for firmware update
CN106685653B (zh) * 2016-12-29 2020-07-07 同济大学 一种基于信息安全技术的车辆远程固件更新方法及装置
KR102368606B1 (ko) * 2017-07-31 2022-03-02 현대자동차주식회사 효율적인 차량용 리프로그래밍 장치 및 그 제어방법
CN110708388B (zh) * 2019-10-15 2022-09-23 大陆投资(中国)有限公司 用于提供安全服务的车身安全锚节点设备、方法以及网络***

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484457A (zh) * 2015-08-25 2017-03-08 福特全球技术公司 多阶段的安全的车辆软件更新
CN106027260A (zh) * 2016-05-12 2016-10-12 成都信息工程大学 基于密钥预分配的汽车ecu完整性验证和加密通信方法
US20190187971A1 (en) * 2017-12-20 2019-06-20 Nio Usa, Inc. Method and system for providing secure over-the-air vehicle updates
CN110221852A (zh) * 2019-05-15 2019-09-10 深兰科技(上海)有限公司 一种固件升级方法及装置
CN110555309A (zh) * 2019-09-10 2019-12-10 深圳市英博超算科技有限公司 启动方法、装置、终端以及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4213051A4 *

Also Published As

Publication number Publication date
CN115828273B (zh) 2024-03-29
CN115828273A (zh) 2023-03-21
JP2024501395A (ja) 2024-01-12
KR20230081988A (ko) 2023-06-08
US20230221949A1 (en) 2023-07-13
EP4213051A1 (en) 2023-07-19
JP7508571B2 (ja) 2024-07-01
KR102680666B1 (ko) 2024-07-01
EP4213051A4 (en) 2023-08-09

Similar Documents

Publication Publication Date Title
US10931451B2 (en) Securely recovering a computing device
CN109446815B (zh) 基本输入输出***固件的管理方法、装置和服务器
US10846393B2 (en) Application program integrity verification method and network device
US10659234B2 (en) Dual-signed executable images for customer-provided integrity
JP6595822B2 (ja) 情報処理装置及びその制御方法
US9626513B1 (en) Trusted modular firmware update using digital certificate
TWI598814B (zh) 用於管理及診斷配備有統一可延伸韌體介面(uefi)相容韌體的計算裝置之系統與方法
US8254568B2 (en) Secure booting a computing device
US8291480B2 (en) Trusting an unverified code image in a computing device
US8732445B2 (en) Information processing device, information processing method, information processing program, and integrated circuit
US20110246778A1 (en) Providing security mechanisms for virtual machine images
CN107045611B (zh) 安全启动方法及装置
EP3343424B1 (en) Control board secure start method, and software package upgrade method and device
CN112181513B (zh) 一种基于硬件板卡的控制主机***引导的可信度量方法
JP2011003020A (ja) コンピューターシステムおよびプログラム起動方法
WO2023092958A1 (zh) 车辆安全启动方法、装置,电子控制单元及存储介质
US20220182248A1 (en) Secure startup method, controller, and control system
CN115329321A (zh) 一种固件的启动方法、芯片及计算设备
EP3356987B1 (en) Securely writing data to a secure data storage device during runtime
CN114296873B (zh) 一种虚拟机镜像保护方法、相关器件、芯片及电子设备
US20230119196A1 (en) Information processing apparatus, authenticity verification method, and program
KR20190118894A (ko) 안전한 usb 장치를 보장하는 부트 방법
EP3679510B1 (en) Secure firmware interface
WO2022185570A1 (ja) 制御装置
WO2024078159A1 (zh) 完整性度量方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022551382

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 2022757193

Country of ref document: EP

Effective date: 20220829