Software upgrading method, device and related equipment

By combining non-cloning functions and symmetric cryptographic algorithms, the software upgrade method solves the security and resource consumption problems of traditional OTA and achieves secure and efficient software upgrades.

CN120751366BActive Publication Date: 2026-02-17CHINA TELECOM CORP LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511061815.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2026-02-17
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

Traditional OTA software upgrade methods rely on traditional public-key cryptography algorithms, which are at risk of being cracked by quantum computing and consume device storage space and computing resources.

Method used

Unique responses are generated using non-clonable functions, and software upgrade packages are encrypted and decrypted using symmetric cryptographic algorithms. Integrity verification is performed using hash-based message authentication codes to ensure the security and resource optimization of software upgrades.

Benefits of technology

It improves the security of software upgrades, avoids the risk of quantum computing cracking, reduces the occupation of device storage space, and optimizes resource management and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751366B_ABST
    Figure CN120751366B_ABST
Patent Text Reader

Abstract

The present disclosure provides a software upgrading method and device and related equipment, relating to the technical field of communication. The method comprises: receiving a first random number, a second random number, a software upgrading package ciphertext and a first hash operation message authentication code sent by a cloud; calculating a first response corresponding to the first random number and a second response corresponding to the second random number by using an unclonable function; based on the first response, performing decryption processing on the software upgrading package ciphertext by using a symmetric cipher algorithm to obtain a software upgrading package; performing integrity verification on the software upgrading package obtained by decryption based on the second response and the first hash operation message authentication code; and after the integrity verification passes, performing software upgrading by using the software upgrading package obtained by decryption. Through the above technical means, the problems of the traditional OTA in the prior art, such as the risk of being cracked by quantum computing and occupying device storage space, are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of communication, and in particular, to a software upgrading method, device and related equipment. BACKGROUND

[0002] The traditional OTA (Over-The-Air) method usually relies on a signature and verification mechanism based on a traditional public key cryptographic algorithm. With the development of quantum technology, the risk of being cracked by quantum computing is increasing day by day. In addition, the mechanism needs to prestore the public key of the OTA cloud on the device side and prestore the public key of the device on the OTA cloud. For resource-constrained devices, the storage and signature verification of the public key occupy valuable storage space and computing resources, affecting the overall performance of the device. SUMMARY

[0003] The present disclosure provides a software upgrading method, device and related equipment, which at least to some extent improves the security guarantee of software upgrading.

[0004] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.

[0005] According to one aspect of the present disclosure, a software upgrading method is provided, applied to a device side, comprising: receiving a first random number, a second random number, a software upgrading package ciphertext and a first hash operation message authentication code sent by a cloud side; calculating a first response corresponding to the first random number and a second response corresponding to the second random number by using an unclonable function; based on the first response, performing decryption processing on the software upgrading package ciphertext by using a symmetric cryptographic algorithm to obtain a software upgrading package; performing integrity verification on the software upgrading package obtained by decryption based on the second response and the first hash operation message authentication code; and after the integrity verification passes, performing software upgrading by using the software upgrading package obtained by decryption.

[0006] In one embodiment of the present disclosure, performing integrity verification on the software upgrading package obtained by decryption based on the second response and the first hash operation message authentication code comprises: calculating a second hash operation message authentication code based on the second response and the software upgrading package obtained by decryption; when the first hash operation message authentication code and the second hash operation message authentication code are the same, the integrity verification passes; otherwise, the integrity verification does not pass.

[0007] In one embodiment of the present disclosure, performing software upgrading by using the software upgrading package obtained by decryption comprises: parsing a current firmware, a first version number and a current timestamp from the software upgrading package obtained by decryption; performing version number verification based on the first version number and timestamp verification based on the current timestamp; and in the case that both verifications pass, performing software upgrading by using the current firmware.

[0008] In one embodiment of the present disclosure, before receiving the first random number, the second random number, the software upgrade package ciphertext and the first hash operation message authentication code sent by the cloud, the method further comprises: registering the device identification number and the unclonable identification number to the cloud.

[0009] In one embodiment of the present disclosure, before receiving the first random number, the second random number, the software upgrade package ciphertext and the first hash operation message authentication code sent by the cloud, the method further comprises: receiving an upgrade request for software upgrade sent by the cloud; and feeding back an upgrade response agreeing to software upgrade to the cloud.

[0010] According to another aspect of the present disclosure, a software upgrade method applied to a cloud is provided, comprising: determining an unclonable identification number of a device according to a device identification number of the device, determining a first random number and a corresponding first response thereof and a second random number and a corresponding second response thereof based on the unclonable identification number; performing encryption processing on a software upgrade package based on the first response by using a symmetric cryptographic algorithm to obtain a software upgrade package ciphertext; calculating a first hash operation message authentication code of the software upgrade package based on the second response; and sending the first random number, the second random number, the software upgrade package ciphertext and the first hash operation message authentication code to the device to enable the device to perform software upgrade.

[0011] In one embodiment of the present disclosure, before performing encryption processing on the software upgrade package based on the first response by using the symmetric cryptographic algorithm to obtain the software upgrade package ciphertext, the method further comprises: receiving a second version number reported by the device; and judging whether the device needs to perform software upgrade based on the second version number and a first version number of a current firmware, wherein the software upgrade package comprises the current firmware and the first version number; and in the case that it is judged that the device needs to perform software upgrade, determining the first random number, the first response, the second random number and the second response according to the device identification number.

[0012] In one embodiment of the present disclosure, before performing encryption processing on the software upgrade package based on the first response by using the symmetric cryptographic algorithm to obtain the software upgrade package ciphertext, the method further comprises: using the current firmware, the first version number of the current firmware and a current timestamp to form the software upgrade package.

