Device anti-counterfeiting method and device
By dividing the root key into a hidden QR code and stored components, the security of terminal devices is enhanced, making it harder to crack and counterfeiting, thus improving network security.
Patent Information
- Application Number
- CN202010603829.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Existing anti-counterfeiting methods for terminal devices with small storage space are vulnerable to key cracking, leading to device counterfeiting and network hijacking due to hard-coded encryption keys being easily deciphered.
The root key is divided into a first and second root key, with the first root key hidden in a device QR code and the second root key stored in the device, enhancing security by dispersing the key across different locations.
This approach significantly increases the difficulty for illegal elements to crack the root key, reducing the risk of device counterfeiting and improving network security.
Smart Images

Figure CN113935744B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a device anti-counterfeiting method and apparatus. Background Art
[0002] With the advent of the Internet of Things era, a large number of terminal devices are connected to the network, such as smart TVs, smart air conditioners, smart refrigerators, smart cameras, smart speakers, smart sockets and smart lamps. In order to ensure the legitimacy and network security of terminal devices, device manufacturers usually activate the anti-counterfeiting capabilities of terminal devices during the initialization phase of the terminal devices. When the terminal devices are subsequently connected to the network, the legitimacy of the terminal devices can be verified through anti-counterfeiting authentication. At present, for terminal devices with small storage space, built-in device activation credentials are usually used to implement anti-counterfeiting verification of terminal devices. The device activation credentials are encrypted with a key generated by hard coding. However, the keys generated by hard coding can be easily cracked by criminals through reverse engineering, and the device activation credentials are obtained by decryption, thereby counterfeiting terminal devices and even hijacking the entire network. Therefore, the deployment of anti-counterfeiting capabilities for such terminal devices with small storage space has become an important part affecting the overall network security. Summary of the invention
[0003] The present application provides a device anti-counterfeiting method and apparatus, which are used to improve the security of anti-counterfeiting information of a terminal device and reduce the risk of the terminal device being counterfeited.
[0004] In order to achieve the above objectives, this application adopts the following technical solutions:
[0005] In a first aspect, a device anti-counterfeiting method is provided, the method comprising: a cloud server obtains a root key and a device activation credential from a credential server, the root key being used to encrypt anti-counterfeiting information of a terminal device, the anti-counterfeiting information comprising a universal unique identifier UUID and the device activation credential, for example, the device activation credential may be a software token or a certificate; the cloud server encrypts the UUID and the device activation credential according to the root key to obtain encrypted information; the cloud server writes a first root key into a device QR code of the terminal device (for example, an image is embedded in the device QR code, and the first root key is written into the image), the first root key being a partial key of the root key; the cloud server sends the device QR code, a second root key and the encrypted information, the second root key being a partial key of the root key and constituting a root key with the first root key, the device QR code may be printed on the body of the terminal device, the second root key and the encrypted information are used to be stored in the terminal device.
[0006] In the above technical scheme, the root key used to encrypt the anti-counterfeiting information of the terminal device can be divided into a first root key and a second root key. The first root key is hidden in the device QR code on the terminal device body, and the second root key is stored in the terminal device. Therefore, by dispersing the root key in different locations of the terminal device, the security of the root key is improved, and the difficulty for illegal elements to crack the root key is increased, thereby greatly reducing the risk of counterfeiting the terminal device.
[0007] In a possible implementation of the first aspect, the cloud server encrypts the UUID and the device activation credential according to the root key to obtain encrypted information, including: the cloud server directly uses the root key to encrypt the UUID and the device activation credential to obtain encrypted information; or the cloud server uses a derived key of the root key to encrypt the UUID and the device activation credential to obtain encrypted information. In the above possible implementations, the cloud server can directly use the root key or a derived key of the root key to encrypt the UUID and the device activation credential, thereby improving the flexibility of the cloud server in using the root key; in addition, the security of the encrypted information can be further improved when the derived key of the root key is used for encryption.
[0008] In a possible implementation of the first aspect, the method further includes: the cloud server generates a device QR code according to the hardware information of the terminal device, and the hardware information includes a media access control MAC address and / or a device serial number. In the above possible implementation, the user can obtain the hardware information of the terminal device by scanning the device QR code, thereby improving the convenience of the user to obtain the hardware information of the terminal device, thereby improving the user experience.
[0009] In a possible implementation of the first aspect, the device activation credential is a software token or a certificate. The above possible implementation can support device anti-counterfeiting of a terminal device that uses a software token or a certificate as a device activation credential.
[0010] In a possible implementation of the first aspect, the terminal device is a smart home device. The above possible implementation can improve the security of anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being counterfeited.
[0011] In a second aspect, a device anti-counterfeiting method is provided, the method comprising: a second terminal device receives a first root key from a first terminal device, the first root key is hidden in a device QR code of the second terminal device (for example, an image is embedded in the device QR code, and the first root key is hidden in the image), and the device QR code can be printed on the body of the second terminal device; the second terminal device determines a root key based on the first root key and a second root key stored in itself; the second terminal device uses the root key to decrypt encrypted information corresponding to anti-counterfeiting information of the second terminal device to obtain the anti-counterfeiting information, the anti-counterfeiting information including a universal unique identifier UUID and a device activation credential; the second terminal device activates the second terminal device based on the UUID and the device activation credential.
[0012] In the above technical scheme, the root key used to encrypt the anti-counterfeiting information of the second terminal device can be divided into a first root key and a second root key. The first root key is hidden in the device QR code on the body of the second terminal device, and the second root key is stored in the second terminal device. Therefore, by dispersing the root key in different locations of the second terminal device, the security of the root key is improved, and the difficulty for illegal elements to crack the root key is increased, thereby greatly reducing the risk of counterfeiting the second terminal device.
[0013] In a possible implementation of the second aspect, the method further includes: when a preset update condition is met, the second terminal device uses the first root key to update the second root key; optionally, the preset update condition includes at least one of the following: the second terminal device system is reset, the second terminal device is restored to factory settings, and the second terminal device receives a new device activation certificate. In the above possible implementation, the second terminal device can update the second root key to ensure the validity and security of the second root key, thereby improving the security of the root key.
[0014] In a possible implementation of the second aspect, the method further includes: the second terminal device sends the second root key to the cloud server. The above possible implementation can ensure that the cloud server obtains a safe and effective second root key.
[0015] In a possible implementation of the second aspect, the device QR code is generated based on hardware information of the second terminal device, and the hardware information includes a media access control MAC address and / or a device serial number. In the above possible implementation, a user can obtain the hardware information of the terminal device by scanning the device QR code, thereby improving the convenience of the user in obtaining the hardware information of the terminal device, thereby improving the user experience.
[0016] In a possible implementation of the second aspect, the second terminal device uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device, including: the second terminal device directly uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device; or the second terminal device directly uses the derived key of the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device. In the above possible implementation, the second terminal device can directly use the root key or the derived key of the root key to decrypt the UUID and the device activation credential, thereby improving the flexibility of the second terminal device in using the root key; in addition, the security of the encrypted information can be further improved when the derived key of the root key is used for decryption.
[0017] In a possible implementation of the second aspect, the device activation credential is a software token or a certificate. The above possible implementation can support device anti-counterfeiting of a terminal device that uses a software token or a certificate as a device activation credential.
[0018] In a possible implementation of the second aspect, the second terminal device is a smart home device. The above possible implementation can improve the security of anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being counterfeited.
[0019] In a third aspect, a device anti-counterfeiting method is provided, the method comprising: a first terminal device scans a device QR code of a second terminal device to obtain a first root key, the first root key being hidden in the device QR code (for example, an image is embedded in the device QR code, and the first root key is hidden in the image), and the device QR code can be printed on the body of the second terminal device; the first terminal device sends the first root key to the second terminal device, the first root key and the second root key stored in the second terminal device constitute a root key, and the root key is used to decrypt encrypted information corresponding to anti-counterfeiting information of the second terminal device, the anti-counterfeiting information including a universal unique identifier UUID and a device activation credential.
[0020] In the above technical solution, the root key used to encrypt the anti-counterfeiting information of the second terminal device can be divided into a first root key and a second root key. The first root key is hidden in the device QR code of the second terminal device (for example, an image is embedded in the device QR code, and the first root key is hidden in the image), and the second root key is stored in the second terminal device. Therefore, by dispersing the root key in different locations of the second terminal device, the security of the root key is improved, and the difficulty for illegal elements to crack the root key is increased, thereby greatly reducing the risk of counterfeiting the second terminal device.
[0021] In a possible implementation of the third aspect, the device QR code is generated based on hardware information of the second terminal device, and the hardware information includes a media access control MAC address and / or a device serial number. In the above possible implementation, a user can obtain the hardware information of the terminal device by scanning the device QR code, thereby improving the convenience of the user in obtaining the hardware information of the terminal device, thereby improving the user experience.
[0022] In a possible implementation manner of the third aspect, the second root key and the encryption information are stored in the second terminal device.
[0023] In a possible implementation of the third aspect, the device activation credential is a software token or a certificate. The above possible implementation can improve the security of anti-counterfeiting information of smart home devices and reduce the risk of terminal devices being counterfeited.
[0024] In a possible implementation of the third aspect, the second terminal device is a smart home device. The above possible implementation can support device anti-counterfeiting of a terminal device that uses a software token or a certificate as a device activation credential.
[0025] In a fourth aspect, a device anti-counterfeiting method is provided, which is applied to a communication system including a credential server, a cloud server, a first terminal device and a second terminal device; wherein the credential server can be used to distribute a root key and a device activation credential to the second terminal device; the cloud server can be used to execute the method provided by the first aspect or any possible implementation of the first aspect; the second terminal device can be used to execute the method provided by the second aspect or any possible implementation of the second aspect; the first terminal device can be used to execute the method provided by the third aspect or any possible implementation of the third aspect.
[0026] In a fifth aspect, a device anti-counterfeiting device is provided, which serves as a cloud server and includes: a receiving unit, used to obtain a root key and a device activation credential from a credential server, the root key being used to encrypt anti-counterfeiting information of a terminal device, the anti-counterfeiting information including a universal unique identifier UUID and a device activation credential; a processing unit, used to encrypt the UUID and the device activation credential according to the root key to obtain encrypted information; the processing unit is also used to steganographically write a first root key into a device QR code of the terminal device (for example, an image is embedded in the device QR code, and the first root key is steganographically written in the image), the first root key being a partial key of the root key, and the device QR code can be printed on the body of the terminal device; a sending unit, used to send the device QR code, a second root key and encrypted information, the second root key being a partial key of the root key and constituting a root key with the first root key.
[0027] In a possible implementation manner of the fifth aspect, the second root key and the encryption information are stored in the terminal device.
[0028] In a possible implementation manner of the fifth aspect, the processing unit is further used to: directly use the root key to encrypt the UUID and the device activation certificate to obtain encrypted information; or use a derived key of the root key to encrypt the UUID and the device activation certificate to obtain encrypted information.
[0029] In a possible implementation manner of the fifth aspect, the processing unit is further used to: generate a device QR code according to hardware information of the terminal device, where the hardware information includes a media access control MAC address and / or a device serial number.
[0030] In a sixth aspect, a device anti-counterfeiting device is provided, the device comprising: a receiving unit, for receiving a first root key from a first terminal device, the first root key being hidden in a device QR code of a second terminal device (for example, an image is embedded in the device QR code, and the first root key is hidden in the image), and the device QR code can be printed on the body of the second terminal device; a processing unit, for determining a root key based on the first root key and a second root key stored in itself; the processing unit is also used to decrypt encrypted information corresponding to anti-counterfeiting information of the second terminal device based on the root key to obtain anti-counterfeiting information, the anti-counterfeiting information including a universal unique identifier UUID and a device activation credential, for example, the device activation credential is a software token or a certificate; the processing unit is also used to activate the second terminal device based on the UUID and the device activation credential.
[0031] In a possible implementation manner of the sixth aspect, the processing unit is further used to: when a preset update condition is met, the second terminal device updates the second root key according to the first root key.
[0032] In a possible implementation manner of the sixth aspect, the device also includes: a sending unit, configured to send a second root key to the cloud server.
[0033] In a possible implementation manner of the sixth aspect, the preset update condition includes at least one of the following: a system reset of the second terminal device, a factory reset of the second terminal device, and a new device activation certificate received by the second terminal device.
[0034] In a possible implementation manner of the sixth aspect, the device QR code is generated based on hardware information of the second terminal device, where the hardware information includes a media access control MAC address and / or a device serial number.
[0035] In a possible implementation of the sixth aspect, the processing unit is also used to: directly use the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device; or directly use the derived key of the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device.
[0036] In the seventh aspect, a device anti-counterfeiting device is provided, which includes: a processing unit, used to scan a device QR code of a second terminal device to obtain a first root key, the first root key is hidden in the device QR code (for example, an image is embedded in the device QR code, and the first root key is hidden in the image), and the device QR code can be printed on the body of the second terminal device; a sending unit, used to send the first root key to the second terminal device, the first root key and the second root key stored in the second terminal device constitute a root key, and the root key is used to decrypt encrypted information corresponding to the anti-counterfeiting information of the second terminal device, and the anti-counterfeiting information includes a universal unique identification code UUID and a device activation certificate.
[0037] In a possible implementation manner of the seventh aspect, the device QR code is generated based on hardware information of the second terminal device, and the hardware information includes a media access control MAC address and / or a device serial number.
[0038] In a possible implementation manner of the seventh aspect, the second root key and the encryption information are stored in the second terminal device.
[0039] In a possible implementation manner of the seventh aspect, the device activation credential is a software token or a certificate.
[0040] In a possible implementation manner of the seventh aspect, the second terminal device is a smart home device.
[0041] In another aspect of the present application, a device anti-counterfeiting device is provided, which is a cloud server or a chip built into a cloud server. The device includes: a memory, and a processor coupled to the memory, the memory stores code and data, and the processor runs the code in the memory so that the device executes the device anti-counterfeiting method provided by the first aspect or any possible implementation of the first aspect.
[0042] In another aspect of the present application, a device anti-counterfeiting device is provided, which is a second terminal device or a chip built into the second terminal device. The device includes: a memory, and a processor coupled to the memory, the memory stores code and data, and the processor runs the code in the memory so that the device executes the device anti-counterfeiting method provided by the second aspect or any possible implementation of the second aspect.
[0043] In another aspect of the present application, a device anti-counterfeiting device is provided, which is a first terminal device or a chip built into the first terminal device. The device includes: a memory, and a processor coupled to the memory, the memory stores code and data, and the processor runs the code in the memory so that the device executes the device anti-counterfeiting method provided by the third aspect or any possible implementation of the third aspect.
[0044] In another aspect of the present application, a communication system is provided, which includes a credential server, a cloud server, a first terminal device and a second terminal device; wherein the cloud server is the cloud server provided by any of the above aspects, and is used to execute the method provided by the first aspect or any possible implementation of the first aspect; the second terminal device is the second terminal device provided by any of the above aspects, and is used to execute the method provided by the second aspect or any possible implementation of the second aspect; the first terminal device is the first terminal device provided by any of the above aspects, and is used to execute the method provided by the third aspect or any possible implementation of the third aspect.
[0045] In another aspect of the present application, a readable storage medium is provided, in which instructions are stored. When the readable storage medium is run on a device, the device executes the method provided by any aspect of the first to third aspects or any possible implementation manner.
[0046] In another aspect of the present application, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method provided by any aspect or any possible implementation manner of the first to third aspects above.
[0047] It can be understood that the apparatus, computer storage medium or computer program product of any of the device anti-counterfeiting methods provided above are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a device anti-counterfeiting method provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a device QR code provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a process flow of another device anti-counterfeiting method provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of an interface of a terminal device provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of an interface of another terminal device provided in an embodiment of the present application;
[0054] Figure 7A schematic diagram of the structure of a cloud server provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of the structure of another cloud server provided in an embodiment of the present application;
[0056] Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0057] Fig.10 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In this application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0059] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0060] The technical solution provided by the present application can be applied to the scenarios of burning anti-counterfeiting information of terminal devices, activating anti-counterfeiting information, and updating anti-counterfeiting information. Among them, the scenario of burning anti-counterfeiting information can refer to the scenario where the manufacturer of the terminal device stores or burns the anti-counterfeiting information or the key used to encrypt the anti-counterfeiting information and other related information to the terminal device before the terminal device leaves the factory, for example, the key used to encrypt the anti-counterfeiting information is integrated into the memory of the terminal device by hard coding; the scenario of activating anti-counterfeiting information can refer to the scenario where the user obtains the anti-counterfeiting information of the terminal device and activates the terminal device in the network according to the anti-counterfeiting information when using the terminal device after the terminal device leaves the factory; the scenario of updating anti-counterfeiting information can refer to the scenario where the anti-counterfeiting information of the terminal device is replaced and the replaced anti-counterfeiting information is updated to the network. In addition, the anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation credential. The device activation credential may be a credential information generated based on public key infrastructure (PKI) technology and / or certification authority (CA) technology using digital certificates, digital signatures, data encryption, and security credentials to ensure the legitimacy and security of the terminal device.
[0061] Optionally, the activation credentials of the device (also known as anti-counterfeiting information) can include two categories according to the security capabilities of the device: the first category is the software token (license) issued by the manufacturer, and the second category is the certificate issued by the manufacturer. The activation credentials of the device are mainly used to prove that the device is produced by a legitimate manufacturer. Among them, the software token is a random string issued by the manufacturer for the device, and is burned into the body of the device when it is produced. During the device activation process, it is necessary to compare the device's software token with the server token. Only after the comparison is passed can the next step of device activation be entered. The software token method has relatively low requirements on the computing power of the device. The certificate is a digital certificate issued by the manufacturer for the device. It is a way to verify whether the device manufacturer is legitimate when the device is activated. Compared with the software token form, it is safer and more reliable, but it has higher requirements on the computing power of the device. The two activation credential methods can be applied to different types of devices. For example, the software token can be applied to devices with low computing power, and the certificate can be applied to devices with high computing power.
[0062] In the present application, the terminal device may be a device with wireless communication function, which may be deployed on land, including indoors or outdoors, handheld or vehicle-mounted, on water (such as ships, etc.), or in the air (such as airplanes, balloons, and satellites, etc.). The terminal device may also be referred to as user equipment (UE), terminal, or electronic device, etc. For example, the terminal device includes a handheld device with wireless connection function, a vehicle-mounted device, etc. In one example, the terminal device may include: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), a vehicle-mounted device (such as a car, a bicycle, an electric car, an airplane, a ship, a train, a high-speed train, etc.), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a smart home device (such as a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a workshop equipment, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, a flying device (such as an intelligent robot, a hot air balloon, a drone, an airplane), etc. In one possible application scenario of the present application, the terminal device is a terminal device that often works on the ground, such as a vehicle-mounted device. In the present application, for the convenience of description, the chip deployed in the above-mentioned device, such as a system-on-a-chip (SOC), a baseband chip, etc., or other chips with communication functions can also be referred to as a terminal device.
[0063] As a possible example, in the embodiment of the present application, the terminal device may also include a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0064] As another possible example, in the embodiment of the present application, the terminal device may also include a smart home device, which may refer to various home appliances used in a smart home. For example, the smart home device may include a series of smart anti-theft products such as smart locks, which may coordinate with each other through various alarms and detectors, trigger alarm information when deployed, and play a role in safety and anti-theft. For another example, the smart home device may also include smart lighting products such as smart lights, and users can easily view and control the switch status of lighting products at home directly through terminal devices such as mobile phones and tablets. For another example, the smart home device may also include home appliance control products such as smart home appliance controllers, which may associate infrared wireless signals and control any device using an infrared remote control through a terminal device, such as a TV, air conditioner, electric curtains, etc. In addition, the smart home device may also include an air quality sensor, and users can easily view the indoor temperature, humidity, and environmental conditions monitored by the air quality sensor on the APP of the terminal device, and can link other electrical appliances in the home to improve the indoor environment and provide users with better enjoyment. Furthermore, the smart home device may also include a mobile phone smart door lock. The user only needs to take out a mobile phone, tablet computer or other terminal device and enter a password to automatically unlock the door. The user can also remotely unlock the door for family members or visitors. For example, the user's mobile phone is installed with an application (application, app) that can be used to select and control various smart home devices. The user's smart TV and the mobile phone are both connected to the same network. The user can select the control interface of the smart TV in the app. For example, the control interface includes multiple buttons such as power on, power off, volume +, volume -, next program and previous program. The user can turn on or off the smart TV by clicking the power on or power off button, or increase or decrease the playback volume of the smart TV by clicking the volume + or volume - button, or switch the program being played by clicking the next program or previous program button.
[0065] Figure 1 A structural diagram of a communication system provided in an embodiment of the present application, the communication system may include a credential server 101, a cloud server 102, a first terminal device 103 and a second terminal device 104.
[0066] The credential server 101 may refer to a server responsible for the issuance and management of credential information of terminal devices and other related services. For example, the credential server 101 may be used to generate, allocate, store and / or authenticate device activation credentials of terminal devices. The credential server 101 may be provided by the manufacturer of the terminal devices. The cloud server 102 may refer to a server used to provide cloud services for terminal devices. The cloud server 102 may be provided by the manufacturer of the terminal devices or by a third party. The cloud server 102 may be used to forward the device activation credentials allocated or generated by the credential server 101 for the terminal devices to the terminal devices. The first terminal device 103 and the second terminal device 104 are both terminal devices that can communicate with the cloud server 102, and communicate with the credential server 101 through the cloud server 102.
[0067] In the present application, both the first terminal device 103 and the second terminal device 104 may be the terminal devices described above. For ease of description, the terminal device may be divided into the first terminal device 103 and the second terminal device 104 herein, and the first terminal device 103 may refer to a terminal device that can be used to control the second terminal device 104. For example, the second terminal device 104 may be a smart home device such as a TV, an air conditioner, a refrigerator, a camera, a smart speaker, a smart socket, and a smart lamp, and the first terminal device 103 may be a terminal device such as a smart phone, a tablet computer, a PDA, etc. with a smart home application (application, app) installed, and the first terminal device 103 may control the second terminal device 104 through the smart home app. The smart home app here may refer to a software program that can select and control various home appliances in a home, and the smart home app may be installed on a terminal device. The smart home app may be an app that has been installed on the first terminal device 103 when it leaves the factory, or may be an app that the user downloads from the network or obtains and installs from other devices during the use of the first terminal device 103.
[0068] Figure 2 The present invention provides a flow chart of a device anti-counterfeiting method, which can be applied to the burning scenario of anti-counterfeiting information of terminal devices. Figure 1 In the communication system shown, the method includes the following steps.
[0069] S201: The cloud server obtains a root key and a device activation credential from a credential server. The root key is used to encrypt anti-counterfeiting information of a terminal device. The anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation credential.
[0070] Among them, the UUID of the terminal device can be used to uniquely identify the terminal device, and the device activation certificate of the terminal device (also known as manufacturer identification information) can refer to the identification information of the manufacturer that produced the terminal device. The device activation certificate can be used to identify the legitimacy of the terminal device. For example, the device activation certificate can be the manufacturer's certificate or software token, etc.
[0071] Specifically, when the cloud server establishes a secure connection with the credential server, the cloud server can request the device activation credential and root key (ROT) of the terminal device from the credential server. For example, the cloud server can send a request message to the credential server. The request message can carry the identification of the terminal device and is used to request the device activation credential and root key of the terminal device. When the credential server receives the request message, the credential server can assign a root key to the terminal device and send the device activation credential and the root key to the cloud server. When the cloud server receives the device activation credential and the root key, the cloud server can assign a UUID to the terminal device and bind the UUID to the device activation credential. Afterwards, the cloud server can send the binding information of the UUID and the device activation credential to the credential server. When the credential server receives the binding information, it can store the information.
[0072] S202: The cloud server encrypts the UUID and the device activation credential according to the root key to obtain encrypted information.
[0073] After the cloud server receives the root key and the device activation certificate and assigns a UUID to the terminal device, the cloud server can use the root key to encrypt the UUID and the device activation certificate respectively, that is, the cloud server uses the root key to encrypt the UUID to obtain the ciphertext of the UUID, and uses the root key to encrypt the device activation certificate to obtain the ciphertext of the device activation certificate. The ciphertext of the UUID and the ciphertext of the device activation certificate are the encrypted information. Alternatively, the cloud server can also use the UUID and the device activation certificate as a whole information, and use the root key to encrypt the whole information to obtain the ciphertext of the whole information, and the ciphertext of the whole information is the encrypted information.
[0074] Optionally, when the cloud server uses the root key to encrypt the UUID and the device activation credential, the cloud server may directly use the root key for encryption, or use a derived key of the root key for encryption, and the derived key of the root key may be a key generated based on the root key. For example, the root key is key 1, and the derived key may be a key obtained after cyclic shift of key 1, or a key obtained after AND operation of key 1 and a fixed value, etc., and the embodiments of the present application do not impose specific restrictions on this.
[0075] S203: The cloud server writes the first root key into an image and embeds the image into the device QR code, where the first root key is a partial key of the root key.
[0076] The root key may include two parts, the first part may be called a first root key, and the second part may be called a second root key. The two parts of the root key may be obtained by dividing the cloud server according to the root key division rule, and the root key division rule may be pre-set. For example, the root key is 8 bits of binary, the first root key may be the first four bits of the 8 bits of binary, and the second root key may be the last four bits of the 8 bits of binary.
[0077] In addition, the image of the steganographic first root key may be a random image or an image related to the terminal device. For example, the image of the steganographic first root key may be an image of the logo of the manufacturer that produces the terminal device. The image of the steganographic first root key may also be specified by the manufacturer that produces the terminal device. The embodiment of the present application does not specifically limit the image of the steganographic first root key.
[0078] Furthermore, the device QR code may be a QR code generated based on the hardware information of the terminal device, for example, the hardware information may include the media access control (MAC) address and device serial number of the terminal device, etc. The device QR code may be generated by the cloud server, or may be generated by other devices and sent to the cloud server.
[0079] Specifically, the cloud server can divide the root key into the first root key and the second root key according to the above-mentioned root key division rule. The cloud server can use data steganography technology to hide the first root key in the image, and generate a device QR code based on the hardware information of the terminal device. After that, the image that hides the first root key is embedded in the device QR code. The image that hides the first root key does not affect the normal reading of the device QR code. For example, Figure 3 The figure shows a schematic diagram of a device QR code provided in an embodiment of the present application, in which an image of a first root key can be embedded in the middle area of the device QR code.
[0080] S204: The cloud server sends the device QR code, the second root key and the encryption information to the terminal device, so that the device QR code is printed on the body of the terminal device, and the second root key and the encryption information are stored in the terminal device.
[0081] When the cloud server obtains the device QR code embedded with the image of the first root key hidden, and the encrypted information, the cloud server can send the device QR code, the second root key and the encrypted information to the terminal device. The cloud server can send all of the above information to the terminal device at one time; or the cloud server sends the above information to the terminal device multiple times, sending only part of the above information each time. For example, the cloud server sends the device QR code to the terminal device in the first transmission, and sends the second root key and the encrypted information to the terminal device in the second transmission.
[0082] When the terminal device receives the device QR code, the second root key and the encrypted information, the manufacturer of the terminal device can print the device QR code on the body of the terminal device (e.g., the casing), and write the second root key and the encrypted information into the terminal device through hard coding or the like, for example, by writing the second root key and the encrypted information into the code segment of the terminal device.
[0083] In an embodiment of the present application, before the terminal device leaves the factory, the root key used to encrypt the anti-counterfeiting information of the terminal device can be divided into a first root key and a second root key. The first root key is steganographically written in an image and embedded in a device QR code printed on the body of the terminal device, and the second root key is stored in the terminal device. Thus, by dispersing the root key in different locations of the terminal device, the security of the root key is improved, the difficulty for illegal elements to crack the root key is increased, and the risk of counterfeiting the terminal device is greatly reduced.
[0084] Figure 4 The present invention provides a flow chart of a device anti-counterfeiting method, which can be applied to the activation scenario of anti-counterfeiting information of a terminal device. Figure 1 In the communication system shown, the method includes the following steps.
[0085] S301: The first terminal device scans and parses the device QR code of the second terminal device to obtain a first root key.
[0086] The device QR code may be located on the body (e.g., housing) of the second terminal device, and the device QR code may be a QR code generated based on the hardware information (e.g., MAC address and device serial number, etc.) of the second terminal device. An image may be embedded in the device QR code, and the first root key may be steganographied in the image, and the embedding of the image does not affect the normal reading of the device QR code.
[0087] In addition, the first terminal device may be installed with an app capable of parsing the key, which may be an app authorized by the manufacturer of the second terminal device, and the user may log in to a legitimate user account on the app, which may be a legitimate account applied by the user to log in to the app. For example, the app may be a smart home app, which may be a software program capable of selecting and controlling various home appliances (such as speakers, televisions, and air conditioners, etc.) in the home.
[0088] For example, Figure 5 (a) is a schematic diagram of an interface of a smart home app installed on a first terminal device. The name of the smart home app may be "My Home". A user can click on the "My Home" icon to enter the following interface: Figure 5 The smart home app login interface shown in (b) in the figure can be used to successfully log in to the smart home app by entering the corresponding user name and password in the login interface. Figure 5 (c) is a schematic diagram of an interface after a successful login, which can display the temperature and humidity of the indoor environment, as well as various home appliances that have joined the network. For example, the home appliances may include speakers, televisions, air conditioners, washing machines, water heaters, etc. Users can control the home appliances by selecting different home appliances.
[0089] Specifically, after the user logs in to the user account on the app installed on the first terminal device that can parse the key, the user can use the first terminal device to scan the device QR code of the second terminal device, for example, use the scanning function of the app to scan the device QR code of the second terminal device, so as to obtain the first root key hidden in the image embedded in the device QR code. Optionally, the user can also set the usage permissions of the app installed on the first terminal device. For example, the usage permissions of the app may include the permission to parse the key, the permission to access the network, the permission to use the camera, and the permission to access the address book. For example, with the app as Figure 5 Take "My Home" as an example. Figure 6 As shown, the user can set the usage permission of "My Home" in the "Settings" option of the first terminal device. The usage permission may include multiple different permissions such as access to the network, use of the camera, parsing of the key, and access to the address book. The user can control the opening or closing of each permission by clicking the open or close button corresponding to each permission. Among them, when the usage permission of the app is to open the parsing of the key permission, the app can parse the first root key hidden in the image embedded in the device QR code when scanning the device QR code of the second terminal device.
[0090] S302: The first terminal device sends a first root key to the second terminal device.
[0091] Among them, a wireless connection can be established and bound between the first terminal device and the second terminal device, and the wireless connection may be a Bluetooth connection or a local area network connection, etc. When the first terminal device parses and obtains the first root key, the first terminal device may send the first root key to the second terminal device via the wireless connection.
[0092] S303: When the second terminal device receives the first root key, it determines a root key according to the first root key and the second root key.
[0093] The second root key may be stored in a memory of the second terminal device, for example, the second root key may be stored in a code segment of the second terminal device. The root key may refer to a root key issued by the network side, and the root key may include two parts, namely a first root key and a second root key. The specific division rule of dividing the root key into the first root key and the second root key may be set in advance.
[0094] Specifically, the second terminal device can obtain the second root key from its own code segment. When receiving the first root key sent by the first terminal device, the second terminal device can determine the root key based on the first root key and the second root key. For example, the second terminal device can combine the first root key and the second root key accordingly based on the division rule of the first root key and the second root key to obtain the root key.
[0095] S304: The second terminal device uses the root key to decrypt the encrypted information to obtain anti-counterfeiting information, which includes the UUID and the device activation certificate.
[0096] The UUID and the device activation certificate may be stored in the second terminal device by the manufacturer of the second terminal device before the second terminal device leaves the factory. The UUID may be used to uniquely identify the second terminal device, and the device activation certificate (also referred to as manufacturer identification information) may refer to the identification information of the manufacturer that produces the second terminal device. The device activation certificate may be used to identify the legitimacy of the second terminal device, for example, the device activation certificate may be a certificate or software token of the manufacturer.
[0097] In addition, the encrypted information may be the ciphertext of the anti-counterfeiting information, and the anti-counterfeiting information may refer to information used to identify the legitimacy of the second terminal device. When the encrypted information is information obtained by encrypting the UUID and the device activation certificate in the anti-counterfeiting information respectively, the encrypted information may include the ciphertext of the UUID and the ciphertext of the device activation certificate. At this time, the second terminal device may use the root key to decrypt the ciphertext of the UUID and the ciphertext of the device activation certificate respectively to obtain the plaintext of the UUID and the plaintext of the device activation certificate, that is, to obtain the UUID and the device activation certificate. When the encrypted information is information obtained by encrypting the UUID and the device activation certificate in the anti-counterfeiting information as a whole information, the encrypted information includes the ciphertext of the whole information, and the second terminal device may use the root key to decrypt the ciphertext of the whole information to obtain the plaintext of the UUID and the plaintext of the device activation certificate, that is, to obtain the UUID and the device activation certificate.
[0098] Optionally, when the network side directly uses the root key to encrypt the anti-counterfeiting information, the second terminal device can directly use the root key to decrypt the encrypted information; when the network side uses a derivative key of the root key to encrypt the anti-counterfeiting information, the second terminal device can generate a derivative key of the root key according to the same method as the network side, and use the derivative key to decrypt the encrypted information.
[0099] S305: The second terminal device sends the UUID and the device activation credential to the credential server through the cloud server to complete the activation of the second terminal device.
[0100] Among them, the second terminal device can establish a secure connection with the cloud server, so that the second terminal device can communicate directly with the cloud server. A secure connection can be established between the cloud server and the credential server, so that the cloud server and the credential server can communicate directly. The second terminal device can communicate with the credential server through the cloud server.
[0101] Specifically, the second terminal device can send the UUID and the device activation credential to the cloud server. When the cloud server receives the UUID and the device activation credential, the cloud server can check whether the UUID has been registered. If the UUID is not registered, the cloud server can forward the UUID and the device activation credential to the credential server; if the UUID has been registered, the cloud server can determine that the second terminal device is an illegal device, that is, the activation of the second terminal device is unsuccessful. When the credential server receives the UUID and the device activation credential, the credential server can detect whether the device activation credential corresponding to the UUID matches the device activation credential bound to the UUID stored in itself. When the detection result of the credential server is a match, the credential server can determine that the second terminal device is a legal device, that is, the second terminal device is activated successfully; when the detection result of the credential server is a mismatch, the credential server can determine that the second terminal device is an illegal device, that is, the activation of the second terminal device is unsuccessful.
[0102] Optionally, after determining that the second terminal device is a legitimate device, if the device activation credential is a software token, the credential server can also generate a new software token for the second terminal device and send the new software token to the cloud server; in addition, the credential server can also store the new software token as the device activation credential bound to the UUID of the second terminal device. When the cloud server receives the new software token, the cloud server can forward the new software token to the second terminal device, so that when the second terminal device receives the new software token, it can use the root key to encrypt the new software token and store the encrypted ciphertext of the new software token.
[0103] Furthermore, when the second terminal device needs to update the root key used to encrypt the anti-counterfeiting information, for example, when the update cycle is reached, the second terminal device resets the system or restores the factory settings, the second terminal device can randomly generate a key fragment, for example, the second terminal device randomly generates a piece of random number information; the second terminal device uses the first root key to encrypt the random number information and the second root key to obtain a new second root key, and the first root key and the new second root key constitute the updated root key. For example, the first root key is ROT1, the second root key is ROT2, the random number information is rand, and the new second root key is ROT2', then ROT2'=encROT1(rand||ROT2), enc represents encryption, and || represents an OR operation.
[0104] In an embodiment of the present application, after the second terminal device leaves the factory, when the user uses the second terminal device, the user can use the first terminal device to scan the device QR code on the body of the second terminal device to obtain the first root key, and use the root key and the second root key to determine the root key used to decrypt the anti-counterfeiting information of the second terminal device, so as to use the root key to decrypt the anti-counterfeiting information to obtain the UUID and the device activation certificate, and then the second terminal device can send the UUID and the device activation certificate to the network side to complete the activation of the second terminal device. Since the root key used to encrypt the anti-counterfeiting information of the second terminal device is divided into the first root key and the second root key, the first root key is steganographically written in the image and embedded in the device QR code printed on the body of the second terminal device, and the second root key is stored in the second terminal device, thereby improving the security of the root key by dispersing the root key in different locations of the second terminal device, increasing the difficulty for illegal elements to crack the root key, and thus greatly reducing the risk of counterfeiting the second terminal device.
[0105] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between various network elements. It can be understood that, in order to realize the above functions, each network element, such as a terminal, includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this document, the present application can be implemented in the form of hardware, software, or a combination of hardware and software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0106] The embodiment of the present application can divide the functional modules of the terminal according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0107] Figure 7A schematic diagram of the structure of an anti-counterfeiting device of a device involved in the above-mentioned embodiment is shown, and the device can implement the function of the cloud server in the method provided in the embodiment of the present application. The device can be a cloud server or a device that can support the cloud server to implement the function of the cloud server in the embodiment of the present application, for example, the device is a chip system applied to the cloud server. The device includes: a receiving unit 401, a processing unit 402 and a sending unit 403. Among them, the receiving unit 401 can be used to support the device to execute S201 in the above-mentioned method embodiment, and / or other technical processes described in this article; the processing unit 402 can be used to support the device to execute S202 and S203 in the above-mentioned method embodiment; the sending unit 403 can be used to support the device to execute S204 in the above-mentioned method embodiment. All relevant contents of each step involved in the above-mentioned method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0108] Optionally, in an embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
[0109] Optionally, the receiving unit 401 in the embodiment of the present application may be a circuit, a device, an interface, a bus, a software module, a transceiver or any other device that can implement communication.
[0110] Optionally, the receiving unit 401 and the sending unit 403 may be communication interfaces of a cloud server or a chip system applied in a cloud server. For example, the communication interface may be a transceiver circuit, and the processing unit 402 may be a processor integrated in the cloud server or a chip system applied in a cloud server.
[0111] Figure 8 A possible logical structure diagram of the device anti-counterfeiting device involved in the above-mentioned embodiment is shown, and the device can implement the function of the cloud server in the method provided in the embodiment of the present application. The device can be a cloud server or a chip system applied to a cloud server, and the device includes: a processor 412 and a communication interface 413. The processor 412 is used to control and manage the actions of the device. For example, the processor 412 is used to execute the steps of message or data processing on the device side. For example, the device is supported to execute steps S201 to S204 in the above-mentioned method embodiment, and / or other processes for the technology described in this article. The communication interface 413 is used to support the device to communicate with other network elements. Optionally, the device may also include a memory 411 for storing program code and data of the device.
[0112] Among them, the processor 412 can be a processor or a controller, for example, a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 413 can be a transceiver or a transceiver circuit, and the like. The memory 411 can be a high-speed random access memory or a non-volatile memory, and the like.
[0113] Exemplarily, the communication interface 413, the processor 412 and the memory 411 are connected to each other via a bus 414; the bus 414 may be a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory 411 is used to store the program code and data of the device. The communication interface 413 is used to support the device to communicate with other devices, and the processor 412 is used to support the device to execute the program code stored in the memory 411 to implement the steps in the method provided in the embodiment of the present application.
[0114] Optionally, the memory 411 may be included in the processor 412 .
[0115] Fig. 9A schematic diagram of the structure of a device anti-counterfeiting device involved in the above embodiment is shown, and the device can realize the function of the terminal device in the method provided in the embodiment of the present application. The device can be a terminal device or a device that can support the terminal device to realize the function of the terminal device in the embodiment of the present application, for example, the device is a chip system applied to the terminal device. The device includes: a receiving unit 501, a processing unit 502 and a sending unit 503. Among them, when the device is used to realize the function of the second terminal device in the above method embodiment, the receiving unit 501 can be used to support the device to perform the step of receiving the first root key sent by S302 in the above method embodiment; the processing unit 502 can be used to support the device to perform S303 and S304 in the above method embodiment, and the sending unit 503 can be used to support the device to perform the step of sending the updated second root key in the above method embodiment. When the device is used to realize the function of the first terminal device in the above method embodiment, the processing unit 502 is used to support the device to perform S301 in the above method embodiment; the sending unit 503 can be used to support the device to perform S302 in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0116] Optionally, in an embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
[0117] Optionally, the receiving unit 501 in the embodiment of the present application may be a circuit, a device, an interface, a bus, a software module, a transceiver or any other device that can implement communication.
[0118] Optionally, the receiving unit 501 and the sending unit 503 may be communication interfaces of a terminal device or a chip system applied in the terminal device. For example, the communication interface may be a transceiver circuit, and the processing unit 502 may be a processor integrated in the terminal device or a chip system applied in the terminal device.
[0119] Fig.10A possible logical structure diagram of the device anti-counterfeiting device involved in the above embodiment is shown, and the device can implement the function of the terminal device in the method provided in the embodiment of the present application. The device can be a terminal device or a chip system applied to a terminal device, and the device includes: a processor 512 and a communication interface 513. The processor 512 is used to control and manage the actions of the device, for example, the processor 512 is used to execute the steps of message or data processing on the device side. For example, when the device is used to implement the function of the second terminal device in the above method embodiment, the processor 512 can support the device to execute steps S303 and S304 in the above method embodiment, and / or other processes for the technology described herein; when the device is used to implement the function of the first terminal device in the above method embodiment, the processor 512 can support the device to execute step S301 in the above method embodiment. The communication interface 513 is used to support the device to communicate with other network elements. Optionally, the device may also include a memory 511 for storing program code and data of the device.
[0120] Among them, the processor 512 can be a processor or a controller, for example, a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 513 can be a transceiver or a transceiver circuit, and the like. The memory 511 can be a high-speed random access memory or a non-volatile memory, and the like.
[0121] Exemplarily, the communication interface 513, the processor 512 and the memory 511 are connected to each other via a bus 514; the bus 514 may be a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory 511 is used to store the program code and data of the device. The communication interface 513 is used to support the device to communicate with other devices, and the processor 512 is used to support the device to execute the program code stored in the memory 511 to implement the steps in the method provided in the embodiment of the present application.
[0122] Optionally, the memory 511 may be included in the processor 512 .
[0123] Based on this, the embodiment of the present application also provides a communication system, which includes a credential server, a cloud server first terminal device and a second terminal device; wherein the cloud server is the above-mentioned Figure 7 or Figure 8 The cloud server provided is used to perform the functions of the cloud server in the embodiment of the method of the present application; the second terminal device is Fig. 9 or Fig.10 The terminal device provided is used to perform the function of the second terminal device in the method embodiment of the present application; the first terminal device is Fig. 9 or Fig.10 The provided terminal device is used to execute the function of the first terminal device in the method embodiment of the present application.
[0124] In an embodiment of the present application, the root key used to encrypt the anti-counterfeiting information of the terminal device is divided into a first root key and a second root key. The first root key is steganographically written in an image and embedded in a device QR code printed on the body of the terminal device. The second root key is stored in the terminal device. Thus, by dispersing the root key in different locations of the terminal device, the security of the root key is improved, the difficulty for illegal elements to crack the root key is increased, and the risk of counterfeiting the terminal device is greatly reduced.
[0125] In the method provided in the embodiment of the present application, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, an SSD), etc.
[0126] Based on this understanding, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute one or more steps of the terminal in the above method embodiment.
[0127] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute one or more steps of the terminal in the above method embodiment.
[0128] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0130] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device anti-counterfeiting method, It is characterized in that The method comprises: The cloud server obtains a root key from the credential server, wherein the root key is used to encrypt anti-counterfeiting information of the terminal device, wherein the anti-counterfeiting information includes a universal unique identifier UUID and a device activation credential of the terminal device; The cloud server encrypts the UUID and the device activation credential according to the root key to obtain encrypted information; The cloud server writes the first root key into the device QR code of the terminal device, where the first root key is a partial key of the root key; The cloud server sends the device QR code, the second root key and the encrypted information to the terminal device, the second root key is a partial key of the root key, the second root key and the first root key constitute the root key, and the device QR code and the second root key are stored in different locations of the terminal device.
2. The method according to claim 1, It is characterized in that An image is embedded in the device QR code, and the first root key is hidden in the image.
3. The method according to claim 1, It is characterized in that The second root key and the encrypted information are stored in the terminal device.
4. The method according to claim 1, It is characterized in that The cloud server encrypts the UUID and the device activation credential according to the root key, including: The cloud server directly uses the root key to encrypt the UUID and the device activation credential; or, The cloud server encrypts the UUID and the device activation credential using a key derived from the root key.
5. The method according to claim 1, It is characterized in that The method further comprises: The cloud server generates the device QR code according to the hardware information of the terminal device, where the hardware information includes a media access control MAC address and / or a device serial number.
6. The method according to claim 1, It is characterized in that The device activation credential is a software token or a certificate.
7. The method according to any one of claims 1 to 6, It is characterized in that The terminal device is a smart home device.
8. A device anti-counterfeiting method, It is characterized in that The method comprises: The second terminal device receives a first root key from the first terminal device, where the first root key is hidden in a device QR code of the second terminal device; The second terminal device determines a root key according to the first root key and a second root key stored in the second terminal device, the first root key and the second root key are both partial keys of the root key, the second root key and the first root key constitute the root key, and the device QR code and the second root key are stored in different locations of the second terminal device; The second terminal device decrypts the encrypted information corresponding to the anti-counterfeiting information of the second terminal device according to the root key to obtain the anti-counterfeiting information, where the anti-counterfeiting information includes a universal unique identifier UUID and a device activation credential; The second terminal device sends the UUID and the device activation credential to the credential server to activate the second terminal device.
9. The method according to claim 8, It is characterized in that The method further comprises: When a preset update condition is met, the second terminal device uses the first root key to update the second root key.
10. The method according to claim 9, It is characterized in that The method further comprises: The second terminal device sends the second root key to the cloud server.
11. The method according to claim 9, It is characterized in that The preset update condition includes at least one of the following: a system reset of the second terminal device, a factory reset of the second terminal device, and a new device activation certificate received by the second terminal device.
12. The method according to claim 8, It is characterized in that An image is embedded in the device QR code, and the first root key is hidden in the image.
13. The method according to claim 8, It is characterized in that The device QR code is generated based on the hardware information of the second terminal device, and the hardware information includes a media access control MAC address and / or a device serial number.
14. The method according to claim 8, It is characterized in that The second terminal device uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device, including: The second terminal device directly uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device; or, The second terminal device directly uses the derived key of the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device.
15. The method according to any one of claims 8 to 14, It is characterized in that The device activation credential is a software token or a certificate.
16. The method according to claim 8, It is characterized in that The second terminal device is a smart home device.
17. A device anti-counterfeiting method, It is characterized in that The method is applied to a communication system including a credential server, a cloud server and a terminal device; The credential server is used to allocate a root key to the terminal device, the cloud server is used to execute the device anti-counterfeiting method described in any one of claims 1-7, and the terminal device is used to execute the device anti-counterfeiting method described in any one of claims 8-16. 18.An anti-counterfeiting device for equipment, It is characterized in that The device includes a memory and a processor coupled to the memory, wherein the memory stores codes, and the processor runs the codes in the memory so that the device executes the device anti-counterfeiting method according to any one of claims 1 to 7. 19.An anti-counterfeiting device for equipment, It is characterized in that The device includes a memory and a processor coupled to the memory, wherein the memory stores codes, and the processor runs the codes in the memory so that the device executes the device anti-counterfeiting method according to any one of claims 8 to 16.
20. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the device anti-counterfeiting method according to any one of claims 1 to 16.
21. A computer program product, It is characterized in that When the computer program product is run on a computer, the computer is enabled to execute the device anti-counterfeiting method according to any one of claims 1 to 16.
