Firmware transmission method and device, wireless entity key, target equipment, medium and product

By generating temporary keys and initial key encryption interactions, direct firmware transmission between the wireless physical key and the target device is achieved, which solves the complex and unsafe firmware upgrade problems in the existing technology and improves the security and simplicity of the transmission.

CN118741503APending Publication Date: 2024-10-01HUIZHOU DESAY SV AUTOMOTIVE
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410862035.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing wireless physical key firmware upgrade process is complex and cumbersome, requiring a server to participate in key distribution, making the process cumbersome and unsafe.

Method used

By generating a temporary key, the initial key encrypts the identification information of the temporary key and the wireless entity key, obtains the key ciphertext, transmits it to the target device, and decrypts the firmware of the wireless entity key based on the temporary key to realize the wireless entity Direct encrypted firmware transfer between key and target device.

Benefits of technology

It simplifies the firmware upgrade process, improves the security and simplicity of transmission, avoids server involvement, and ensures the security of firmware transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741503A_ABST
    Figure CN118741503A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware transmission method and device, a wireless entity key, target equipment, a medium and a product. The method comprises the following steps: generating a temporary key; encrypting identification information of the temporary key and the wireless entity key through the initial key to obtain a key ciphertext; transmitting the key ciphertext to the target device; acquiring a firmware ciphertext which is transmitted by the target equipment and encrypted by the temporary key; and decrypting the firmware ciphertext based on the temporary key to obtain the firmware of the wireless entity key. According to the method, the temporary key and the identification information are encrypted through the initial key to obtain the key ciphertext, the firmware ciphertext transmitted by the target equipment is obtained, and finally the firmware ciphertext is decrypted based on the temporary key to obtain the firmware of the wireless entity key, so that direct firmware transmission between the wireless entity key and the target equipment is realized without participation of a server, and the firmware transmission efficiency is improved. The firmware transmission simplicity is improved; the interaction between the wireless entity key and the target equipment is encryption interaction, and the firmware is transmitted based on the temporary key, so that the security of firmware transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of data transmission, and in particular, to a firmware transmission method, apparatus, wireless physical key, target device, medium and product. Background Art

[0002] The physical key of a vehicle refers to the traditional tangible key used to open and operate the vehicle. With the continuous advancement of technology, the physical key has integrated wireless communication technology, so that the physical key has the function of wireless communication. For example, the Bluetooth smart physical key is the product of combining the traditional physical key with Bluetooth technology. It connects and communicates the physical key with the vehicle through Bluetooth to achieve intelligent operation of the vehicle.

[0003] With the application of wireless physical keys integrating wireless communication technology, there is a need for firmware upgrades for wireless physical keys. Currently, the firmware upgrade of wireless physical keys is performed by sending keys through the server so that the physical key can obtain the firmware through ciphertext interaction. However, the involvement of the server makes the firmware upgrade process complicated and cumbersome. Summary of the invention

[0004] The present invention provides a firmware transmission method, apparatus, wireless physical key, target device, medium and product to achieve simple and secure transmission of firmware, thereby helping to solve the problem that the physical key firmware upgrade process is too complicated and cumbersome.

[0005] In a first aspect, an embodiment of the present invention provides a firmware transmission method, which is applied to a wireless physical key of a vehicle, comprising:

[0006] Generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade;

[0007] Encrypting the temporary key and the identification information of the wireless physical key by using the initial key to obtain a key ciphertext;

[0008] Transmitting the key ciphertext to a target device;

[0009] Obtaining firmware ciphertext encrypted by the temporary key and transmitted by the target device;

[0010] The firmware ciphertext is decrypted based on the temporary key to obtain the firmware of the wireless physical key.

[0011] In a second aspect, an embodiment of the present invention provides a firmware transmission method, which is applied to a target device, comprising:

[0012] Acquire a key ciphertext transmitted by a wireless physical key, wherein the key ciphertext is a ciphertext of a temporary key generated by the wireless physical key, and the temporary key is a key used by the wireless physical key in this firmware upgrade;

[0013] Decrypting the key ciphertext using the initial key to obtain decrypted information;

[0014] Extracting the temporary key from the decrypted information;

[0015] Encrypting the firmware of the wireless physical key by using the temporary key to obtain a firmware ciphertext;

[0016] The firmware ciphertext is transmitted to the wireless physical key.

[0017] In a third aspect, an embodiment of the present invention provides a firmware transmission device, which is applied to a wireless physical key of a vehicle, comprising:

[0018] A key generation module, used to generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade;

[0019] A key ciphertext determination module, used to encrypt the temporary key and the identification information of the wireless physical key by using an initial key to obtain a key ciphertext;

[0020] A key ciphertext transmission module, used for transmitting the key ciphertext to a target device;

[0021] A firmware ciphertext acquisition module, used to acquire the firmware ciphertext encrypted by the temporary key and transmitted by the target device;

[0022] The firmware determination module is used to decrypt the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key.

[0023] In a fourth aspect, an embodiment of the present invention provides a firmware transmission device, which is applied to a target device, including:

[0024] A key ciphertext acquisition module, used to acquire a key ciphertext transmitted by a wireless physical key, wherein the key ciphertext is a ciphertext of a temporary key generated by the wireless physical key, and the temporary key is a key used by the wireless physical key in this firmware upgrade;

[0025] A decrypted information determination module, used to decrypt the key ciphertext using an initial key to obtain decrypted information;

[0026] A temporary key extraction module, used to extract the temporary key from the decrypted information;

[0027] A firmware ciphertext determination module, used for encrypting the firmware of the wireless physical key by using the temporary key to obtain a firmware ciphertext;

[0028] The firmware ciphertext transmission module is used to transmit the firmware ciphertext to the wireless physical key.

[0029] In a fifth aspect, an embodiment of the present invention provides a wireless physical key, including:

[0030] at least one processor; and

[0031] a memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware transmission method as described in the first aspect.

[0033] In a sixth aspect, an embodiment of the present invention provides a target device, including:

[0034] at least one processor; and

[0035] a memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware transmission method as described in the second aspect.

[0037] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware transmission method as described in the first aspect or the second aspect when executed.

[0038] In an eighth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the firmware transmission method as described in the first aspect or the second aspect is implemented.

[0039] The embodiment of the present invention provides a firmware transmission method, device, wireless physical key, target device, medium and product. By generating a temporary key, encrypting the temporary key and the identification information of the wireless physical key with the initial key to obtain the key ciphertext, transmitting the key ciphertext to the target device, obtaining the firmware ciphertext encrypted by the temporary key transmitted by the target device, and finally decrypting the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key, direct firmware transmission between the wireless physical key and the target device is realized, no server is involved in key distribution, the simplicity of firmware transmission is improved, the interaction between the wireless physical key and the target device is encrypted interaction, the security of firmware transmission is guaranteed, and the firmware is transmitted based on the temporary key, which further improves the security of firmware transmission.

[0040] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0042] Figure 1 A flowchart of a firmware transmission method provided in Embodiment 1 of the present invention;

[0043] Figure 2 A flowchart of a firmware transmission method provided in Embodiment 2 of the present invention;

[0044] Figure 3 A scenario block diagram of firmware transmission provided by Embodiment 2 of the present invention;

[0045] Figure 4 A schematic diagram of establishing a channel connection provided by Embodiment 2 of the present invention;