[0013] In one embodiment of the present disclosure, after calculating the first hash operation message authentication code of the software upgrade package based on the second response, the method further comprises: initiating an upgrade request for software upgrade to the device; and after receiving an upgrade response agreeing to software upgrade from the device, sending the first random number, the second random number, the software upgrade package ciphertext and the first hash operation message authentication code to the device.

[0014] According to another aspect of this disclosure, a software upgrade apparatus is provided, applied at a device end, comprising: a receiving module configured to receive a first random number, a second random number, encrypted software upgrade package, and a first hash operation message authentication code sent from a cloud; a first calculation module configured to calculate a first response corresponding to the first random number and a second response corresponding to the second random number using a non-cloning function; a decryption module configured to decrypt the encrypted software upgrade package based on the first response using a symmetric cryptographic algorithm to obtain the software upgrade package; a verification module configured to perform integrity verification on the decrypted software upgrade package based on the second response and the first hash operation message authentication code; and an upgrade module configured to perform a software upgrade using the decrypted software upgrade package after the integrity verification passes.

[0015] According to another aspect of this disclosure, a software upgrade apparatus is provided, applied in the cloud, comprising: a determining module configured to determine an unclonable identifier of a device based on a device identifier, and to determine a first random number and its corresponding first response and a second random number and its corresponding second response based on the unclonable identifier; an encryption module configured to encrypt a software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain ciphertext of the software upgrade package; a second calculation module configured to calculate a first hash operation message authentication code of the software upgrade package based on the second response; and a sending module configured to send the first random number, the second random number, the ciphertext of the software upgrade package, and the first hash operation message authentication code to the device, thereby enabling the device to perform a software upgrade.

[0016] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the methods described above by executing the executable instructions.

[0017] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.

[0018] According to another aspect of this disclosure, a computer program product is provided, including computer instructions stored in a computer-readable storage medium, which, when executed by a processor, implement operation instructions for any of the methods described above.

[0019] In the embodiments of this disclosure, by using a non-cloning function to calculate a first response corresponding to a first random number and a second response corresponding to a second random number, the encrypted software upgrade package is decrypted based on the first response, and the integrity of the decrypted software upgrade package is verified based on the second response and the first hash operation message authentication code. This solves the problems of traditional OTA being vulnerable to being cracked by quantum computing and occupying device storage space in the prior art, thereby improving the security of OTA and avoiding the occupation of device storage space.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0022] Figure 1 A schematic diagram of the software upgrade system architecture in an embodiment of this disclosure is shown.

[0023] Figure 2 A flowchart of a software upgrade method according to an embodiment of this disclosure is shown.

[0024] Figure 3 A flowchart illustrating another software upgrade method in an embodiment of this disclosure is shown.

[0025] Figure 4 A flowchart of a software upgrade determination method according to an embodiment of this disclosure is shown.

[0026] Figure 5 A flowchart illustrating a software upgrade package verification method according to an embodiment of this disclosure is shown.

[0027] Figure 6 A schematic diagram of a software upgrade apparatus according to an embodiment of the present disclosure is shown.

[0028] Figure 7 A schematic diagram of another software upgrade apparatus is shown in an embodiment of this disclosure.

[0029] Figure 8 A schematic diagram of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0030] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0031] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0032] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0035] It should be noted that, unless otherwise specified, the embodiments of this disclosure and the technical features thereof can be combined with each other.

[0036] To facilitate understanding, the following is an explanation of several terms used in this disclosure:

[0037] OTA (Over-the-Air): OTA refers to a technology that transmits data or updates functionality to remote devices via a wireless network. It is commonly used for software upgrades, firmware updates, or configuration parameter adjustments, and is particularly prevalent in the Internet of Things (IoT), smartphones, and smart cars. Through OTA technology, manufacturers can perform remote upgrades without manual user intervention or device return to the factory, thereby improving maintenance efficiency, reducing operating costs, and promptly fixing vulnerabilities or adding new features. The core OTA process includes firmware package signing and distribution, device verification and installation, ensuring the security and reliability of the upgrade process.

[0038] PUF (Physical Unclonable Function) is a technology that generates unique identifiers based on the physical characteristics of hardware. It leverages microscopic differences in materials or manufacturing processes to generate unique, unpredictable responses for each device. These differences are naturally formed during production and cannot be precisely copied or cloned, thus providing a high level of security.

[0039] A PUF identifier is an identifier associated with a specific PUF. It is used to associate a device with a challenge-response pair generated by its PUF function, where the challenge is a random number.

[0040] Symmetric cryptography is a method of encryption in which the same key is used for both encryption and decryption. This means that the sender and receiver must share the same key and keep it secret to ensure secure communication. Due to their relatively high efficiency and speed, symmetric cryptography is widely used in data encryption, privacy protection, and various security protocols.

[0041] SHA-256 (Secure Hash Algorithm 256-bit) is a member of the SHA-2 family of cryptographic hash functions widely used in various security applications and protocols. It generates a 256-bit (32-byte) hash value, typically represented as 64 hexadecimal digits. SHA-256 is designed to provide data integrity verification and, due to its collision resistance (i.e., it is very difficult to find two different inputs that produce the same output), it is also used in areas such as digital signatures and certificate authentication.

[0042] The specific implementation methods of the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0043] Figure 1 This diagram illustrates the structure of a software upgrade system according to an embodiment of the present disclosure. This system can utilize the software upgrade methods or apparatus described in various embodiments of the present disclosure. Figure 1 As shown, the system architecture may include device 101 and OTA cloud 102.

[0044] Device 101 can be a mobile device such as a mobile phone, game console, tablet computer, e-book reader, smart glasses, MP4 (Moving Picture Experts Group Audio Layer IV) player, smart home device, AR (Augmented Reality) device, VR (Virtual Reality) device, or a personal computer (PC), such as a laptop computer or desktop computer.

