A vehicle machine OTA upgrading method and device, electronic equipment and storage medium
By using PKI and digital signature technologies for dual security verification in intelligent connected vehicles, the security risks of OTA upgrade solutions are resolved, the legality and integrity of upgrade packages are verified, and the security and reliability of the upgrade process are improved.
Patent Information
- Application Number
- CN202510316501.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing OTA upgrade solutions pose security risks in intelligent connected vehicles. Attackers can compromise OTA upgrade links through hijacking, tampering, or replacement, making the upgrade process insecure.
By employing Public Key Infrastructure (PKI) and digital signature technology, a ciphertext hash verification value is generated by encrypting the plaintext hash verification value with the public key at the vehicle end, and the plaintext signature information is encrypted with the private key of the cloud platform. The hash verification and signature information are combined for dual security verification, and decryption verification is performed at the vehicle end to ensure the legality and integrity of the upgrade package.
It improves the security of OTA upgrades, reduces the risk of attacks and tampering, enhances the source signature legitimacy and anti-tampering capabilities of upgrade packages, improves the security of ECU upgrade packages through a two-factor authentication mechanism, and enables rollback to the initial version in the event of upgrade failure.
Smart Images

Figure CN120342659B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and particularly relates to a car machine OTA upgrading method and device, electronic equipment and a storage medium. BACKGROUND
[0002] With the development of intelligent networked vehicles, more and more host manufacturers integrate OTA upgrading functions on vehicle products, and realize system upgrading, application updating, bug fixing and function opening through OTA. OTA refers to over-the-air update, online upgrading, specifically software upgrading through wireless means instead of using cables or other local connections for data transmission. As an important function of intelligent networked vehicles, OTA function has become the focus of attackers, and attackers launch attacks on intelligent networked vehicle OTA upgrading links through hijacking, tampering and replacement. Therefore, the existing OTA upgrading scheme has security risks. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a car machine OTA upgrading method, device, electronic equipment and storage medium to improve the security of intelligent networked vehicle OTA upgrading.
[0004] To achieve the above purpose, one aspect of the embodiments of the present application provides a car machine OTA upgrading method, which is applied to a cloud platform, and the method comprises the following steps:
[0005] calculating a plaintext hash check value of an upgrading package;
[0006] encrypting the plaintext hash check value by using a public key of a vehicle end to generate a ciphertext hash check value;
[0007] encrypting plaintext signature information of the cloud platform by using a private key of the cloud platform to generate ciphertext signature information; wherein the plaintext signature information comprises the plaintext hash check value and information of the upgrading package;
[0008] transmitting the upgrading package, the ciphertext hash check value and the ciphertext signature information to the vehicle end, so that the vehicle end upgrades by using the upgrading package.
[0009] In some embodiments, the step of encrypting the plaintext hash check value by using the public key of the vehicle end to generate the ciphertext hash check value comprises the following steps:
[0010] if the length of the public key of the vehicle end exceeds the information packet length of the message digest algorithm, calculating the digest of the public key of the vehicle end as a target public key by using the message digest algorithm;
[0011] encrypting the plaintext hash check value by using the target public key to generate the ciphertext hash check value.
[0012] In some embodiments, the step of encrypting the plaintext signature information of the cloud platform using the private key of the cloud platform to generate the ciphertext signature information comprises the following steps:
[0013] combining the plaintext hash check value, the identity information of the cloud platform and the version information of the upgrade package into the plaintext signature information in a target format;
[0014] encrypting the plaintext signature information using the private key of the cloud platform to generate the ciphertext signature information.
[0015] To achieve the above object, another aspect of the embodiment of the present application proposes a vehicle machine OTA upgrade method, which is applied to a vehicle end in a vehicle machine OTA upgrade method as described in the present application, and comprises the following steps:
[0016] receiving an upgrade package, a ciphertext hash check value of the upgrade package and a ciphertext signature information of a cloud platform sent by the cloud platform;
[0017] decrypting the ciphertext signature information using the public key of the cloud platform to obtain decrypted signature information;
[0018] if the decrypted signature information matches the plaintext signature information of the cloud platform, calculating the plaintext hash check value of the upgrade package;
[0019] decrypting the ciphertext hash check value using the private key of the vehicle end to obtain a decrypted hash check code;
[0020] if the decrypted hash check code matches the plaintext hash check value, upgrading using the upgrade package.
[0021] In some embodiments, the step of calculating the plaintext hash check value of the upgrade package comprises the following steps:
[0022] sequentially reading bytes of the upgrade package in blocks;
[0023] generating sub-hash values of corresponding lengths according to the bytes read in blocks using a hash algorithm;
[0024] combining the sub-hash values into the plaintext hash check value.
[0025] In some embodiments, the method further comprises the following steps:
[0026] if it is detected that the upgrade package fails to upgrade, rolling back the software corresponding to the upgrade package to a version before upgrading.
[0027] To achieve the above object, another aspect of the embodiment of the present application provides a vehicle machine OTA upgrading device, which is applied to a cloud platform and comprises:
[0028] a first hash value calculation unit configured to calculate a plaintext hash check value of the upgrading package;
[0029] a hash value encryption unit configured to encrypt the plaintext hash check value to generate a ciphertext hash check value by using a public key of the vehicle end;
[0030] a signature encryption unit configured to encrypt plaintext signature information of the cloud platform to generate ciphertext signature information by using a private key of the cloud platform, wherein the plaintext signature information comprises the plaintext hash check value and information of the upgrading package;
[0031] an information transmission unit configured to transmit the upgrading package, the ciphertext hash check value and the ciphertext signature information to the vehicle end, so that the vehicle end upgrades by using the upgrading package.
[0032] To achieve the above object, another aspect of the embodiment of the present application provides a vehicle machine OTA upgrading device, which is applied to a cloud platform and comprises:
[0033] an information receiving unit configured to receive an upgrading package, a ciphertext hash check value of the upgrading package and ciphertext signature information of the cloud platform sent by the cloud platform;
[0034] a signature decryption unit configured to decrypt the ciphertext signature information by using a public key of the cloud platform to obtain decrypted signature information;
[0035] a second hash value calculation unit configured to calculate a plaintext hash check value of the upgrading package if the decrypted signature information matches plaintext signature information of the cloud platform;
[0036] a hash value decryption unit configured to decrypt the ciphertext hash check value by using a private key of the vehicle end to obtain a decrypted hash check code;
[0037] a software upgrading unit configured to upgrade by using the upgrading package if the decrypted hash check code matches the plaintext hash check value.
[0038] To achieve the above object, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.
[0039] To achieve the above object, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.
[0040] The embodiment of the present application at least has the following beneficial effects:
[0041] The present application can calculate the plaintext hash check value of the upgrade package, encrypt the plaintext hash check value by using the public key of the vehicle end to generate the ciphertext hash check value, and encrypt the plaintext signature information of the cloud platform by using the private key of the cloud platform to generate the ciphertext signature information, wherein the plaintext signature information includes the plaintext hash check value and the information of the upgrade package; and transmit the upgrade package, the ciphertext hash check value and the ciphertext signature information to the vehicle end, so that the vehicle end uses the upgrade package for upgrading. The present application adopts the hash check value and the encrypted signature information, realizes double security verification, can reduce the risk of attack and tampering in the OTA process, and improves the security of OTA upgrading. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0043] Figure 1 A flowchart of a vehicle machine OTA upgrading method provided by the embodiment of the present application is shown in the figure;
[0044] Figure 2 A flowchart of another vehicle machine OTA upgrading method provided by the embodiment of the present application is shown in the figure;
[0045] Figure 3 An example flowchart of a vehicle machine OTA upgrading method provided by the embodiment of the present application is shown in the figure;
[0046] Figure 4 A structural diagram of a vehicle machine OTA upgrading device provided by the embodiment of the present application is shown in the figure;
[0047] Figure 5 A structural diagram of another vehicle machine OTA upgrading device provided by the embodiment of the present application is shown in the figure;
[0048] Figure 6 A hardware structural diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0049] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the present application. They are only examples of apparatuses and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0050] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".
[0051] The terms "at least one", "multiple", "each", "any", and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0053] Before the embodiments of the present application are described in detail, first, some related technologies involved in the embodiments of the present application are described as follows:
[0054] The related OTA upgrade verification mode includes:
[0055] (1) Integrity verification based on HASH algorithm: the cloud uses HASH algorithms such as MD5, SHA-1, etc. to calculate the HASH value of the upgrade file, and the vehicle side uses the same algorithm to calculate the HASH value of the upgrade file, and the integrity verification of the upgrade file is realized by comparing the HASH values, and the OTA upgrade verification is completed. However, attackers can usually bypass this verification method by tampering with the HASH value and tampering with the verification logic, and this verification method has low security and mature attack methods against this method.
[0056] (2) Signature verification based on signature algorithm: By using the PKI system to generate public and private keys, the cloud uses the private key to encrypt the upgrade package data checksum or other variables related to the data content, completes the legal "signature" of the data, and the vehicle end uses the public key of the cloud to interpret the received "digital signature", and uses the interpretation result to verify the integrity of the data, and confirms the legality of the signature. This way confirms the source of the upgrade package, but it does not consider the integrity of the upgrade package content and the rollback mechanism after the upgrade fails.
[0057] Related OTA upgrade methods include HASH integrity verification, signature algorithm verification, etc.
[0058] The HASH algorithm-based integrity verification method is simple to deploy, but if the HASH value is tampered with by an attacker during transmission, the tampered verification logic will bypass this verification method. The signature verification based on the signature algorithm can basically confirm the legality of the signature and prove that the upgrade package indeed comes from a regular source, but it does not consider the integrity of the upgrade package content and the rollback mechanism after the upgrade fails.
[0059] The purpose of this application is to provide a secure intelligent connected vehicle OTA upgrade method that comprehensively uses public key infrastructure (PKI), digital signature, hash verification, and failure rollback technology to ensure data security during the upgrade process.
[0060] The purpose of using digital signature is to confirm that a certain information is indeed sent by a certain sender, no one can fake the message, and the sender cannot deny it. OTA can achieve anti-forgery, anti-denial, tamper detection, and data integrity verification by using digital signature, ensuring the legality of the software package during the OTA upgrade process. Common digital signature algorithms include: MD5 with RSA / SHA1 with RSA / SHA256 with RSA / SHA1 with DSA / SHA 256 with DSA / SHA512 with DSA / ECDSA, etc.
[0061] The HASH (Hash-based Message Authentication Code, referred to as HMAC, which is a message authentication code algorithm based on a hash function, mainly used to ensure the integrity of data and verify the source of the message) algorithm is based on the information digest algorithm. At present, it mainly collects MD and SHA two series of message digest algorithms. Among them, the MD series algorithms have HmacMD2, HmacMD4, HmacMD5 three algorithms; the SHA series algorithms have HmacSHA1, HmacSHA224, HmacSHA256, HmacSHA384, HmacSHA512 five algorithms. In addition to the information digest algorithm, the HMAC algorithm also needs a key. The HMAC key can be of any length, and if the length of the key exceeds the length of the information packet of the digest algorithm, the digest of the key is calculated using the digest algorithm as the new key. It is generally not recommended to use too short a key, because the length of the key is related to the security strength. The key length of the present application can be selected to be not less than the length of the information digest output by the selected digest algorithm.
[0062] With reference to Figure 1 The embodiment of the present application provides a vehicle machine OTA upgrading method, which is applied to a cloud platform. The method can include but is not limited to S100 to S130, and the details are as follows:
[0063] S100: Calculate a plaintext hash check value of an upgrade package.
[0064] S110: Encrypt the plaintext hash check value by using a public key of a vehicle end to generate a ciphertext hash check value.
[0065] Further, S110 can include the following steps S111-S112:
[0066] S111: If the length of the public key of the vehicle end exceeds the information packet length of the information digest algorithm, calculate the digest of the public key of the vehicle end by using the information digest algorithm as a target public key;
[0067] S112: Encrypt the plaintext hash check value by using the target public key to generate the ciphertext hash check value.
[0068] S120: Encrypt plaintext signature information of the cloud platform by using a private key of the cloud platform to generate ciphertext signature information; wherein the plaintext signature information includes the plaintext hash check value and information of the upgrade package.
[0069] Further, S120 can include the following steps S121-S122:
[0070] S121: combine the plaintext hash check value, the identity information of the cloud platform, and the version information of the upgrade package into the plaintext signature information in a target format;
[0071] S122: encrypt the plaintext signature information using a private key of the cloud platform to generate the ciphertext signature information.
[0072] S130: transmit the upgrade package, the ciphertext hash check value, and the ciphertext signature information to the vehicle end for the vehicle end to perform an upgrade using the upgrade package.
[0073] Referring to Figure 2 The embodiments of the present application provide a vehicle machine OTA upgrade method, which is applied to Figure 1 The vehicle end in the method can include, but is not limited to, S200 to S240, and details are as follows:
[0074] S200: receive an upgrade package, a ciphertext hash check value of the upgrade package, and a ciphertext signature information of a cloud platform sent by the cloud platform.
[0075] S210: decrypt the ciphertext signature information using a public key of the cloud platform to obtain decrypted signature information.
[0076] S220: if the decrypted signature information matches the plaintext signature information of the cloud platform, calculate the plaintext hash check value of the upgrade package.
[0077] Further, S220 can include the following steps S221 to S223:
[0078] S221: read bytes of the upgrade package in blocks one by one;
[0079] S222: generate sub-hash values of corresponding lengths using a hash algorithm according to the bytes read in blocks;
[0080] S223: combine the sub-hash values to obtain the plaintext hash check value.
[0081] S230: decrypt the ciphertext hash check value using a private key of the vehicle end to obtain a decrypted hash check code.
[0082] S240: if the decrypted hash check code matches the plaintext hash check value, perform an upgrade using the upgrade package.
[0083] Further, the embodiments of the present application can further include a step of upgrade rollback:
[0084] S250: if it is detected that the upgrade package fails to upgrade, roll back software corresponding to the upgrade package to a version before the upgrade.
[0085] Next, the scheme of the embodiment of the application will be described in detail with reference to a specific application example.
[0086] With reference to Figure 3 The embodiment provides a vehicle machine OTA upgrading method example flow chart.
[0087] Specifically, the embodiment can include the following steps:
[0088] Step 1: The OTA cloud platform establishes a secure link with the vehicle end TBOX.
[0089] Step 2: The OTA cloud platform calculates the hash check value (H) of the upgrade package and encrypts H using the public key of the vehicle end to generate the encrypted hash check value (SH), and fuses the identity information of the cloud platform, the upgrade package version information and the like into signature information (N) according to a specific format, and encrypts the platform signature information (SN) through the private key of the cloud platform.
[0090] Step 3: The OTA cloud platform transmits the upgrade package, the signature information (SN) and the encrypted check value (SH) to the vehicle end TBOX.
[0091] Step 4: The vehicle end TBOX decrypts the signature information N1 through the public key of the cloud platform.
[0092] Step 5: If N=N1, it means that the signature information is valid, proving that the upgrade package data source is reliable, otherwise go to step 1 to re-establish the link.
[0093] Step 6: The vehicle end TBOX calculates the hash check value H of the received data package, and decrypts the hash check value H1 through the private key of the vehicle end.
[0094] Step 7: If H=H1, it means that the check is valid and the upgrade package content is complete; otherwise, go to step 2.
[0095] Step 8: The vehicle end TBOX distributes the upgrade package to the ECU, and the ECU performs secondary check on the received upgrade package using digital signature or hash check technology according to its own software and hardware architecture, and performs upgrade and installation after successful check.
[0096] Step 9: The vehicle end checks the software or firmware version information, and rolls back to the initial version if the upgrade fails.
[0097] More specifically, the scheme of the embodiment can be implemented by the following implementation manner:
[0098] In the cloud platform, the following steps can be included:
[0099] 1. Calculate the hash check value of the upgrade package:
[0100] First, a suitable hash algorithm, such as SHA-256, is selected, and then the file to be upgraded (e.g., "firmware_update.bin") is hashed. This step involves reading each byte of the file, inputting it into the hash function, and ultimately generating a unique hash value (H). This hash value represents a digital fingerprint of the file's content, used for subsequent integrity verification.
[0101] 2. Encrypted hash verification value:
[0102] Next, the calculated hash value H is encrypted using the public key of the vehicle's TBOX. This process ensures that only the vehicle's device with the corresponding private key can decrypt it. The encrypted result is called the cryptographic hash check value (SH). This step uses an asymmetric encryption algorithm combined with a cryptographic padding scheme such as PKCS5Padding or PKCS1Padding to ensure the security of the encryption process.
[0103] 3. The signature information obtained by fusion:
[0104] In this step, the OTA cloud platform needs to prepare signature information (N). Signature information typically includes the cloud platform's identity information (e.g., "OTA_PLATFORM_001"), the upgrade package version information (e.g., "1.0.0"), and the previously calculated hash value H. This information can be combined using a specific format, such as separating it with a vertical bar "|". The resulting string N is the content that needs to be signed.
[0105] 4. Generate signature information:
[0106] Finally, the generated signature information N is encrypted using the OTA cloud platform's private key, generating signature information (SN). Asymmetric encryption is also used here to ensure that only the recipient holding the corresponding public key can verify the signature's validity. Once completed, the cloud platform sends the upgrade data package, the encrypted hash checksum SH, and the signature information SN to the vehicle's TBOX.
[0107] The following steps can be included in the vehicle-side implementation:
[0108] 1. Calculate the hash check value H:
[0109] Receiving the upgrade data packet: The vehicle-mounted TBOX first receives the upgrade data packet sent by the OTA cloud platform. This data packet contains the software or firmware update content.
[0110] Choosing a hash algorithm: SHA-256 or other secure hash algorithms are typically used. Selecting a suitable hash algorithm is crucial, as it should be able to efficiently generate hash values for data packets.
[0111] Read the content of the data packet: TBOX reads the entire content of the upgrade data packet into memory. For larger files, it can be read in chunks to avoid excessive memory consumption.
[0112] Calculate the hash value: Each byte read is passed to the hash algorithm. The hash algorithm processes these bytes to generate a fixed-length hash value H. This hash value represents the content of the data packet. The calculation process of the hash value includes block-by-block processing of the read data until the entire data packet is processed.
[0113] Get the hash check value H: After the calculation is complete, TBOX will obtain the hash check value H of the upgrade data packet. This value is used for subsequent integrity verification.
[0114] 2. Decrypt the hash check value H1:
[0115] Receive the encrypted hash check value: During the upgrade process, the cloud platform sends the encrypted hash check value SH. The vehicle-end TBOX also receives this encrypted value.
[0116] Get the private key: The vehicle-end TBOX has its own private key. This private key is unique and only owned by the vehicle-end, used to decrypt encrypted information.
[0117] Select the decryption algorithm: Usually use asymmetric encryption algorithm such as RSA, combined with appropriate padding method (such as PKCS#1v1.5 or OAEP) to ensure a secure decryption process.
[0118] Decrypt using private key: TBOX uses its own private key to decrypt the received encrypted hash check value SH. This process involves passing the encrypted data to the decryption algorithm, which uses the private key to process the data and restore the original hash value H1.
[0119] Get the hash check value H1: After decryption is complete, TBOX will get the decrypted hash value H1. This value should be compared with the previously calculated hash value H to verify whether the data packet has been tampered with or damaged during transmission.
[0120] In summary, the technical features of this embodiment include:
[0121] 1) OTA cloud platform calculates the hash check value (H) of the upgrade package and encrypts H with the public key of the vehicle-end to generate the encrypted hash check value (SH), fuses the cloud platform's identity information, upgrade package version information, etc. into signature information (N) according to a specific format, and encrypts the platform signature information (SN) with the cloud platform's private key.
[0122] 2) The vehicle end TBOX distributes the upgrade package to the ECU, and the ECU performs secondary verification on the received upgrade package using digital signature or hash check technology according to the hardware and software architecture of the ECU, and performs upgrade and installation after successful verification.
[0123] 3) The vehicle end checks the software or firmware version information, and rolls back to the initial version if the upgrade fails.
[0124] The embodiment has at least the following beneficial effects:
[0125] 1. The use of public key infrastructure (PKI) and digital signature technology enhances the legality of the source signature of the upgrade package and the anti-tampering ability.
[0126] 2. The use of asymmetric encryption algorithm and hash check technology protects the security of data during transmission.
[0127] 3. The secondary verification mechanism improves the security of the ECU upgrade package.
[0128] 4. The rollback mechanism reduces the negative impact of upgrade failure.
[0129] Referring to Figure 4 , the embodiment of the application also provides a vehicle machine OTA upgrade device, which can implement Figure 1 a vehicle machine OTA upgrade method, and the device comprises:
[0130] a first hash value calculation unit configured to calculate a plaintext hash check value of an upgrade package;
[0131] a hash value encryption unit configured to encrypt the plaintext hash check value to generate a ciphertext hash check value using a public key of a vehicle end;
[0132] a signature encryption unit configured to encrypt plaintext signature information of a cloud platform to generate ciphertext signature information using a private key of the cloud platform; wherein the plaintext signature information comprises the plaintext hash check value and information of the upgrade package;
[0133] an information transmission unit configured to transmit the upgrade package, the ciphertext hash check value and the ciphertext signature information to the vehicle end, so that the vehicle end performs upgrade using the upgrade package.
[0134] Referring to Figure 5 , the embodiment of the application also provides a vehicle machine OTA upgrade device, which can implement Figure 2 a vehicle machine OTA upgrade method, and the device comprises:
[0135] an information receiving unit configured to receive an upgrade package, a ciphertext hash check value of the upgrade package and ciphertext signature information of a cloud platform sent by the cloud platform;
[0136] a signature decryption unit configured to decrypt the ciphertext signature information by using a public key of the cloud platform to obtain decrypted signature information;
[0137] a second hash value calculation unit configured to calculate a plaintext hash check value of the upgrade package if the decrypted signature information matches the plaintext signature information of the cloud platform;
[0138] a hash value decryption unit configured to decrypt the ciphertext hash check value by using a private key of the vehicle end to obtain a decrypted hash check code;
[0139] a software upgrade unit configured to perform upgrade by using the upgrade package if the decrypted hash check code matches the plaintext hash check value.
[0140] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0141] The present application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above vehicle machine OTA upgrade method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle computer.
[0142] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0143] Please refer to Figure 6 , Figure 6 a hardware structure of an electronic device of another embodiment is shown, which includes:
[0144] The processor 601 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the present application.
[0145] The memory 602 can be implemented in the form of a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 602 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 602 and are called and executed by the processor 601 to implement the vehicle machine OTA upgrading method provided by the embodiments of the present application;
[0146] The input / output interface 603 is configured to realize information input and output.
[0147] The communication interface 604 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0148] The bus 605 is configured to transmit information between various components (for example, the processor 601, the memory 602, the input / output interface 603, and the communication interface 604) of the device.
[0149] The processor 601, the memory 602, the input / output interface 603, and the communication interface 604 are connected to each other through the bus 605 to realize the communication connection between the device.
[0150] The present application also provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the vehicle machine OTA upgrading method described above is realized.
[0151] It can be understood that the contents of the above method embodiments are applicable to the present storage medium embodiments. The present storage medium embodiments specifically realize the same functions as the above method embodiments and achieve the same beneficial effects as the above method embodiments.
[0152] The memory is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor. These remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0153] The embodiments described in the specification are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0154] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0155] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0156] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0157] The terms "first", "second", "third", "fourth" and the like (if any) in the specification of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0158] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c can be single or multiple.
[0159] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0160] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0161] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0162] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0163] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for OTA (Over-The-Air) upgrade of a vehicle infotainment system, characterized in that, The method is applied to a cloud platform and includes the following steps: Calculate the plaintext hash checksum of the upgrade package; The plaintext hash check value is encrypted using the vehicle's public key to generate a ciphertext hash check value; The plaintext signature information of the cloud platform is encrypted using the private key of the cloud platform to generate ciphertext signature information; wherein, the plaintext signature information includes the plaintext hash check value and the information of the upgrade package; The upgrade package, the encrypted hash verification value, and the encrypted signature information are transmitted to the vehicle terminal so that the vehicle terminal can use the upgrade package to perform an upgrade; wherein, when the signature information decrypted by the vehicle terminal is consistent with the plaintext signature information of the cloud platform, the vehicle terminal uses the upgrade package to perform an upgrade. The step of encrypting the plaintext hash verification value using the vehicle's public key to generate a ciphertext hash verification value includes the following steps: If the length of the public key on the vehicle exceeds the information block length of the message digest algorithm, then the message digest algorithm is used to calculate the digest of the public key on the vehicle as the target public key. The plaintext hash check value is encrypted using the target public key to generate the ciphertext hash check value; The step of encrypting the plaintext signature information of the cloud platform using the private key of the cloud platform to generate ciphertext signature information includes the following steps: The plaintext hash verification value, the identity information of the cloud platform, and the version information of the upgrade package are combined into the plaintext signature information using the target format; The plaintext signature information is encrypted using the private key of the cloud platform to generate the ciphertext signature information.
2. A method for OTA (Over-The-Air) upgrade of a vehicle infotainment system, characterized in that, The method is applied to the vehicle side in the in-vehicle OTA upgrade method as described in claim 1, and the method includes the following steps: Receive the upgrade package sent by the cloud platform, the encrypted hash verification value of the upgrade package, and the encrypted signature information of the cloud platform; The encrypted signature information is decrypted using the public key of the cloud platform to obtain the decrypted signature information; If the decryption signature information matches the plaintext signature information of the cloud platform, then the plaintext hash verification value of the upgrade package is calculated. The encrypted hash verification value is decrypted using the private key on the vehicle to obtain the decrypted hash verification code; If the decryption hash checksum matches the plaintext hash checksum, then the upgrade package is used for the upgrade.
3. The vehicle infotainment system OTA upgrade method according to claim 2, characterized in that, The calculation of the plaintext hash verification value of the upgrade package includes the following steps: Read the bytes of the upgrade package in blocks sequentially; A sub-hash value of corresponding length is generated based on the bytes obtained from the block reading using a hash algorithm; The individual sub-hash values are combined to form the plaintext hash verification value.
4. A vehicle infotainment system OTA upgrade method according to any one of claims 2 to 3, characterized in that, The method further includes the following steps: If the upgrade package fails to upgrade, the software corresponding to the upgrade package will be rolled back to the version before the upgrade.
5. A vehicle infotainment OTA upgrade device, characterized in that, The device is used in a cloud platform, and the device includes: The first hash value calculation unit is used to calculate the plaintext hash check value of the upgrade package; A hash value encryption unit is used to encrypt the plaintext hash verification value using the public key of the vehicle end to generate a ciphertext hash verification value; A signature encryption unit is used to encrypt the plaintext signature information of the cloud platform using the private key of the cloud platform to generate ciphertext signature information; wherein, the plaintext signature information includes the plaintext hash check value and the information of the upgrade package; An information transmission unit is used to transmit the upgrade package, the encrypted hash verification value, and the encrypted signature information to the vehicle terminal, so that the vehicle terminal can use the upgrade package to perform an upgrade; wherein, when the signature information decrypted by the vehicle terminal is consistent with the plaintext signature information of the cloud platform, the vehicle terminal uses the upgrade package to perform an upgrade. in: The step of encrypting the plaintext hash check value using the vehicle's public key to generate a ciphertext hash check value includes: If the length of the public key on the vehicle exceeds the information block length of the message digest algorithm, then the message digest algorithm is used to calculate the digest of the public key on the vehicle as the target public key. The plaintext hash check value is encrypted using the target public key to generate the ciphertext hash check value; The step of encrypting the plaintext signature information of the cloud platform using the private key to generate ciphertext signature information includes: The plaintext hash verification value, the identity information of the cloud platform, and the version information of the upgrade package are combined into the plaintext signature information using the target format; The plaintext signature information is encrypted using the private key of the cloud platform to generate the ciphertext signature information.
6. A vehicle infotainment OTA upgrade device, characterized in that, The device is applied to the vehicle end in the vehicle-mounted OTA upgrade method as described in claim 1, and the device comprises: The information receiving unit is used to receive the upgrade package sent by the cloud platform, the encrypted hash verification value of the upgrade package, and the encrypted signature information of the cloud platform; The signature decryption unit is used to decrypt the ciphertext signature information using the public key of the cloud platform to obtain decrypted signature information; The second hash value calculation unit is used to calculate the plaintext hash verification value of the upgrade package if the decryption signature information matches the plaintext signature information of the cloud platform. The hash value decryption unit is used to decrypt the ciphertext hash verification value using the private key of the vehicle terminal to obtain the decrypted hash verification code; The software upgrade unit is used to upgrade the software using the upgrade package if the decryption hash checksum matches the plaintext hash checksum.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 4.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
OTA file security processing method, device and system
CN113055181A
Upgrade package downloading method and device, computer equipment and storage medium
CN117640616A