[0046] Figure 5 A flowchart of a firmware transmission method provided in Embodiment 3 of the present invention;

[0047] Figure 6 A schematic diagram of a key negotiation process provided in Embodiment 3 of the present invention;

[0048] Figure 7 A flowchart of another firmware transmission method provided in Embodiment 3 of the present invention;

[0049] Figure 8 A schematic diagram of an upgrade instruction page provided in Embodiment 3 of the present invention;

[0050] Fig. 9 A schematic diagram of the structure of a firmware transmission device provided in Embodiment 4 of the present invention;

[0051] Fig.10 A schematic diagram of the structure of a firmware transmission device provided in Embodiment 5 of the present invention;

[0052] Fig.11 A schematic diagram of the structure of a wireless physical key provided in Embodiment 6 of the present invention;

[0053] Fig.12 A schematic diagram of the structure of a target device provided in Embodiment 7 of the present invention. DETAILED DESCRIPTION

[0054] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. It is also necessary to explain that, for the convenience of description, only the parts related to the present invention are shown in the accompanying drawings, rather than all structures.

[0055] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0056] It should be noted that the concepts such as "first" and "second" mentioned in the embodiments of the present invention are only used to distinguish different devices, modules, units or other objects, and are not used to limit the order or interdependence of the functions performed by these devices, modules, units or other objects.

[0057] Taking the wireless physical key as a Bluetooth smart physical key and the target device as a mobile phone as an example, in most Bluetooth smart physical key firmware upgrade data interaction processes, when the mobile phone APP establishes a Bluetooth connection with the Bluetooth smart physical key through the Just Work Bluetooth connection pairing method, the data interaction between the mobile phone APP and the Bluetooth smart physical key at the Bluetooth channel level is plain text interaction, and the interactive instruction protocol and firmware package data in the upgrade process are at risk of being stolen by others. In order to solve the risk problem of plain text transmission mentioned above, the current common practice is to fill the relevant certificates and keys inside the physical key, and it is also necessary to synchronize the certificate and key association relationship in the physical key to the mobile phone APP through the background server, so the process is relatively cumbersome and will involve related costs such as the construction of a security server. In order to solve the above technical problems, the present invention provides a firmware transmission method.

[0058] Embodiment 1

[0059] Figure 1 This is a flowchart of a firmware transmission method provided in the first embodiment of the present invention. This embodiment can be applied to simple and secure transmission of firmware, which helps to solve the problem that the firmware upgrade process of the physical key is too complicated and cumbersome. Specifically, the firmware transmission method can be executed by a firmware transmission device, which can be implemented by software and / or hardware and integrated in the wireless physical key.

[0060] Furthermore, the wireless physical key includes but is not limited to: a Bluetooth smart physical key, a Near Field Communication (NFC) physical key, and an Ultra Wideband (UWB) key.

[0061] like Figure 1 As shown, the method specifically comprises the following steps:

[0062] S110: Generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade.

[0063] In this embodiment, the temporary key can be understood as a time-limited key, which can be the key used by the wireless physical key in this firmware upgrade, and can be used for temporary encrypted transmission of data (such as firmware). The wireless physical key can refer to a physical key that integrates wireless communication technology, such as a smart key that uses wireless communication technology to operate (such as unlocking and starting) a car. The wireless physical key can achieve connection and interaction with the vehicle through wireless technologies such as Bluetooth, Near Field Communication (NFC), and Ultra Wideband (UWB). That is, the wireless physical key can include at least one of the following: Bluetooth smart physical key, NFC physical key, and UWB key. Among them, the Bluetooth smart physical key can refer to a smart device that combines Bluetooth technology and the functions of a traditional physical key. Firmware can refer to a software program embedded in a hardware device (such as a wireless physical key), which can be used to be responsible for the basic functions and performance of the hardware device.

[0064] The wireless physical key can generate a random number, and use the generated random data as a temporary key.

[0065] It should be noted that the temporary key can be a key used for a single firmware upgrade of the wireless physical key, or a key used for multiple firmware upgrades of the wireless physical key, such as updating the temporary key once every n firmware upgrades of the wireless physical key.

[0066] This operation, by generating a temporary key, can make subsequent firmware transmission more secure and flexible. Because the temporary key is only valid within the specified validity period, once it expires, any request to use the key will be rejected, which can ensure the security of data transmission (such as firmware transmission); because the temporary key has a short validity period, even if the key is leaked, the impact is limited, which can improve the security and flexibility of firmware transmission.

[0067] S120. Encrypt the temporary key and the identification information of the wireless physical key using an initial key to obtain a key ciphertext.

[0068] In this embodiment, the initial key may refer to an original key that is used at the beginning of the encryption process. The identification information may refer to a digital code or identifier used to uniquely identify each wireless physical key. The identification information may be expressed as KEYID, for example. The key ciphertext may refer to the ciphertext of the temporary key encrypted with the initial key. In this embodiment, the key ciphertext also includes the identification information encrypted with the temporary key.

[0069] Among them, the wireless physical key can use an encryption algorithm (such as an AES encryption algorithm) to encrypt the temporary key and the identification information of the wireless physical key through the initial key. For example, the temporary key and the identification information of the wireless physical key can be spliced, and then the spliced ​​information can be encrypted through the encryption algorithm to obtain the key ciphertext; for example, the temporary key and the identification information of the wireless physical key can be spliced ​​to obtain the spliced ​​information, and then the spliced ​​information can be processed through a hash algorithm (such as SHA-256) to obtain the processed information, and then the spliced ​​information is spliced ​​with the processed information to obtain the re-spliced ​​information, and finally the re-spliced ​​information is encrypted through the initial key to obtain the key ciphertext.

[0070] In this operation, the temporary key and the identification information of the wireless physical key are encrypted by the initial key to obtain the key ciphertext, so as to realize the ciphertext interaction of the temporary key, which can further improve the security of firmware transmission.

[0071] S130: Transmit the key ciphertext to the target device.

[0072] In this embodiment, the target device may refer to a device that generates wireless physical key firmware. The target device is an electronic device that can receive firmware upgrade notification information and / or can periodically query firmware upgrade package information. The target device may store the firmware of the wireless physical key, such as a desktop computer, a laptop computer, and a smart phone.

[0073] Among them, the wireless physical key can transmit the key ciphertext to the target device, so that after the target device obtains the key ciphertext, it decrypts the key ciphertext to obtain a temporary key. The target device then encrypts the firmware with the temporary key and transmits the encrypted firmware to the wireless physical key. That is, the firmware upgrade package required for the firmware upgrade can be obtained from the target device, which helps to realize firmware transmission more easily and safely.

[0074] S140. Obtain the firmware ciphertext encrypted by the temporary key and transmitted by the target device.

[0075] In this embodiment, the firmware ciphertext may refer to the encrypted firmware, which is more secure.

[0076] Among them, the target device can encrypt the firmware with a temporary key or encrypt the firmware with a temporary key and an initial key using the same encryption algorithm as the wireless physical key to obtain the firmware ciphertext, and then transmit the firmware ciphertext to the wireless physical key. The wireless physical key obtains the firmware ciphertext, which helps to realize firmware transmission more easily and securely.

[0077] It should be noted that the initial key of the wireless physical key and the initial key of the target device can be generated using the same means, or can be agreed upon in advance.

[0078] S150. Decrypt the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key.