[0045] The device 101 may be equipped with an application that performs the following actions: receiving a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code sent from the cloud; calculating a first response corresponding to the first random number and a second response corresponding to the second random number using a non-cloning function; decrypting the software upgrade package ciphertext using a symmetric cryptographic algorithm based on the first response to obtain the software upgrade package; performing an integrity check on the decrypted software upgrade package based on the second response and the first hash operation message authentication code; and performing a software upgrade using the decrypted software upgrade package after the integrity check passes.

[0046] Optionally, the application clients installed on different devices 101 may be the same, or the application clients installed on two devices 101 may be clients of the same type of application on different control system platforms. Depending on the device platform, the specific form of the application client may also differ; for example, the application client may be a mobile client, a PC client, or a World Wide Web (Web) client.

[0047] Those skilled in the art will understand that the number of the aforementioned devices 101 can be more or less. For example, there may be only one device, or there may be dozens or hundreds of devices, or even more. This application does not limit the number or type of devices in its embodiments.

[0048] OTA Cloud 102 consists of one or more servers. An application can be installed on OTA Cloud 102 to perform the following actions: determining the device's unclonable identifier based on the device's device identifier; determining a first random number and its corresponding first response and a second random number and its corresponding second response based on the unclonable identifier; encrypting the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package; calculating the first hash operation message authentication code of the software upgrade package based on the second response; and sending the first random number, the second random number, the ciphertext of the software upgrade package, and the first hash operation message authentication code to the device, enabling the device to perform a software upgrade.

[0049] Device 101 is connected to OTA cloud 102 via a communication network. Optionally, the communication network can be a wired network or a wireless network.

[0050] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0051] In software upgrade systems, the first response generated by a non-cloning function is used to encrypt the software upgrade package using a symmetric cryptographic algorithm. This makes each software upgrade dependent on a unique identifier specific to the device, adding an extra layer of security. This means that even if the encrypted software upgrade package is intercepted, it cannot be correctly decrypted and used without a response generated by the corresponding non-cloning function. Applying the second response generated by the non-cloning function to calculate the second hash operation message authentication code effectively verifies whether the received software upgrade package has been tampered with during transmission, thus ensuring data integrity and authenticity. In summary, the effective combination of non-cloning functions and software upgrade packages not only strengthens security measures and prevents potential attack risks but also optimizes resource management and user experience. This combination demonstrates high innovation and provides important security guarantees and technical support for the Internet of Things and other fields that rely on remote software update technologies.

[0052] Figure 2 This diagram illustrates a flowchart of a software upgrade method according to an embodiment of the present disclosure. This method is applied in the cloud, such as... Figure 2 As shown, it includes the following steps:

[0053] S201, determine the non-clonable identifier of the device based on the device identifier, and determine the first random number and its corresponding first response and the second random number and its corresponding second response based on the non-clonable identifier.

[0054] The cloud includes the OTA cloud, which refers to a remote server that sends software upgrade-related data. Based on the device's identifier, the cloud can determine a unique, non-clonable identifier for that device from an identifier lookup table. Based on this non-clonable identifier, a first random number and its corresponding first response, and a second random number and its corresponding second response can be determined from a mapping table. The identifier lookup table stores the correspondence between device identifiers and non-clonable identifiers, while the mapping table stores the correspondence between non-clonable identifiers and multiple challenge-response pairs. Each challenge-response pair consists of a random number and its corresponding response. This technique ensures that both the random number and the response are unique, significantly enhancing security and resistance to attacks.

[0055] Table 1 shows a mapping relationship table in an embodiment of this disclosure, as follows:

[0056]

[0057] Table 1

[0058] The cloud can generate multiple challenge-response pairs for the device using the same method as issuing a PUF challenge to the device. PUF1 is the device's unclonable identifier (PUF ID), and each challenge is a random number. For example, the cloud randomly generates challenge C1 and sends challenge C1 to the device. The device generates a response Res1 based on challenge C1 using the unclonable function. Then, a mapping table is used to store the unclonable identifier and multiple challenge-response pairs.

[0059] Table 2 shows an identification lookup table in an embodiment of this disclosure, as follows:

[0060]

[0061] Table 2

[0062] The device ID is a device identifier. Each device has a device identifier and a non-clonable identifier.

[0063] S202, based on the first response, the software upgrade package is encrypted using a symmetric cryptographic algorithm to obtain the ciphertext of the software upgrade package.

[0064] A software upgrade package contains the necessary data for device software upgrades. Using the first response as a key, a symmetric cryptographic algorithm is employed to encrypt the software upgrade package before it is sent to the device, resulting in the encrypted software upgrade package. This technique protects the software upgrade package from unauthorized reading or tampering during transmission.

[0065] In one embodiment, before encrypting the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package, the method further includes: assembling the software upgrade package using the current firmware, the first version number of the current firmware, and the current timestamp.

[0066] The current firmware refers to the new version firmware file contained within the software upgrade package, intended to replace the existing firmware on the device. The first version number is an identifier specified within the decrypted software upgrade package, used to indicate the version information of the decrypted software upgrade package. The current timestamp is a timestamp within the software upgrade package, indicating the generation or approval time of the current firmware or software package, used to verify the validity and timeliness of the software upgrade package. The software upgrade package can be obtained by sequentially assembling the current firmware, the first version number of the current firmware, and the current timestamp.

[0067] In one embodiment, before encrypting the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package, the method further includes: assembling the software upgrade package using the plugin corresponding to the current firmware, the first version number of the current firmware, and the current timestamp.

[0068] Plugins are created by assembling new features or components from the current firmware.

