Encryption device, decryption device, encryption method and decryption method for upgrade package of in-vehicle infotainment system
During the offline upgrade of the car smart cockpit, the vehicle machine upgrade package is asymmetric and symmetrically encrypted, and encrypted files and parameter files are generated to form an encryption upgrade package, and verify it during decryption, which solves the vehicle machine upgrade package. The issue of leaks or tampering during offline upgrades significantly improves security.
Patent Information
- Application Number
- CN202411379656.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the offline upgrade of the car smart cockpit, the car machine upgrade package lacks security protection measures, resulting in the upgrade package being leaked or maliciously tampered with, posing a security risk.
Provide a vehicle computer upgrade package encryption device and decryption device. By using asymmetric encryption algorithm and symmetric encryption algorithm, the vehicle computer upgrade package is signed and encrypted, and an encrypted file and encryption parameter file are generated to form a vehicle computer encryption upgrade package. Verification is performed during the decryption process to ensure security.
It effectively improves the security of the car upgrade package, prevents the upgrade package from being leaked or maliciously tampered with, and reduces the security risk of offline upgrade of the car cockpit.
Smart Images

Figure CN119442264A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of encryption technology, and in particular, to an encryption device, a decryption device, an encryption method, and a decryption method for a vehicle computer upgrade package. Background Art
[0002] With the continuous development of software-defined cars, car cockpits are becoming more and more intelligent, the systems and applications within the cockpit are becoming more and more bloated, the update iteration of cockpit-related software versions is gradually accelerating, and the size of car computer upgrade packages is increasing.
[0003] At present, online upgrades of smart cockpits have been widely used. However, once the vehicle encounters abnormal conditions such as poor network during factory preparation and after-sales maintenance, it will not only hinder the cockpit upgrade, but also increase the traffic consumption of the eSIM card. As a result, some manufacturers often use offline USB flash drives to upgrade the car cockpit. However, in the existing process of using USB flash drives to upgrade the car cockpit offline, because the entire offline upgrade process lacks security protection measures for the car upgrade package, the upgrade package is easy to leak or be maliciously tampered with, posing a security risk.
[0004] It should be noted that the aforementioned eSIM is the abbreviation of Embedded-SIM, which is translated as electronic SIM card; the aforementioned USB disk is the abbreviation of USB flash disk, which is translated as USB flash disk. Summary of the invention
[0005] The embodiments of the present invention provide a vehicle computer upgrade package encryption device, a decryption device, an encryption method and a decryption method, so as to at least solve the problem of vehicle computer upgrade package leakage or malicious tampering caused by the lack of security protection measures in the vehicle computer upgrade package during the offline upgrade of the existing automobile intelligent cockpit, thereby improving the security of the vehicle computer upgrade.
[0006] In a first aspect, an embodiment of the present invention provides a vehicle upgrade package encryption device, the encryption device being at least used for:
[0007] In response to the preparation of the vehicle computer upgrade package, the vehicle computer upgrade package is signed using a first asymmetric encryption algorithm to obtain a signature file; and, in response to the generation of the signature file, encryption parameters are generated using a preset symmetric encryption algorithm; and, in response to the generation of the encryption parameters, the signature file is encrypted using the encryption parameters to obtain an encrypted file; and, in response to the generation of the encrypted file, the encryption parameters are written into a parameter file, and the parameter file is encrypted using a second asymmetric encryption algorithm to obtain an encrypted parameter file; and, at least after the encrypted file and the encrypted parameter file are generated, a vehicle computer encrypted upgrade package is generated based on the encrypted file and the encrypted parameter file.
[0008] Optionally, the encryption device is at least further used to pre-prepare a key pair of the first asymmetric encryption algorithm and a key pair of the second asymmetric encryption algorithm, so as to enable the encryption device to use the first asymmetric encryption algorithm to sign the vehicle upgrade package, and use the second asymmetric encryption algorithm to encrypt the parameter file.
[0009] Optionally, the encryption device includes at least an asymmetric encryption module, a symmetric encryption module and an encryption upgrade package generation module;
[0010] The asymmetric encryption module is at least used to, when the first asymmetric encryption algorithm is used to sign the vehicle upgrade package, extract the private key of the first asymmetric encryption algorithm, and use the private key of the first asymmetric encryption algorithm to sign the vehicle upgrade package; and, when the second asymmetric encryption algorithm is used to encrypt the parameter file, extract the public key of the second asymmetric encryption algorithm, and use the public key of the second asymmetric encryption algorithm to encrypt the parameter file;
[0011] The symmetric encryption module is at least used to, after the signature file is generated, use the preset symmetric encryption algorithm to generate at least a symmetric encryption key and an encryption initialization vector; and encrypt the signature file according to the symmetric encryption key and the encryption initialization vector;
[0012] The encrypted upgrade package generation module is at least used to generate the vehicle computer encrypted upgrade package by using the encrypted file and the encrypted parameter file according to a specified naming rule after the encrypted file and the encrypted parameter file are generated.
[0013] In a second aspect, an embodiment of the present invention further provides a vehicle upgrade package decryption device, the decryption device being at least used for:
[0014] In response to the activation of the decryption device, a vehicle computer encryption upgrade package is obtained; and, at least after determining that the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements, an encryption parameter file and an encryption file are obtained; and, the encryption parameter file is decrypted using a second asymmetric encryption algorithm to obtain encryption parameters; and, after obtaining the encryption parameters, the encrypted file is decrypted using the encryption parameters to obtain a signature file; and, after obtaining the signature file, the signature file is verified using a first asymmetric encryption algorithm; and, after successfully verifying the signature file, a vehicle computer upgrade package is obtained; and, a vehicle computer upgrade operation is performed based on the vehicle computer upgrade package.
[0015] Optionally, the decryption device is also used to pre-set the public key of the first asymmetric encryption algorithm and the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, so that the decryption device uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file and uses the first asymmetric encryption algorithm to verify the signature file.
[0016] Optionally, the decryption device is also used to, in response to the acquisition of the vehicle computer encryption upgrade package, verify the name of the vehicle computer encryption upgrade package to determine whether the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements.
[0017] Optionally, the decryption device is also used to delete the vehicle computer upgrade package and process files after the vehicle computer upgrade operation is completed.
[0018] Optionally, the decryption device includes at least an upgrade package verification module, an asymmetric decryption module, and a symmetric decryption module;
[0019] The upgrade package verification module is at least used to, in response to the activation of the decryption device, obtain the vehicle computer encrypted upgrade package; and after obtaining the vehicle computer encrypted upgrade package, verify whether the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements; and after determining that the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements, decompress the vehicle computer encrypted upgrade package to obtain the encrypted file and the encrypted parameter file; and after determining that the name of the vehicle computer encrypted upgrade package does not meet the preset vehicle model upgrade file requirements, exit the vehicle computer upgrade operation;
[0020] The asymmetric decryption module is at least used to, after obtaining the encrypted parameter file, extract the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, and decrypt the encrypted parameter file based on the private key of the second asymmetric encryption algorithm to obtain the encryption parameters; and, after obtaining the signature file, extract the public key of the first asymmetric encryption algorithm in the vehicle computer to be upgraded, and verify the signature file based on the public key of the first asymmetric encryption algorithm; and, if the encrypted parameter file is decrypted successfully and the signature file is verified, the vehicle computer upgrade operation is executed; and, if the encrypted parameter file fails to be decrypted or the signature file fails to be verified, the vehicle computer upgrade operation is terminated;
[0021] The symmetric decryption module is at least used to, after obtaining the encryption parameters, use the encryption parameters to decrypt the encrypted file to obtain the signature file; and, based on the decryption result of the encrypted file, determine whether the encrypted file has been tampered with; and, if the encrypted file is decrypted successfully, the encrypted file has not been tampered with, and the vehicle computer upgrade operation continues to be executed; and, if the encrypted file decryption fails, the encrypted file is at risk of being tampered with, and the vehicle computer upgrade operation is exited.
[0022] In a third aspect, an embodiment of the present invention further provides a method for encrypting a vehicle upgrade package, which is executed by using the vehicle upgrade package encryption device described in the first aspect. The method at least includes:
[0023] S1. In response to the preparation of the vehicle computer upgrade package, the encryption device signs the vehicle computer upgrade package using a first asymmetric encryption algorithm to obtain a signature file;
[0024] S2, the encryption device generates encryption parameters using a preset symmetric encryption algorithm in response to the generation of the signature file;
[0025] S3, the encryption device encrypts the signature file using the encryption parameter in response to the generation of the encryption parameter to obtain an encrypted file;
[0026] S4, in response to the generation of the encrypted file, the encryption device writes the encryption parameters into a parameter file, and encrypts the parameter file using a second asymmetric encryption algorithm to obtain an encrypted parameter file;
[0027] S5. The encryption device generates a vehicle computer encryption upgrade package based on the encryption file and the encryption parameter file at least after the encryption file and the encryption parameter file are generated.
[0028] In a fourth aspect, an embodiment of the present invention further provides a method for decrypting a vehicle upgrade package, and the vehicle upgrade package decryption device described in the second aspect is used to execute the method, and the method at least includes:
[0029] S101, after the decryption device is turned on, obtaining the vehicle computer encryption upgrade package;
[0030] S102, the decryption device obtains the encryption parameter file and the encryption file after at least determining that the vehicle machine encryption upgrade package meets the preset vehicle model upgrade file requirements;
[0031] S103, the decryption device uses a second asymmetric encryption algorithm to decrypt the encryption parameter file to obtain encryption parameters;
[0032] S104, after obtaining the encryption parameter, the decryption device uses the encryption parameter to decrypt the encrypted file to obtain a signature file;
[0033] S105, after obtaining the signature file, the decryption device uses a first asymmetric encryption algorithm to verify the signature file;
[0034] S106, after successfully verifying the signature file, the decryption device obtains a vehicle computer upgrade package;
[0035] S107: The decryption device performs a vehicle computer upgrade operation based on the vehicle computer upgrade package.
[0036] In summary, the embodiments of the present invention provide a vehicle upgrade package encryption device, a decryption device, an encryption method and a decryption method. First, the encryption device responds to the preparation of the vehicle upgrade package and signs the vehicle upgrade package using a first asymmetric encryption algorithm to obtain a signature file; secondly, the encryption device responds to the generation of the signature file and generates encryption parameters using a preset symmetric encryption algorithm; thirdly, the encryption device responds to the generation of the encryption parameters and encrypts the signature file using the encryption parameters to obtain an encrypted file; thirdly, the encryption device responds to the generation of the encrypted file and writes the encryption parameters into a parameter file, and encrypts the parameter file using a second asymmetric encryption algorithm to obtain an encrypted parameter file; finally, the encryption device generates a vehicle encrypted upgrade package based on the encryption file and the encrypted parameter file at least after the encryption file and the encrypted parameter file are generated.
[0037] It is understandable that in the encryption process of the above-mentioned vehicle upgrade package, the encryption device can be, for example, a personal computer (PC) of the vehicle upgrade personnel. Based on the technical solution provided by the embodiment of the present invention, the vehicle upgrade personnel can use the PC to sign and encrypt the vehicle upgrade package before performing the car smart cockpit upgrade, which at least overcomes the problem of leakage or malicious tampering of the vehicle upgrade package due to the lack of security protection measures in the vehicle upgrade package during the offline upgrade of the existing car cockpit, which is conducive to improving the security of the vehicle upgrade package and reducing the security risk of offline upgrade of the car cockpit. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1It is a schematic diagram of a framework of a vehicle upgrade package encryption device provided by an embodiment of the present invention;
[0040] Figure 2 It is an implementation flow chart of a vehicle upgrade package encryption device provided by an embodiment of the present invention;
[0041] Figure 3 It is a schematic diagram of a framework of a vehicle upgrade package decryption device provided by an embodiment of the present invention;
[0042] Figure 4 This is a flow chart of a vehicle upgrade package decryption device provided by an embodiment of the present invention;
[0043] Figure 5 This is a timing diagram for implementing a vehicle computer upgrade provided by an embodiment of the present invention;
[0044] Figure 6 It is a flow chart of a vehicle machine upgrade package encryption method provided by an embodiment of the present invention;
[0045] Figure 7 The present invention provides a flowchart of a vehicle upgrade package decryption method. DETAILED DESCRIPTION
[0046] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0047] Figure 1 is a schematic diagram of a framework of a vehicle upgrade package encryption device provided by an embodiment of the present invention, such as Figure 1 As shown. The vehicle upgrade package encryption device 100 (hereinafter referred to as the encryption device 100) is at least used for, in response to the preparation of the vehicle upgrade package, using the first asymmetric encryption algorithm to sign the vehicle upgrade package to obtain a signature file; and, in response to the generation of the signature file, using a preset symmetric encryption algorithm to generate encryption parameters; and, in response to the generation of the encryption parameters, using the encryption parameters to encrypt the signature file to obtain an encrypted file; and, in response to the generation of the encrypted file, writing the encryption parameters into the parameter file, and using the second asymmetric encryption algorithm to encrypt the parameter file to obtain an encrypted parameter file; and, at least after the encryption file and the encrypted parameter file are generated, generating a vehicle encrypted upgrade package based on the encryption file and the encrypted parameter file.
[0048] The encryption device 100 may refer to a terminal such as a PC, an industrial computer, a single-chip microcomputer, or a mobile phone.
[0049] It can be known that the signature file may refer to a compressed package containing the vehicle upgrade package file and the corresponding signature (which can be understood as an identifier). In addition, the response to the preparation of the vehicle upgrade package may refer to the vehicle upgrade package required for the vehicle to be upgraded obtained by the vehicle upgrade personnel manually downloading from the official website of the car company or copying from a USB flash drive.
[0050] The preset symmetric encryption algorithm may refer to the AES-GCM algorithm (wherein AES stands for Advanced Encryption Standard, which is a symmetric key block cipher algorithm, and GCM stands for Galois / Counter Mode, which is a commonly used counter mode); using the preset symmetric encryption algorithm to generate encryption parameters may refer to the encryption device 100 using the AES-GCM algorithm to randomly generate an encryption key K and an encryption initialization vector IV. Wherein, the encryption initialization vector IV changes as the number of encryption times increases.
[0051] Continuing to use the AES-GCM algorithm to generate encryption parameters as an example, using the encryption parameters to encrypt the signature file, and obtaining the encrypted file can refer to using the encryption key K and the encryption initial vector IV to encrypt the signature file of the vehicle upgrade package, and generating the signature file (i.e., the encrypted file) of the vehicle upgrade package including the ciphertext. The encrypted parameter file can refer to a ciphertext file containing the encryption key K and the encryption initial vector IV generated by the aforementioned AES-GCM algorithm. Using the second asymmetric encryption algorithm to encrypt the parameter file, and obtaining the encrypted parameter file can refer to using the public key of the second asymmetric encryption algorithm to encrypt the file containing the encryption key K and the encryption initial vector IV (i.e., the aforementioned parameter file), and obtaining the corresponding ciphertext file is the encrypted parameter file. Generating a vehicle encrypted upgrade package based on the encrypted file and the encrypted parameter file can refer to compressing the encrypted file containing the vehicle upgrade package and the encrypted parameter file that can provide encryption parameters for the vehicle upgrade package into the same compressed package, that is, generating a vehicle encrypted upgrade package.
[0052] In a specific implementation, the vehicle computer upgrade personnel presses the PC power button to turn on the PC. Further, the vehicle computer upgrade personnel manually downloads the vehicle computer upgrade package required for the vehicle computer to be upgraded this time from the official website of the car company. Further, after the vehicle computer upgrade package is downloaded, the vehicle computer upgrade personnel double-clicks the shortcut of the upgrade package encryption program on the PC desktop to open the upgrade package encryption program. Further, the vehicle computer upgrade personnel drags the downloaded vehicle computer upgrade package into the upgrade package encryption program. Further, the upgrade package encryption program signs each file in the vehicle computer upgrade package using the first asymmetric encryption algorithm, and compresses all upgrade package files into a compressed package P. Further, the upgrade package encryption program uses the AES-GCM algorithm to randomly generate an encryption key K and an encryption initial vector IV, and uses the encryption key K and the encryption initial vector IV to encrypt the compressed package P to generate an encrypted file enc_P. Further, the upgrade package encryption program writes the encryption key K and the encryption initial vector IV into the parameter file offline_file. Furthermore, the upgrade package encryption program encrypts the parameter file offline_file by a second asymmetric encryption algorithm to generate an encrypted parameter file enc_offline_file. Finally, the upgrade package encryption program compresses the encrypted file enc_P and the encrypted parameter file enc_offline_file into the same compressed package, thereby obtaining the vehicle computer encrypted upgrade package.
[0053] To sum up, this embodiment can use a PC to sign and encrypt the vehicle computer upgrade package before the vehicle computer upgrade personnel perform the offline upgrade of the car's smart cockpit. This at least overcomes the problem of vehicle computer upgrade package leakage or malicious tampering caused by the lack of security protection measures in the process of offline cockpit upgrade of existing cars. It is beneficial to improve the security of the vehicle computer upgrade package and reduce the security risk of offline upgrade of the car cockpit.
[0054] Based on the above embodiments or implementation methods, this embodiment adds and refines the above vehicle upgrade package encryption device 100, but does not limit the present invention. Figure 1 In a specific implementation, optionally, the encryption device 100 is at least further used to pre-prepare a key pair of a first asymmetric encryption algorithm and a key pair of a second asymmetric encryption algorithm, so as to implement the action of the encryption device 100 using the first asymmetric encryption algorithm to sign the vehicle upgrade package and using the second asymmetric encryption algorithm to encrypt the parameter file.
[0055] Among them, the key pair of the first asymmetric encryption algorithm and the key pair of the second asymmetric encryption algorithm can be pre-made by using the car company's cockpit business root certificate to issue two sets of public key certificates and their corresponding private keys.
[0056] In another specific implementation, optionally, the encryption device 100 includes at least an asymmetric encryption module 110 , a symmetric encryption module 120 and an encryption upgrade package generation module 130 .
[0057] The asymmetric encryption module 110 is at least used to extract the private key of the first asymmetric encryption algorithm and use the private key of the first asymmetric encryption algorithm to sign the vehicle computer upgrade package when the first asymmetric encryption algorithm is used to sign the vehicle computer upgrade package; and to extract the public key of the second asymmetric encryption algorithm and use the public key of the second asymmetric encryption algorithm to encrypt the parameter file when the second asymmetric encryption algorithm is used to encrypt the parameter file.
[0058] The symmetric encryption module 120 is at least used to generate at least a symmetric encryption key (i.e., the aforementioned encryption key K) and an encryption initialization vector (i.e., the aforementioned encryption initialization vector IV) using a preset symmetric encryption algorithm after the signature file is generated; and to encrypt the signature file according to the symmetric encryption key and the encryption initialization vector.
[0059] The encryption upgrade package generation module 130 is at least used to generate a vehicle computer encryption upgrade package by using the encryption file and the encryption parameter file according to a specified naming rule after the encryption file and the encryption parameter file are generated.
[0060] Among them, the specified naming rule can be, for example, "manufacturer_model_cabin code_full quantity_date_version number".
[0061] For example, assuming that the vehicle model corresponding to the vehicle to be upgraded is FAW Hongqi, the internal code of the cockpit is 0042, the full flag of the car computer upgrade package is 1, the download date of the car computer upgrade package is 2024.8.25 and the version number of the car computer upgrade package is V2.01, then the method of generating a car computer encrypted upgrade package from the encrypted file and the encrypted parameter file according to the specified naming rules can be that when the encrypted file and the encrypted parameter file are compressed and merged to generate the car computer encrypted upgrade package, the car computer encrypted upgrade package is named "FAW Hongqi_0042_01_2024.8.25_2.01".
[0062] Based on the specific scheme of the above implementation mode, Figure 2 It is an implementation flow chart of a vehicle upgrade package encryption device provided by an embodiment of the present invention.
[0063] See also Figure 2 Before the vehicle upgrade personnel can perform offline upgrade operations on the smart cockpit of FAW Hongqi H5, they need to perform encryption operations on the vehicle upgrade package of FAW Hongqi H5. Furthermore, the vehicle upgrade personnel use the cockpit business root certificate of FAW Hongqi to issue public key certificates A_P and B_P, and generate private keys A_R and B_R corresponding to the public key certificates (equivalent to Figure 2Step A1 in the process). Furthermore, the vehicle computer upgrade personnel presses the PC power button to start the PC. Furthermore, the vehicle computer upgrade personnel searched and entered the official website of FAW Hongqi from the browser on August 25, 2024, and downloaded the FAW Hongqi H5 vehicle computer upgrade package with version number V2.05. Furthermore, the vehicle computer upgrade personnel double-clicked the shortcut of the upgrade package encryption program on the PC desktop to open the upgrade package encryption program. Furthermore, the vehicle computer upgrade personnel dragged the downloaded vehicle computer upgrade package into the upgrade package encryption program. Furthermore, the upgrade package encryption program signed each file in the vehicle computer upgrade package using the private key of the first asymmetric encryption algorithm, and compressed all upgrade package files into a compressed package P (equivalent to Figure 2 Further, the upgrade package encryption program uses the AES-GCM algorithm (such as the AES-128-GCM algorithm) to randomly generate an encryption key K and an encryption initialization vector IV (equivalent to Figure 2 Step A3 in step A3), and use the encryption key K and the encryption initial vector IV to encrypt the compressed package P to generate an encrypted file enc_P (equivalent to Figure 2 Further, the upgrade package encryption program writes the encryption key K and the encryption initialization vector IV into the parameter file offline_file (equivalent to Figure 2 Further, the upgrade package encryption program encrypts the parameter file offline_file through the public key certificate B_P of the second asymmetric encryption algorithm to generate an encrypted parameter file enc_offline_file (equivalent to Figure 2 Finally, the vehicle upgrade personnel learned that the internal code of the vehicle model to be upgraded is 0072, and the full flag of the vehicle upgrade package is 528. Then the vehicle upgrade personnel can use the upgrade package encryption program to compress the encrypted file enc_P and the encrypted parameter file enc_offline_file into the same compressed package, and name the compressed package "FAW Hongqi H5_0072_528_2024.8.25_2.05" (equivalent to Figure 2 Step A7 in the above example) and then output the compressed package to the specified directory of the USB flash drive (equivalent to Figure 2 At this point, the encryption of the FAW Hongqi H5 car upgrade package is complete.
[0064] In summary, on the one hand, this embodiment can use the AES-128-GCM algorithm to dynamically encrypt the vehicle upgrade package before the vehicle upgrade personnel perform the offline upgrade of the car's intelligent cockpit, ensuring that the decryption keys of each vehicle upgrade package are different, and can ensure the confidentiality of the vehicle upgrade package while taking into account the integrity of the vehicle upgrade package. On the other hand, this embodiment can overcome the problem of leakage or malicious tampering of the vehicle upgrade package due to the lack of security protection measures in the vehicle upgrade package during the offline upgrade of the existing car cockpit by adopting multiple encryption and signatures, which is conducive to improving the security of the vehicle upgrade package and reducing the security risk of offline upgrade of the car cockpit.
[0065] The embodiment of the present invention also provides a vehicle computer upgrade package decryption device. Figure 3 is a schematic diagram of a framework of a vehicle upgrade package decryption device provided by an embodiment of the present invention, such as Figure 3 As shown. The vehicle upgrade package decryption device 200 (hereinafter referred to as the decryption device 200) is at least used to, in response to the opening of the decryption device 200, obtain the vehicle encrypted upgrade package; and, at least after determining that the vehicle encrypted upgrade package meets the preset vehicle model upgrade file requirements, obtain the encrypted parameter file and the encrypted file; and, use the second asymmetric encryption algorithm to decrypt the encrypted parameter file to obtain the encryption parameter; and, after obtaining the encryption parameter, use the encryption parameter to decrypt the encrypted file to obtain the signature file; and, after obtaining the signature file, use the first asymmetric encryption algorithm to verify the signature file; and, after successfully verifying the signature file, obtain the vehicle upgrade package; and, based on the vehicle upgrade package, perform the vehicle upgrade operation.
[0066] The decryption device 200 may include an upgrade application in the vehicle to be upgraded. In response to the activation of the decryption device 200, obtaining the vehicle encrypted upgrade package may mean that when a USB flash drive storing the vehicle encrypted upgrade package is inserted into the vehicle upgrade designated interface of the vehicle to be upgraded, the upgrade application in the vehicle to be upgraded automatically starts (that is, the decryption device 200 is activated), and the upgrade application can obtain the vehicle encrypted upgrade package from the designated storage path of the USB flash drive.
[0067] In addition, the basis for judging whether it meets the preset vehicle model upgrade file requirements can be whether the naming name of the vehicle machine encryption upgrade package meets the aforementioned specified naming rules. For example, assuming that the specified naming rule of the vehicle machine encryption upgrade package is "Manufacturer_Model Cockpit Internal Code_Full Quantity_Date_Version Number", if the naming format of the vehicle machine encryption upgrade package in the U disk conforms to "Manufacturer_Model Cockpit Internal Code_Full Quantity_Date_Version Number" and is compatible with the vehicle machine to be upgraded (for example, "Manufacturer" and "Model Cockpit Internal Code" are consistent with the corresponding information in the vehicle machine to be upgraded, and "Date" is within the validity period), then it can be considered that the vehicle machine encryption upgrade package meets the preset vehicle model upgrade file requirements; otherwise, it can be determined that the vehicle machine encryption upgrade package does not meet the preset vehicle model upgrade file requirements.
[0068] In a specific implementation, the naming rule of the designated upgrade package of the vehicle to be upgraded is "manufacturer_vehicle type_cockpit code_full_date_version number". Further, the vehicle upgrade personnel insert the U disk storing the encrypted upgrade package of the vehicle to be upgraded into the designated upgrade interface of the vehicle to be upgraded. Further, the decryption device is automatically activated when the U disk is inserted into the designated upgrade interface. Further, the decryption device obtains the vehicle encrypted upgrade package from the designated storage path of the U disk. Further, after confirming the designated naming rule of the vehicle encrypted upgrade package name, the decryption device can determine that the vehicle encrypted upgrade package meets the preset vehicle model upgrade file requirements; further, the decryption device decompresses the vehicle encrypted upgrade package to obtain the encrypted parameter file enc_offline_file and the encrypted file enc_P. Further, the decryption device uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file enc_offline_file to obtain the encryption parameters. Further, the decryption device decrypts the encrypted file enc_P by using the obtained encryption parameters to obtain the compressed package P containing the signed vehicle upgrade package. Furthermore, the decryption device can perform signature verification on each vehicle upgrade package file in the compressed package P by decompressing and using the first asymmetric encryption algorithm, and the vehicle upgrade package is obtained after the signatures of each file are successfully verified. Furthermore, the decryption device completes the vehicle upgrade operation based on the vehicle upgrade package.
[0069] To sum up, this embodiment can use a decryption device to verify and decrypt the encrypted upgrade package of the vehicle computer before executing the offline upgrade of the car's smart cockpit, so as to at least solve the problems of unknown source, leakage and malicious tampering of the vehicle computer upgrade package caused by the lack of security protection measures in the process of offline upgrade of the existing car cockpit. This is beneficial to improving the security of vehicle computer upgrades and reducing the security risks of offline upgrades of car cockpits.
[0070] Based on the above embodiments or implementation methods, this embodiment adds and refines the vehicle upgrade package decryption device 200 of the above embodiments, but it is not intended to limit the present invention. Figure 3In a specific implementation, optionally, the decryption device 200 is also used to pre-set the public key of the first asymmetric encryption algorithm and the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, so that the decryption device 200 uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file and uses the first asymmetric encryption algorithm to verify the signature file.
[0071] Among them, the vehicle computer to be upgraded may refer to, for example, a vehicle cockpit domain controller that is composed of a decryption device 200, a smart cockpit read-only area, and a smart cockpit security computing storage area and needs to perform a vehicle computer upgrade operation. Presetting the public key of the first asymmetric encryption algorithm and the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded may refer to presetting the public key certificate A_P of the first asymmetric encryption algorithm to the smart cockpit read-only area of the vehicle to be upgraded (such a setting can ensure that the public key certificate A_P of the first asymmetric encryption algorithm is not tampered with), and presetting the private key certificate B_R of the second asymmetric encryption algorithm to the smart cockpit security computing storage area of the vehicle to be upgraded (such a configuration can ensure that the private key certificate B_R of the second asymmetric encryption algorithm is not read and leaked).
[0072] In another specific implementation, optionally, the decryption device is also used to, in response to obtaining the vehicle computer encryption upgrade package, verify the name of the vehicle computer encryption upgrade package to determine whether the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements.
[0073] Among them, the name of the vehicle computer encryption upgrade package can be verified, for example, assuming that the file name format of the vehicle computer encryption upgrade package is "manufacturer (2 digits)_car model (3 digits)_cockpit code (2 digits)_full amount (1 digit)_date (8 digits)_version number (8 digits)", the decryption device 200 will use the "_" character as a separator to split the file name of the vehicle computer encryption upgrade package, and compare the data at the corresponding position (such as manufacturer, car model, cockpit code, version number, etc.) with the local data information (for example, it may refer to the data information stored in the vehicle computer to be upgraded).
[0074] Exemplarily, the process of comparing the local data information with the data at the corresponding position in the file name of the vehicle computer encryption upgrade package may be:
[0075] First, determine whether the 2-digit manufacturer code is consistent with the vehicle computer to be upgraded; secondly, if the manufacturer code is consistent, determine whether the 3-digit vehicle model code is consistent with the vehicle computer to be upgraded; thirdly, if the vehicle model code is also consistent with the vehicle computer to be upgraded, determine whether the cockpit code is consistent with the vehicle computer to be upgraded; thirdly, after the cockpit code is still consistent with the vehicle computer to be upgraded, determine whether the date is a reasonable date; finally, after all the above judgments are passed, determine whether to perform a full upgrade operation or a differential upgrade operation when performing the subsequent vehicle computer upgrade operation based on the full flag.
[0076] In another specific implementation, optionally, after executing the vehicle computer upgrade operation, the decryption device 200 is further used to delete the vehicle computer upgrade package and process files after the vehicle computer upgrade operation is completed.
[0077] Among them, the process file may refer to a temporary file (including at least the aforementioned encryption parameter file, signature file, etc.) generated by the vehicle computer upgrade operation after the upgrade of the vehicle computer to be upgraded is completed.
[0078] In another specific implementation, optionally, the decryption device 200 includes at least an upgrade package verification module 210, an asymmetric decryption module 220, and a symmetric decryption module 230;
[0079] The upgrade package verification module 210 is at least used to, in response to the activation of the decryption device 200, obtain the vehicle computer encrypted upgrade package; and after obtaining the vehicle computer encrypted upgrade package, verify whether the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements; and after determining that the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements, decompress the vehicle computer encrypted upgrade package to obtain the encrypted file and the encrypted parameter file; and after determining that the name of the vehicle computer encrypted upgrade package does not meet the preset vehicle model upgrade file requirements, exit the vehicle computer upgrade operation;
[0080] The asymmetric decryption module 220 is at least used to, after obtaining the encrypted parameter file, extract the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, and decrypt the encrypted parameter file based on the private key of the second asymmetric encryption algorithm to obtain the encryption parameters; and, after obtaining the signature file, extract the public key of the first asymmetric encryption algorithm in the vehicle computer to be upgraded, and verify the signature file based on the public key of the first asymmetric encryption algorithm; and, if the encrypted parameter file is decrypted successfully and the signature file is verified, then execute the vehicle computer upgrade operation; and, if the encrypted parameter file fails to be decrypted or the signature file fails to be verified, then end the vehicle computer upgrade operation;
[0081] The symmetric decryption module 230 is at least used to, after obtaining the encryption parameters, use the encryption parameters to decrypt the encrypted file to obtain a signature file; and, based on the decryption result of the encrypted file, determine whether the encrypted file has been tampered with; and, if the encrypted file is decrypted successfully, the encrypted file has not been tampered with, and the vehicle computer upgrade operation continues to be executed; and, if the encrypted file decryption fails, the encrypted file is at risk of being tampered with, and the vehicle computer upgrade operation is exited.
[0082] Based on the specific scheme of the above implementation mode, Figure 4 This is a flowchart of an implementation of a vehicle upgrade package decryption device provided by an embodiment of the present invention. Figure 4Before the vehicle upgrade personnel perform the vehicle upgrade operation on the vehicle to be upgraded, they can use the upgrade application in the vehicle to be upgraded to preset the public key certificate A_P of the first asymmetric encryption algorithm to the smart cockpit read-only area of the vehicle to be upgraded, and preset the private key certificate B_R of the second asymmetric encryption algorithm to the smart cockpit security computing storage area of the vehicle to be upgraded (equivalent to Figure 4 Step B1 in the above figure). Furthermore, the vehicle upgrade personnel inserts the USB flash drive storing the vehicle encrypted upgrade package into the upgrade designated interface of the vehicle to be upgraded (equivalent to Figure 4 Step B2 in the above process). Furthermore, the decryption device is automatically activated when the USB flash drive is inserted into the upgrade designated interface. Furthermore, the decryption device obtains the vehicle computer encryption upgrade package (equivalent to the vehicle computer encryption upgrade package) from the designated storage path of the USB flash drive. Figure 4 Step B4 in the above description). Further, the decryption device obtains a vehicle computer encryption upgrade package with a file name of "03_072_28_1_20240825_00002005". Further, the decryption device determines whether the file name of the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements. Further, the decryption device determines whether the 2-digit manufacturer code (i.e., the aforementioned "03") is consistent with the vehicle computer to be upgraded. Further, the decryption device determines whether the 3-digit vehicle model code (i.e., the aforementioned "072") is consistent with the vehicle computer to be upgraded. Further, the decryption device continues to determine whether the 2-digit cockpit code (i.e., the aforementioned "28") is consistent with the vehicle computer to be upgraded. Further, the decryption device determines whether the download date "20240825" of the vehicle computer encryption upgrade package is within the validity period of the vehicle computer upgrade (the validity period can be a date interval, for example, it can be "20240801-20240831"). Further, the decryption device determines that the subsequent vehicle to be upgraded performs a full upgrade operation based on the vehicle encryption upgrade package according to the full flag "1" of the vehicle encryption upgrade package. Further, the decryption device decompresses the vehicle encryption upgrade package to obtain the encrypted parameter file enc_offline_file and the encrypted file enc_P. Further, the decryption device uses the private key certificate B_R preset in the smart cockpit security computing storage area to decrypt the encrypted parameter file enc_offline_file, and obtains the encryption key K and the encryption initial vector IV (equivalent to Figure 4 Step B5 in step 2). Further, the decryption device uses the encryption key K and the encryption initial vector IV to decrypt the encrypted file enc_P, and obtains a compressed package P (equivalent to Figure 4 Step B6 in the above). Further, the decryption device uses the public key certificate A_P preset in the read-only area of the smart cockpit in the vehicle to be upgraded to verify the signature of the compressed package P (equivalent to Figure 4 Step B7) in the above step obtains the vehicle upgrade package. Further, the decryption device performs a full upgrade operation of the vehicle to be upgraded based on the vehicle upgrade package (equivalent to Figure 4Step B8 in the above code), and after the full upgrade is completed, delete the vehicle upgrade package, the encrypted parameter file enc_offline_file, the encrypted file enc_P, etc. (equivalent to Figure 4 Further, after the upgrade of the vehicle computer to be upgraded is completed, the decryption device automatically shuts down (equivalent to Figure 4 Step B10).
[0083] In summary, on the one hand, this embodiment can use common coding rules to verify the file name of the vehicle computer encryption upgrade package before the vehicle computer upgrade personnel perform the offline upgrade of the car intelligent cockpit, so as to avoid the use of the vehicle computer encryption upgrade package that does not meet the preset vehicle model upgrade file requirements to perform subsequent cryptographic calculations, which is conducive to reducing the resource occupation of the vehicle computer upgrade system (for example, it can be composed of the aforementioned encryption device and decryption device). On the other hand, this embodiment uses the decryption device to perform decryption and signature verification on the vehicle computer encryption upgrade package, which at least solves the problems of unknown source, leakage and malicious tampering of the vehicle computer upgrade package caused by the lack of security protection measures in the process of offline cockpit upgrade of existing cars, which is conducive to improving the security of vehicle computer upgrades and reducing the security risks of offline cockpit upgrades.
[0084] It should be noted that, in a specific implementation, Figure 5 This is a timing diagram for implementing a vehicle computer upgrade provided by an embodiment of the present invention, such as Figure 5 In the process of executing the vehicle computer upgrade operation, since there can be one or more vehicle computer upgrade personnel, when executing the vehicle computer offline upgrade, Figure 5 Some of the operations shown can be processed in parallel (for example, the operation of presetting the public key certificate A_P to the smart cockpit read-only area of the vehicle computer to be upgraded, and the operation of presetting the private key certificate B_R to the smart cockpit security computing storage area of the vehicle computer to be upgraded can be processed in parallel), which is beneficial to reducing the upgrade time of the vehicle computer and improving the upgrade efficiency of the vehicle computer.
[0085] The embodiment of the present invention also provides a method for encrypting a vehicle upgrade package. Figure 6 This is a flow chart of a vehicle upgrade package encryption method provided by an embodiment of the present invention. This embodiment is applicable to encryption scenarios of vehicle upgrade packages in various types of vehicles, such as fuel vehicles, pure electric vehicles, oil-electric hybrid vehicles, plug-in hybrid vehicles, extended-range electric vehicles, driverless vehicles, etc. The vehicle upgrade package encryption method can be, but is not limited to, executed by the vehicle upgrade package encryption device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 6 As shown, the vehicle upgrade package encryption method includes at least the following steps:
[0086] S1. In response to the preparation of the vehicle computer upgrade package, the encryption device signs the vehicle computer upgrade package using a first asymmetric encryption algorithm to obtain a signature file.
[0087] S2. In response to the generation of the signature file, the encryption device generates encryption parameters using a preset symmetric encryption algorithm.
[0088] S3. In response to the generation of the encryption parameters, the encryption device uses the encryption parameters to encrypt the signature file to obtain an encrypted file.
[0089] S4. In response to the generation of the encrypted file, the encryption device writes the encryption parameters into the parameter file, and uses the second asymmetric encryption algorithm to encrypt the parameter file to obtain an encrypted parameter file.
[0090] S5. The encryption device generates a vehicle computer encryption upgrade package based on the encryption file and the encryption parameter file at least after the encryption file and the encryption parameter file are generated.
[0091] Optionally, the vehicle upgrade package encryption method at least includes:
[0092] The encryption device pre-makes a key pair of a first asymmetric encryption algorithm and a key pair of a second asymmetric encryption algorithm to enable the encryption device to sign the vehicle upgrade package using the first asymmetric encryption algorithm and encrypt the parameter file using the second asymmetric encryption algorithm.
[0093] The key pair pre-production step may be performed before the aforementioned step S1.
[0094] Optionally, the encryption device includes at least an asymmetric encryption module, a symmetric encryption module, and an encryption upgrade package generation module;
[0095] The asymmetric encryption module is at least used to, when using the first asymmetric encryption algorithm to sign the vehicle upgrade package, extract the private key of the first asymmetric encryption algorithm, and use the private key of the first asymmetric encryption algorithm to sign the vehicle upgrade package (corresponding to the aforementioned step S1); and, when using the second asymmetric encryption algorithm to encrypt the parameter file, extract the public key of the second asymmetric encryption algorithm, and use the public key of the second asymmetric encryption algorithm to encrypt the parameter file (corresponding to the aforementioned step S4);
[0096] The symmetric encryption module is at least used to, after the signature file is generated, use a preset symmetric encryption algorithm to generate at least a symmetric encryption key and an encryption initial vector (corresponding to the aforementioned step S2); and encrypt the signature file according to the symmetric encryption key and the encryption initial vector (corresponding to the aforementioned step S3);
[0097] The encryption upgrade package generation module is at least used to generate a vehicle computer encryption upgrade package (corresponding to the aforementioned step S5) by using the encryption file and the encryption parameter file according to a specified naming rule after the encryption file and the encryption parameter file are generated.
[0098] The technical solution provided in this embodiment is as follows: first, in response to the preparation of the vehicle computer upgrade package, the encryption device uses a first asymmetric encryption algorithm to sign the vehicle computer upgrade package to obtain a signature file; further, in response to the generation of the signature file, the encryption device uses a preset symmetric encryption algorithm to generate encryption parameters; further, in response to the generation of the encryption parameters, the encryption device uses the encryption parameters to encrypt the signature file to obtain an encrypted file; further, in response to the generation of the encrypted file, the encryption device writes the encryption parameters into a parameter file, and uses a second asymmetric encryption algorithm to encrypt the parameter file to obtain an encrypted parameter file; finally, at least after the encryption file and the encrypted parameter file are generated, the encryption device generates a vehicle computer encrypted upgrade package based on the encryption file and the encrypted parameter file.
[0099] It can be seen from this that before performing the offline upgrade of the car's smart cockpit, the car computer upgrade personnel can use the encryption device to sign and encrypt the car computer upgrade package. This at least overcomes the problem of car computer upgrade package leakage or malicious tampering caused by the lack of security protection measures in the process of offline cockpit upgrade of existing cars. It is beneficial to improve the security of the car computer upgrade package and reduce the security risk of offline upgrade of the car cockpit.
[0100] The embodiment of the present invention also provides a method for decrypting a vehicle upgrade package. Figure 7 This is a flow chart of a vehicle upgrade package decryption method provided by an embodiment of the present invention. This embodiment is applicable to the encryption and decryption scenarios of vehicle upgrade packages in various types of vehicles, such as fuel vehicles, pure electric vehicles, oil-electric hybrid vehicles, plug-in hybrid vehicles, extended-range electric vehicles, driverless vehicles, etc. The vehicle upgrade package decryption method can be, but is not limited to, executed by the vehicle upgrade package decryption device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 7 As shown, the vehicle upgrade package decryption method includes at least the following steps:
[0101] S101. After the decryption device is turned on, obtain the vehicle computer encryption upgrade package.
[0102] S102. The decryption device obtains the encryption parameter file and the encryption file after at least determining that the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements.
[0103] S103: The decryption device uses a second asymmetric encryption algorithm to decrypt the encryption parameter file to obtain encryption parameters.
[0104] S104: After obtaining the encryption parameters, the decryption device uses the encryption parameters to decrypt the encrypted file to obtain the signature file.
[0105] S105. After obtaining the signature file, the decryption device uses the first asymmetric encryption algorithm to verify the signature file.
[0106] S106. After successfully verifying the signature file, the decryption device obtains the vehicle computer upgrade package.
[0107] S107. The decryption device performs a vehicle computer upgrade operation based on the vehicle computer upgrade package.
[0108] Optionally, the vehicle upgrade package decryption method further includes at least:
[0109] The decryption device presets the public key of the first asymmetric encryption algorithm and the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, so that the decryption device uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file and uses the first asymmetric encryption algorithm to verify the signature file.
[0110] The step of presetting the public key and the private key in the vehicle computer to be upgraded may be performed before the aforementioned step S101.
[0111] Optionally, the vehicle upgrade package decryption method further includes at least:
[0112] In response to obtaining the vehicle computer encryption upgrade package, the decryption device verifies the name of the vehicle computer encryption upgrade package to determine whether the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements.
[0113] Among them, the above-mentioned step of verifying the name of the vehicle computer encryption upgrade package can be performed before the aforementioned step S102.
[0114] Optionally, the vehicle upgrade package decryption method further includes at least:
[0115] After the vehicle computer upgrade operation is completed, the decryption device deletes the vehicle computer upgrade package and process files.
[0116] Among them, the above-mentioned step of deleting the vehicle computer upgrade package and process files can be performed after the aforementioned step S107.
[0117] Optionally, the decryption device includes at least an upgrade package verification module, an asymmetric decryption module, and a symmetric decryption module;
[0118] The upgrade package verification module is at least used for, in response to the activation of the decryption device, obtaining the vehicle computer encrypted upgrade package (corresponding to the aforementioned step S101); and, after obtaining the vehicle computer encrypted upgrade package, verifying whether the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements; and, after determining that the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements, decompressing the vehicle computer encrypted upgrade package to obtain the encrypted file and the encrypted parameter file (corresponding to the aforementioned step S102); and, after determining that the name of the vehicle computer encrypted upgrade package does not meet the preset vehicle model upgrade file requirements, exiting the vehicle computer upgrade operation;
[0119] The asymmetric decryption module is at least used for, after obtaining the encrypted parameter file, extracting the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, and decrypting the encrypted parameter file based on the private key of the second asymmetric encryption algorithm to obtain the encryption parameters (corresponding to the aforementioned step S103); and, after obtaining the signature file, extracting the public key of the first asymmetric encryption algorithm in the vehicle computer to be upgraded, and verifying the signature file based on the public key of the first asymmetric encryption algorithm (corresponding to the aforementioned step S105); and, if the encrypted parameter file is decrypted successfully and the signature file is verified, executing the vehicle computer upgrade operation; and, if the encrypted parameter file is decrypted unsuccessfully or the signature file is verified unsuccessfully, terminating the vehicle computer upgrade operation;
[0120] The symmetric decryption module is at least used to, after obtaining the encryption parameters, use the encryption parameters to decrypt the encrypted file to obtain the signature file (corresponding to the aforementioned step S104); and, based on the decryption result of the encrypted file, determine whether the encrypted file has been tampered with. If the encrypted file is decrypted successfully, the encrypted file has not been tampered with, and the vehicle computer upgrade operation continues to be executed (corresponding to the aforementioned steps S106 and S107); and, if the encrypted file decryption fails, the encrypted file is at risk of being tampered with, and the vehicle computer upgrade operation is exited.
[0121] The technical solution provided in this embodiment is as follows: first, after the decryption device is turned on, the vehicle computer encrypted upgrade package is obtained; further, the decryption device obtains the encrypted parameter file and the encrypted file at least after determining that the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements; further, the decryption device uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file to obtain the encryption parameters; further, after obtaining the encryption parameters, the decryption device uses the encryption parameters to decrypt the encrypted file to obtain the signature file; further, after obtaining the signature file, the decryption device uses the first asymmetric encryption algorithm to verify the signature file; further, after successfully verifying the signature file, the decryption device obtains the vehicle computer upgrade package; finally, the decryption device performs the vehicle computer upgrade operation based on the vehicle computer upgrade package.
[0122] It can be seen from this that this embodiment can use a decryption device to verify and decrypt the encrypted upgrade package of the vehicle computer before executing the offline upgrade of the car's smart cockpit, so as to at least solve the problem of unknown source, leakage and malicious tampering of the vehicle computer upgrade package due to the lack of security protection measures in the process of offline upgrade of the existing car cockpit. This is beneficial to improving the security of vehicle computer upgrades and reducing the security risks of offline upgrades of car cockpits.
[0123] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A vehicle upgrade package encryption device, characterized in that: The encryption device is at least used for: In response to the preparation of the vehicle upgrade package, the vehicle upgrade package is signed using a first asymmetric encryption algorithm to obtain a signature file; and in response to the generation of the signature file, encryption parameters are generated using a preset symmetric encryption algorithm; and, in response to the generation of the encryption parameter, encrypting the signature file using the encryption parameter to obtain an encrypted file; and, in response to the generation of the encrypted file, writing the encryption parameters into a parameter file, and encrypting the parameter file using a second asymmetric encryption algorithm to obtain an encrypted parameter file; And, at least after the encryption file and the encryption parameter file are generated, a vehicle computer encryption upgrade package is generated based on the encryption file and the encryption parameter file.
2. The vehicle upgrade package encryption device according to claim 1, characterized in that: The encryption device is at least further used to pre-prepare a key pair of the first asymmetric encryption algorithm and a key pair of the second asymmetric encryption algorithm, so as to enable the encryption device to use the first asymmetric encryption algorithm to sign the vehicle upgrade package, and use the second asymmetric encryption algorithm to encrypt the parameter file.
3. The vehicle upgrade package encryption device according to claim 1, characterized in that: The encryption device at least includes an asymmetric encryption module, a symmetric encryption module and an encryption upgrade package generation module; The asymmetric encryption module is at least used to, when the first asymmetric encryption algorithm is used to sign the vehicle upgrade package, extract the private key of the first asymmetric encryption algorithm, and use the private key of the first asymmetric encryption algorithm to sign the vehicle upgrade package; and, when the second asymmetric encryption algorithm is used to encrypt the parameter file, extract the public key of the second asymmetric encryption algorithm, and use the public key of the second asymmetric encryption algorithm to encrypt the parameter file; The symmetric encryption module is at least used to, after the signature file is generated, use the preset symmetric encryption algorithm to generate at least a symmetric encryption key and an encryption initialization vector; and encrypt the signature file according to the symmetric encryption key and the encryption initialization vector; The encrypted upgrade package generation module is at least used to generate the vehicle computer encrypted upgrade package by using the encrypted file and the encrypted parameter file according to a specified naming rule after the encrypted file and the encrypted parameter file are generated.
4. A vehicle upgrade package decryption device, characterized in that: The decryption device is at least used for: In response to the activation of the decryption device, obtaining a vehicle computer encryption upgrade package; and, at least after determining that the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements, obtaining an encryption parameter file and an encryption file; and, using a second asymmetric encryption algorithm to decrypt the encryption parameter file to obtain encryption parameters; and, after obtaining the encryption parameters, using the encryption parameters to decrypt the encrypted file to obtain a signature file; and, after obtaining the signature file, verifying the signature file using a first asymmetric encryption algorithm; and, after successfully verifying the signature file, obtaining a vehicle upgrade package; And, performing a vehicle computer upgrade operation based on the vehicle computer upgrade package.
5. The vehicle upgrade package decryption device according to claim 4, characterized in that: The decryption device is also used to pre-set the public key of the first asymmetric encryption algorithm and the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, so that the decryption device uses the second asymmetric encryption algorithm to decrypt the encrypted parameter file and uses the first asymmetric encryption algorithm to verify the signature file.
6. The vehicle upgrade package decryption device according to claim 5, characterized in that: The decryption device is also used to, in response to the acquisition of the vehicle computer encryption upgrade package, verify the name of the vehicle computer encryption upgrade package to determine whether the vehicle computer encryption upgrade package meets the preset vehicle model upgrade file requirements.
7. The vehicle upgrade package decryption device according to claim 4, characterized in that: The decryption device is also used to delete the vehicle computer upgrade package and process files after the vehicle computer upgrade operation is completed.
8. The vehicle upgrade package decryption device according to claim 6, characterized in that: The decryption device at least includes an upgrade package verification module, an asymmetric decryption module and a symmetric decryption module; The upgrade package verification module is at least used to, in response to the activation of the decryption device, obtain the vehicle computer encrypted upgrade package; and after obtaining the vehicle computer encrypted upgrade package, verify whether the name of the vehicle computer encrypted upgrade package meets the preset vehicle model upgrade file requirements; And, after determining that the name of the vehicle machine encryption upgrade package meets the preset vehicle model upgrade file requirements, decompressing the vehicle machine encryption upgrade package to obtain the encryption file and the encryption parameter file; And, after determining that the name of the vehicle computer encrypted upgrade package does not meet the preset vehicle model upgrade file requirements, exiting the vehicle computer upgrade operation; The asymmetric decryption module is at least used to, after obtaining the encrypted parameter file, extract the private key of the second asymmetric encryption algorithm in the vehicle computer to be upgraded, and decrypt the encrypted parameter file based on the private key of the second asymmetric encryption algorithm to obtain the encryption parameters; and, after obtaining the signature file, extract the public key of the first asymmetric encryption algorithm in the vehicle computer to be upgraded, and verify the signature file based on the public key of the first asymmetric encryption algorithm; and, if the encrypted parameter file is decrypted successfully and the signature file is verified, the vehicle computer upgrade operation is executed; and, if the encrypted parameter file fails to be decrypted or the signature file fails to be verified, the vehicle computer upgrade operation is terminated; The symmetric decryption module is at least used to, after obtaining the encryption parameter, use the encryption parameter to decrypt the encrypted file to obtain the signature file; and, determining whether the encrypted file has been tampered with based on the decryption result of the encrypted file; And, if the encrypted file is decrypted successfully, the encrypted file has not been tampered with, and the vehicle computer upgrade operation continues to be executed; Furthermore, if the encrypted file fails to be decrypted, the encrypted file is at risk of being tampered with, and the vehicle computer upgrade operation is exited.
9. A method for encrypting a vehicle upgrade package, characterized in that: The method is executed by using the vehicle upgrade package encryption device according to claim 1, and the method at least comprises: S1. In response to the preparation of the vehicle computer upgrade package, the encryption device signs the vehicle computer upgrade package using a first asymmetric encryption algorithm to obtain a signature file; S2, the encryption device generates encryption parameters using a preset symmetric encryption algorithm in response to the generation of the signature file; S3, the encryption device encrypts the signature file using the encryption parameter in response to the generation of the encryption parameter to obtain an encrypted file; S4, in response to the generation of the encrypted file, the encryption device writes the encryption parameters into a parameter file, and encrypts the parameter file using a second asymmetric encryption algorithm to obtain an encrypted parameter file; S5. The encryption device generates a vehicle computer encryption upgrade package based on the encryption file and the encryption parameter file at least after the encryption file and the encryption parameter file are generated.
10. A method for decrypting a vehicle upgrade package, characterized in that: The method is performed by using the vehicle computer offline upgrade decryption device according to claim 4, and the method at least comprises: S101, after the decryption device is turned on, obtaining the vehicle computer encryption upgrade package; S102, the decryption device obtains the encryption parameter file and the encryption file after at least determining that the vehicle machine encryption upgrade package meets the preset vehicle model upgrade file requirements; S103, the decryption device uses a second asymmetric encryption algorithm to decrypt the encryption parameter file to obtain encryption parameters; S104, after obtaining the encryption parameter, the decryption device uses the encryption parameter to decrypt the encrypted file to obtain a signature file; S105, after obtaining the signature file, the decryption device uses a first asymmetric encryption algorithm to verify the signature file; S106, after successfully verifying the signature file, the decryption device obtains a vehicle computer upgrade package; S107: The decryption device performs a vehicle computer upgrade operation based on the vehicle computer upgrade package.
Citation Information
Patent Citations
Remote program upgrading method and device and medium
CN112134911A
Vehicle software upgrading method and device and storage medium
CN115022092A
Upgrading data processing method and system, computer equipment and medium
CN116896460A
Vehicle system upgrading method, OTA upgrading file cloud processing method and electronic equipment
CN117041048A
Vehicle flashing method and device, terminal equipment and storage medium
CN117892290A
Cited By
In‑vehicle infotainment system update package encryption device, decryption device, encryption method and decryption method
WO2026066277A1