[0079] In this embodiment, the wireless physical key can decrypt the firmware ciphertext based on a temporary key or based on a temporary key and an initial key to obtain the firmware of the wireless physical key, thereby realizing direct firmware transmission between the wireless physical key and the target device. There is no server involved in key issuance, which improves the simplicity of firmware transmission and helps solve the problem that the physical key firmware upgrade process is too complicated and cumbersome. The ciphertext is obtained through the temporary key and then the firmware transmission is realized, which ensures the security of the firmware transmission.

[0080] A firmware transmission method provided in the first embodiment of the present invention is applied to a wireless physical key of a vehicle, and the method includes: generating a temporary key, the temporary key is the key used by the wireless physical key in this firmware upgrade; encrypting the temporary key and the identification information of the wireless physical key by an initial key to obtain a key ciphertext; transmitting the key ciphertext to a target device; obtaining the firmware ciphertext encrypted by the temporary key transmitted by the target device; decrypting the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key. The above technical scheme generates a temporary key, encrypts the temporary key and the identification information of the wireless physical key by an initial key to obtain a key ciphertext, transmits the key ciphertext to the target device, obtains the firmware ciphertext encrypted by the temporary key transmitted by the target device, and finally decrypts the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key, thereby realizing direct firmware transmission between the wireless physical key and the target device, without the server participating in the key distribution, improving the simplicity of firmware transmission, and the interaction between the wireless physical key and the target device is an encrypted interaction, which ensures the security of firmware transmission, and transmits the firmware based on the temporary key, further improving the security of firmware transmission.

[0081] Embodiment 2

[0082] Figure 2 This is a flowchart of a firmware transmission method provided in Embodiment 2 of the present invention. This embodiment is a refinement of the above embodiment, and specifically describes the generation of a temporary key and the encryption of the temporary key and the identification information of the wireless physical key by the initial key to obtain the key ciphertext. It should be noted that the technical details not described in detail in this embodiment can be referred to any of the above embodiments.

[0083] Specifically, Figure 2 As shown, the method specifically comprises the following steps:

[0084] S210: After establishing a channel connection with the target device, generate a random number key.

[0085] In this embodiment, the channel connection may refer to a wireless channel connection, such as a Bluetooth channel connection. The random number key may refer to a key of a random digital sequence, which may be generated by a random number generator.

[0086] S220: Use the random number key as a temporary key for this firmware upgrade.

[0087] S230: Convert the temporary key and the identification information of the wireless physical key into verification information of a set length.

[0088] In this embodiment, the set length can be set according to actual needs, such as 256 bits. The verification information can refer to information used to verify whether the data has been tampered with during the transmission process.

[0089] This embodiment does not limit the means of conversion, as long as the temporary key and the wireless physical key can be converted into a unique representation form and the verification information of data integrity and identity authentication can be guaranteed.

[0090] In one embodiment, the wireless physical key can convert the temporary key and the identification information of the wireless physical key into verification information of a set length through a hash algorithm. For example, the temporary key and the identification information of the wireless physical key can be concatenated first, and then the concatenated result can be converted through a hash algorithm (such as the SHA-256 algorithm) to obtain verification information of a set length. The integrity and authenticity of each relevant data (such as the identification information of the wireless physical key and the temporary key) can be verified through the verification information, which helps to ensure the security of firmware transmission.

[0091] Among them, the SHA-256 (Secure Hash Algorithm 256-bit) algorithm may refer to a cryptographic hash function, which is used to convert data or messages of any length into a hash value of a fixed length (such as 256 bits), and may be generally used to ensure data integrity and verify data authenticity.

[0092] S240: Concatenate the temporary key, the identification information of the wireless physical key, and the verification information to obtain first concatenated information.

[0093] In this embodiment, the first spliced ​​information may refer to information obtained by splicing the temporary key, the identification information of the wireless physical key, and the verification information.

[0094] In this embodiment, the order of splicing the temporary key, the identification information of the wireless physical key and the verification information is not limited. For example, they can be spliced ​​in the order of the temporary key, the identification information of the wireless physical key and the verification information, or in the order of the identification information of the wireless physical key, the temporary key and the verification information.

[0095] In this operation, the arrangement order of the temporary key and the wireless physical key during the splicing process can be the same as the arrangement order of the temporary key and the wireless physical key when the verification information is generated.

[0096] In this embodiment, the means of splicing are not limited, as long as different data can be placed in different bit positions, such as performing a shift operation or a bitwise OR operation.

[0097] S250: Encrypt the first splicing information using the initial key to obtain a key ciphertext.

[0098] The wireless physical key can encrypt the first splicing information through an initial key via an encryption algorithm to obtain a key ciphertext.

[0099] S260: Transmit the key ciphertext to the target device.

[0100] S270. Obtain the firmware ciphertext encrypted by the temporary key and transmitted by the target device.

[0101] S280. Decrypt the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key.

[0102] A firmware transmission method provided in the second embodiment of the present invention is refined on the basis of the above embodiment, by generating a random number key after establishing a channel connection with the target device; using the random number key as a temporary key for this firmware upgrade; converting the temporary key and the identification information of the wireless physical key into verification information of a set length; splicing the temporary key, the identification information of the wireless physical key and the verification information to obtain the first splicing information; encrypting the first splicing information with the initial key to obtain the key ciphertext; transmitting the key ciphertext to the target device; obtaining the firmware ciphertext encrypted with the temporary key transmitted by the target device; decrypting the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key. In the above technical scheme, the key ciphertext is obtained by the verification information and the first splicing information, and finally the firmware is transmitted based on the key ciphertext, which further improves the security of firmware transmission.

[0103] For example, Figure 3 A flowchart of a firmware transmission scenario provided by the second embodiment of the present invention. Taking the wireless physical key as a Bluetooth smart physical key and the target device as a mobile phone as an example, when a new version of firmware is integrated and released for the Bluetooth smart physical key, the new version of firmware of the Bluetooth smart physical key can be pushed to the mobile phone through the Over-the-Air (OTA) background management system (such as OTA background), wherein the OTA background can be connected to the mobile phone via 4G / 5G / WIFI, etc., and the mobile phone can be connected to the Bluetooth smart physical key via Bluetooth and perform firmware upgrades. Figure 3As shown, step 1: the Bluetooth smart physical key software developer and integrator provides the signed upgrade package to the operation and maintenance personnel; step 2: the operation and maintenance personnel upload the upgrade package to the OTA background and record the software version number and other information; step 3: the OTA background regularly pushes upgrade notifications to the mobile phone or the mobile phone regularly queries whether there is an upgrade package update based on the vehicle model information adapted by the Bluetooth smart physical key; step 4: the Bluetooth smart physical key presses the lock cylinder button for X seconds to enter the Over-the-Air Download (OAD) upgrade mode, and the mobile phone scans the Bluetooth smart physical key Bluetooth broadcast to establish a Bluetooth connection; step 5: the mobile phone can scan the Bluetooth smart physical key, read the key information, and decide whether to upgrade based on the key power returned by the Bluetooth smart physical key. If the power meets the requirements, a simple authentication handshake is performed, and the Bluetooth smart physical key firmware upgrade begins. The upgrade process is displayed by the upgrade progress bar, and the upgrade result pop-up box prompts.