[0069] S203, based on the second response, calculate the first hash operation message authentication code of the software upgrade package.

[0070] The second response is used as the key to calculate the first hash message authentication code of the software upgrade package. This technique provides the necessary verification basis for subsequent integrity checks on the device side, ensuring that the software upgrade package has not been tampered with during transmission.

[0071] In one embodiment, calculating a first hash operation message authentication code for a software upgrade package based on a second response includes: performing an XOR operation on the second response and an internal padding value to obtain a first intermediate value; performing an XOR operation on the second response and an external padding value to obtain a second intermediate value; appending the software upgrade package to the first intermediate value to obtain first data, and calculating the hash value of the first data; appending the hash value of the first data to the second intermediate value to obtain second data, and calculating the hash value of the second data; and using the hash value of the second data as the first hash operation message authentication code.

[0072] The internal and external padding values ​​are preset values. After concatenating the software upgrade package to the first intermediate value, the first data is obtained. A hash function is then used to calculate the hash value of the first data. After concatenating the hash value of the first data to the second intermediate value, the second data is obtained. A hash function is then used to calculate the hash value of the second data, which is used as the authentication code for the first hash operation message.

[0073] In one embodiment, before performing an XOR operation on the second response and the internal padding value to obtain a first intermediate value, the method further includes: preprocessing the second response: if the length of the second response is shorter than the block size of the hash function (e.g., for SHA-256, the block size is 512 bits or 64 bytes), then the second response is padded with zeros until its length reaches the block size of the hash function. If the second response is longer than the block size of the hash function, then the second response is first hashed, and the resulting hash value is used as the new second response.

[0074] S204, send the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code to the device to enable the device to perform a software upgrade.

[0075] The system sends a first random number, a second random number, the encrypted software upgrade package, and a first hash operation authentication code to the device, enabling the device to decrypt, verify, and ultimately complete the software upgrade according to a predetermined process. This technique not only mitigates the quantum computing vulnerability that traditional OTA systems may face, but also reduces the pressure on device storage space caused by storing the entire software upgrade package, thereby improving the overall system reliability and efficiency.

[0076] In one embodiment, after calculating the first hash message authentication code of the software upgrade package based on the second response, the method further includes: initiating an upgrade request to the device to perform a software upgrade; and after receiving an upgrade response from the device agreeing to perform the software upgrade, sending a first random number, a second random number, the encrypted software upgrade package, and the first hash message authentication code to the device.

[0077] If the device does not agree to the software upgrade, the upgrade will be abandoned. These technical measures help avoid unnecessary software upgrades.

[0078] An exemplary embodiment: In a smart city management system, to ensure that each sensor node (device) can securely receive the latest firmware updates, the cloud employs the method of this disclosure to generate and distribute software upgrade packages. For each sensor node, the cloud first determines a unique, non-clonable identifier based on its device identifier, and determines the corresponding random number and response. Subsequently, the firmware upgrade package is encrypted using these parameters, and a message authentication code is calculated. The upgrade package, after this processing, is sent to the sensor nodes, ensuring the security and reliability of the firmware update process while maintaining the efficient operation of the management system as a whole.

[0079] Figure 3 This invention discloses a flowchart of another software upgrade method according to an embodiment of the present disclosure, which is applied to a device, such as... Figure 3 As shown, it includes the following steps:

[0080] S301 receives the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent from the cloud.

[0081] In one embodiment, according to the set communication protocol, a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code are first received and downloaded from the cloud.

[0082] S302, use a non-cloning function to calculate the first response corresponding to the first random number and the second response corresponding to the second random number.

[0083] Unclonable functions are also known as PUF functions or PUF modules.

[0084] In one embodiment, a first random number C1 is input as a challenge to the PUF module. This challenge can be transmitted to the PUF via digital signals, voltage changes, or optical signals. Upon receiving the challenge C1, the PUF module generates a unique response Res1 (the first response) based on its internal physical characteristics. The PUF response is typically of a fixed length (e.g., 64-bit, 128-bit, or 256-bit), depending on the PUF design. Because the PUF module is unique, its response is also unique once the random number is determined. These techniques ensure that the response required for decryption and encryption is not leaked and cannot be calculated by other parties, thus guaranteeing the security of software upgrades.

[0085] S303, based on the first response, uses a symmetric cryptographic algorithm to decrypt the ciphertext of the software upgrade package to obtain the software upgrade package.

[0086] Using the first response as the key and employing a symmetric cryptographic algorithm to decrypt the ciphertext of the software upgrade package, the software upgrade package can be obtained, thus avoiding the risk of being copied and tampered with.

[0087] S304, perform integrity verification on the decrypted software upgrade package based on the second response and the first hash operation message authentication code.

[0088] In one embodiment, the integrity verification of the decrypted software upgrade package based on the second response and the first hash operation message authentication code includes: calculating the second hash operation message authentication code based on the second response and the decrypted software upgrade package; if the first hash operation message authentication code and the second hash operation message authentication code are the same, the integrity verification passes; otherwise, the integrity verification fails.

[0089] In this embodiment, the second response is first used as the key to calculate the second hash message authentication code of the software upgrade package obtained through decryption. Then, this newly generated second hash message authentication code is compared with the first hash message authentication code received from the cloud. If they are the same, it indicates that the software upgrade package has not been tampered with, and the integrity verification passes. Otherwise, it fails. Through the above technical means, the integrity and reliability of the software upgrade package during transmission are improved.