[0104] For example, Figure 4 A schematic diagram of establishing a channel connection is provided in Embodiment 2 of the present invention. Figure 4 As shown, taking the wireless physical key as a Bluetooth smart physical key and the target device as a mobile phone as an example, the OTA background pushes an upgrade notification to the mobile phone (such as a mobile phone APP), and the mobile phone (such as a mobile phone APP) receives the upgrade instruction, or the mobile phone APP regularly queries the OTA background whether there is an upgrade package update based on the vehicle model information adapted by the Bluetooth smart physical key and the version number of the current firmware of the Bluetooth smart physical key. When the firmware needs to be updated, the OTA background transmits the firmware upgrade package list (including version number information, etc.) to the mobile phone APP, and the mobile phone APP receives and displays the firmware upgrade package list (the list includes upgrade packages of multiple versions of the firmware), and then selects the required firmware from it, downloads the firmware upgrade package and verifies it, and then prompts the Bluetooth smart physical key to press and hold the lock cylinder button to enter the upgrade learning broadcast mode (that is, prompt the key to press and hold to enter the upgrade learning broadcast mode). After the Bluetooth smart physical key presses the lock cylinder button for X seconds, it enters the OTA mode to send the OTA broadcast, and the mobile phone scans the Bluetooth smart physical key Bluetooth broadcast (that is, scans the key broadcast), and finally the mobile phone establishes a Bluetooth channel with the Bluetooth smart physical key.

[0105] Optionally, converting the identification information of the temporary key and the wireless physical key into verification information of a set length includes:

[0106] Concatenate the temporary key and the identification information of the wireless physical key to obtain second concatenated information;

[0107] Convert the second splicing information into a hash value of a set length;

[0108] The hash value is determined as verification information.

[0109] In one embodiment, the second concatenated information may refer to information including the temporary key and identification information of the wireless physical key. The hash value may refer to a value converted from the second concatenated information by a hash function, or may refer to a unique fixed-length value generated from the second concatenated information by a hash function.

[0110] Exemplarily, the temporary key can be represented as Kra, the identification information can be represented as KEYID, and the temporary key and the identification information of the wireless physical key can be concatenated as Kra||KEYID, that is, the second concatenated information can be represented as Kra||KEYID, and the second concatenated information is converted into a hash value of a set length, such as converting the second concatenated information through the SHA-256 algorithm, that is, the hash value of the set length can be represented as SHA256(Kra||KEYID), and the hash value is used as verification information.

[0111] Optionally, after transmitting the key ciphertext to the target device, the method further includes:

[0112] Encrypting the key information of the wireless physical key by using the temporary key and the initial key to obtain encrypted key information, wherein the key information includes a version number of the firmware of the wireless physical key, a power level of the wireless physical key, and identification information of the wireless physical key;

[0113] transmitting the encrypted key information to the target device;

[0114] An upgrade instruction transmitted by the target device is obtained, where the upgrade instruction is an instruction for performing a firmware upgrade on an instruction generated after analyzing the encrypted key information.

[0115] In one embodiment, the key information may refer to key information stored in the wireless physical key, and may include, for example: the version number of the wireless physical key's firmware, the power level of the wireless physical key, and identification information of the wireless physical key.

[0116] After the key ciphertext is transmitted to the target device, the key information of the wireless physical key is encrypted by the temporary key and the initial key. For example, the temporary key can be represented by Kra, and the initial key can be one that can be represented by K1, or two that can be represented by K1 and K1_IV, wherein the length of K1 and K1_IV can both be 16 bytes. For example, the key information of the wireless physical key is encrypted by the AES encryption algorithm, and the key information can be represented by Msgkeyfob. Then, the key information of the wireless physical key encrypted by the temporary key and the initial key can be represented by AES128_CBC (Kra, K1_IV, Msgkeyfob), that is, the encrypted key information can be represented by EMsgkeyfob = AES128_CBC (Kra, K1_IV, Msgkeyfob). Among them, AES128_CBC can refer to the process of using the AES encryption algorithm, specifically using a 128-bit key length and CBC mode for encryption or decryption; and then the encrypted key information is transmitted to the target device. It should be noted that when the initial key is used for encryption, one initial key or two initial keys may be used for encryption, and the present invention does not limit this.

[0117] The target device queries and filters out the firmware that is compatible with the wireless physical key, and then transmits an upgrade instruction to the wireless physical key. The wireless physical key obtains the upgrade instruction, and then feeds back upgrade preparation information to the target device. The target device can determine whether the wireless physical key is ready for the upgrade based on the power of the wireless physical key. If the power meets the requirements, the upgrade preparation information is ready, and the target device can transmit the firmware to the wireless physical key to complete the firmware upgrade. If the power does not meet the requirements, the upgrade preparation information is not ready, and the target device will not transmit the firmware to the wireless physical key.

[0118] Optionally, the key ciphertext and the firmware ciphertext are data frames transmitted according to a set communication protocol, and the data frames transmitted according to the set communication protocol include a message header, a message body and a checksum;

[0119] The message header includes length indication information and protocol control information, the length indication information indicates the length of the protocol control information and the message body in the data frame, and the protocol control information indicates attribute information of the data frame;

[0120] The message body includes a message identifier, a command identifier and message content;

[0121] The checksum is information for verifying the data frame.

[0122] In one embodiment, the message identifier may refer to a unique identifier used to distinguish messages (such as key information of a wireless physical key, a temporary key), which is used to identify the message. The command identifier may refer to a unique identifier of a command, which can be used to distinguish different command types. The message content may refer to the actual or specific content of the message, which may be the core part of the communication. The message content contains specific information or data to be transmitted to the recipient.

[0123] Exemplarily, the communication protocol is set as shown in Table 1. The data frame transmitted according to the set communication protocol includes a message header (Header), a message body (Body) and a checksum (Checksum). The message header includes length indication information (Length) and protocol control information (Control and FSN). The message body includes a message identifier (Massage ID), a command identifier (Commond ID) and a message content (Payload).

[0124] Table 1 Setting the communication protocol

[0125]

[0126] Among them, SOF is Start of Frame, 1 Byte, indicating the beginning of the data frame, fixed to 0xA5.

[0127] The length of Length is 2 bytes, which refers to the length from Control to Body, excluding Checksum.

[0128] Control is used for protocol control, including:

[0129] bit0: encryption indicator bit. Encryption indicates that the body segment is encrypted data, where 0: not encrypted, 1: encrypted;

[0130] bit1&bit2: packet sub-indicator bit;

[0131] 00: indicates that the current data frame is a complete data packet;

[0132] 01: Indicates that the current data frame is the starting frame of a complete data packet, and the data frame FSN is numbered;

[0133] 10: Indicates that the current data frame is a complete data packet process frame, and the data frame FSN number;

[0134] 11: Indicates that the current data frame is the last frame of a complete data packet, and the data frame FSN is numbered;

[0135] Reserved for subsequent expansion: bit3-bit7, that is, reserved.

[0136] FSN: Frame Sequence Number, the number of the data frame when it is packetized; when it is not packetized, it is 0, and when it is packetized, it is 0-255.

[0137] Massage ID:

[0138] 0x00: key interaction data;

[0139] 0x01: The target device (such as a mobile phone) requests to read the key information command. The payload follows the TLV format (Tag[1Byte]Length[1Byte]Value).

[0140] 0x02: Upgrade package data. Payload does not follow the TLV format.

[0141] 0x03: Control instruction; the payload does not follow the TLV format.