[0090] In one embodiment, calculating a second hash operation message authentication code based on a second response and a decrypted software upgrade package includes: performing an XOR operation on the second response and an internal padding value to obtain a first intermediate value; performing an XOR operation on the second response and an external padding value to obtain a second intermediate value; appending the decrypted software upgrade package to the first intermediate value to obtain third data, and calculating the hash value of the third data; appending the hash value of the third data to the second intermediate value to obtain fourth data, and calculating the hash value of the fourth data; and using the hash value of the fourth data as the second hash operation message authentication code.

[0091] After concatenating the decrypted software upgrade package with the first intermediate value, the third data is obtained. A hash function is then used to calculate the hash value of the third data. Concatenating the hash value of the third data with the second intermediate value, the fourth data is obtained. A hash function is then used to calculate the hash value of the fourth data, which is then used as the first hash operation message authentication code.

[0092] In one embodiment, before performing an XOR operation on the second response and the internal padding value to obtain a first intermediate value, the method further includes: preprocessing the second response: if the length of the second response is shorter than the block size of the hash function, then the second response is padded with zeros until its length reaches the block size of the hash function. If the second response is longer than the block size of the hash function, then the second response is first hashed, and the resulting hash value is used as the new second response.

[0093] S305: After the integrity verification passes, the software upgrade package obtained through decryption is used to perform the software upgrade.

[0094] After successful integrity verification, the system will use the decrypted software upgrade package to perform the software upgrade operation. By employing the above technical means, the risks of traditional OTA (Over-The-Air) updates being cracked by quantum computing and the excessive use of device storage space are addressed, enhancing the security of the software upgrade process and improving the confidentiality and integrity protection of the software upgrade package.

[0095] Figure 4 This diagram illustrates a flowchart of a software upgrade determination method according to an embodiment of the present disclosure. This method is applied in the cloud, such as... Figure 4 As shown, it includes the following steps:

[0096] S401, receiving the second version number reported by the receiving device;

[0097] S402 determines whether the device needs a software upgrade based on the second version number and the first version number of the current firmware. The software upgrade package includes the current firmware and the first version number.

[0098] S403, if it is determined that the device needs a software upgrade, a first random number, a first response, a second random number, and a second response are determined based on the device identification number.

[0099] In this embodiment, firstly, the cloud needs to receive the second version number reported by the device. This is the firmware version number already installed on the device, used to compare with the first version number of the current firmware to be distributed by the cloud. Next, based on the second and first version numbers, it is determined whether the device needs a software upgrade. This technique is to confirm whether the existing firmware version on the device is lower than the current firmware provided by the cloud, i.e., to check whether the device truly needs a software update, avoiding unnecessary software upgrade operations. If it is determined that the device does need a software upgrade, a first random number, a first response, a second random number, and a second response are determined based on the device identifier. This technique ensures that unique security parameters are generated for a specific device, thereby enhancing the security of the entire software upgrade process. Through the above techniques, the accuracy of software upgrade decisions is enhanced, the targeting of the software upgrade process is improved, and the efficiency of system resource utilization is increased.

[0100] For example, in a smart home network environment, a smart thermostat periodically reports its installed firmware version number (i.e., version two) to the cloud. The cloud compares this version number with the latest available firmware version number (i.e., version one). If it finds that the smart thermostat is using a lower firmware version, it determines a first random number, a first response, a second random number, and a second response based on the device identifier. This not only ensures that smart home devices receive the latest feature improvements and security patches in a timely manner, but also avoids repeatedly pushing the same or unnecessary updates to devices that do not need upgrades, effectively saving network bandwidth and device storage resources.

[0101] In one embodiment, when the device reports a second version number, it also uploads the functional description of the firmware version number installed on the device. The functional description of the firmware version number installed on the device is compared with the functional description of the current firmware to determine the new functionalities added to the current firmware compared to the firmware version number installed on the device. The components corresponding to these new functionalities are then identified in the current firmware, and a corresponding plugin is generated. A software upgrade package is then constructed using the plugin, the first version number of the current firmware, and the current timestamp. This technical approach enables flexible device upgrades.

[0102] The feature description details the functions the firmware possesses. For example, if the current firmware adds error detection and reporting functionality compared to the firmware version installed on the device, then the component implementing this functionality will be identified within the current firmware, and a corresponding plugin will be generated. Generating a plugin for this component essentially involves separating it from the current firmware. The main method is to define a generic plugin interface for this component. Then, after the device installs the plugin, the installed firmware version will call the plugin based on this interface.

[0103] Figure 5This diagram illustrates a flowchart of a software upgrade package verification method according to an embodiment of the present disclosure. This method is applied to the device side, such as... Figure 5 As shown, it includes the following steps:

[0104] S501, extracts the current firmware, first version number and current timestamp from the decrypted software upgrade package;

[0105] S502, performs version number verification based on the first version number and timestamp verification based on the current timestamp;

[0106] If both verifications pass, the S503 will be upgraded using the current firmware.

[0107] In this embodiment, when performing a software upgrade using the decrypted software upgrade package, the current firmware, first version number, and current timestamp are first parsed from the decrypted package. Then, the first version number is compared with the second version number of the firmware currently installed on the device to ensure that the new firmware version to be installed is indeed newer than the existing version. Simultaneously, a timestamp verification is performed based on the current timestamp to confirm that the software upgrade package is up-to-date and not expired. If both verifications pass, the system will use the parsed current firmware to perform the software upgrade operation. Through these technical means, it is ensured that user devices can obtain the latest features and security patches in a timely manner, while also avoiding problems caused by incorrect versions or outdated upgrade packages, thereby improving device security and user experience.

[0108] In one embodiment of this disclosure, before receiving the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent by the cloud, the method further includes: registering the device identifier and the unclonable identifier to the cloud.