[0142] Common ID: 1 byte in length, used to identify specific instructions, with a value of 1-255;

[0143] The instruction format for requesting a temporary key is shown in Table 2.

[0144] Table 2 Format of command to request temporary key

[0145]

[0146] Among them, Fobkey is a wireless physical key.

[0147] Embodiment 3

[0148] Figure 5 This is a flowchart of a firmware transmission method provided in the third embodiment of the present invention. This embodiment can be applied to simple and secure firmware transmission, which helps to solve the problem that the physical key firmware upgrade process is too complicated and cumbersome. Specifically, the firmware transmission method can be executed by a firmware transmission device, which can be implemented by software and / or hardware and integrated in the target device. Furthermore, the target device includes but is not limited to: desktop computers, laptops, smart phones and other target devices.

[0149] like Figure 5 As shown, the method specifically comprises the following steps:

[0150] S310, obtaining the key ciphertext transmitted by the wireless physical key.

[0151] The key ciphertext is the ciphertext of the temporary key generated by the wireless physical key, and the temporary key is the key used by the wireless physical key in this firmware upgrade.

[0152] The target device may receive the key ciphertext transmitted by the wireless physical key to perform subsequent operations based on the key ciphertext.

[0153] S320. Decrypt the key ciphertext using the initial key to obtain decrypted information.

[0154] In this embodiment, the initial key in the target device is the same as the initial key in the wireless physical key, and the initial key can be generated by the same means or can be agreed upon in advance. For example, the target device and the wireless physical key can use the same algorithm to generate the same initial key. The decrypted information can refer to the information obtained after decrypting the key ciphertext, and the decrypted information can include, for example, the key to be verified, the identification to be verified, and verification information. Among them, the key to be verified can be understood as a temporary key that needs to be verified to be authentic; the identification to be verified can be understood as the identification information of the wireless physical key that needs to be verified to be authentic.

[0155] The target device can use the same encryption algorithm as the wireless physical key to decrypt the key ciphertext with the initial key to obtain the decrypted information.

[0156] S330. Extract the temporary key from the decrypted information.

[0157] Among them, the target device can directly extract the temporary key from the decrypted information, or it can determine that the temporary key is authentic and accurate through verification means and then extract it.

[0158] S340: Encrypt the firmware of the wireless physical key using the temporary key to obtain a firmware ciphertext.

[0159] The target device may encrypt the firmware used for wireless physical key firmware upgrade by using a temporary key or a temporary key and an initial key using an encryption algorithm (such as an AES algorithm) to obtain a firmware ciphertext.

[0160] S350: Transmit the firmware ciphertext to the wireless physical key.

[0161] The target device may transmit the firmware ciphertext to the wireless physical key, so that the wireless physical key performs a firmware upgrade based on the firmware ciphertext.

[0162] A firmware transmission method provided in the third embodiment of the present invention includes: obtaining a key ciphertext transmitted by a wireless physical key, wherein the key ciphertext is a ciphertext of a temporary key generated by the wireless physical key, and the temporary key is a key used by the wireless physical key in this firmware upgrade; decrypting the key ciphertext by an initial key to obtain decrypted information; extracting the temporary key from the decrypted information; encrypting the firmware of the wireless physical key by the temporary key to obtain a firmware ciphertext; and transmitting the firmware ciphertext to the wireless physical key. In the above technical scheme, the key ciphertext is decrypted by the initial key to obtain the decrypted information, and then the temporary key is extracted from the decrypted information, and then the firmware ciphertext is obtained by the temporary key, and finally the firmware ciphertext is transmitted to the wireless physical key, thereby realizing direct firmware transmission between the target device and the wireless physical key, and firmware transmission without the participation of a server, thereby improving the simplicity of firmware transmission; the interaction between the wireless physical key and the target device is an encrypted interaction, thereby ensuring the security of firmware transmission, and obtaining the firmware ciphertext by a temporary key further improves the security of firmware transmission.

[0163] Optionally, extracting the temporary key from the decrypted information includes:

[0164] Obtaining the key to be verified, the identifier to be verified and the verification information in the decrypted information;

[0165] Verifying the key to be verified and the identifier to be verified based on the verification information to obtain a verification result;

[0166] When the verification result is that the verification is passed, the key to be verified is determined as a temporary key.

[0167] Among them, the target device can decrypt the key ciphertext with the initial key to obtain the decrypted information, and then obtain the key to be verified, the identifier to be verified and the verification information from the decrypted information. The key to be verified and the identifier to be verified can be verified based on the verification information, or the key to be verified and the identifier to be verified can be converted into one information, and then the verification information can be compared with the information to obtain the verification result. If the verification result is that the verification is passed, that is, the key to be verified and the identifier to be verified are both authentic and have not been tampered with, that is, the key to be verified is a temporary key, and the identifier to be verified is the identification information of the physical key; if the verification result is that the verification is not passed, it can be explained that the key to be verified and / or the identifier to be verified are tampered with during the transmission process, and the interaction between the target device and the wireless physical key is unsafe, so if the verification fails, the firmware transmission is not performed. Or the wireless physical key is re-instructed to transmit the updated key ciphertext.

[0168] This operation verifies the key to be verified and the identifier to be verified by verifying the information, thereby ensuring the security of firmware transmission.

[0169] Optionally, the verifying the key to be verified and the identifier to be verified based on the verification information to obtain a verification result includes:

[0170] Converting the key to be verified and the identifier to be verified into information to be verified of a set length;

[0171] Comparing the information to be verified with the verification information to obtain a comparison result;

[0172] If the comparison result indicates that the information to be verified is the same as the verification information, the verification result is determined to be a verification success; otherwise, the verification result is determined to be a verification failure.

[0173] In one embodiment, the information to be verified may refer to information that has not been confirmed or verified.

[0174] Among them, the target device can use the same means as the verification information (such as SHA-256 algorithm) to convert the key to be verified and the identifier to be verified into information to be verified of a set length. For example, the key to be verified and the identifier to be verified can be first spliced ​​to obtain the third spliced ​​information, and the third spliced ​​information is converted into the information to be verified of a set length by the SHA-256 algorithm. The information to be verified is compared with the verification information. If the information to be verified is the same as the verification information, it indicates that the verification result is passed, that is, the temporary key of the wireless physical key and the identification information of the wireless physical key have not been tampered with, and are safe and authentic. If the information to be verified is different from the verification information, it indicates that the verification result is not passed, and the verification fails, that is, the temporary key of the wireless physical key and / or the identification information of the wireless physical key have been tampered with during the transmission process, which is unsafe and unauthentic, and the firmware transmission cannot be continued.