[0109] The device registers its device identifier and unclonable identifier with the cloud. The cloud can then determine the unclonable identifier based on the device identifier, and then select a first random number and its corresponding first response, and a second random number and its corresponding second response. The software upgrade package is encrypted according to the first response, and the first hash operation message authentication code of the encrypted software upgrade package is calculated according to the second response.

[0110] In one embodiment of this disclosure, before receiving the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent by the cloud, the method further includes: receiving an upgrade request for software upgrade sent by the cloud; and sending an upgrade response to the cloud agreeing to the software upgrade.

[0111] The upgrade request carries the first version number of the current firmware. It compares the first version number with the second version number of the firmware currently installed on the device. If it is determined that the first version number is a newer version number than the second version number, an upgrade response agreeing to the software upgrade is sent to the cloud. Otherwise, an upgrade response disagreeing to the software upgrade is sent to the cloud.

[0112] By employing the aforementioned technical means, invalid transmissions can be avoided. If a device is unable to upgrade for some reason (such as the current version being the latest, the device being under heavy load, or poor network conditions), a rejection response can be provided to prevent the cloud from continuing to transmit unnecessary data (such as random numbers, encrypted data, etc.), thereby saving communication bandwidth and computing resources. Simultaneously, resource allocation can be optimized. The cloud can dynamically adjust its upgrade strategy based on the device's response, for example, prioritizing devices that agree to upgrade and postponing or canceling upgrade operations for other devices.

[0113] In some embodiments, the plugin, the first version number, and the current timestamp are parsed from the decrypted software upgrade package; version number verification is performed based on the first version number, and timestamp verification is performed based on the current timestamp; if both verifications pass, the software upgrade is performed using the plugin.

[0114] The above technical means are used to verify version compatibility: by verifying the first version number, it is confirmed whether the target version of the upgrade package is compatible with the current device version, so as to avoid upgrade failure or abnormality due to version incompatibility; and to verify timeliness: by verifying the current timestamp, it is ensured that the upgrade package was generated within a reasonable time range, so as to avoid using an outdated or invalid upgrade package and further reduce the risk of upgrade failure.

[0115] For example: Compare the device's current version number 1.0.0 with the first version number 1.1.0 in the software upgrade package. Since 1.1.0 is higher than 1.0.0, the version number verification passes. Timestamp verification: Assuming the current time is 1700050000 (corresponding to January 2, 2023), check if the timestamp is within a reasonable range (e.g., the maximum allowed time difference is 7 days). Since the time difference is less than 7 days, the timestamp verification passes. Execute the upgrade: If both verifications pass, load and execute the plugin in the upgrade package to complete the software upgrade to version 1.1.0.

[0116] Based on the same inventive concept, this disclosure also provides a software upgrade device, as shown in the following embodiment. Since the principle by which this device solves the problem is similar to that of the method embodiment described above, the implementation of this device embodiment can refer to the implementation of the method embodiment described above, and repeated details will not be described again.

[0117] Figure 6 This diagram illustrates a software upgrade device according to an embodiment of the present disclosure, applied to a device, such as...Figure 6 As shown, the software upgrade device may include:

[0118] The receiving module 601 is configured to receive a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code sent from the cloud.

[0119] The first calculation module 602 is configured to use a non-cloning function to calculate the first response corresponding to the first random number and the second response corresponding to the second random number.

[0120] The decryption module 603 is configured to decrypt the ciphertext of the software upgrade package based on the first response using a symmetric cryptographic algorithm to obtain the software upgrade package.

[0121] Verification module 604 is configured to perform integrity verification on the decrypted software upgrade package based on the second response and the first hash operation message authentication code.

[0122] Upgrade module 605 is configured to perform a software upgrade using the decrypted software upgrade package after the integrity verification passes.

[0123] According to the technical solution provided in this disclosure, the system receives a first random number, a second random number, encrypted software upgrade package, and a first hash operation message authentication code sent from the cloud; calculates a first response corresponding to the first random number and a second response corresponding to the second random number using a non-cloning function; decrypts the encrypted software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the software upgrade package; performs integrity verification on the decrypted software upgrade package based on the second response and the first hash operation message authentication code; and performs a software upgrade using the decrypted software upgrade package after the integrity verification passes. Through these technical means, the system addresses the risks of traditional OTA (Over-The-Air) updates being cracked by quantum computing and the problem of occupying device storage space, thereby improving the security of OTA and avoiding the occupation of device storage space.

[0124] In some embodiments, the verification module 604 is further configured to calculate a second hash operation message authentication code based on the second response and the decrypted software upgrade package; if the first hash operation message authentication code and the second hash operation message authentication code are the same, the integrity verification passes; otherwise, the integrity verification fails.

[0125] In some embodiments, the upgrade module 605 is further configured to parse the current firmware, the first version number, and the current timestamp from the decrypted software upgrade package; perform version number verification based on the first version number and timestamp verification based on the current timestamp; and perform software upgrade using the current firmware if both verifications pass.

[0126] In some embodiments, the receiving module 601 is further configured to register the device identifier and the non-clonable identifier to the cloud.

[0127] In some embodiments, the receiving module 601 is further configured to receive an upgrade request sent by the cloud for software upgrade; and to send an upgrade response to the cloud agreeing to the software upgrade.

[0128] In some embodiments, the receiving module 601 is further configured to first receive and download a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code from the cloud according to a set communication protocol.

[0129] In some embodiments, the first calculation module 602 is further configured to input a first random number C1 as a challenge into the PUF module, and the challenge can be transmitted to the PUF through digital signals, voltage changes or optical signals, etc. After receiving the challenge C1, the PUF module generates a unique response Res1 based on its internal physical characteristics.