[0175] For example, Figure 6 A schematic diagram of a key negotiation process provided by Embodiment 3 of the present invention. Figure 6As shown, taking the wireless physical key as a Bluetooth smart physical key and the target device as a mobile phone as an example, the OTA background has nothing to do with the interaction between the wireless physical key and the target device, that is, the firmware transmission will not involve the server, and the application software in the mobile phone (such as a mobile phone APP) and the Bluetooth smart physical key can generate the same initial key (that is, the initial interaction key K1 and K1_IV) by the same means, and the Bluetooth smart physical key generates a random number key Kra, which is used as a temporary key. The Bluetooth smart physical key can splice the temporary key and the identification information of the wireless physical key to obtain the second splicing information, and the identification information can be expressed as KEYID, that is, the second splicing information can be expressed as Kra||KEYID, and the second splicing information is converted into a hash value of a set length, such as through SHA -256 algorithm is used to convert the second splicing information, that is, the hash value of the set length can be expressed as SHA256 (Kra||KEYID), and the hash value is used as the verification information. The temporary key, the identification information of the wireless physical key and the verification information are spliced ​​to obtain the first splicing information, that is, the first splicing information can be expressed as Kra||KEYID||SHA256 (Kra||KEYID), and the first splicing information is encrypted using the AES encryption algorithm with the initial key to obtain the key ciphertext, that is, the key ciphertext can be expressed as EKra=AES128_CBC(K1,K1_IV,Kra||KEYID||SHA256(Kra||KEYID)), and the key ciphertext is sent to the mobile phone APP, that is, EKra is sent.

[0176] The mobile phone APP obtains the key ciphertext sent by the Bluetooth smart physical key. The mobile phone APP uses the AES encryption algorithm to decrypt the key ciphertext with the initial key to obtain the decrypted information, that is, the decrypted information can be expressed as Kra||KEYID||SHA256(Kra||KEYID)=AES128_CBC(K1,K1_IV,EKra), SHA256(Kra||KEYID) is the verification information, Kra is the verified key to be verified, that is, the temporary key, KEYID is the verified identifier to be verified, that is, the identification information, which indicates that the firmware transmission can be started between the mobile phone and the Bluetooth smart physical key, and then the Bluetooth smart physical key uses the AES encryption algorithm to encrypt the key information of the Bluetooth smart physical key with the temporary key and the initial key to obtain the encrypted key information. The key information can be expressed as Msgkeyfob, and the key information of the Bluetooth smart physical key encrypted by the temporary key and the initial key can be expressed as AES128_CBC(Kra,K1_IV,Msgkeyfob), that is, the encrypted key information can be expressed as EMsgkeyfob=AES128_CBC(Kra,K1_IV,Msgkeyfob), and then the encrypted key information is transmitted to the mobile phone APP, that is, EMsgkeyfob is sent. After the mobile phone APP receives the encrypted key information, the mobile phone APP uses the AES encryption algorithm with the temporary key and the initial key to decrypt the encrypted key information to obtain the key information, that is, the key information can be expressed as Msgkeyfob=AES128_CBC(Kra,K1_IV,EMsgkeyfob).

[0177] Then the mobile phone APP queries and filters out the firmware that is compatible with the Bluetooth smart physical key, and then transmits the upgrade instruction to the Bluetooth smart physical key. The Bluetooth smart physical key obtains the upgrade instruction, and then feedbacks the upgrade preparation information to the mobile phone APP. The target device determines whether the wireless physical key is ready for the upgrade based on the power of the wireless physical key. If the power meets the requirements, the upgrade preparation information is ready, and the mobile phone APP can transmit the firmware to the Bluetooth smart physical key. The mobile phone APP uses the AES encryption algorithm to encrypt the firmware of the Bluetooth smart physical key with the temporary key and the initial key to obtain the firmware ciphertext. The firmware of the Bluetooth smart physical key can be represented as Msgapp , that is, the firmware ciphertext can be expressed as EMsgapp = AES128_CBC (Kra, K1_IV, Msgapp), and the firmware ciphertext is transmitted to the Bluetooth smart physical key, that is, EMsgapp is sent. After the Bluetooth smart physical key receives the firmware ciphertext, it decrypts the firmware ciphertext based on the temporary key and the initial key to obtain the firmware of the Bluetooth smart physical key, that is, the firmware can be expressed as Msgapp = AES128_CBC (Kra, K1_IV, EMsgapp), and then the firmware upgrade is completed. If the power does not meet the requirements, the upgrade preparation information is not ready, and the mobile phone APP will not transmit the firmware to the Bluetooth smart physical key. It should be noted that the transmission of firmware ciphertext between the mobile phone and the Bluetooth smart physical key can be repeated. Because the firmware may occupy too many resources, the firmware needs to be sub-packetized for transmission.

[0178] For example, Figure 7 This is a flowchart of another firmware transmission method provided by Embodiment 3 of the present invention. Figure 7As shown, taking the wireless physical key as a Bluetooth smart physical key and the target device as a mobile phone as an example, the Bluetooth smart physical key sends key information to the mobile phone APP, such as the version number, identification information (KEYID) and power level of the Bluetooth smart physical key firmware. The mobile phone APP queries and selects the firmware that is compatible with the Bluetooth smart physical key, that is, checks the key version number, and then transmits the upgrade instruction to the Bluetooth smart physical key, that is, sends the start upgrade instruction. The Bluetooth smart physical key obtains the upgrade instruction and then feeds back the upgrade preparation information to the mobile phone APP. The target device determines whether the wireless physical key is ready for the upgrade based on the power of the wireless physical key. If the power meets the requirement, the upgrade preparation information is ready. Then the mobile phone APP can transmit the firmware to the Bluetooth smart physical key, that is, send the upgrade package data. The Bluetooth smart physical key receives the firmware and deletes the original firmware in the memory, that is, the Bluetooth smart physical key receives the upgrade package and writes FLASN. At the same time, the upgrade indication page of the mobile phone APP displays the progress bar of the Bluetooth smart physical key firmware upgrade, that is, displays the upgrade progress. Sending upgrade package data, receiving upgrade packages, writing FLASN and displaying upgrade progress is a heavy process until the Bluetooth smart physical key feeds back the upgrade package verification result to the mobile phone APP, the upgrade indication page of the mobile phone APP displays the upgrade result, and the Bluetooth smart physical key resets the upgrade mark to enter the mobile phone APP, that is, the Bluetooth smart physical key firmware upgrade is completed.

[0179] Optionally, the method further includes:

[0180] An upgrade instruction page is displayed, wherein the upgrade instruction page includes upgrade progress instruction information, and the upgrade progress instruction information includes a progress bar for upgrading the wireless physical key firmware and stage instruction information during the wireless physical key firmware upgrade process.

[0181] In one embodiment, the stage indication information may refer to information used to display the current stage or step during the firmware upgrade process. The stage indication information may be used to inform a user or administrator of the progress and status of the firmware upgrade.

[0182] For example, Figure 8 This is a schematic diagram of an upgrade instruction page provided by Embodiment 3 of the present invention. Figure 8 As shown, the file name is the name of the firmware; checksum is the checksum; version number is the version number of the firmware, that is, the version number of the new version of the firmware; key version number is the version number of the firmware in the wireless physical key before the firmware upgrade, that is, the version number of the original firmware; power is the power of the wireless physical key; ID is the identification information of the wireless physical key; progress is the progress bar; new initial key is the generated initial key;

[0183] like Figure 8As shown in the picture numbered a (upgrade indication page), it is still in initialization (Initialize), and the target device has not yet established a connection with the wireless physical key, so the key version number, power, ID, upgrade mark and progress bar are all empty at this time; Figure 8 As shown in the picture numbered b (upgrade instruction page), Bluetooth is turned on (BluetoothPoweredOn) indicating that the target device and the wireless physical key have established a Bluetooth channel connection, the secret key request has been sent (SecretKeyRequestSent) and the secret key has been received (SecretKeyRecieved) indicating that the key negotiation between the target device and the wireless physical key is successful, and OAD is ready (OADAlreadyPrepared) indicating that the wireless physical key is ready; Figure 8 As shown in the picture numbered c (upgrade indication page), at this time, the target device has established a connection with the wireless physical key, and the key information request has been sent (KeylnformationRequestSent) and the key information has been received (KeylnformationRecieved), indicating that the target device has successfully received the key information of the wireless physical key. Therefore, the upgrade indication page of the target device has displayed the specific key version number, power and ID. Since the firmware has not been transmitted at this time, the progress bar is still 0; Figure 8 As shown in the picture numbered d (upgrade indication page), the block size request has been sent (BlockSizeRequestSent), the block size has been received (BlockSizeRecieved), and the enable OAD image command has been sent (EnableOADImageCommandSent) indicating that the target device has transmitted the firmware ciphertext to the wireless physical key, and the wireless physical key has successfully received the firmware ciphertext. The wireless physical key has started the firmware upgrade, so the progress bar has a specific value (such as 6.32%) at this time, and the image transfer (ImageTranster) indicates that the image transfer has started; Figure 8 As shown in the picture numbered d (upgrade indication page), the wireless physical key firmware upgrade is completed. After the upgrade is completed, the wireless physical key feeds back an indication of successful upgrade to the target device, such as CompleteFeedbackOK. After the upgrade is completed, the target device and the wireless physical key are disconnected, such as OADCompletelncludingDisconnect, and ImageTransferOK, indicating that the image transmission is successful.

[0184] Embodiment 4

[0185] Fig. 9This is a schematic diagram of the structure of a firmware transmission device provided in the fourth embodiment of the present invention. The device can be applied to a wireless physical key of a vehicle, and the device can execute the firmware transmission method provided in the embodiment of the present invention. The firmware transmission device provided in this embodiment includes:

[0186] The key generation module 410 is used to generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade;

[0187] A key ciphertext determination module 420, configured to encrypt the temporary key and the identification information of the wireless physical key by using an initial key to obtain a key ciphertext;

[0188] The key ciphertext transmission module 430 is used to transmit the key ciphertext to the target device;

[0189] The firmware ciphertext acquisition module 440 is used to acquire the firmware ciphertext encrypted by the temporary key and transmitted by the target device;

[0190] The firmware determination module 450 is configured to decrypt the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key.

[0191] Optionally, based on the above embodiment, the key generation module 410 includes:

[0192] A random number key generation unit, used to generate a random number key after establishing a channel connection with the target device;

[0193] The temporary key determination unit is used to use the random number key as the temporary key for this firmware upgrade.

[0194] Optionally, based on the above embodiment, the key ciphertext determination module 420 includes:

[0195] A verification information determination unit, configured to convert the temporary key and the identification information of the wireless physical key into verification information of a set length;

[0196] A first splicing information determining unit, configured to splice the temporary key, the identification information of the wireless physical key and the verification information to obtain first splicing information;

[0197] The key ciphertext determining unit is used to encrypt the first splicing information by using the initial key to obtain the key ciphertext.

[0198] Optionally, based on the above embodiment, the verification information determining unit includes:

[0199] A second splicing information determining subunit, configured to splice the temporary key and the identification information of the wireless physical key to obtain second splicing information;

[0200] A hash value determination subunit, used for converting the second splicing information into a hash value of a set length;

[0201] The verification information determination subunit is used to determine the Hash value as verification information.

[0202] Optionally, based on the above embodiment, the device further includes:

[0203] an encrypted key information determination module, configured to, after transmitting the key ciphertext to the target device, encrypt the key information of the wireless physical key by using the temporary key and the initial key to obtain the encrypted key information, wherein the key information includes a version number of the firmware of the wireless physical key, a power level of the wireless physical key, and identification information of the wireless physical key;

[0204] An encrypted key information transmission module, used for transmitting the encrypted key information to the target device;

[0205] The upgrade instruction acquisition module is used to acquire the upgrade instruction transmitted by the target device, wherein the upgrade instruction is an instruction for performing firmware upgrade based on the instruction generated after analyzing the encrypted key information.

[0206] Optionally, based on the above embodiment, the key ciphertext and the firmware ciphertext are data frames transmitted according to a set communication protocol, and the data frames transmitted according to the set communication protocol include a message header, a message body and a checksum;

[0207] The message header includes length indication information and protocol control information, the length indication information indicates the length of the protocol control information and the message body in the data frame, and the protocol control information indicates attribute information of the data frame;

[0208] The message body includes a message identifier, a command identifier and message content;

[0209] The checksum is information for verifying the data frame.

[0210] The firmware transmission device provided in the fourth embodiment of the present invention can be used to execute the firmware transmission methods provided in the above-mentioned first and second embodiments, and has corresponding functions and beneficial effects.

[0211] Embodiment 5

[0212] Fig.10This is a schematic diagram of the structure of a firmware transmission device provided in Embodiment 5 of the present invention. The device can be applied to a target device and can execute the firmware transmission method provided in the embodiment of the present invention. The firmware transmission device provided in this embodiment includes:

[0213] The key ciphertext acquisition module 510 is used to acquire the key ciphertext transmitted by the wireless physical key, wherein the key ciphertext is the ciphertext of the temporary key generated by the wireless physical key, and the temporary key is the key used by the wireless physical key in this firmware upgrade;

[0214] A decrypted information determination module 520, configured to decrypt the key ciphertext using an initial key to obtain decrypted information;

[0215] A temporary key extraction module 530, configured to extract the temporary key from the decrypted information;

[0216] A firmware ciphertext determination module 540 is used to encrypt the firmware of the wireless physical key by using the temporary key to obtain a firmware ciphertext;

[0217] The firmware ciphertext transmission module 550 is used to transmit the firmware ciphertext to the wireless physical key.

[0218] Optionally, based on the above embodiment, the temporary key extraction module 530 includes:

[0219] An information acquisition unit, used to acquire the key to be verified, the identifier to be verified and the verification information in the decrypted information;

[0220] A verification result determination unit, configured to verify the key to be verified and the identifier to be verified based on the verification information to obtain a verification result;

[0221] The temporary key determination unit is used to determine the key to be verified as a temporary key when the verification result is that the verification is passed.

[0222] Optionally, based on the above embodiment, the verification result determination unit includes:

[0223] The information to be verified conversion subunit is used to convert the key to be verified and the identifier to be verified into information to be verified of a set length;

[0224] A comparison result determination subunit, used to compare the information to be verified with the verification information to obtain a comparison result;

[0225] The verification result determination subunit is used to determine that the verification result is a passed verification if the comparison result indicates that the information to be verified is the same as the verification information; otherwise, determine that the verification result is a failed verification.

[0226] Optionally, based on the above embodiment, the device further includes:

[0227] The page display module is used to display an upgrade instruction page, wherein the upgrade instruction page includes upgrade progress indication information, and the upgrade progress indication information includes a progress bar for upgrading the wireless physical key firmware and stage indication information during the wireless physical key firmware upgrade process.

[0228] The firmware transmission device provided in the fifth embodiment of the present invention can be used to execute the firmware transmission method provided in the third embodiment above, and has corresponding functions and beneficial effects.

[0229] Embodiment 6