[0130] In some embodiments, the verification module 604 is further configured to perform an XOR operation on the second response and the internal padding value to obtain a first intermediate value; perform an XOR operation on the second response and the external padding value to obtain a second intermediate value; append the decrypted software upgrade package to the first intermediate value to obtain third data, and calculate the hash value of the third data; append the hash value of the third data to the second intermediate value to obtain fourth data, and calculate the hash value of the fourth data, and use the hash value of the fourth data as the second hash operation message authentication code.

[0131] In some embodiments, the verification module 604 is further configured to preprocess the second response: if the length of the second response is shorter than the block size of the hash function, the second response is padded with zeros until its length reaches the block size of the hash function. If the second response is longer than the block size of the hash function, the second response is first hashed, and then the resulting hash value is used as the new second response.

[0132] Figure 7 This illustration shows a schematic diagram of another software upgrade device according to an embodiment of the present disclosure, applied in the cloud, such as... Figure 7 As shown, the software upgrade device may include:

[0133] The determination module 701 is configured to determine the unclonable identifier of the device based on the device identifier, and determine a first random number and its corresponding first response and a second random number and its corresponding second response based on the unclonable identifier.

[0134] Encryption module 702 is configured to encrypt the software upgrade package using a symmetric cryptographic algorithm based on the first response, thereby obtaining the ciphertext of the software upgrade package;

[0135] The second computing module 703 is configured to calculate the first hash operation message authentication code of the software upgrade package based on the second response.

[0136] The sending module 704 is configured to send a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code to the device, enabling the device to perform a software upgrade.

[0137] In the embodiments of this disclosure, an unclonable identifier of the device is determined based on the device identifier. A first random number and its corresponding first response, and a second random number and its corresponding second response are determined based on the unclonable identifier. Based on the first response, a symmetric cryptographic algorithm is used to encrypt the software upgrade package to obtain the ciphertext of the software upgrade package. Based on the second response, a first hash operation message authentication code for the software upgrade package is calculated. The first random number, the second random number, the ciphertext of the software upgrade package, and the first hash operation message authentication code are sent to the device, enabling the device to perform a software upgrade. Through the above technical means, the risks of traditional OTA being cracked by quantum computing and the occupation of device storage space in the prior art are solved, thereby improving the security of OTA and avoiding the occupation of device storage space.

[0138] In some embodiments, the encryption module 702 is further configured to receive a second version number reported by the device; determine whether the device needs a software upgrade based on the second version number and the first version number of the current firmware, wherein the software upgrade package includes the current firmware and the first version number; and if it is determined that the device needs a software upgrade, determine a first random number, a first response, a second random number, and a second response based on the device identifier.

[0139] In some embodiments, the encryption module 702 is further configured to compose a software upgrade package using the current firmware, the first version number of the current firmware, and the current timestamp.

[0140] In some embodiments, the sending module 704 is further configured to initiate an upgrade request to the device for software upgrade; after receiving an upgrade response from the device agreeing to the software upgrade, it sends a first random number, a second random number, the encrypted software upgrade package, and a first hash operation message authentication code to the device.

[0141] In some embodiments, the second calculation module 703 is further configured to perform an XOR operation on the second response and the internal padding value to obtain a first intermediate value; perform an XOR operation on the second response and the external padding value to obtain a second intermediate value; append the software upgrade package to the first intermediate value to obtain first data, and calculate the hash value of the first data; append the hash value of the first data to the second intermediate value to obtain second data, and calculate the hash value of the second data, and use the hash value of the second data as the first hash operation message authentication code.

[0142] In some embodiments, the second calculation module 703 is further configured to preprocess the second response: if the length of the second response is shorter than the block size of the hash function, the second response is padded with zeros until its length reaches the block size of the hash function. If the second response is longer than the block size of the hash function, a hash operation is first performed on the second response, and the resulting hash value is used as the new second response.

[0143] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0144] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0145] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).

[0146] The storage unit stores program code, which can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform the following steps of the above method embodiment: receiving a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code sent from the cloud; calculating a first response corresponding to the first random number and a second response corresponding to the second random number using a non-cloning function; decrypting the software upgrade package ciphertext using a symmetric cryptographic algorithm based on the first response to obtain the software upgrade package; performing an integrity check on the decrypted software upgrade package based on the second response and the first hash operation message authentication code; and performing a software upgrade using the decrypted software upgrade package after the integrity check passes.

[0147] The processing unit 810 can also perform the following steps in the above method embodiment: determine the non-clonable identifier of the device based on the device identifier; determine a first random number and its corresponding first response and a second random number and its corresponding second response based on the non-clonable identifier; encrypt the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package; calculate the first hash operation message authentication code of the software upgrade package based on the second response; and send the first random number, the second random number, the ciphertext of the software upgrade package, and the first hash operation message authentication code to the device to enable the device to perform a software upgrade.

[0148] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.

[0149] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0150] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0151] Electronic device 800 can also communicate with one or more external devices 840 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0152] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0153] In the disclosed exemplary embodiments, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium.

[0154] In some possible implementations, various aspects of this disclosure may also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the foregoing “Detailed Description” section of this specification according to various exemplary embodiments of this disclosure.

[0155] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0156] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.

[0157] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0158] In practice, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0159] This disclosure provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the software upgrade method provided in various alternative embodiments of this disclosure.

[0160] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0161] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0162] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope of this disclosure is indicated by the appended claims.

Claims

1. A software upgrade method, applied to a device, characterized in that, include: Receive the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent from the cloud; The first response corresponding to the first random number and the second response corresponding to the second random number are calculated using a non-cloning function. Based on the first response, the ciphertext of the software upgrade package is decrypted using a symmetric cryptographic algorithm to obtain the software upgrade package. The decrypted software upgrade package contains a plugin corresponding to the current firmware. The plugin is obtained by assembling new functions or components in the current firmware. The integrity of the decrypted software upgrade package is verified based on the second response and the first hash operation message authentication code. After the integrity verification is passed, the software is upgraded using the decrypted software upgrade package, wherein upgrading the software using the decrypted software upgrade package means upgrading the software using the plugin.