[0230] Fig.11 A schematic diagram of a wireless physical key 10 that can be used to implement an embodiment of the present invention is shown. The wireless physical key 10 is intended to represent various forms of wireless physical keys, such as Bluetooth smart physical keys, Near Field Communication (NFC) physical keys, Ultra Wideband (UWB) keys, and other similar wireless physical key devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0231] like Fig.11 As shown, the wireless physical key 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the wireless physical key 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0232] Multiple components in the wireless physical key 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the wireless physical key 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, wireless networks.

[0233] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the firmware transmission method.

[0234] In some embodiments, the firmware transmission method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the wireless physical key 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the firmware transmission method in any other appropriate manner (e.g., by means of firmware).

[0235] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0236] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0237] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0238] To provide interaction with a user, the systems and techniques described herein may be implemented on a wireless physical key 10 having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the wireless physical key 10. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0239] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0240] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0241] Embodiment 7

[0242] Fig.12 A schematic diagram of a target device 20 that can be used to implement an embodiment of the present invention is shown. The target device 20 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, and other suitable computers. The target device 20 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, user equipment, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0243] like Fig.12 As shown, the target device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In the RAM 23, various programs and data required for the operation of the target device 20 can also be stored. The processor 21, ROM 22 and RAM 23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0244] A number of components in the target device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the target device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, wireless networks.

[0245] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as the firmware transmission method.

[0246] In some embodiments, the firmware transmission method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the target device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to perform the firmware transmission method in any other appropriate manner (e.g., by means of firmware).

[0247] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0248] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0249] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0250] To provide interaction with a user, the systems and techniques described herein may be implemented on a target device 20 having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the target device 20. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0251] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0252] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0253] An embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program, and the computer program, when executed by a processor, implements the firmware transmission method according to any embodiment of the present invention.

[0254] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0255] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A firmware transmission method, characterized in that: A wireless physical key applied to a vehicle, the method comprising: Generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade; Encrypting the temporary key and the identification information of the wireless physical key by using the initial key to obtain a key ciphertext; Transmitting the key ciphertext to a target device; Obtaining firmware ciphertext encrypted by the temporary key and transmitted by the target device; The firmware ciphertext is decrypted based on the temporary key to obtain the firmware of the wireless physical key.

2. The method according to claim 1, characterized in that The generating of a temporary key comprises: After establishing a channel connection with the target device, generating a random number key; The random number key is used as a temporary key for this firmware upgrade.

3. The method according to claim 1, characterized in that The step of encrypting the temporary key and the identification information of the wireless physical key by using the initial key to obtain the key ciphertext includes: Convert the temporary key and the identification information of the wireless physical key into verification information of a set length; Concatenate the temporary key, the identification information of the wireless physical key, and the verification information to obtain first concatenated information; The first splicing information is encrypted using the initial key to obtain a key ciphertext.

4. The method according to claim 3, characterized in that The converting the identification information of the temporary key and the wireless physical key into verification information of a set length includes: Concatenate the temporary key and the identification information of the wireless physical key to obtain second concatenated information; Convert the second splicing information into a hash value of a set length; The hash value is determined as verification information.

5. The method according to claim 1, characterized in that: After transmitting the key ciphertext to the target device, the method further includes: Encrypting the key information of the wireless physical key by using the temporary key and the initial key to obtain the encrypted key information, wherein the key information includes the version number of the firmware of the wireless physical key, the power level of the wireless physical key and the identification information of the wireless physical key; transmitting the encrypted key information to the target device; An upgrade instruction transmitted by the target device is obtained, where the upgrade instruction is an instruction for performing a firmware upgrade on an instruction generated after analyzing the encrypted key information.

6. The method according to any one of claims 1 to 5, characterized in that: The key ciphertext and the firmware ciphertext are data frames transmitted according to a set communication protocol, and the data frames transmitted according to the set communication protocol include a message header, a message body and a checksum; The message header includes length indication information and protocol control information, the length indication information indicates the length of the protocol control information and the message body in the data frame, and the protocol control information indicates attribute information of the data frame; The message body includes a message identifier, a command identifier and message content; The checksum is information for verifying the data frame.

7. A firmware transmission method, characterized in that: Applied to a target device, the method comprises: Acquire a key ciphertext transmitted by a wireless physical key, wherein the key ciphertext is a ciphertext of a temporary key generated by the wireless physical key, and the temporary key is a key used by the wireless physical key in this firmware upgrade; Decrypting the key ciphertext using the initial key to obtain decrypted information; Extracting the temporary key from the decrypted information; Encrypting the firmware of the wireless physical key by using the temporary key to obtain a firmware ciphertext; The firmware ciphertext is transmitted to the wireless physical key.

8. The method according to claim 7, characterized in that The step of extracting the temporary key from the decrypted information comprises: Obtaining the key to be verified, the identifier to be verified and the verification information in the decrypted information; Verifying the key to be verified and the identifier to be verified based on the verification information to obtain a verification result; When the verification result is that the verification is passed, the key to be verified is determined as a temporary key.

9. The method according to claim 8, characterized in that The verifying the key to be verified and the identifier to be verified based on the verification information to obtain a verification result includes: Converting the key to be verified and the identifier to be verified into information to be verified of a set length; Comparing the information to be verified with the verification information to obtain a comparison result; If the comparison result indicates that the information to be verified is the same as the verification information, the verification result is determined to be a verification success; otherwise, the verification result is determined to be a verification failure.

10. The method according to claim 7, characterized in that Also includes: An upgrade instruction page is displayed, wherein the upgrade instruction page includes upgrade progress instruction information, and the upgrade progress instruction information includes a progress bar for upgrading the wireless physical key firmware and stage instruction information during the wireless physical key firmware upgrade process.

11. A firmware transmission device, characterized in that: A wireless physical key applied to a vehicle, the device comprising: A key generation module, used to generate a temporary key, where the temporary key is the key used by the wireless physical key in this firmware upgrade; A key ciphertext determination module, used to encrypt the temporary key and the identification information of the wireless physical key by using an initial key to obtain a key ciphertext; A key ciphertext transmission module, used for transmitting the key ciphertext to a target device; A firmware ciphertext acquisition module, used to acquire the firmware ciphertext encrypted by the temporary key and transmitted by the target device; The firmware determination module is used to decrypt the firmware ciphertext based on the temporary key to obtain the firmware of the wireless physical key.

12. A firmware transmission device, characterized in that: Applied to a target device, the apparatus comprises: A key ciphertext acquisition module, used to acquire a key ciphertext transmitted by a wireless physical key, wherein the key ciphertext is a ciphertext of a temporary key generated by the wireless physical key, and the temporary key is a key used by the wireless physical key in this firmware upgrade; A decrypted information determination module, used to decrypt the key ciphertext using an initial key to obtain decrypted information; A temporary key extraction module, used to extract the temporary key from the decrypted information; A firmware ciphertext determination module, used for encrypting the firmware of the wireless physical key by using the temporary key to obtain a firmware ciphertext; The firmware ciphertext transmission module is used to transmit the firmware ciphertext to the wireless physical key.

13. A wireless physical key, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware transmission method according to any one of claims 1 to 6.

14. A target device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware transmission method according to any one of claims 7 to 10.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware transmission method according to any one of claims 1 to 10 when executed.

16. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the firmware transmission method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Upgrading method and device of private cloud server and computer program product

    CN119449605A

  • Bluetooth entity key upgrading method and system

    CN120957165A

  • Software upgrade package automatic pushing method and device and computer equipment

    CN121070407A