2. The method according to claim 1, characterized in that, The integrity of the decrypted software upgrade package is verified based on the second response and the first hash operation message authentication code, including: Based on the second response and the decrypted software upgrade package, calculate the second hash operation message authentication code; If the first hash operation message authentication code and the second hash operation message authentication code are the same, then the integrity verification passes. Otherwise, the integrity check will fail.

3. The method according to claim 1, characterized in that, The software upgrade is performed using the decrypted software upgrade package, including: The current firmware, first version number, and current timestamp are extracted from the decrypted software upgrade package; Version number verification is performed based on the first version number, and timestamp verification is performed based on the current timestamp; If both verifications pass, the software will be upgraded using the current firmware.

4. The method according to claim 1, characterized in that, Before receiving the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent from the cloud, the method further includes: Register the device identifier and the non-clonable identifier to the cloud.

5. The method according to claim 1, characterized in that, Before receiving the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code sent from the cloud, the method further includes: Receive the upgrade request sent from the cloud to upgrade the software; The system sends an upgrade response to the cloud, indicating agreement to perform the software upgrade.

6. A software upgrade method, applied in the cloud, characterized in that, include: The device identification number is determined based on the device identification number, and a first random number and its corresponding first response and a second random number and their corresponding second response are determined based on the unclonable identification number. Based on the first response, the software upgrade package is encrypted using a symmetric cryptographic algorithm to obtain the ciphertext of the software upgrade package; Based on the second response, calculate the first hash operation message authentication code of the software upgrade package; The first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code are sent to the device, enabling the device to perform a software upgrade. Wherein, after encrypting the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package, the method further includes: receiving a function description of the firmware version number installed on the device reported by the device; comparing the function description of the firmware version number installed on the device with the function description of the current firmware to determine the new functions added by the current firmware compared to the firmware version number installed on the device; determining the component corresponding to the new functions in the current firmware, generating a plugin corresponding to the component; and using the plugin to assemble the software upgrade package.

7. The method according to claim 6, characterized in that, Based on the first response, before encrypting the software upgrade package using a symmetric cryptographic algorithm to obtain the ciphertext of the software upgrade package, the method further includes: Receive the second version number reported by the device; Based on the second version number and the first version number of the current firmware, it is determined whether the device needs to undergo the software upgrade, wherein the software upgrade package includes the current firmware and the first version number; If it is determined that the device needs to undergo the software upgrade, the first random number, the first response, the second random number, and the second response are determined based on the device identifier.

8. The method according to claim 6, characterized in that, Based on the first response, before encrypting the software upgrade package using a symmetric cryptographic algorithm to obtain the ciphertext of the software upgrade package, the method further includes: The software upgrade package is composed of the current firmware, the first version number of the current firmware, and the current timestamp.

9. The method according to claim 6, characterized in that, Based on the second response, after calculating the first hash message authentication code of the software upgrade package, the method further includes: Initiate an upgrade request to the device to perform the software upgrade; After receiving the upgrade response from the device agreeing to the software upgrade, the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code are sent to the device.

10. A software upgrade device, applied to a device, characterized in that, include: The receiving module is configured to receive a first random number, a second random number, a software upgrade package ciphertext, and a first hash operation message authentication code sent from the cloud. The first calculation module is configured to use a non-clonable function to calculate the first response corresponding to the first random number and the second response corresponding to the second random number. The decryption module is configured to decrypt the ciphertext of the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the software upgrade package. The decrypted software upgrade package contains a plugin corresponding to the current firmware, and the plugin is obtained by assembling new functions or components in the current firmware. The verification module is configured to perform integrity verification on the decrypted software upgrade package based on the second response and the first hash operation message authentication code; The upgrade module is configured to perform a software upgrade using the decrypted software upgrade package after the integrity verification passes, wherein performing a software upgrade using the decrypted software upgrade package means performing a software upgrade using the plugin.

11. A software upgrade device, applied in the cloud, characterized in that, include: The determination module is configured to determine the unclonable identifier of the device based on the device identifier, and to determine a first random number and its corresponding first response and a second random number and its corresponding second response based on the unclonable identifier. The encryption module is configured to encrypt the software upgrade package using a symmetric cryptographic algorithm based on the first response, thereby obtaining the ciphertext of the software upgrade package; The second calculation module is configured to calculate the first hash operation message authentication code of the software upgrade package based on the second response; The sending module is configured to send the first random number, the second random number, the encrypted software upgrade package, and the first hash operation message authentication code to the device, so that the device performs a software upgrade. The step of encrypting the software upgrade package using a symmetric cryptographic algorithm based on the first response to obtain the ciphertext of the software upgrade package further includes: receiving a function description of the firmware version number installed on the device reported by the device; comparing the function description of the firmware version number installed on the device with the function description of the current firmware to determine the new functions added by the current firmware compared to the firmware version number installed on the device; determining the component corresponding to the new functions in the current firmware, generating a plugin corresponding to the component; and using the plugin to assemble the software upgrade package.

12. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-5 or 6-9 by executing the executable instructions.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-5 or 6-9.

14. A computer program product comprising computer instructions stored in a computer-readable storage medium, wherein the computer instructions, when executed by a processor, implement the operation instructions of the method according to any one of claims 1-5 or 6-9.

Citation Information

Patent Citations

  • Secure OTA upgrading method and system based on quantum random number

    CN119814299A

  • Vehicle OTA upgrading method and device, electronic equipment and storage medium

    CN120342659A

  • KR20250074977A