WO2022001272A1 - Method and apparatus for device anti-counterfeiting - Google Patents

Method and apparatus for device anti-counterfeiting Download PDF

Info

Publication number
WO2022001272A1
WO2022001272A1 PCT/CN2021/085663 CN2021085663W WO2022001272A1 WO 2022001272 A1 WO2022001272 A1 WO 2022001272A1 CN 2021085663 W CN2021085663 W CN 2021085663W WO 2022001272 A1 WO2022001272 A1 WO 2022001272A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
root key
counterfeiting
cloud server
key
Prior art date
Application number
PCT/CN2021/085663
Other languages
French (fr)
Chinese (zh)
Inventor
韩亚
甘璐
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022001272A1 publication Critical patent/WO2022001272A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a device anti-counterfeiting method and device.
  • the device manufacturer usually activates the anti-counterfeiting capability of the terminal device during the initialization stage of the terminal device.
  • the legitimacy of the terminal device can be verified through anti-counterfeiting authentication.
  • a built-in device activation certificate is usually used to realize the anti-counterfeiting verification of the terminal device, and the device activation certificate is encrypted by a key generated in a hard-coded manner.
  • the keys generated by hard coding can easily be obtained by criminals through reverse engineering and decryption to obtain device activation credentials, thereby forging 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 that affects the security of the entire network.
  • the present application provides a device anti-counterfeiting method and device, which are used to improve the security of anti-counterfeiting information of a terminal device and reduce the risk of the terminal device being forged.
  • a device anti-counterfeiting method includes: a cloud server obtains a root key and a device activation certificate from a certificate server, the root key is used to encrypt anti-counterfeiting information of a terminal device, and the anti-counterfeiting information includes a universal unique identification code UUID and the device activation certificate, for example, the device activation certificate can be a software token or certificate; the cloud server encrypts the UUID and the device activation certificate according to the root key to obtain encrypted information; the cloud server hides the first root key Write it into the device QR code of the terminal device (for example, the device QR code is embedded with an image, and the first root key is steganographically written in the image), and the first root key is the partial encryption of the root key.
  • the cloud server sends the device QR code, the second root key and the encrypted information, the second root key is a partial key of the root key and forms a root key with the first root key, the device two
  • the dimensional code can be printed on the body of the terminal device, and the second root key and encrypted information are used for storage in the terminal device.
  • 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, and the first root key is steganographically written in the device 2 of the terminal device body.
  • the second root key is stored in the terminal device, thereby improving the security of the root key by storing the root key in different locations of the terminal device, and increasing the ability of illegal elements to crack the root key. The difficulty of the key, thereby greatly reducing the risk of forging the terminal device.
  • 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 encrypts the UUID and the device activation certificate by using the root key certificate to obtain encrypted information; or, the cloud server encrypts the UUID and the device activation certificate using a key derived from the root key to obtain encrypted information.
  • the cloud server can directly use the root key or use the 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 encrypted using a key derived from the root key.
  • the method further includes: the cloud server generates a device two-dimensional code according to hardware information of the terminal device, where the hardware information includes a media intervention control MAC address and/or a device serial number.
  • the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
  • the device activation credential is a software token or a certificate.
  • the above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
  • the terminal device is a smart home device.
  • the above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
  • a device anti-counterfeiting method includes: a second terminal device receives a first root key from a first terminal device, and the first root key is steganographically written in a device two-dimensional code of the second terminal device (For example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device;
  • the root key and the second root key stored by itself determine the root key;
  • the second terminal device uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device to obtain the anti-counterfeiting information, and the anti-counterfeiting information includes universal unique
  • 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, and the first root key is steganographically written on the body of the second terminal device.
  • the second root key is stored in the second terminal device, so that the root key is stored in different locations of the second terminal device, the security of the root key is improved, and the It is difficult for illegal elements to crack the root key, thereby greatly reducing the risk of forging the second terminal device.
  • 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, preset update The conditions include at least one of the following: the system of the second terminal device is reset, the second terminal device is restored to factory settings, and the second terminal device receives a new device activation credential.
  • the second root key may be updated by the second terminal device to ensure the validity and security of the second root key, thereby improving the security of the root key.
  • the method further includes: the second terminal device sends the second root key to the cloud server.
  • the second terminal device sends the second root key to the cloud server.
  • the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
  • the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
  • 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 decrypts the second terminal device by using the root key The encrypted information corresponding to the anti-counterfeiting information of the terminal device; or, the second terminal device directly decrypts the encrypted information corresponding to the anti-counterfeiting information of the second terminal device using the derived key of the root key.
  • the second terminal device can directly use the root key or use 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.
  • the security of encrypted information can be further improved when decrypting with a key derived from the root key.
  • the device activation credential is a software token or a certificate.
  • the above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
  • the second terminal device is a smart home device.
  • the above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
  • a device anti-counterfeiting method comprising: a first terminal device scans a device two-dimensional code of a second terminal device to obtain a first root key, and the first root key is steganographically written in the device two-dimensional code (For example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the first terminal device communicates to the second terminal device.
  • the terminal device sends the first root key, the first root key and the second root key stored in the second terminal device constitute the root key, and the root key is used to decrypt the encryption corresponding to the anti-counterfeiting information of the second terminal device information, the anti-counterfeiting information includes UUID and device activation certificate.
  • 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, and the first root key is steganographically written in the device of the second terminal device.
  • the two-dimensional code for example, an image is embedded in the two-dimensional code of the device, and the first root key is steganographically written in the image
  • the second root key is stored in the second terminal device, so that by using the root key
  • the key is distributed in different locations of the second terminal device, which improves the security of the root key, increases the difficulty for illegal elements to decipher the root key, and greatly reduces the risk of forging the second terminal device.
  • the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
  • the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
  • the second root key and the encrypted information are stored in the second terminal device.
  • the device activation credential is a software token or a certificate.
  • the above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
  • the second terminal device is a smart home device.
  • the above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
  • a device anti-counterfeiting method is provided, and the method is applied in 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 assign a root to the second terminal device
  • the cloud server can be used to execute the method provided by the first aspect or any possible implementation manner of the first aspect
  • the second terminal device can be used to execute the second aspect or any one of the second aspect
  • the first terminal device can be used to execute the method provided by the third aspect or any possible implementation manner of the third aspect.
  • a device anti-counterfeiting device As a cloud server, the device includes: a receiving unit configured to obtain a root key and a device activation certificate from a certificate server, where the root key is used to encrypt anti-counterfeiting information of a terminal device, the The anti-counterfeiting information includes the universal unique identification code UUID and the device activation certificate; the processing unit is used to encrypt the UUID and the device activation certificate according to the root key to obtain encrypted information; the processing unit is also used to steganographically write the first root key to the terminal device
  • the device QR code of the device for example, the device QR code is embedded with an image, and the first root key is steganographically written in the image
  • the first root key is a partial key of the root key
  • the device QR code The code can be printed on the body of the terminal device; the sending unit is used to send the device two-dimensional code, the second root key and encrypted information, and the second root key is a partial
  • the second root key and encrypted information are stored in the terminal device.
  • the processing unit is further configured to: directly encrypt the UUID and the device activation credential by using the root key to obtain encrypted information; or, encrypt the UUID and the device activation using a key derived from the root key Credentials to get encrypted information.
  • the processing unit is further configured to: generate a device two-dimensional code according to hardware information of the terminal device, where the hardware information includes a media intervention control MAC address and/or a device serial number.
  • a device anti-counterfeiting device comprising: a receiving unit configured to receive a first root key from a first terminal device, where the first root key is steganographically written in a device two-dimensional code of the second terminal device (for example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the processing unit is used to The first root key and the second root key stored by itself determine the root key; the processing unit is further configured to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device according to the root key to obtain anti-counterfeiting information, where the anti-counterfeiting information includes general
  • the unique identification code UUID and the device activation certificate for example, the device activation certificate is a software token or certificate; the processing unit is further configured to activate the second terminal device according to the UUID and the device activation
  • the processing unit is further configured to: when a preset update condition is satisfied, the second terminal device updates the second root key according to the first root key.
  • the apparatus further includes: a sending unit, configured to send the second root key to the cloud server.
  • the preset update condition includes at least one of the following: system reset of the second terminal device, factory reset of the second terminal device, and receipt of a new device activation certificate by the second terminal device .
  • the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
  • the processing unit is further configured 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 first The encrypted information corresponding to the anti-counterfeiting information of the second terminal device.
  • a device anti-counterfeiting device comprising: a processing unit configured to scan a device two-dimensional code of a second terminal device to obtain a first root key, and the first root key is steganographically written in the device two-dimensional code (for example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the sending unit is used to send The second terminal device sends the first root key, the first root key and the second root key stored in the second terminal device constitute the root key, and the root key is used to decrypt the corresponding anti-counterfeiting information of the second terminal device Encrypted information, anti-counterfeiting information includes UUID and device activation certificate.
  • the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
  • the second root key and the encrypted information are stored in the second terminal device.
  • the device activation credential is a software token or a certificate.
  • the second terminal device is a smart home device.
  • a device anti-counterfeiting device is provided, the device is a cloud server or a chip built into the cloud server, the device includes: a memory, and a processor coupled with the memory, the memory stores codes and data, and processes The code in the running memory of the processor causes the apparatus to execute the device anti-counterfeiting method provided by the first aspect or any possible implementation manner of the first aspect.
  • a device anti-counterfeiting device is provided, the device is a second terminal device or a chip built in the second terminal device, the device includes: a memory and a processor coupled to the memory, the memory stores codes and data, the processor runs the code in the memory to cause the apparatus to execute the device anti-counterfeiting method provided by the second aspect or any possible implementation manner of the second aspect.
  • a device anti-counterfeiting device is provided, the device is a first terminal device or a chip built in the first terminal device, the device includes: a memory, and a processor coupled to the memory, where codes are stored in the memory and data, the processor runs the code in the memory to cause the apparatus to execute the device anti-counterfeiting method provided by the third aspect or any possible implementation manner of the third aspect.
  • a communication system in yet another aspect of the present application, includes a credential server, a first terminal device of a cloud server, and a second terminal device; wherein the cloud server is the cloud server provided in any of the above aspects, and is used for executing The method provided by the first aspect or any possible implementation manner 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 second aspect or any one of the second aspects The method provided by a possible implementation manner; the first terminal device is the first terminal device provided in any of the foregoing aspects, and is configured to execute the third aspect or the method provided by any of the possible implementation manners of the third aspect.
  • a readable storage medium is provided, and instructions are stored in the readable storage medium, and when the readable storage medium runs on a device, the device causes the device to perform the above-mentioned first to sixth aspects.
  • a method provided by any one of the three aspects or any possible implementation manner.
  • a computer program product which, when the computer program product runs on a computer, causes the computer to perform any one of the above-mentioned first to third aspects or any possible possibility methods provided by the implementation.
  • the device, computer storage medium or computer program product of any device anti-counterfeiting method provided above are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the above. The beneficial effects in the corresponding method provided will not be repeated here.
  • FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a device two-dimensional code provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another device anti-counterfeiting method provided by an embodiment of the present application.
  • FIG. 5 is a schematic interface diagram of a terminal device provided by an embodiment of the present application.
  • FIG. 6 is a schematic interface diagram of another terminal device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a cloud server according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another cloud server provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another terminal device provided by an embodiment of the present application.
  • At least one means one or more
  • plural means two or more.
  • And/or which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c may be single or multiple.
  • the burning scenario of anti-counterfeiting information may refer to a scenario in which the manufacturer of the terminal device stores or burns relevant information such as anti-counterfeiting information or a key used to encrypt anti-counterfeiting 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 activation scenario of the anti-counterfeiting information may refer to the user obtaining the anti-counterfeiting information of the terminal device when using the terminal device after the terminal device leaves the factory
  • the scenario of activating the terminal device in the network according to the anti-counterfeiting information; the update scenario of the anti-counterfeiting information may refer to the scenario of replacing
  • the anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation certificate
  • UUID universally unique identifier
  • the device activation certificate may be based on a public key infrastructure (PKI) technology and/or a certificate authority (certification authority) , CA) technology, a kind of credential information used to ensure the legitimacy and security of terminal equipment generated by means of digital certificates, digital signatures, data encryption and security credentials.
  • PKI public key infrastructure
  • CA certificate authority
  • the device activation certificate (also referred to as anti-counterfeiting information) may include two types according to the device security capability: the first type is a software token (license) issued by the manufacturer, and the second type is a certificate issued by the manufacturer.
  • the device's activation certificate is mainly used to prove that the device is produced by a legitimate manufacturer.
  • the software token is a random string issued by the manufacturer for the device, and is burned into the device when the device is produced. During the device activation process, it is necessary to compare the software token of the device with the server token. After passing, you can enter the next step of device activation.
  • the software token method has relatively low requirements on the computing power of the device.
  • a certificate is a digital certificate issued by a manufacturer for a device.
  • the two activation credential methods can be applied to different device types. For example, a software token can be applied to a device with low computing power, and a certificate can be applied to a device with high computing power.
  • the above-mentioned terminal device can be a device with wireless communication function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted, can also be deployed on water (such as ships, etc.), and can also be deployed on In the air (eg on airplanes, balloons and satellites, etc.).
  • the terminal device may also be referred to as a user equipment (user equipment, UE), a terminal (terminal), or an electronic device, or the like.
  • the terminal device includes a handheld device with a wireless connection function, a vehicle-mounted device, and the like.
  • the terminal device may include: a mobile phone (mobile phone), a tablet computer, a notebook computer, a palmtop computer, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, pedometers, etc.), in-vehicle equipment (for example, cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed trains, etc.), virtual reality (VR) equipment, augmented reality (AR) equipment, industrial control Wireless terminals in (industrial control), smart home devices (such as refrigerators, TVs, air conditioners, electricity meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving, remote medical surgery ), wireless terminal equipment in smart grid, wireless terminal equipment in transportation safety, wireless terminal equipment in smart city, or wireless terminal equipment in smart home wireless terminal equipment, flying equipment (for example, intelligent robots, hot air balloons, drones, airplanes), etc.
  • a mobile phone mobile phone
  • a tablet computer for example, a tablet computer, a notebook computer, a palmtop computer
  • the terminal device is a terminal device that often works on the ground, such as a vehicle-mounted device.
  • chips deployed in the above-mentioned devices such as system-on-a-chip (SOC), baseband chips, etc., or other chips with communication functions, may also be referred to as terminal devices.
  • the terminal device may further include a wearable device.
  • Wearable devices can also be called wearable smart devices, which are the general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, 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 clothing or accessories. Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones.
  • the terminal device may further include a smart home device, and the smart home device may refer to various home devices applied in a smart home.
  • the smart home equipment can include smart anti-theft products such as smart locks.
  • the smart anti-theft products can coordinate with each other through various alarms and detectors to trigger alarm information in the deployed state, which plays a role in security and anti-theft. effect.
  • the smart home device may also include smart lighting products such as smart lights, and the user can easily view and control the switching status of the lighting products in the home directly through terminal devices such as mobile phones and tablet computers.
  • the smart home device may also include home appliance control products such as a smart home appliance controller.
  • the home appliance control product can associate infrared wireless signals to control any device using an infrared remote control through a terminal device, such as TV, air conditioner, electric curtain, etc.
  • a terminal device such as TV, air conditioner, electric curtain, etc.
  • the smart home device can also include an air quality sensor. Users can conveniently 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 equipment in the home to improve the indoor environment. Provide users with better enjoyment.
  • the smart home device can also include a mobile phone smart door lock. Users only need to take out terminal devices such as mobile phones and tablet computers and enter a password to realize automatic unlocking. At the same time, users can also remotely unlock for family members or visitors.
  • an application that can be used to select and control various smart home devices is installed in the user's mobile phone, the user's smart TV and the mobile phone are both connected to the same network, and the user can select in the app.
  • the control interface of the smart TV for example, the control interface includes multiple buttons such as power on, power off, volume +, volume -, next program and previous program, then the user can click the power on or power off button to turn on or off the Smart TV, or click the volume + or volume - button to increase or decrease the playback volume of the smart TV, or click the button of the next program or the previous program to switch the playing program, etc.
  • FIG. 1 is a schematic structural diagram of a communication system provided by 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 .
  • the credential server 101 may refer to a server responsible for related services such as issuance and management of credential information of terminal devices.
  • the credential server 101 may be provided by the manufacturer of the terminal device.
  • the cloud server 102 may refer to a server used to provide cloud services for the terminal device.
  • the cloud server 102 may be provided by the manufacturer of the terminal device or provided by a third party.
  • the cloud server 102 may be used to forward the certificate server 101 to the terminal device as the terminal Device-assigned or generated device-activation credentials.
  • the first terminal device 103 and the second terminal device 104 are both terminal devices, which can communicate with the cloud server 102 , and communicate with the credential server 101 through the cloud server 102 .
  • both the first terminal device 103 and the second terminal device 104 may be the terminal devices described above.
  • the terminal device may be divided into a first terminal device 103 and a 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 .
  • 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
  • the first terminal device 103 may be a smart home device installed with a smart home application (application, app).
  • the first terminal device 103 can 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 devices in the home, and the smart home app can be installed on the terminal device.
  • the smart home app may be an app installed by the first terminal device 103 when it leaves the factory, or may be an app downloaded by the user from the network or acquired and installed from other devices during the use of the first terminal device 103 .
  • FIG. 2 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application, and the method can be applied to a scene of programming anti-counterfeiting information of a terminal device.
  • the method can be applied to the communication system shown in FIG. 1 , and the method includes the following steps.
  • the cloud server obtains a root key and a device activation certificate from a certificate server, where the root key is used to encrypt anti-counterfeiting information of the terminal device, and the anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation certificate.
  • UUID universally unique identifier
  • the UUID of the terminal device can be used to uniquely identify the terminal device
  • the device activation certificate (also referred to as manufacturer identification information) of the terminal device can refer to the identification information of the manufacturer that produces the terminal device
  • the device activation certificate can be Used to identify the legitimacy of the terminal device, for example, the device activation credential may be the manufacturer's certificate or software token or the like.
  • the cloud server may request the credential server for the device activation credential and root key (ROT) of the terminal device.
  • the cloud server may send request information to the credential server, and the request The information may carry the identification of the terminal device and be used to request the device activation credential and root key of the terminal device.
  • 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.
  • the cloud server receives the device activation certificate and the root key
  • the cloud server can assign a UUID to the terminal device, and bind the UUID to the device activation certificate.
  • the cloud server may send the information of binding the UUID and the device activation certificate to the certificate server, and the certificate server may store the information when receiving the bound information.
  • S202 The cloud server encrypts the UUID and the device activation certificate according to the root key to obtain encrypted information.
  • 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 Encrypting the UUID to obtain the ciphertext of the UUID, and encrypting the device activation credential with the root key to obtain the ciphertext of the device activation credential, the ciphertext of the UUID and the ciphertext of the device activation credential are encrypted information.
  • the cloud server may also take the UUID and the device activation certificate as a whole, and encrypt the whole information with the root key to obtain the ciphertext of the whole information, and the cipher text of the whole information is the encrypted information.
  • the cloud server when the cloud server uses the root key to encrypt the UUID and the device activation certificate, the cloud server can directly use the root key for encryption, or can use a derived key of the root key for encryption.
  • a key derived from the key may be a key generated based on the root key.
  • the root key is key 1
  • the derived key can be the key obtained after key 1 is cyclically shifted, or the key obtained after the AND operation between key 1 and a certain fixed value, etc. This embodiment of the present application does not specifically limit this.
  • S203 The cloud server steganographically writes the first root key into the image, and embeds the image into the two-dimensional code of the device, where the first root key is a partial key of the root key.
  • the root key may include two parts, the first part may be referred to as the first root key, and the second part may be referred to as the second root key.
  • the two parts included in the root key may be obtained by dividing the cloud server according to the root key dividing rule, and the root key dividing rule may be preset.
  • the root key is an 8-bit binary
  • the first root key may be the first four binary digits of the 8-bit binary
  • the second root key may be the last four binary of the 8-bit binary.
  • the image of the steganographic first root key may be a random image or an image related to the terminal device.
  • the image of the steganographic first root key may be an image of the logo of the manufacturer producing the terminal device.
  • the image of the steganographic first root key can also be specified by the manufacturer of the terminal device. This embodiment of the present application does not specifically limit the image for steganographically writing the first root key.
  • the device two-dimensional code can be a two-dimensional code generated based on the hardware information of the terminal device, for example, the hardware information can include the media access control (media access control, MAC) address and device serial number of the terminal device. Wait.
  • the device QR code can be generated by the cloud server, or generated by other devices and sent to the cloud server.
  • the cloud server may divide the root key into a first root key and a second root key according to the above root key division rule.
  • the cloud server can use data steganography technology to steganographic the first root key into the image, and generate a device QR code based on the hardware information of the terminal device, and then embed the image with the first root key steganographic into the image.
  • the image with the first key steganographic does not affect the normal reading of the two-dimensional code of the device.
  • FIG. 3 a schematic diagram of a device two-dimensional code provided by an embodiment of the present application, an image in which the first root key is steganographically written may be embedded in the middle area of the device two-dimensional code.
  • the cloud server sends the device two-dimensional code, the second root key and the encrypted information to the terminal device, so that the device two-dimensional code is printed on the body of the terminal device, the second root key and the encrypted information Information is stored in the terminal device.
  • the cloud server can send the device QR code, the second root key and the encrypted information to the terminal device .
  • the cloud server may send all the above information to the terminal device at one time; or, the cloud server sends the above information to the terminal device multiple times, and only sends part of the above information each time.
  • the cloud server sends the QR code of the device to the terminal device when it is sent for the first time, and sends the second root key and the encrypted information to the terminal device when it is sent for the second time.
  • the manufacturer of the terminal device can print the two-dimensional code of the device on the body (for example, the casing) of the terminal device,
  • the second root key and the encrypted information are written into the terminal device by means of hard coding, for example, the second root key and the encrypted information are written into the code segment of the terminal device.
  • the root key used to encrypt the anti-counterfeiting information of the terminal device may be divided into a first root key and a second root key, and the first root key is hidden Written in the image and embedded in the device QR code printed on the body of the terminal device, the second root key is stored in the terminal device, so that by dispersing the root key in different locations of the terminal device, The security of the root key is improved, and the difficulty of cracking the root key by illegal elements is increased, thereby greatly reducing the risk of forging the terminal device.
  • FIG. 4 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application, and the method can be applied to an activation scenario of anti-counterfeiting information of a terminal device.
  • the method can be applied to the communication system shown in FIG. 1 , and the method includes the following steps.
  • the first terminal device scans and parses the device two-dimensional code of the second terminal device to obtain the first root key.
  • the two-dimensional code of the device may be located on the body (for example, the casing) of the second terminal device, and the two-dimensional code of the device may be generated based on hardware information (for example, MAC address and device serial number, etc.) of the second terminal device QR code.
  • An image may be embedded in the two-dimensional code of the device, the first key may be steganographied in the image, and the embedding of the image will not affect the normal reading of the two-dimensional code of the device.
  • the first terminal device may be installed with an app capable of parsing the key, and the app may refer to an app authorized by the manufacturer producing the second terminal device.
  • the user may log in to the app with a legal user account, and the user account may be The legal account applied by the user that can log in to the app.
  • the app may be a smart home app, and the smart home app may refer to a software program capable of selecting and controlling various home devices (eg, speakers, TVs, air conditioners, etc.) in the home.
  • FIG. 5 it is a schematic interface diagram of a smart home app installed on the first terminal device, and the name of the smart home app may be "My Home".
  • the user can enter the login interface of the smart home app as shown in (b) in Figure 5 by clicking the icon "My Home", and can successfully log in to the smart home app by entering the corresponding user name and password in the login interface.
  • (c) in Figure 5 is a schematic diagram of an interface after successful login, in which the temperature and humidity of the indoor environment can be displayed, as well as various household devices that have joined the network.
  • the household devices can include speakers, TVs, Air conditioners, washing machines, water heaters, etc., users can control the household equipment by selecting different household equipment.
  • the user can use the first terminal device to scan the device QR code of the second terminal device, for example, use the app's scan code
  • the function scans the device two-dimensional code of the second terminal device, thereby obtaining the first root key steganographically embedded in the image of the device two-dimensional code.
  • the user may also set the permission to use the app installed on the first terminal device.
  • the permission to use the app may include permission to parse keys, permission to access the network, permission to use the camera, permission to access the address book, and the like. For example, taking the app as "My Home" shown in Fig. 5 as an example, as shown in Fig.
  • Permissions can include multiple different permissions, such as access to the network, permission to use the camera, permission to parse keys, and permission to access the address book. Users can control the opening or closing of each permission by clicking the corresponding on or off button for each permission. closure.
  • the use authority of the app is the authority to open the parsing key
  • the app scans the device two-dimensional code of the second terminal device, it can parse and obtain the first root steganographic in the image embedded in the two-dimensional code of the device. key.
  • S302 The first terminal device sends the first root key to the second terminal device.
  • a wireless connection can be established and bound between the first terminal device and the second terminal device.
  • the wireless connection is a Bluetooth connection or a local area network connection.
  • the first terminal device parses and obtains the first root key, the first terminal device can The first root key is sent to the second terminal device via the wireless connection.
  • the second root key may be stored in the memory of the second terminal device, for example, the second root key may be stored in the code segment of the second terminal device.
  • the root key may refer to the root key issued by the network side.
  • the root key may include two parts, namely the first root key and the second root key. Specifically, the root key is divided into the first root key. The division rule of the key and the second root key may be set in advance.
  • the second terminal device can obtain the second root key from its own code segment, and when receiving the first root key sent by the first terminal device, the second terminal device can obtain the second root key according to the first root key and the first root key.
  • the second root key determines the root key.
  • the second terminal device may perform corresponding combination processing on the first root key and the second root key based on the division rule of the first root key and the second root key. , to get the root key.
  • the second terminal device uses the root key to decrypt the encrypted information to obtain anti-counterfeiting information, where the anti-counterfeiting information includes a UUID and a device activation certificate.
  • the UUID and the device activation certificate may be stored in the second terminal device before the second terminal device leaves the factory by the manufacturer producing the second terminal device.
  • the UUID may be used to uniquely identify the second terminal device
  • the device activation certificate also referred to as manufacturer identification information
  • the device activation certificate may refer to the identification information of the manufacturer producing the second terminal device
  • the device activation certificate may be used to identify the second terminal
  • the legitimacy of the device for example, the device activation certificate may be the manufacturer's certificate or software token.
  • the encrypted information may be ciphertext encrypted by the anti-counterfeiting information
  • the anti-counterfeiting information may refer to information used to identify the legitimacy of the second terminal device.
  • the encrypted information may include the ciphertext encrypted by the UUID and the ciphertext encrypted by the device activation credential.
  • the second The terminal device can use the root key to decrypt the ciphertext encrypted by the UUID and the ciphertext encrypted by the device activation credential, respectively, to obtain the plaintext of the UUID and the plaintext of the device activation credential, that is, to obtain the UUID and the device activation credential. certificate.
  • the encrypted information When the encrypted information is obtained by encrypting the UUID and the device activation certificate in the anti-counterfeiting information as a whole, the encrypted information includes the encrypted ciphertext of the whole information, and the second terminal device can use the root key to decrypt
  • the encrypted ciphertext of the overall information is obtained 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.
  • the second terminal device can directly use the root key to decrypt the encrypted information;
  • the second terminal device can generate a derived key of the root key according to the same method on the network side, and use the derived key to decrypt the encrypted information.
  • the second terminal device sends the UUID and the device activation certificate to the certificate server through the cloud server, so as to complete the activation of the second terminal device.
  • the second terminal device may establish a secure connection with the cloud server, so that the second terminal device may 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 may communicate with the credential server through the cloud server.
  • the second terminal device may send the UUID and the device activation credential to the cloud server.
  • the cloud server receives the UUID and the device activation credential
  • the cloud server can check whether the UUID is registered. If the UUID is not registered, the cloud server can forward the UUID and the device activation certificate to the certificate server; if the UUID is 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.
  • 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 by itself.
  • the credential server can determine that the second terminal device is a legitimate device, that is, the second terminal device is successfully activated; when the detection result of the credential server is a mismatch, the credential server can determine that the second terminal device is a Invalid device, that is, the activation of the second terminal device is unsuccessful.
  • the certificate server may also generate a new software token for the second terminal device, and send the new software token to the cloud.
  • the credential server may also store the new software token as a device activation credential bound to the UUID of the second terminal device.
  • 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.
  • the second terminal device 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 password.
  • key segment 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, the first root key The key and the new second root key constitute the updated root key.
  • ROT1 the random number information is rand
  • ROT2' the new second root key
  • ROT2' encROT1(rand
  • means OR operation.
  • 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 determine the root key for decrypting the anti-counterfeiting information of the second terminal device according to the root key and the second root key, 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
  • the UUID and the device activation credential may be sent to the network side to complete the activation of the second terminal device.
  • 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 steganographic in the image and embedded in the image printed on the second terminal device
  • the second root key is stored in the second terminal device, so that the security of the root key is improved by dispersing the root key in different locations of the second terminal device, This increases the difficulty for illegal elements to decipher the root key, thereby greatly reducing the risk of forging the second terminal device.
  • each network element such as a terminal
  • each network element includes corresponding hardware structures and/or software modules for performing each function.
  • the present application can be implemented in the form of hardware, software or a combination of hardware and machine software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • the terminal may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation. The following description will be given by taking as an example that each function module is divided corresponding to each function.
  • FIG. 7 shows a schematic structural diagram of a device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of a cloud server in the method provided by the embodiment of the present application.
  • the device may be a cloud server or a device that can support the cloud server to implement the functions of the cloud server in the embodiments of the present application, for example, the device is a chip system applied in the cloud server.
  • the apparatus includes: a receiving unit 401 , a processing unit 402 and a sending unit 403 .
  • the sending unit 403 may be configured to support the apparatus to perform S204 in the foregoing method embodiments. All relevant contents of the steps involved in the foregoing method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the receiving unit 401 in this 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.
  • the receiving unit 401 and the sending unit 403 may be a cloud server or a communication interface applied to a chip system in the cloud server.
  • the communication interface may be a transceiver circuit
  • the processing unit 402 may be integrated in the cloud server or applied to the cloud server.
  • the processor of the system-on-a-chip in the cloud server may be a cloud server or a communication interface applied to a chip system in the cloud server.
  • FIG. 8 is a schematic diagram of a possible logical structure of the device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of the cloud server in the method provided by the embodiment of the present application.
  • the apparatus may be a cloud server or a chip system applied in the cloud server, and the apparatus includes: a processor 412 and a communication interface 413 .
  • the processor 412 is configured to control and manage the actions of the device, for example, the processor 412 is configured to execute the steps of processing messages or data on the device side.
  • the apparatus is supported to perform steps S201 to S204 in the above-described method embodiments, and/or other processes for the techniques described herein.
  • the communication interface 413 is used to support the device to communicate with other network elements.
  • the apparatus may further include a memory 411 for storing program codes and data of the apparatus.
  • the processor 412 may be a processor or a controller, such as 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 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of the embodiments of this application.
  • a processor may also be a combination that performs computing functions, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the communication interface 412 may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the memory 411 may be a high-speed random access memory or a non-volatile memory or the like.
  • the communication interface 413, the processor 412 and the memory 411 are connected to each other through a bus 414; the bus 414 may be a PCI bus or an EISA bus or the like.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 8, 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 codes and data of the device.
  • the communication interface 413 is used to support the apparatus to communicate with other devices, and the processor 412 is used to enable the apparatus to execute program codes stored in the memory 411 to implement the steps in the methods provided by the embodiments of this application.
  • the memory 411 may be included in the processor 412 .
  • FIG. 9 shows a schematic structural diagram of a device anti-counterfeiting device involved in the above embodiment, and the device can implement the functions of the terminal device in the method provided by the embodiment of the present application.
  • the apparatus may be a terminal device or a device that can support the terminal device to implement the functions of the terminal device in the embodiments of the present application, for example, the device is a chip system applied in the terminal device.
  • the apparatus includes: a receiving unit 501 , a processing unit 502 and a sending unit 503 .
  • the receiving unit 501 may be used to support the apparatus to perform the step of receiving the first root key sent by S302 in the above method embodiment; the processing unit 502 may be used to support the apparatus to perform S303 and S304 in the above method embodiments, and the sending unit 503 may be used to support the apparatus to perform the step of sending the updated second root key in the above method embodiments.
  • the processing unit 502 is used to support the apparatus to perform S301 in the above method embodiments; the sending unit 503 may be used to support the apparatus to perform the above method embodiments in S302. All relevant contents of the steps involved in the foregoing method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the receiving unit 501 in this 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.
  • the receiving unit 501 and the sending unit 503 may be a terminal device or a communication interface applied to a chip system in the terminal device.
  • the communication interface may be a transceiver circuit
  • the processing unit 502 may be integrated in the terminal device or applied to the terminal device. on the processor of the system-on-a-chip in the terminal device.
  • FIG. 10 shows a schematic diagram of a possible logical structure of the device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of the terminal device in the method provided by the embodiment of the present application.
  • the apparatus may be a terminal device or a chip system applied in the terminal device, and the apparatus includes: a processor 512 and a communication interface 513 .
  • the processor 512 is configured to control and manage the actions of the device. For example, the processor 512 is configured to execute the steps of processing messages or data on the device side.
  • the processor 512 may support the apparatus to perform steps S303 and S304 in the above method embodiments, and/or be used for the techniques described herein other processes; when the apparatus is used to implement the function of the first terminal device in the above method embodiment, the processor 512 may support the apparatus to perform step S301 in the above method embodiment.
  • the communication interface 513 is used to support the device to communicate with other network elements.
  • the apparatus may further include a memory 511 for storing program codes and data of the apparatus.
  • the processor 512 may be a processor or a controller, such as 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 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of the embodiments of this application.
  • a processor may also be a combination that performs computing functions, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the communication interface 512 may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the memory 511 may be a high-speed random access memory or a non-volatile memory or the like.
  • the communication interface 513, the processor 512 and the memory 511 are connected to each other through a bus 514; the bus 514 may be a PCI bus or an EISA bus or the like.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 10, 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 codes and data of the device.
  • the communication interface 513 is used for supporting the apparatus to communicate with other devices, and the processor 512 is used for enabling the apparatus to execute program codes stored in the memory 511 to implement the steps in the methods provided by the embodiments of the present application.
  • the memory 511 may be included in the processor 512 .
  • an embodiment of the present application further provides a communication system, which includes a credential server, a first terminal device and a second terminal device of a cloud server; wherein the cloud server is the cloud server provided in FIG. 7 or FIG. 8, and is used for executing The function of the cloud server in the method embodiment of the present application; the second terminal device is the terminal device provided in FIG. 9 or FIG. 10 , which is used to execute the function of the second terminal device in the method embodiment of the present application; the first terminal device is FIG. 9 Or the terminal device provided in FIG. 10 is configured to execute the function of the first terminal device in the method embodiment of the present application.
  • the cloud server is the cloud server provided in FIG. 7 or FIG. 8, and is used for executing The function of the cloud server in the method embodiment of the present application
  • the second terminal device is the terminal device provided in FIG. 9 or FIG. 10 , which is used to execute the function of the second terminal device in the method embodiment of the present application
  • the first terminal device is FIG. 9
  • the terminal device provided in FIG. 10 is
  • 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, and the first root key is steganographically written in the image and embedded in the printed In the device two-dimensional code of the terminal device body, the second root key is stored in the terminal device, so that the root key is distributed and stored in different locations of the terminal device, the security of the root key is improved, and the It is difficult for illegal elements to crack the root key, thereby greatly reducing the risk of counterfeiting terminal equipment.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented in 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, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, network appliance, or other programmable apparatus.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available media that can be accessed by a computer, or a data storage device such as a server, data center, etc. that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs)), or semiconductor media (eg, SSDs), and the like.
  • the embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the operation of the terminal in the foregoing method embodiments. one or more steps.
  • Embodiments of the present application also provide a computer program product containing instructions, which, when run on a computer, cause the computer to execute one or more steps of the terminal in the foregoing method embodiments.

Abstract

A method and apparatus for device anti-counterfeiting, relating to the technical field of communications. The present invention is used for improving the security of anti-counterfeiting information of a terminal device, and reducing the risk that the terminal device is counterfeited. The method comprises: a cloud server obtains a root key and a device activation certificate from a certificate server, the root key being used for encrypting the anti-counterfeiting information of the terminal device, and the anti-counterfeiting information comprising a UUID and the device activation certificate (S201); the cloud server encrypts the UUID and the device activation certificate according to the root key to obtain encryption information (S202); the cloud server performs steganography of a first root key to a device QR code of the terminal device, the first root key being a partial key of the root key (S203); and the cloud server sends the device QR code, a second root key and the encryption information, the second root key and the first root key constituting the root key.

Description

一种设备防伪方法及装置Device anti-counterfeiting method and device
本申请要求于2020年06月29日提交国家知识产权局、申请号为202010603829.6、申请名称为“一种设备防伪方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010603829.6 and the application title "An Equipment Anti-counterfeiting Method and Device", which was submitted to the State Intellectual Property Office on June 29, 2020, the entire contents of which are incorporated into this application by reference middle.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种设备防伪方法及装置。The present application relates to the field of communication technologies, and in particular, to a device anti-counterfeiting method and device.
背景技术Background technique
随着物联网时代的到来,海量的中的终端设备被接入到网络中,比如,智能电视、智能空调、智能冰箱、智能摄像头、智能音箱、智能插座和智能灯具等。为了保证终端设备的合法性和网络安全性,通常设备生产厂商会在终端设备的初始化阶段激活终端设备的防伪能力,后续当终端设备接入网络时可以通过防伪认证来验证终端设备的合法性。目前,对于存储空间较小的终端设备,通常采用内置的设备激活凭证来实现终端设备的防伪验证,该设备激活凭证采用硬编码方式生成的密钥来加密。但是,采用硬编码方式生成的密钥很容易被不法分子通过逆向工程破解得到,并通过解密得到设备激活凭证,从而伪造终端设备,甚至劫持整个网络。因此,针对这种存储空间较小的终端设备的防伪能力部署成为影响整个网络安全的重要一环。With the advent of the Internet of Things era, a large number of terminal devices have been 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 the terminal device, the device manufacturer usually activates the anti-counterfeiting capability of the terminal device during the initialization stage of the terminal device. When the terminal device accesses the network, the legitimacy of the terminal device can be verified through anti-counterfeiting authentication. At present, for a terminal device with a small storage space, a built-in device activation certificate is usually used to realize the anti-counterfeiting verification of the terminal device, and the device activation certificate is encrypted by a key generated in a hard-coded manner. However, the keys generated by hard coding can easily be obtained by criminals through reverse engineering and decryption to obtain device activation credentials, thereby forging 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 that affects the security of the entire network.
发明内容SUMMARY OF THE INVENTION
本申请提供一种设备防伪方法及装置,用于提高终端设备的防伪信息的安全性,降低终端设备被伪造的风险。The present application provides a device anti-counterfeiting method and device, which are used to improve the security of anti-counterfeiting information of a terminal device and reduce the risk of the terminal device being forged.
为达到上述目的,本申请采用如下技术方案:To achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种设备防伪方法,该方法包括:云服务器从凭证服务器获取根密钥和设备激活凭证,该根密钥用于加密终端设备的防伪信息,该防伪信息包括通用唯一识别码UUID和该设备激活凭证,比如,该设备激活凭证可以为软件令牌或者证书;云服务器根据该根密钥加密该UUID和该设备激活凭证,得到加密信息;云服务器将第一根密钥隐写到该终端设备的设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),第一根密钥为该根密钥的部分密钥;云服务器发送该设备二维码、第二根密钥和该加密信息,第二根密钥为的根密钥的部分密钥且与第一根密钥构成根密钥,该设备二维码可被打印在该终端设备的机身,第二根密钥和加密信息用于存储在该终端设备中。In a first aspect, a device anti-counterfeiting method is provided, the method includes: a cloud server obtains a root key and a device activation certificate from a certificate server, the root key is used to encrypt anti-counterfeiting information of a terminal device, and the anti-counterfeiting information includes a universal unique identification code UUID and the device activation certificate, for example, the device activation certificate can be a software token or certificate; the cloud server encrypts the UUID and the device activation certificate according to the root key to obtain encrypted information; the cloud server hides the first root key Write it into the device QR code of the terminal device (for example, the device QR code is embedded with an image, and the first root key is steganographically written in the image), and the first root key is the partial encryption of the root key. key; the cloud server sends the device QR code, the second root key and the encrypted information, the second root key is a partial key of the root key and forms a root key with the first root key, the device two The dimensional code can be printed on the body of the terminal device, and the second root key and encrypted information are used for storage in the terminal device.
上述技术方案中,用于加密该终端设备的防伪信息的根密钥可以被划分为第一根密钥和第二根密钥,第一根密钥被隐写在终端设备机身的设备二维码中,第二根密钥被存储在该终端设备中,从而通过将该根密钥分散存放在该终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造该终端设备的风险。In the above technical solution, 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, and the first root key is steganographically written in the device 2 of the terminal device body. In the dimensional code, the second root key is stored in the terminal device, thereby improving the security of the root key by storing the root key in different locations of the terminal device, and increasing the ability of illegal elements to crack the root key. The difficulty of the key, thereby greatly reducing the risk of forging the terminal device.
在第一方面的一种可能的实现方式中,云服务器根据该根密钥加密该UUID和该设备激活凭证,得到加密信息,包括:云服务器直接使用该根密钥加密该UUID和该 设备激活凭证,得到加密信息;或者,云服务器使用该根密钥的衍生密钥加密该UUID和该设备激活凭证,得到加密信息。上述可能的实现方式,云服务器可以直接使用该根密钥或者使用该根密钥的衍生密钥加密该UUID和该设备激活凭证,从而提高了云服务器使用该根密钥的灵活性;此外,使用该根密钥的衍生密钥加密时还可以进一步提高加密信息的安全性。In a possible implementation manner 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 encrypts the UUID and the device activation certificate by using the root key certificate to obtain encrypted information; or, the cloud server encrypts the UUID and the device activation certificate using a key derived from the root key to obtain encrypted information. In the above possible implementation manner, the cloud server can directly use the root key or use the 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 encrypted using a key derived from the root key.
在第一方面的一种可能的实现方式中,该方法还包括:云服务器根据该终端设备的硬件信息生成设备二维码,该硬件信息包括媒体介入控制MAC地址和/或设备序列号。上述可能的实现方式,用户可以通过扫描该设备二维码得到该终端设备的硬件信息,从而提高用户获知该终端设备的硬件信息的便利性,从而提高用户体验。In a possible implementation manner of the first aspect, the method further includes: the cloud server generates a device two-dimensional code according to hardware information of the terminal device, where the hardware information includes a media intervention control MAC address and/or a device serial number. In the above possible implementation manner, the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
在第一方面的一种可能的实现方式中,该设备激活凭证为软件令牌或者证书。上述可能的实现方式,可以支持通过软件令牌或者证书作为设备激活凭证的终端设备的设备防伪。In a possible implementation manner of the first aspect, the device activation credential is a software token or a certificate. The above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
在第一方面的一种可能的实现方式中,该终端设备为智能家居设备。上述可能的实现方式,可以提高智能家居设备的防伪信息的安全性,降低终端设备被伪造的风险。In a possible implementation manner of the first aspect, the terminal device is a smart home device. The above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
第二方面,提供一种设备防伪方法,该方法包括:第二终端设备接收来自第一终端设备的第一根密钥,第一根密钥隐写在第二终端设备的设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),该设备二维码可被打印在第二终端设备的机身;第二终端设备根据第一根密钥和自身存储的第二根密钥确定根密钥;第二终端设备使用该根密钥解密第二终端设备的防伪信息对应的加密信息以得到该防伪信息,该防伪信息包括通用唯一识别码UUID和设备激活凭证;第二终端设备根据该UUID和设备激活凭证激活第二终端设备。In a second aspect, a device anti-counterfeiting method is provided. The method includes: a second terminal device receives a first root key from a first terminal device, and the first root key is steganographically written in a device two-dimensional code of the second terminal device (For example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; The root key and the second root key stored by itself determine the root key; the second terminal device uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device to obtain the anti-counterfeiting information, and the anti-counterfeiting information includes universal unique The identification code UUID and the device activation certificate; the second terminal device activates the second terminal device according to the UUID and the device activation certificate.
上述技术方案中,用于加密第二终端设备的防伪信息的根密钥可以被划分为第一根密钥和第二根密钥,第一根密钥被隐写在第二终端设备机身的设备二维码中,第二根密钥被存储在第二终端设备中,从而通过将该根密钥分散存放在第二终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造第二终端设备的风险。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, and the first root key is steganographically written on the body of the second terminal device. In the two-dimensional code of the device, the second root key is stored in the second terminal device, so that the root key is stored in different locations of the second terminal device, the security of the root key is improved, and the It is difficult for illegal elements to crack the root key, thereby greatly reducing the risk of forging the second terminal device.
在第二方面的一种可能的实现方式中,该方法还包括:当满足预设更新条件时,第二终端设备使用第一根密钥更新第二根密钥;可选的,预设更新条件包括以下至少一项:第二终端设备系统重置,第二终端设备恢复出厂设置,第二终端设备接收到新的设备激活凭证。上述可能的实现方式,可以由第二终端设备更新第二根密钥,以保证第二根密钥的有效性和安全性,从而提高该根密钥的安全性。In a possible implementation manner 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, preset update The conditions include at least one of the following: the system of the second terminal device is reset, the second terminal device is restored to factory settings, and the second terminal device receives a new device activation credential. In the above possible implementation manner, the second root key may be updated by the second terminal device to ensure the validity and security of the second root key, thereby improving the security of the root key.
在第二方面的一种可能的实现方式中,该方法还包括:第二终端设备向云服务器发送第二根密钥。上述可能的实现方式,可以保证云服务器获取到安全、有效的第二根密钥。In a possible implementation manner 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 manners can ensure that the cloud server obtains a safe and effective second root key.
在第二方面的一种可能的实现方式中,该设备二维码是基于第二终端设备的硬件信息生成的,硬件信息包括媒体介入控制MAC地址和/或设备序列号。上述可能的实现方式,用户可以通过扫描该设备二维码得到该终端设备的硬件信息,从而提高用户获知该终端设备的硬件信息的便利性,从而提高用户体验。In a possible implementation manner of the second aspect, the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number. In the above possible implementation manner, the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
在第二方面的一种可能的实现方式中,第二终端设备使用该根密钥解密第二终端 设备的防伪信息对应的加密信息,包括:第二终端设备直接使用该根密钥解密第二终端设备的防伪信息对应的加密信息;或者,第二终端设备直接使用该根密钥的衍生密钥解密第二终端设备的防伪信息对应的加密信息。上述可能的实现方式,第二终端设备可以直接使用该根密钥或者使用该根密钥的衍生密钥解密该UUID和该设备激活凭证,从而提高了第二终端设备使用该根密钥的灵活性;此外,使用该根密钥的衍生密钥解密时还可以进一步提高加密信息的安全性。In a possible implementation manner 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 decrypts the second terminal device by using the root key The encrypted information corresponding to the anti-counterfeiting information of the terminal device; or, the second terminal device directly decrypts the encrypted information corresponding to the anti-counterfeiting information of the second terminal device using the derived key of the root key. In the above possible implementation manner, the second terminal device can directly use the root key or use 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 encrypted information can be further improved when decrypting with a key derived from the root key.
在第二方面的一种可能的实现方式中,该设备激活凭证为软件令牌或者证书。上述可能的实现方式,可以支持通过软件令牌或者证书作为设备激活凭证的终端设备的设备防伪。In a possible implementation manner of the second aspect, the device activation credential is a software token or a certificate. The above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
在第二方面的一种可能的实现方式中,第二终端设备为智能家居设备。上述可能的实现方式,可以提高智能家居设备的防伪信息的安全性,降低终端设备被伪造的风险。In a possible implementation manner of the second aspect, the second terminal device is a smart home device. The above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
第三方面,提供一种设备防伪方法,该方法包括:第一终端设备扫描第二终端设备的设备二维码,得到第一根密钥,第一根密钥隐写在设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),该设备二维码可以被打印在第二终端设备的机身;第一终端设备向第二终端设备发送第一根密钥,第一根密钥和存储在第二终端设备中的第二根密钥构成根密钥,该根密钥用于解密第二终端设备的防伪信息对应的加密信息,该防伪信息包括通用唯一识别码UUID和设备激活凭证。In a third aspect, a device anti-counterfeiting method is provided, the method comprising: a first terminal device scans a device two-dimensional code of a second terminal device to obtain a first root key, and the first root key is steganographically written in the device two-dimensional code (For example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the first terminal device communicates to the second terminal device. The terminal device sends the first root key, the first root key and the second root key stored in the second terminal device constitute the root key, and the root key is used to decrypt the encryption corresponding to the anti-counterfeiting information of the second terminal device information, the anti-counterfeiting information includes UUID and device activation certificate.
上述技术方案中,用于加密第二终端设备的防伪信息的根密钥可以被划分为第一根密钥和第二根密钥,第一根密钥被隐写在第二终端设备的设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),第二根密钥被存储在第二终端设备中,从而通过将该根密钥分散存放在第二终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造第二终端设备的风险。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, and the first root key is steganographically written in the device of the second terminal device. In the two-dimensional code (for example, an image is embedded in the two-dimensional code of the device, and the first root key is steganographically written in the image), the second root key is stored in the second terminal device, so that by using the root key The key is distributed in different locations of the second terminal device, which improves the security of the root key, increases the difficulty for illegal elements to decipher the root key, and greatly reduces the risk of forging the second terminal device.
在第三方面的一种可能的实现方式中,该设备二维码是基于第二终端设备的硬件信息生成的,硬件信息包括媒体介入控制MAC地址和/或设备序列号。上述可能的实现方式,用户可以通过扫描该设备二维码得到该终端设备的硬件信息,从而提高用户获知该终端设备的硬件信息的便利性,从而提高用户体验。In a possible implementation manner of the third aspect, the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number. In the above possible implementation manner, the user can obtain the hardware information of the terminal device by scanning the two-dimensional code of the device, thereby improving the convenience for the user to know the hardware information of the terminal device, thereby improving the user experience.
在第三方面的一种可能的实现方式中,第二根密钥和加密信息存储在第二终端设备中。In a possible implementation manner of the third aspect, the second root key and the encrypted information are stored in the second terminal device.
在第三方面的一种可能的实现方式中,该设备激活凭证为软件令牌或者证书。上述可能的实现方式,可以提高智能家居设备的防伪信息的安全性,降低终端设备被伪造的风险。In a possible implementation manner of the third aspect, the device activation credential is a software token or a certificate. The above possible implementation manners can improve the security of the anti-counterfeiting information of the smart home device and reduce the risk of the terminal device being forged.
在第三方面的一种可能的实现方式中,第二终端设备为智能家居设备。上述可能的实现方式,可以支持通过软件令牌或者证书作为设备激活凭证的终端设备的设备防伪。In a possible implementation manner of the third aspect, the second terminal device is a smart home device. The above-mentioned possible implementation manners can support device anti-counterfeiting of terminal devices that use software tokens or certificates as device activation credentials.
第四方面,提供一种设备防伪方法,该方法应用于包括凭证服务器、云服务器、第一终端设备和第二终端设备的通信系统中;其中,该凭证服务器可用于为第二终端设备分配根密钥和设备激活凭证;云服务器可用于执行第一方面或者第一方面的任一 种可能的实现方式所提供的方法;第二终端设备可用于执行第二方面或者第二方面的任一种可能的实现方式所提供的方法;第一终端设备可用于执行第三方面或者第三方面的任一种可能的实现方式所提供的方法。In a fourth aspect, a device anti-counterfeiting method is provided, and the method is applied in 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 assign a root to the second terminal device The key and the device activation certificate; the cloud server can be used to execute the method provided by the first aspect or any possible implementation manner of the first aspect; the second terminal device can be used to execute the second aspect or any one of the second aspect The method provided by a possible implementation manner; the first terminal device can be used to execute the method provided by the third aspect or any possible implementation manner of the third aspect.
第五方面,提供一种设备防伪装置,该装置作为云服务器,包括:接收单元,用于从凭证服务器获取根密钥和设备激活凭证,该根密钥用于加密终端设备的防伪信息,该防伪信息包括通用唯一识别码UUID和设备激活凭证;处理单元,用于根据根密钥加密UUID和设备激活凭证,得到加密信息;处理单元,还用于将第一根密钥隐写到终端设备的设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),第一根密钥为根密钥的部分密钥,该设备二维码可以被打印在该终端设备的机身;发送单元,用于发送设备二维码、第二根密钥和加密信息,第二根密钥为根密钥的部分密钥且与第一根密钥构成根密钥。In a fifth aspect, a device anti-counterfeiting device is provided. As a cloud server, the device includes: a receiving unit configured to obtain a root key and a device activation certificate from a certificate server, where the root key is used to encrypt anti-counterfeiting information of a terminal device, the The anti-counterfeiting information includes the universal unique identification code UUID and the device activation certificate; the processing unit is used to encrypt the UUID and the device activation certificate according to the root key to obtain encrypted information; the processing unit is also used to steganographically write the first root key to the terminal device In the device QR code of the device (for example, the device QR code is embedded with an image, and the first root key is steganographically written in the image), the first root key is a partial key of the root key, and the device QR code The code can be printed on the body of the terminal device; the sending unit is used to send the device two-dimensional code, the second root key and encrypted information, and the second root key is a partial key of the root key and is the same as the first root key. The key constitutes the root key.
在第五方面的一种可能的实现方式中,第二根密钥和加密信息存储在该终端设备中。In a possible implementation manner of the fifth aspect, the second root key and encrypted information are stored in the terminal device.
在第五方面的一种可能的实现方式中,处理单元还用于:直接使用根密钥加密UUID和设备激活凭证,得到加密信息;或者,使用根密钥的衍生密钥加密UUID和设备激活凭证,得到加密信息。In a possible implementation manner of the fifth aspect, the processing unit is further configured to: directly encrypt the UUID and the device activation credential by using the root key to obtain encrypted information; or, encrypt the UUID and the device activation using a key derived from the root key Credentials to get encrypted information.
在第五方面的一种可能的实现方式中,处理单元还用于:根据终端设备的硬件信息生成设备二维码,硬件信息包括媒体介入控制MAC地址和/或设备序列号。In a possible implementation manner of the fifth aspect, the processing unit is further configured to: generate a device two-dimensional code according to hardware information of the terminal device, where the hardware information includes a media intervention control MAC address and/or a device serial number.
第六方面,提供一种设备防伪装置,该装置包括:接收单元,用于接收来自第一终端设备的第一根密钥,第一根密钥隐写在第二终端设备的设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),该设备二维码可以被打印在第二终端设备的机身;处理单元,用于根据第一根密钥和自身存储的第二根密钥确定根密钥;处理单元,还用于根据根密钥解密第二终端设备的防伪信息对应的加密信息得到防伪信息,该防伪信息包括通用唯一识别码UUID和设备激活凭证,比如,该设备激活凭证为软件令牌或者证书;处理单元,还用于根据UUID和设备激活凭证激活第二终端设备。In a sixth aspect, a device anti-counterfeiting device is provided, the device comprising: a receiving unit configured to receive a first root key from a first terminal device, where the first root key is steganographically written in a device two-dimensional code of the second terminal device (for example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the processing unit is used to The first root key and the second root key stored by itself determine the root key; the processing unit is further configured to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device according to the root key to obtain anti-counterfeiting information, where the anti-counterfeiting information includes general The unique identification code UUID and the device activation certificate, for example, the device activation certificate is a software token or certificate; the processing unit is further configured to activate the second terminal device according to the UUID and the device activation certificate.
在第六方面的一种可能的实现方式中,处理单元还用于:当满足预设更新条件时,第二终端设备根据第一根密钥更新第二根密钥。In a possible implementation manner of the sixth aspect, the processing unit is further configured to: when a preset update condition is satisfied, the second terminal device updates the second root key according to the first root key.
在第六方面的一种可能的实现方式中,该装置还包括:发送单元,用于向云服务器发送第二根密钥。In a possible implementation manner of the sixth aspect, the apparatus further includes: a sending unit, configured to send the second root key to the cloud server.
在第六方面的一种可能的实现方式中,预设更新条件包括以下至少一项:第二终端设备系统重置,第二终端设备恢复出厂设置,第二终端设备接收到新的设备激活凭证。In a possible implementation manner of the sixth aspect, the preset update condition includes at least one of the following: system reset of the second terminal device, factory reset of the second terminal device, and receipt of a new device activation certificate by the second terminal device .
在第六方面的一种可能的实现方式中,设备二维码是基于第二终端设备的硬件信息生成的,硬件信息包括媒体介入控制MAC地址和/或设备序列号。In a possible implementation manner of the sixth aspect, the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
在第六方面的一种可能的实现方式中,处理单元还用于:直接使用根密钥解密第二终端设备的防伪信息对应的加密信息;或者,直接使用根密钥的衍生密钥解密第二终端设备的防伪信息对应的加密信息。In a possible implementation manner of the sixth aspect, the processing unit is further configured 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 first The encrypted information corresponding to the anti-counterfeiting information of the second terminal device.
第七方面,提供一种设备防伪装置,该装置包括:处理单元,用于扫描第二终端 设备的设备二维码,得到第一根密钥,第一根密钥隐写在设备二维码中(比如,该设备二维码中嵌入有图像,第一根密钥隐写在该图像中),该设备二维码可以被打印在第二终端设备的机身;发送单元,用于向第二终端设备发送第一根密钥,第一根密钥和存储在第二终端设备中的第二根密钥构成根密钥,根密钥用于解密第二终端设备的防伪信息对应的加密信息,防伪信息包括通用唯一识别码UUID和设备激活凭证。In a seventh aspect, a device anti-counterfeiting device is provided, the device comprising: a processing unit configured to scan a device two-dimensional code of a second terminal device to obtain a first root key, and the first root key is steganographically written in the device two-dimensional code (for example, an image is embedded in the two-dimensional code of the device, and the first key is steganographically written in the image), the two-dimensional code of the device can be printed on the body of the second terminal device; the sending unit is used to send The second terminal device sends the first root key, the first root key and the second root key stored in the second terminal device constitute the root key, and the root key is used to decrypt the corresponding anti-counterfeiting information of the second terminal device Encrypted information, anti-counterfeiting information includes UUID and device activation certificate.
在第七方面的一种可能的实现方式中,设备二维码是基于第二终端设备的硬件信息生成的,硬件信息包括媒体介入控制MAC地址和/或设备序列号。In a possible implementation manner of the seventh aspect, the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or a device serial number.
在第七方面的一种可能的实现方式中,第二根密钥和加密信息存储在第二终端设备中。In a possible implementation manner of the seventh aspect, the second root key and the encrypted information are stored in the second terminal device.
在第七方面的一种可能的实现方式中,设备激活凭证为软件令牌或者证书。In a possible implementation manner of the seventh aspect, the device activation credential is a software token or a certificate.
在第七方面的一种可能的实现方式中,第二终端设备为智能家居设备。In a possible implementation manner of the seventh aspect, the second terminal device is a smart home device.
在本申请的又一方面,提供一种设备防伪装置,该装置为云服务器或者内置于云服务器的芯片,该装置包括:存储器、以及与存储器耦合的处理器,存储器中存储代码和数据,处理器运行存储器中的代码使得该装置执行第一方面或第一方面的任一种可能的实现方式所提供的设备防伪方法。In another aspect of the present application, a device anti-counterfeiting device is provided, the device is a cloud server or a chip built into the cloud server, the device includes: a memory, and a processor coupled with the memory, the memory stores codes and data, and processes The code in the running memory of the processor causes the apparatus to execute the device anti-counterfeiting method provided by the first aspect or any possible implementation manner of the first aspect.
在本申请的又一方面,提供一种设备防伪装置,该装置为第二终端设备或者内置于第二终端设备的芯片,该装置包括:存储器、以及与存储器耦合的处理器,存储器中存储代码和数据,处理器运行存储器中的代码使得该装置执行第二方面或第二方面的任一种可能的实现方式所提供的设备防伪方法。In another aspect of the present application, a device anti-counterfeiting device is provided, the device is a second terminal device or a chip built in the second terminal device, the device includes: a memory and a processor coupled to the memory, the memory stores codes and data, the processor runs the code in the memory to cause the apparatus to execute the device anti-counterfeiting method provided by the second aspect or any possible implementation manner of the second aspect.
在本申请的又一方面,提供一种设备防伪装置,该装置为第一终端设备或者内置于第一终端设备的芯片,该装置包括:存储器、以及与存储器耦合的处理器,存储器中存储代码和数据,处理器运行存储器中的代码使得该装置执行第三方面或第三方面的任一种可能的实现方式所提供的设备防伪方法。In another aspect of the present application, a device anti-counterfeiting device is provided, the device is a first terminal device or a chip built in the first terminal device, the device includes: a memory, and a processor coupled to the memory, where codes are stored in the memory and data, the processor runs the code in the memory to cause the apparatus to execute the device anti-counterfeiting method provided by the third aspect or any possible implementation manner of the third aspect.
在本申请的又一方面,提供一种通信系统,该通信系统包括凭证服务器、云服务器第一终端设备和第二终端设备;其中,云服务器为上述任一方面提供的云服务器,用于执行第一方面或第一方面的任一种可能的实现方式所提供的方法;第二终端设备为上述任一方面提供的第二终端设备,用于执行第二方面或第二方面的任一种可能的实现方式所提供的方法;第一终端设备为上述任一方面提供的第一终端设备,用于执行第三方面或第三方面的任一种可能的实现方式所提供的方法。In yet another aspect of the present application, a communication system is provided, the communication system includes a credential server, a first terminal device of a cloud server, and a second terminal device; wherein the cloud server is the cloud server provided in any of the above aspects, and is used for executing The method provided by the first aspect or any possible implementation manner 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 second aspect or any one of the second aspects The method provided by a possible implementation manner; the first terminal device is the first terminal device provided in any of the foregoing aspects, and is configured to execute the third aspect or the method provided by any of the possible implementation manners of the third aspect.
在本申请的又一方面,提供一种可读存储介质,所述可读存储介质中存储有指令,当所述可读存储介质在设备上运行时,使得该设备执行上述第一方面至第三方面中的任一方面或者任一种可能的实现方式所提供方法。In yet another aspect of the present application, a readable storage medium is provided, and instructions are stored in the readable storage medium, and when the readable storage medium runs on a device, the device causes the device to perform the above-mentioned first to sixth aspects. A method provided by any one of the three aspects or any possible implementation manner.
在本申请的又一方面,提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得该计算机执行上述第一方面至第三方面中的任一方面或者任一种可能的实现方式所提供方法。In yet another aspect of the present application, a computer program product is provided, which, when the computer program product runs on a computer, causes the computer to perform any one of the above-mentioned first to third aspects or any possible possibility methods provided by the implementation.
可以理解地,上述提供的任一种设备防伪方法的装置、计算机存储介质或者计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。It can be understood that the device, computer storage medium or computer program product of any device anti-counterfeiting method provided above are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the above. The beneficial effects in the corresponding method provided will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种通信系统的结构示意图;FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
图2为本申请实施例提供的一种设备防伪方法的流程示意图;2 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application;
图3为本申请实施例提供的一种设备二维码的示意图;3 is a schematic diagram of a device two-dimensional code provided by an embodiment of the present application;
图4为本申请实施例提供的另一种设备防伪方法的流程示意图;4 is a schematic flowchart of another device anti-counterfeiting method provided by an embodiment of the present application;
图5为本申请实施例提供的一种终端设备的界面示意图;FIG. 5 is a schematic interface diagram of a terminal device provided by an embodiment of the present application;
图6为本申请实施例提供的另一种终端设备的界面示意图;FIG. 6 is a schematic interface diagram of another terminal device provided by an embodiment of the present application;
图7为本申请实施例提供的一种云服务器的结构示意图;FIG. 7 is a schematic structural diagram of a cloud server according to an embodiment of the present application;
图8为本申请实施例提供的另一种云服务器的结构示意图;FIG. 8 is a schematic structural diagram of another cloud server provided by an embodiment of the present application;
图9为本申请实施例提供的一种终端设备的结构示意图;FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图10为本申请实施例提供的另一种终端设备的结构示意图。FIG. 10 is a schematic structural diagram of another terminal device provided by an embodiment of the present application.
具体实施方式detailed description
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a、b、c、a-b、a-c、b-c、或a-b-c,其中a、b、c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "And/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c may be single or multiple.
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.
本申请提供的技术方案可以应用于终端设备的防伪信息的烧录场景中、防伪信息的激活场景中、以及防伪信息的更新场景中。其中,防伪信息的烧录场景可以是指在终端设备出厂前,生产该终端设备的厂商将防伪信息或者用于加密防伪信息的密钥等相关信息存储或者刻录到该终端设备的场景,比如,将用于加密防伪信息的密钥通过硬编码方式集成在终端设备的存储器中;防伪信息的激活场景可以是指在终端设备出厂后,用户在使用该终端设备时,获取该终端设备的防伪信息并根据该防伪信息在网络中激活该终端设备的场景;防伪信息的更新场景可以是指更换终端设备的防伪信息,并将更换后的防伪信息更新到网络的场景。另外,该防伪信息可以包括通用唯一识别码(universally unique identifier,UUID)和设备激活凭证,该设备激活凭证可以是基于公钥基础设施(public key infrastructure,PKI)技术和/或证书授权(certification authority,CA)技术,采用数字证书、数字签名、数据加密和安全凭证等方式产生的一种用于保证终端设备合法性和安全性的凭证信息。The technical solutions provided by the present application can be applied to the scenario of burning anti-counterfeiting information of the terminal device, the scenario of activating the anti-counterfeiting information, and the scenario of updating the anti-counterfeiting information. Wherein, the burning scenario of anti-counterfeiting information may refer to a scenario in which the manufacturer of the terminal device stores or burns relevant information such as anti-counterfeiting information or a key used to encrypt anti-counterfeiting 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 activation scenario of the anti-counterfeiting information may refer to the user obtaining the anti-counterfeiting information of the terminal device when using the terminal device after the terminal device leaves the factory The scenario of activating the terminal device in the network according to the anti-counterfeiting information; the update scenario of the anti-counterfeiting information may refer to the scenario of replacing the anti-counterfeiting information of the terminal device and updating the replaced anti-counterfeiting information to the network. In addition, the anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation certificate, and the device activation certificate may be based on a public key infrastructure (PKI) technology and/or a certificate authority (certification authority) , CA) technology, a kind of credential information used to ensure the legitimacy and security of terminal equipment generated by means of digital certificates, digital signatures, data encryption and security credentials.
可选的,设备的激活凭证(也可以称为防伪信息)根据设备安全能力可以包括两类:第一类是制造厂商发放的软件令牌(license),第二类是制造厂商发放的证书。设备的激活凭证主要用于证明设备是由合法的制造厂商生产。其中,软件令牌是制造厂商为设备发放的一串随机的字符串,并且在设备生产时烧录到机身,在设备激活过程中,需要对比设备的软件令牌与服务端令牌,对比通过后才能进入设备激活的下一步。 软件令牌方式对设备的计算能力要求相对不高。证书是制造厂商为设备发放的数字证书,用于设备激活时验证设备生产厂商是否合法的一种方式,与软件令牌的形式相比更安全可靠,但对设备计算能力的要求更高。两种激活凭证方式可适用于不同的设备类型,比如,软件令牌可以适用于计算能力不高的设备,证书可适用于计算能力较高的设备。Optionally, the device activation certificate (also referred to as anti-counterfeiting information) may include two types according to the device security capability: the first type is a software token (license) issued by the manufacturer, and the second type is a certificate issued by the manufacturer. The device's activation certificate is 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 device when the device is produced. During the device activation process, it is necessary to compare the software token of the device with the server token. After passing, you can enter the next step of device activation. The software token method has relatively low requirements on the computing power of the device. A certificate is a digital certificate issued by a manufacturer for a device. It is used to verify whether the device manufacturer is legitimate when the device is activated. Compared with the form of software token, it is more secure and reliable, but it has higher requirements on the computing power of the device. The two activation credential methods can be applied to different device types. For example, a software token can be applied to a device with low computing power, and a certificate can be applied to a device with high computing power.
在本申请中,上述终端设备可以是一种具有无线通信功能的设备,可以部署在陆地上,包括室内或室外、手持或车载,也可以部署在水面上(如轮船等),还可以部署在空中(例如飞机、气球和卫星上等)。该终端设备还可以称为用户设备(user equipment,UE),终端(terminal)或者电子设备等。例如,该终端设备包括具有无线连接功能的手持式设备、车载设备等。在一种示例中,该终端设备可以包括:手机(mobile phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备(例如智能手表、智能手环、计步器等),车载设备(例如,汽车、自行车、电动车、飞机、船舶、火车、高铁等)、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、智能家居设备(例如,冰箱、电视、空调、电表等)、智能机器人、车间设备、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端设备、运输安全(transportation safety)中的无线终端设备、智慧城市(smart city)中的无线终端设备,或智慧家庭(smart home)中的无线终端设备、飞行设备(例如,智能机器人、热气球、无人机、飞机)等。本申请一种可能的应用的场景中终端设备为经常工作在地面的终端设备,例如车载设备。在本申请中,为了便于叙述,部署在上述设备中的芯片,例如片上系统(system-on-a-chip,SOC)、基带芯片等,或者其他具备通信功能的芯片也可以称为终端设备。In this application, the above-mentioned terminal device can be a device with wireless communication function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted, can also be deployed on water (such as ships, etc.), and can also be deployed on In the air (eg on airplanes, balloons and satellites, etc.). The terminal device may also be referred to as a user equipment (user equipment, UE), a terminal (terminal), or an electronic device, or the like. For example, the terminal device includes a handheld device with a wireless connection function, a vehicle-mounted device, and the like. In one example, the terminal device may include: a mobile phone (mobile phone), a tablet computer, a notebook computer, a palmtop computer, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, pedometers, etc.), in-vehicle equipment (for example, cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed trains, etc.), virtual reality (VR) equipment, augmented reality (AR) equipment, industrial control Wireless terminals in (industrial control), smart home devices (such as refrigerators, TVs, air conditioners, electricity meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving, remote medical surgery ), wireless terminal equipment in smart grid, wireless terminal equipment in transportation safety, wireless terminal equipment in smart city, or wireless terminal equipment in smart home wireless terminal equipment, flying equipment (for example, intelligent robots, hot air balloons, drones, airplanes), etc. In a 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 this application, for ease of description, chips deployed in the above-mentioned devices, such as system-on-a-chip (SOC), baseband chips, etc., or other chips with communication functions, may also be referred to as terminal devices.
作为一种可能的示例,在本申请实施例中,该终端设备还可以包括可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As a possible example, in this embodiment of the present application, the terminal device may further include a wearable device. Wearable devices can also be called wearable smart devices, which are the general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, 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 clothing or accessories. Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets, smart jewelry, etc. for physical sign monitoring.
作为另一种可能的示例,在本申请实施例中,该终端设备还可以包括智能家居设备,该智能家居设备可以是指应用在智能家居中的各种家居设备。比如,该智能家居设备可以包括诸如智能锁之类的智能防盗系列产品,该智能防盗系列产品可通过各种报警器、探测器相互协调,在布放状态下触发报警信息,起到安全防盗的作用。再比如,该智能家居设备还可以包括诸如智能灯之类的智能照明类产品,用户可直接通过手机、平板电脑等终端设备轻松查看和控制家中照明类产品的开关状态。再比如,该智能家居设备还可以包括诸如智能家电控制器之类的家电控制类产品,该家电控制类产品可以将红外无线信号关联起来,通过终端设备来控制任何使用红外遥控器的设备,例如电视、空调、电动窗帘等。另外,该智能家居设备还可以包括空气质量传感器, 用户可以在终端设备的APP上方便地查看空气质量传感器监控到的室内温湿度、环境情况,并可联动家中其他用电设备改善室内环境,为用户提供更好享受。进一步,该智能家居设备还可以包括手机智能门锁,用户只需拿出手机、平板电脑等终端设备,输入密码,即可实现自动开锁,同时用户还可以为家人或访客远程开锁等。示例性的,用户的手机中安装有可用于对各种智能家居设备进行选择和控制的应用程序(application,app),用户的智能电视与该手机均加入同一网络,用户可以在该app中选择智能电视的控制界面,比如,该控制界面中包括开机、关机、音量+、音量-、下一个节目和上一个节目等多个按钮,则用户可以通过点击开机或关机的按钮以打开或关闭该智能电视,或者通过点击音量+或音量-的按钮以增加或减小该智能电视的播放音量,又或者通过点击下一个节目或上一个节目的按钮以切换播放的节目等。As another possible example, in this embodiment of the present application, the terminal device may further include a smart home device, and the smart home device may refer to various home devices applied in a smart home. For example, the smart home equipment can include smart anti-theft products such as smart locks. The smart anti-theft products can coordinate with each other through various alarms and detectors to trigger alarm information in the deployed state, which plays a role in security and anti-theft. effect. For another example, the smart home device may also include smart lighting products such as smart lights, and the user can easily view and control the switching status of the lighting products in the home directly through terminal devices such as mobile phones and tablet computers. For another example, the smart home device may also include home appliance control products such as a smart home appliance controller. The home appliance control product can associate infrared wireless signals to control any device using an infrared remote control through a terminal device, such as TV, air conditioner, electric curtain, etc. In addition, the smart home device can also include an air quality sensor. Users can conveniently 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 equipment in the home to improve the indoor environment. Provide users with better enjoyment. Further, the smart home device can also include a mobile phone smart door lock. Users only need to take out terminal devices such as mobile phones and tablet computers and enter a password to realize automatic unlocking. At the same time, users can also remotely unlock for family members or visitors. Exemplarily, an application (application, app) that can be used to select and control various smart home devices is installed in the user's mobile phone, the user's smart TV and the mobile phone are both connected to the same network, and the user can select in the app. The control interface of the smart TV, for example, the control interface includes multiple buttons such as power on, power off, volume +, volume -, next program and previous program, then the user can click the power on or power off button to turn on or off the Smart TV, or click the volume + or volume - button to increase or decrease the playback volume of the smart TV, or click the button of the next program or the previous program to switch the playing program, etc.
图1为本申请实施例提供的一种通信系统的结构示意图,该通信系统可以包括凭证服务器101、云服务器102、第一终端设备103和第二终端设备104。FIG. 1 is a schematic structural diagram of a communication system provided by 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 .
其中,凭证服务器101可以是指用于负责终端设备的凭证信息的发放和管理等相关服务的服务器,比如,凭证服务器101可以用于生成、分配、存储和/或认证终端设备的设备激活凭证,凭证服务器101可以由终端设备的生产厂商提供。云服务器102可以是指用于为终端设备提供云服务的服务器,云服务器102可以由终端设备的生产厂商提供或者由第三方提供,云服务器102可以用于向终端设备转发凭证服务器101为该终端设备分配或生成的设备激活凭证。第一终端设备103和第二终端设备104都是终端设备,能够与云服务器102进行通信,以及通过云服务器102与凭证服务器101进行通信等。Wherein, the credential server 101 may refer to a server responsible for related services such as issuance and management of credential information of terminal devices. The credential server 101 may be provided by the manufacturer of the terminal device. The cloud server 102 may refer to a server used to provide cloud services for the terminal device. The cloud server 102 may be provided by the manufacturer of the terminal device or provided by a third party. The cloud server 102 may be used to forward the certificate server 101 to the terminal device as the terminal Device-assigned or generated device-activation credentials. The first terminal device 103 and the second terminal device 104 are both terminal devices, which can communicate with the cloud server 102 , and communicate with the credential server 101 through the cloud server 102 .
在本申请中,第一终端设备103和第二终端设备104均可以是上文所描述的终端设备。为便于描述,本文可以将该终端设备划分为第一终端设备103和第二终端设备104,第一终端设备103可以是指能够用于控制第二终端设备104的终端设备。比如,第二终端设备104可以是电视、空调、冰箱、摄像头、智能音箱、智能插座和智能灯具等智能家居设备,第一终端设备103可以是安装有智能家居应用程序(application,app)的智能手机、平板电脑、掌上电脑等终端设备,第一终端设备103可以通过该智能家居app控制第二终端设备104。这里的智能家居app可以是指能对家居中的各种家居设备进行选择和控制的软件程序,该智能家居app可以安装在终端设备上。该智能家居app可以是第一终端设备103在出厂时已安装的app,也可以是用户在使用第一终端设备103的过程中从网络下载或者从其他设备获取安装的app。In this 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 a first terminal device 103 and a 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 smart home device installed with a smart home application (application, app). For terminal devices such as mobile phones, tablet computers, and palmtop computers, the first terminal device 103 can 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 devices in the home, and the smart home app can be installed on the terminal device. The smart home app may be an app installed by the first terminal device 103 when it leaves the factory, or may be an app downloaded by the user from the network or acquired and installed from other devices during the use of the first terminal device 103 .
图2为本申请实施例提供的一种设备防伪方法的流程示意图,该方法可以应用于终端设备的防伪信息的烧录场景中。该方法可以应用于图1所示的通信系统中,该方法包括以下几个步骤。FIG. 2 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application, and the method can be applied to a scene of programming anti-counterfeiting information of a terminal device. The method can be applied to the communication system shown in FIG. 1 , and the method includes the following steps.
S201:云服务器从凭证服务器获取根密钥和设备激活凭证,该根密钥用于加密终端设备的防伪信息,该防伪信息可以包括通用唯一识别码(universally unique identifier,UUID)和设备激活凭证。S201: The cloud server obtains a root key and a device activation certificate from a certificate server, where the root key is used to encrypt anti-counterfeiting information of the terminal device, and the anti-counterfeiting information may include a universally unique identifier (UUID) and a device activation certificate.
其中,该终端设备的UUID可以用于唯一标识该终端设备,该终端设备的设备激活凭证(也可以称为厂商标识信息)可以是指生产该终端设备的厂商的标识信息,该设备激活凭证可以用于标识该终端设备的合法性,比如,该设备激活凭证可以是该厂 商的证书或者软件令牌等。Wherein, the UUID of the terminal device can be used to uniquely identify the terminal device, the device activation certificate (also referred to as manufacturer identification information) of the terminal device can refer to the identification information of the manufacturer that produces the terminal device, and the device activation certificate can be Used to identify the legitimacy of the terminal device, for example, the device activation credential may be the manufacturer's certificate or software token or the like.
具体的,当云服务器与凭证服务器建立安全连接时,云服务器可以向凭证服务器请求该终端设备的设备激活凭证和根密钥(ROT),比如,云服务器可以向凭证服务器发送请求信息,该请求信息可以携带该终端设备的标识,且用于请求该终端设备的设备激活凭证和根密钥。当凭证服务器接收到该请求信息时,凭证服务器可以为该终端设备分配根密钥,并向云服务器发送该设备激活凭证和该根密钥。当云服务器接收到该设备激活凭证和该根密钥时,云服务器可以为该终端设备分配UUID,并将该UUID与该设备激活凭证绑定。之后,云服务器可以将该UUID与该设备激活凭证绑定的信息发送给凭证服务器,凭证服务器在接收到该绑定的信息时,可以对该信息进行存储。Specifically, when the cloud server establishes a secure connection with the credential server, the cloud server may request the credential server for the device activation credential and root key (ROT) of the terminal device. For example, the cloud server may send request information to the credential server, and the request The information may carry the identification of the terminal device and be used to request the device activation credential and root key of the terminal device. When the credential server receives the request information, 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 certificate and the root key, the cloud server can assign a UUID to the terminal device, and bind the UUID to the device activation certificate. After that, the cloud server may send the information of binding the UUID and the device activation certificate to the certificate server, and the certificate server may store the information when receiving the bound information.
S202:云服务器根据该根密钥加密该UUID和该设备激活凭证,得到加密信息。S202: The cloud server encrypts the UUID and the device activation certificate according to the root key to obtain encrypted information.
当云服务器接收到该根密钥和该设备激活凭证,并为该终端设备分配UUID之后,云服务器可以使用该根密钥分别加密该UUID和该设备激活凭证,即云服务器使用该根密钥加密该UUID以得到该UUID的密文,以及使用该根密钥加密该设备激活凭证得到以该设备激活凭证的密文,该UUID的密文和该设备激活凭证的密文即为加密信息。或者,云服务器也可以将该UUID和该设备激活凭证作为一个整体信息,使用该根密钥加密该整体信息,以得到该整体信息的密文,该整体信息的密文即为加密信息。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 Encrypting the UUID to obtain the ciphertext of the UUID, and encrypting the device activation credential with the root key to obtain the ciphertext of the device activation credential, the ciphertext of the UUID and the ciphertext of the device activation credential are encrypted information. Alternatively, the cloud server may also take the UUID and the device activation certificate as a whole, and encrypt the whole information with the root key to obtain the ciphertext of the whole information, and the cipher text of the whole information is the encrypted information.
可选的,云服务器使用该根密钥加密该UUID和该设备激活凭证时,云服务器可以直接使用该根密钥进行加密,也可以使用该根密钥的衍生密钥进行加密,该根密钥的衍生密钥可以是基于该根密钥产生的密钥。比如,该根密钥为密钥1,该衍生密钥可以是密钥1经过循环移位后得到的密钥,或者是密钥1与某一固定数值的与运算之后得到的密钥等,本申请实施例对此不作具体限制。Optionally, when the cloud server uses the root key to encrypt the UUID and the device activation certificate, the cloud server can directly use the root key for encryption, or can use a derived key of the root key for encryption. A key derived from the key may be a key generated based on the root key. For example, the root key is key 1, and the derived key can be the key obtained after key 1 is cyclically shifted, or the key obtained after the AND operation between key 1 and a certain fixed value, etc. This embodiment of the present application does not specifically limit this.
S203:云服务器将第一根密钥隐写到图像中,并将该图像嵌入设备二维码中,第一根密钥为该根密钥的部分密钥。S203: The cloud server steganographically writes the first root key into the image, and embeds the image into the two-dimensional code of the device, where the first root key is a partial key of the root key.
其中,该根密钥可以包括两部分,第一部分可以称为第一根密钥,第二部分可以称为第二根密钥。该根密钥包括的两部分可以由云服务器按照根密钥划分规则划分得到,该根密钥划分规则可以是预先设置的。比如,该根密钥为8位二进制,第一根密钥可以为该8位二进制的前四位二进制,第二根密钥可以为该8位二进制的后四位二进制。The root key may include two parts, the first part may be referred to as the first root key, and the second part may be referred to as the second root key. The two parts included in the root key may be obtained by dividing the cloud server according to the root key dividing rule, and the root key dividing rule may be preset. For example, the root key is an 8-bit binary, the first root key may be the first four binary digits of the 8-bit binary, and the second root key may be the last four binary of the 8-bit binary.
另外,隐写第一根密钥的图像可以是随机的图像,也可以是与该终端设备相关的图像,比如,隐写第一根密钥的图像可以是生产该终端设备的厂商标志的图像。隐写第一根密钥的图像还可以由生产该终端设备的厂商指定。本申请实施例对隐写第一根密钥的图像不作具体限制。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 producing the terminal device. . The image of the steganographic first root key can also be specified by the manufacturer of the terminal device. This embodiment of the present application does not specifically limit the image for steganographically writing the first root key.
再者,该设备二维码可以是基于该终端设备的硬件信息生成的二维码,比如,该硬件信息可以包括该终端设备的媒体接入控制(media access control,MAC)地址和设备序列号等。该设备二维码可以由云服务器生成,也可以由其他设备生成并发送给云服务器。Furthermore, the device two-dimensional code can be a two-dimensional code generated based on the hardware information of the terminal device, for example, the hardware information can include the media access control (media access control, MAC) address and device serial number of the terminal device. Wait. The device QR code can be generated by the cloud server, or generated by other devices and sent to the cloud server.
具体的,云服务器可以根据上述根密钥划分规则将该根密钥划分为第一根密钥和第二根密钥。云服务器可以使用数据隐写技术将第一根密钥隐写到图像中,并基于该 终端设备的硬件信息生成设备二维码,之后,将隐写了第一根密钥的图像嵌入到该设备二维码中,隐写了第一根密钥的图像不影响该设备二维码的正常读取。比如,如图3所示为本申请实施例提供的一种设备二维码的示意图,隐写了第一根密钥的图像可以嵌入到该设备二维码的中间区域。Specifically, the cloud server may divide the root key into a first root key and a second root key according to the above root key division rule. The cloud server can use data steganography technology to steganographic the first root key into the image, and generate a device QR code based on the hardware information of the terminal device, and then embed the image with the first root key steganographic into the image. In the two-dimensional code of the device, the image with the first key steganographic does not affect the normal reading of the two-dimensional code of the device. For example, as shown in FIG. 3 , a schematic diagram of a device two-dimensional code provided by an embodiment of the present application, an image in which the first root key is steganographically written may be embedded in the middle area of the device two-dimensional code.
S204:云服务器将该设备二维码、第二根密钥和该加密信息发送给终端设备,以使该设备二维码被打印在该终端设备的机身、第二根密钥和该加密信息被存储在该终端设备中。S204: The cloud server sends the device two-dimensional code, the second root key and the encrypted information to the terminal device, so that the device two-dimensional code is printed on the body of the terminal device, the second root key and the encrypted information Information is stored in the terminal device.
当云服务器得到嵌入了隐写有第一根密钥的图像的设备二维码、以及该加密信息时,云服务器可以将设备二维码、第二根密钥和该加密信息发送给终端设备。其中,云服务器可以一次性地将上述信息全部发送给终端设备;或者,云服务器通过多次将上述信息发送给终端设备,每次仅发送上述信息中的部分信息。比如,云服务器在第一次发送时将该设备二维码发送给终端设备,在第二次发送时将第二根密钥和该加密信息发送给终端设备。When the cloud server obtains the device QR code embedded with the image steganographically embedded with the first root key 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 may send all the above information to the terminal device at one time; or, the cloud server sends the above information to the terminal device multiple times, and only sends part of the above information each time. For example, the cloud server sends the QR code of the device to the terminal device when it is sent for the first time, and sends the second root key and the encrypted information to the terminal device when it is sent for the second time.
当终端设备接收到该设备二维码、第二根密钥和该加密信息时,生产该终端设备的厂商可以将该设备二维码打印在该终端设备的机身(比如,外壳)上,并将通过硬编码等方式将第二根密钥和该加密信息写入该终端设备中,比如,将第二根密钥和该加密信息写入该终端设备的代码段中。When the terminal device receives the two-dimensional code of the device, the second root key and the encrypted information, the manufacturer of the terminal device can print the two-dimensional code of the device on the body (for example, the casing) of the terminal device, The second root key and the encrypted information are written into the terminal device by means of hard coding, for example, the second root key and the encrypted information are written into the code segment of the terminal device.
在本申请实施例中,在该终端设备出厂前,用于加密该终端设备的防伪信息的根密钥可以被划分为第一根密钥和第二根密钥,第一根密钥被隐写在图像中并嵌入到打印在终端设备机身的设备二维码中,第二根密钥被存储在该终端设备中,从而通过将该根密钥分散存放在该终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造该终端设备的风险。In this 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 may be divided into a first root key and a second root key, and the first root key is hidden Written in the image and embedded in the device QR code printed on the body of the terminal device, the second root key is stored in the terminal device, so that by dispersing the root key in different locations of the terminal device, The security of the root key is improved, and the difficulty of cracking the root key by illegal elements is increased, thereby greatly reducing the risk of forging the terminal device.
图4为本申请实施例提供的一种设备防伪方法的流程示意图,该方法可以应用于终端设备的防伪信息的激活场景中。该方法可以应用于图1所示的通信系统中,该方法包括以下几个步骤。FIG. 4 is a schematic flowchart of a device anti-counterfeiting method provided by an embodiment of the present application, and the method can be applied to an activation scenario of anti-counterfeiting information of a terminal device. The method can be applied to the communication system shown in FIG. 1 , and the method includes the following steps.
S301:第一终端设备扫描第二终端设备的设备二维码并解析,得到第一根密钥。S301: The first terminal device scans and parses the device two-dimensional code of the second terminal device to obtain the first root key.
其中,该设备二维码可以位于第二终端设备的机身(比如,外壳)上,该设备二维码可以是基于第二终端设备的硬件信息(比如,MAC地址和设备序列号等)生成的二维码。该设备二维码中可以嵌入有图像,第一根密钥可以被隐写(steganographied)在该图像中,该图像的嵌入不影响该设备二维码的正常读取。Wherein, the two-dimensional code of the device may be located on the body (for example, the casing) of the second terminal device, and the two-dimensional code of the device may be generated based on hardware information (for example, MAC address and device serial number, etc.) of the second terminal device QR code. An image may be embedded in the two-dimensional code of the device, the first key may be steganographied in the image, and the embedding of the image will not affect the normal reading of the two-dimensional code of the device.
另外,第一终端设备中可以安装有能够解析密钥的app,该app可以是指生产第二终端设备的厂商授权的app,用户可以在该app上登录合法的用户账号,该用户账号可以是用户申请的能够登录该app的合法账号。比如,该app可以是智能家居app,该智能家居app可以是指能够对家居中的各种家居设备(比如,音箱、电视和空调等)进行选择和控制的软件程序。In addition, the first terminal device may be installed with an app capable of parsing the key, and the app may refer to an app authorized by the manufacturer producing the second terminal device. The user may log in to the app with a legal user account, and the user account may be The legal account applied by the user that can log in to the app. For example, the app may be a smart home app, and the smart home app may refer to a software program capable of selecting and controlling various home devices (eg, speakers, TVs, air conditioners, etc.) in the home.
示例性的,如图5所示中的(a)所示,为第一终端设备上安装的智能家居app的一种界面示意图,该智能家居app的名称可以为“我的家”。用户可以通过点击“我的家”这个图标,进入如图5中的(b)所示的该智能家居app的登录界面,通过在该登录界面中的输入相应的用户名和密码即可成功登录该智能家居app。图5中的(c) 为一种登录成功后的界面示意图,该界面中可以显示室内环境的温度和湿度,以及已加入网络的各种家居设备,比如,该家居设备可以包括音箱、电视、空调、洗衣机、热水器等,用户可以通过选择不同的家居设备来实现对该家居设备的控制。Exemplarily, as shown in (a) of FIG. 5 , it is a schematic interface diagram of a smart home app installed on the first terminal device, and the name of the smart home app may be "My Home". The user can enter the login interface of the smart home app as shown in (b) in Figure 5 by clicking the icon "My Home", and can successfully log in to the smart home app by entering the corresponding user name and password in the login interface. Smart home app. (c) in Figure 5 is a schematic diagram of an interface after successful login, in which the temperature and humidity of the indoor environment can be displayed, as well as various household devices that have joined the network. For example, the household devices can include speakers, TVs, Air conditioners, washing machines, water heaters, etc., users can control the household equipment by selecting different household equipment.
具体的,当用户在第一终端设备安装的能够解析密钥的app上登录用户账号后,用户可以使用第一终端设备扫描第二终端设备的设备二维码,比如,使用该app的扫码功能扫码第二终端设备的设备二维码,从而得到嵌入该设备二维码的图像中隐写的第一根密钥。可选的,用户还可以设置第一终端设备上安装的该app的使用权限,比如,该app的使用权限可以包括解析密钥权限、访问网络权限、使用相机权限、以及访问通讯录权限等。比如,以该app为图5所示的“我的家”为例,如图6所示,用户可以在第一终端设备的“设置”选项中设置“我的家”的使用权限,该使用权限中可以包括访问网络权限、使用相机权限、解析密钥权限、以及访问通讯录权限等多个不同的权限,用户可以通过点击每个权限对应的打开或关闭按钮来控制每个权限的开启或关闭。其中,当该app的使用权限为打开解析密钥权限时,该app在扫描到第二终端设备的设备二维码时,能够解析得到嵌入该设备二维码的图像中隐写的第一根密钥。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 app's scan code The function scans the device two-dimensional code of the second terminal device, thereby obtaining the first root key steganographically embedded in the image of the device two-dimensional code. Optionally, the user may also set the permission to use the app installed on the first terminal device. For example, the permission to use the app may include permission to parse keys, permission to access the network, permission to use the camera, permission to access the address book, and the like. For example, taking the app as "My Home" shown in Fig. 5 as an example, as shown in Fig. 6, the user can set the usage authority of "My Home" in the "Settings" option of the first terminal device. Permissions can include multiple different permissions, such as access to the network, permission to use the camera, permission to parse keys, and permission to access the address book. Users can control the opening or closing of each permission by clicking the corresponding on or off button for each permission. closure. Wherein, when the use authority of the app is the authority to open the parsing key, when the app scans the device two-dimensional code of the second terminal device, it can parse and obtain the first root steganographic in the image embedded in the two-dimensional code of the device. key.
S302:第一终端设备向第二终端设备发送第一根密钥。S302: The first terminal device sends the first root key to the second terminal device.
其中,第一终端设备与第二终端设备之间可以建立无线连接并绑定,该无线连接蓝牙连接或者局域网连接等,当第一终端设备解析得到第一根密钥时,第一终端设备可以通过无线连接将第一根密钥发送给第二终端设备。Wherein, a wireless connection can be established and bound between the first terminal device and the second terminal device. The wireless connection is a Bluetooth connection or a local area network connection. When the first terminal device parses and obtains the first root key, the first terminal device can The first root key is sent to the second terminal device via the wireless connection.
S303:当第二终端设备接收到第一根密钥时,根据第一根密钥和第二根密钥确定根密钥。S303: When the second terminal device receives the first root key, determine the root key according to the first root key and the second root key.
其中,第二根密钥可以存储在第二终端设备的存储器中,比如,第二根密钥可以存储在第二终端设备的代码段中。该根密钥可以是指网络侧下发的根密钥,该根密钥可以包括两部分,即第一根密钥和第二根密钥,具体将该根密钥划分为第一根密钥和第二根密钥的划分规则可以是事先设置的。The second root key may be stored in the memory of the second terminal device, for example, the second root key may be stored in the code segment of the second terminal device. The root key may refer to the root key issued by the network side. The root key may include two parts, namely the first root key and the second root key. Specifically, the root key is divided into the first root key. The division rule of the key and the second root key may be set in advance.
具体的,第二终端设备可以从自身的代码段中获取第二根密钥,在接收到第一终端设备发送的第一根密钥时,第二终端设备可以根据第一根密钥和第二根密钥确定该根密钥,比如,第二终端设备可以基于第一根密钥和第二根密钥的划分规则,将第一根密钥和第二根密钥进行相应的组合处理,以得到该根密钥。Specifically, the second terminal device can obtain the second root key from its own code segment, and when receiving the first root key sent by the first terminal device, the second terminal device can obtain the second root key according to the first root key and the first root key. The second root key determines the root key. For example, the second terminal device may perform corresponding combination processing on the first root key and the second root key based on the division rule of the first root key and the second root key. , to get the root key.
S304:第二终端设备使用该根密钥解密加密信息,得到防伪信息,该防伪信息包括UUID和设备激活凭证。S304: The second terminal device uses the root key to decrypt the encrypted information to obtain anti-counterfeiting information, where the anti-counterfeiting information includes a UUID and a device activation certificate.
其中,该UUID和该设备激活凭证可以是生产第二终端设备的厂商在第二终端设备出厂前存储在第二终端设备中的。该UUID可以用于唯一标识第二终端设备,该设备激活凭证(也可以称为厂商标识信息)可以是指生产第二终端设备的厂商的标识信息,该设备激活凭证可以用于标识第二终端设备的合法性,比如,该设备激活凭证可以是该厂商的证书或者软件令牌等。Wherein, the UUID and the device activation certificate may be stored in the second terminal device before the second terminal device leaves the factory by the manufacturer producing the second terminal device. The UUID may be used to uniquely identify the second terminal device, the device activation certificate (also referred to as manufacturer identification information) may refer to the identification information of the manufacturer producing the second terminal device, and the device activation certificate may be used to identify the second terminal The legitimacy of the device, for example, the device activation certificate may be the manufacturer's certificate or software token.
另外,该加密信息可以是该防伪信息加密后的密文,该防伪信息可以是指用于鉴别第二终端设备的合法性的信息。当该加密信息是对该防伪信息中的UUID和设备激活凭证分别加密得到的信息时,该加密信息可以包括UUID加密后的密文和该设备激 活凭证加密后的密文,此时,第二终端设备可以使用该根密钥分别解密该UUID加密后的密文和该设备激活凭证加密后的密文,以得到该UUID的明文和该设备激活凭证的明文,即得到该UUID和该设备激活凭证。当该加密信息是对该防伪信息中的UUID和设备激活凭证作为一个整体信息加密得到的信息时,该加密信息包括该整体信息加密后的密文,第二终端设备可以使用该根密钥解密该整体信息加密后的密文,以得到该UUID的明文和该设备激活凭证的明文,即得到该UUID和该设备激活凭证。In addition, the encrypted information may be ciphertext encrypted by 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 obtained by separately encrypting the UUID and the device activation credential in the anti-counterfeiting information, the encrypted information may include the ciphertext encrypted by the UUID and the ciphertext encrypted by the device activation credential. At this time, the second The terminal device can use the root key to decrypt the ciphertext encrypted by the UUID and the ciphertext encrypted by the device activation credential, respectively, to obtain the plaintext of the UUID and the plaintext of the device activation credential, that is, to obtain the UUID and the device activation credential. certificate. When the encrypted information is obtained by encrypting the UUID and the device activation certificate in the anti-counterfeiting information as a whole, the encrypted information includes the encrypted ciphertext of the whole information, and the second terminal device can use the root key to decrypt The encrypted ciphertext of the overall information is obtained 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.
可选的,当网络侧是直接使用该根密钥加密该防伪信息时,第二终端设备可以直接使用该根密钥解密该加密信息;当网络侧是使用该根密钥的衍生密钥加密该防伪信息时,第二终端设备可以根据网络侧相同的方法生成该根密钥的衍生密钥,并使用该衍生密钥解密该加密信息。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 anti-counterfeiting information is used, the second terminal device can generate a derived key of the root key according to the same method on the network side, and use the derived key to decrypt the encrypted information.
S305:第二终端设备通过云服务器向凭证服务器发送该UUID和该设备激活凭证,以完成第二终端设备的激活。S305: The second terminal device sends the UUID and the device activation certificate to the certificate server through the cloud server, so as to complete the activation of the second terminal device.
其中,第二终端设备可以与云服务器建立有安全连接,从而第二终端设备可以与云服务器之间可以直接进行通信。云服务器与凭证服务器之间可以建立有安全连接,从而云服务器与凭证服务器之间可以直接进行通信。第二终端设备可以通过云服务器与凭证服务器之间进行通信。The second terminal device may establish a secure connection with the cloud server, so that the second terminal device may 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 may communicate with the credential server through the cloud server.
具体的,第二终端设备可以将该UUID和该设备激活凭证发送给云服务器。当云服务器接收到该UUID和该设备激活凭证时,云服务器可以检查该UUID是否已注册。若该UUID未注册,则云服务器可以将该UUID和该设备激活凭证转发给凭证服务器;若该UUID已注册,则云服务器可以确定第二终端设备为非法设备,即第二终端设备激活不成功。当凭证服务器接收到该UUID和该设备激活凭证时,凭证服务器可以检测该UUID对应的该设备激活凭证与自身存储的该UUID绑定的设备激活凭证是否匹配。当凭证服务器的检测结果为匹配时,凭证服务器可以确定第二终端设备为合法设备,即第二终端设备激活成功;当凭证服务器的检测结果为不匹配时,凭证服务器可以确定第二终端设备为不合法设备,即第二终端设备激活不成功。Specifically, the second terminal device may 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 is registered. If the UUID is not registered, the cloud server can forward the UUID and the device activation certificate to the certificate server; if the UUID is 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 by itself. When the detection result of the credential server is a match, the credential server can determine that the second terminal device is a legitimate device, that is, the second terminal device is successfully activated; when the detection result of the credential server is a mismatch, the credential server can determine that the second terminal device is a Invalid device, that is, the activation of the second terminal device is unsuccessful.
可选的,在确定第二终端设备为合法设备后,若该设备激活凭证为软件令牌,则凭证服务器还可以为第二终端设备生成新软件令牌,并将新软件令牌发送给云服务器;此外,凭证服务器还可以将该新软件令牌作为第二终端设备的UUID绑定的设备激活凭证进行存储。当云服务器接收到该新软件令牌时,云服务器可以将该新软件令牌转发给第二终端设备,从而第二终端设备在接收到该新软件令牌时,可以使用该根密钥加密该新软件令牌,并将加密得到的该新软件令牌的密文进行存储。Optionally, after determining that the second terminal device is a legitimate device, if the device activation certificate is a software token, the certificate server may 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 may also store the new software token as a 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.
进一步的,当第二终端设备需要更新用于加密该防伪信息的根密钥时,比如,达到更新周期、第二终端设备发生重置系统或者恢复出厂设置时,第二终端设备可以随机生成密钥片段,比如,第二终端设备随机生成一段随机数信息;第二终端设备使用第一根密钥加密该随机数信息和第二根密钥,得到新的第二根密钥,第一根密钥和新的第二根密钥构成更新后的根密钥。比如,第一根密钥为ROT1、第二根密钥为ROT2、该随机数信息为rand、新的第二根密钥为ROT2’,则ROT2’=encROT1(rand||ROT2),enc表示加密,||表示或运算。Further, 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 password. key segment, 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, the first root key The key and the new second root key constitute the updated root key. For example, if 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 means Encryption, || means OR operation.
在本申请实施例中,在第二终端设备出厂后,用户使用第二终端设备时,用户可 以使用第一终端设备扫描第二终端设备机身的设备二维码以得到第一根密钥,并根据根密钥和第二根密钥确定用于解密第二终端设备的防伪信息的根密钥,从而使用该根密钥解密该防伪信息得到UUID和设备激活凭证,之后,第二终端设备可以向网络侧发送该UUID和该设备激活凭证,以完成第二终端设备激活。由于用于加密第二终端设备的防伪信息的根密钥被划分为第一根密钥和第二根密钥,第一根密钥被隐写在图像中并嵌入到打印在第二终端设备机身的设备二维码中,第二根密钥被存储在第二终端设备中,从而通过将该根密钥分散存放在第二终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造第二终端设备的风险。In the 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 determine the root key for decrypting the anti-counterfeiting information of the second terminal device according to the root key and the second root key, 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 The UUID and the device activation credential may be sent 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 steganographic in the image and embedded in the image printed on the second terminal device In the device two-dimensional code of the fuselage, the second root key is stored in the second terminal device, so that the security of the root key is improved by dispersing the root key in different locations of the second terminal device, This increases the difficulty for illegal elements to decipher the root key, thereby greatly reducing the risk of forging the second terminal device.
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,各个网元,例如终端,为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件、软件或硬件和机软件相结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of interaction between various network elements. It can be understood that each network element, such as a terminal, in order to implement the above-mentioned functions, it includes corresponding hardware structures and/or software modules for performing each function. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware, software or a combination of hardware and machine software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对终端进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。下面以采用对应各个功能划分各个功能模块为例进行说明。In this embodiment of the present application, the terminal may be divided into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation. The following description will be given by taking as an example that each function module is divided corresponding to each function.
图7示出了上述实施例中所涉及的一种设备防伪装置的结构示意图,该装置可以实现本申请实施例提供的方法中云服务器的功能。该装置可以为云服务器或者为可以支持云服务器实现本申请实施例中云服务器的功能的装置,例如该装置为应用于云服务器中的芯片系统。该装置包括:接收单元401、处理单元402和发送单元403。其中,接收单元401可以用于支持该装置执行上述方法实施例中的S201,和/或本文所描述的其他技术过程;处理单元402可以用于支持该装置执行上述方法实施例中的S202和S203;发送单元403可以用于支持该装置执行上述方法实施例中的S204。上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。FIG. 7 shows a schematic structural diagram of a device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of a cloud server in the method provided by the embodiment of the present application. The device may be a cloud server or a device that can support the cloud server to implement the functions of the cloud server in the embodiments of the present application, for example, the device is a chip system applied in the cloud server. The apparatus includes: a receiving unit 401 , a processing unit 402 and a sending unit 403 . The receiving unit 401 may be configured to support the apparatus to perform S201 in the above method embodiments, and/or other technical processes described herein; the processing unit 402 may be configured to support the apparatus to perform S202 and S203 in the above method embodiments ; The sending unit 403 may be configured to support the apparatus to perform S204 in the foregoing method embodiments. All relevant contents of the steps involved in the foregoing method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
可选的,本申请的实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。Optionally, in the embodiment of the present application, the chip system may be composed of chips, or may include chips and other discrete devices.
可选的,本申请实施例中的接收单元401可以为电路、器件、接口、总线、软件模块、收发器或者其它任意可以实现通信的装置。Optionally, the receiving unit 401 in this 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.
可选地,接收单元401和发送单元403可以为云服务器或者应用于云服务器中的芯片系统的通信接口,例如,该通信接口可以为收发电路,处理单元402可以为集成在云服务器或者应用于云服务器中的芯片系统的处理器上。Optionally, the receiving unit 401 and the sending unit 403 may be a cloud server or a communication interface applied to a chip system in the cloud server. For example, the communication interface may be a transceiver circuit, and the processing unit 402 may be integrated in the cloud server or applied to the cloud server. On the processor of the system-on-a-chip in the cloud server.
图8示出了上述实施例中所涉及的设备防伪装置的一种可能的逻辑结构示意图, 该装置可以实现本申请实施例提供的方法中云服务器的功能。该装置可以为云服务器或者应用于云服务器中的芯片系统,该装置包括:处理器412和通信接口413。处理器412用于对该装置的动作进行控制管理,例如,处理器412用于执行该装置侧进行消息或数据处理的步骤。例如,支持该装置执行上述方法实施例中的步骤S201至S204,和/或用于本文所描述的技术的其他过程。通信接口413用于支持该装置与其他网元进行通信。可选的,该装置还可以包括存储器411,用于存储该装置的程序代码和数据。FIG. 8 is a schematic diagram of a possible logical structure of the device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of the cloud server in the method provided by the embodiment of the present application. The apparatus may be a cloud server or a chip system applied in the cloud server, and the apparatus includes: a processor 412 and a communication interface 413 . The processor 412 is configured to control and manage the actions of the device, for example, the processor 412 is configured to execute the steps of processing messages or data on the device side. For example, the apparatus is supported to perform steps S201 to S204 in the above-described method embodiments, and/or other processes for the techniques described herein. The communication interface 413 is used to support the device to communicate with other network elements. Optionally, the apparatus may further include a memory 411 for storing program codes and data of the apparatus.
其中,处理器412可以是处理器或控制器,例如可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。通信接口412可以是收发器、收发电路或通信接口等。存储器411可以是高速随机存取存储器或者非易失性存储器等。The processor 412 may be a processor or a controller, such as 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 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of the embodiments of this application. A processor may also be a combination that performs computing functions, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 412 may be a transceiver, a transceiver circuit, a communication interface, or the like. The memory 411 may be a high-speed random access memory or a non-volatile memory or the like.
示例性的,通信接口413、处理器412以及存储器411通过总线414相互连接;总线414可以是PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。其中,存储器411用于存储该支装置的程序代码和数据。通信接口413用于支持该装置与其他设备通信,处理器412用于持该装置执行存储器411中存储的程序代码以实现本申请实施例所提供的方法中的步骤。Exemplarily, the communication interface 413, the processor 412 and the memory 411 are connected to each other through a bus 414; the bus 414 may be a PCI bus or an EISA bus or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus. Among them, the memory 411 is used to store the program codes and data of the device. The communication interface 413 is used to support the apparatus to communicate with other devices, and the processor 412 is used to enable the apparatus to execute program codes stored in the memory 411 to implement the steps in the methods provided by the embodiments of this application.
可选地,存储器411可以包括于处理器412中。Alternatively, the memory 411 may be included in the processor 412 .
图9示出了上述实施例中所涉及的一种设备防伪装置的结构示意图,该装置可以实现本申请实施例提供的方法中终端设备的功能。该装置可以为终端设备或者为可以支持终端设备实现本申请实施例中终端设备的功能的装置,例如该装置为应用于终端设备中的芯片系统。该装置包括:接收单元501、处理单元502和发送单元503。其中,当该装置用于实现上述方法实施例中第二终端设备的功能时,接收单元501可以用于支持该装置执行上述方法实施例中接收S302发送的第一根密钥的步骤;处理单元502可以用于支持该装置执行上述方法实施例中的S303和S304,发送单元503可以用于支持该装置执行上述方法实施例中发送更新后的第二根密钥的步骤。当该装置用于实现上述方法实施例中第一终端设备的功能时,处理单元502用于支持该装置执行上述方法实施例中的S301;发送单元503可以用于支持该装置执行上述方法实施例中的S302。上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。FIG. 9 shows a schematic structural diagram of a device anti-counterfeiting device involved in the above embodiment, and the device can implement the functions of the terminal device in the method provided by the embodiment of the present application. The apparatus may be a terminal device or a device that can support the terminal device to implement the functions of the terminal device in the embodiments of the present application, for example, the device is a chip system applied in the terminal device. The apparatus includes: a receiving unit 501 , a processing unit 502 and a sending unit 503 . Wherein, when the apparatus is used to implement the function of the second terminal device in the above method embodiment, the receiving unit 501 may be used to support the apparatus to perform the step of receiving the first root key sent by S302 in the above method embodiment; the processing unit 502 may be used to support the apparatus to perform S303 and S304 in the above method embodiments, and the sending unit 503 may be used to support the apparatus to perform the step of sending the updated second root key in the above method embodiments. When the apparatus is used to implement the function of the first terminal device in the above method embodiments, the processing unit 502 is used to support the apparatus to perform S301 in the above method embodiments; the sending unit 503 may be used to support the apparatus to perform the above method embodiments in S302. All relevant contents of the steps involved in the foregoing method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
可选的,本申请的实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。Optionally, in the embodiment of the present application, the chip system may be composed of chips, or may include chips and other discrete devices.
可选的,本申请实施例中的接收单元501可以为电路、器件、接口、总线、软件模块、收发器或者其它任意可以实现通信的装置。Optionally, the receiving unit 501 in this 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.
可选地,接收单元501和发送单元503可以为终端设备或者应用于终端设备中的芯片系统的通信接口,例如,该通信接口可以为收发电路,处理单元502可以为集成在终端设备或者应用于终端设备中的芯片系统的处理器上。Optionally, the receiving unit 501 and the sending unit 503 may be a terminal device or a communication interface applied to a chip system in the terminal device. For example, the communication interface may be a transceiver circuit, and the processing unit 502 may be integrated in the terminal device or applied to the terminal device. on the processor of the system-on-a-chip in the terminal device.
图10示出了上述实施例中所涉及的设备防伪装置的一种可能的逻辑结构示意图,该装置可以实现本申请实施例提供的方法中终端设备的功能。该装置可以为终端设备或者应用于终端设备中的芯片系统,该装置包括:处理器512和通信接口513。处理器512用于对该装置的动作进行控制管理,例如,处理器512用于执行该装置侧进行消息或数据处理的步骤。例如,当该装置用于实现上述方法实施例中第二终端设备的功能时,处理器512可支持该装置执行上述方法实施例中的步骤S303、S304,和/或用于本文所描述的技术的其他过程;当该装置用于实现上述方法实施例中第一终端设备的功能时,处理器512可支持该装置执行上述方法实施例中的步骤S301。通信接口513用于支持该装置与其他网元进行通信。可选的,该装置还可以包括存储器511,用于存储该装置的程序代码和数据。FIG. 10 shows a schematic diagram of a possible logical structure of the device anti-counterfeiting device involved in the above embodiment, and the device can implement the function of the terminal device in the method provided by the embodiment of the present application. The apparatus may be a terminal device or a chip system applied in the terminal device, and the apparatus includes: a processor 512 and a communication interface 513 . The processor 512 is configured to control and manage the actions of the device. For example, the processor 512 is configured to execute the steps of processing messages or data on the device side. For example, when the apparatus is used to implement the functions of the second terminal device in the above method embodiments, the processor 512 may support the apparatus to perform steps S303 and S304 in the above method embodiments, and/or be used for the techniques described herein other processes; when the apparatus is used to implement the function of the first terminal device in the above method embodiment, the processor 512 may support the apparatus to perform 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 apparatus may further include a memory 511 for storing program codes and data of the apparatus.
其中,处理器512可以是处理器或控制器,例如可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。通信接口512可以是收发器、收发电路或通信接口等。存储器511可以是高速随机存取存储器或者非易失性存储器等。The processor 512 may be a processor or a controller, such as 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 may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of the embodiments of this application. A processor may also be a combination that performs computing functions, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 512 may be a transceiver, a transceiver circuit, a communication interface, or the like. The memory 511 may be a high-speed random access memory or a non-volatile memory or the like.
示例性的,通信接口513、处理器512以及存储器511通过总线514相互连接;总线514可以是PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。其中,存储器511用于存储该支装置的程序代码和数据。通信接口513用于支持该装置与其他设备通信,处理器512用于持该装置执行存储器511中存储的程序代码以实现本申请实施例所提供的方法中的步骤。Exemplarily, the communication interface 513, the processor 512 and the memory 511 are connected to each other through a bus 514; the bus 514 may be a PCI bus or an EISA bus or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 10, but it does not mean that there is only one bus or one type of bus. Among them, the memory 511 is used to store the program codes and data of the device. The communication interface 513 is used for supporting the apparatus to communicate with other devices, and the processor 512 is used for enabling the apparatus to execute program codes stored in the memory 511 to implement the steps in the methods provided by the embodiments of the present application.
可选地,存储器511可以包括于处理器512中。Optionally, the memory 511 may be included in the processor 512 .
基于此,本申请实施例还提供通信系统,该通信系统包括凭证服务器、云服务器第一终端设备和第二终端设备;其中,云服务器为上述图7或图8提供的云服务器,用于执行本申请方法实施例中云服务器的功能;第二终端设备为图9或图10所提供的终端设备,用于执行本申请方法实施例中第二终端设备的功能;第一终端设备为图9或图10所提供的终端设备,用于执行本申请方法实施例中第一终端设备的功能。Based on this, an embodiment of the present application further provides a communication system, which includes a credential server, a first terminal device and a second terminal device of a cloud server; wherein the cloud server is the cloud server provided in FIG. 7 or FIG. 8, and is used for executing The function of the cloud server in the method embodiment of the present application; the second terminal device is the terminal device provided in FIG. 9 or FIG. 10 , which is used to execute the function of the second terminal device in the method embodiment of the present application; the first terminal device is FIG. 9 Or the terminal device provided in FIG. 10 is configured to execute the function of the first terminal device in the method embodiment of the present application.
在本申请实施例中,用于加密终端设备的防伪信息的根密钥被划分为第一根密钥和第二根密钥,第一根密钥被隐写在图像中并嵌入到打印在终端设备机身的设备二维码中,第二根密钥被存储在终端设备中,从而通过将该根密钥分散存放在终端设备的不同位置,提高该根密钥的安全性,增加了非法分子破解该根密钥的难度,进而大大降低了伪造终端设备的风险。In this 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, and the first root key is steganographically written in the image and embedded in the printed In the device two-dimensional code of the terminal device body, the second root key is stored in the terminal device, so that the root key is distributed and stored in different locations of the terminal device, the security of the root key is improved, and the It is difficult for illegal elements to crack the root key, thereby greatly reducing the risk of counterfeiting terminal equipment.
本申请实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例描述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备或者其他可编程装置。所述计 算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,SSD)等。The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in 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, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, network appliance, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available media that can be accessed by a computer, or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs)), or semiconductor media (eg, SSDs), and the like.
基于这样的理解,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述方法实施例中该终端的一个或者多个步骤。Based on such understanding, the embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the operation of the terminal in the foregoing method embodiments. one or more steps.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法实施例中该终端的一个或者多个步骤。Embodiments of the present application also provide a computer program product containing instructions, which, when run on a computer, cause the computer to execute one or more steps of the terminal in the foregoing method embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize 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. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or replacements within the technical scope disclosed in the present application should be covered by the present application. within the scope of protection of the application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (21)

  1. 一种设备防伪方法,其特征在于,所述方法包括:A device anti-counterfeiting method, characterized in that the method comprises:
    云服务器从凭证服务器获取根密钥,所述根密钥用于加密终端设备的防伪信息,所述防伪信息包括通用唯一识别码UUID和所述终端设备的设备激活凭证;The cloud server obtains a root key from the credential server, and the root key is used to encrypt the anti-counterfeiting information of the terminal device, and the anti-counterfeiting information includes the universal unique identifier UUID and the device activation certificate of the terminal device;
    所述云服务器根据所述根密钥加密所述UUID和所述设备激活凭证,得到加密信息;The cloud server encrypts the UUID and the device activation credential according to the root key to obtain encrypted information;
    所述云服务器将第一根密钥隐写到所述终端设备的设备二维码中,所述第一根密钥为所述根密钥的部分密钥;The cloud server steganographically writes a first root key into the device two-dimensional 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, where the second root key is a partial key of the root key and the first root key. the root key.
  2. 根据权利要求1所述的方法,其特征在于,所述设备二维码中嵌入有图像,所述第一根密钥隐写在所述图像中。The method according to claim 1, wherein an image is embedded in the two-dimensional code of the device, and the first root key is steganographically written in the image.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第二根密钥和所述加密信息存储在所述终端设备中。The method according to claim 1 or 2, wherein the second root key and the encrypted information are stored in the terminal device.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述云服务器根据所述根密钥加密所述UUID和所述设备激活凭证,包括:The method according to any one of claims 1-3, wherein the cloud server encrypts the UUID and the device activation credential according to the root key, comprising:
    所述云服务器直接使用所述根密钥加密所述UUID和所述设备激活凭证;或者,The cloud server directly encrypts the UUID and the device activation credential using the root key; or,
    所述云服务器使用所述根密钥的衍生密钥加密所述UUID和所述设备激活凭证。The cloud server encrypts the UUID and the device activation credential using a key derived from the root key.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    所述云服务器根据所述终端设备的硬件信息生成所述设备二维码,所述硬件信息包括媒体介入控制MAC地址和/或设备序列号。The cloud server generates the device two-dimensional code according to hardware information of the terminal device, where the hardware information includes a media intervention control MAC address and/or a device serial number.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述设备激活凭证为软件令牌或者证书。The method according to any one of claims 1-5, wherein the device activation credential is a software token or a certificate.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述终端设备为智能家居设备。The method according to any one of claims 1-6, wherein the terminal device is a smart home device.
  8. 一种设备防伪方法,其特征在于,所述方法包括:A device anti-counterfeiting method, characterized in that the method comprises:
    第二终端设备接收来自第一终端设备的第一根密钥,所述第一根密钥隐写在所述第二终端设备的设备二维码中;The second terminal device receives the first root key from the first terminal device, and the first root key is steganographically written in the device two-dimensional code of the second terminal device;
    所述第二终端设备根据所述第一根密钥和自身存储的第二根密钥确定根密钥;The second terminal device determines a root key according to the first root key and the second root key stored by itself;
    所述第二终端设备根据所述根密钥解密所述第二终端设备的防伪信息对应的加密信息以得到所述防伪信息,所述防伪信息包括通用唯一识别码UUID和设备激活凭证;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, and the anti-counterfeiting information includes a universal unique identification code UUID and a device activation certificate;
    所述第二终端设备根据所述UUID和所述设备激活凭证激活所述第二终端设备。The second terminal device activates the second terminal device according to the UUID and the device activation credential.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    当满足预设更新条件时,所述第二终端设备使用所述第一根密钥更新所述第二根密钥。When a preset update condition is satisfied, the second terminal device uses the first root key to update the second root key.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    所述第二终端设备向云服务器发送所述第二根密钥。The second terminal device sends the second root key to the cloud server.
  11. 根据权利要求9或10所述的方法,其特征在于,所述预设更新条件包括以下 至少一项:所述第二终端设备系统重置,所述第二终端设备恢复出厂设置,所述第二终端设备接收到新的所述设备激活凭证。The method according to claim 9 or 10, wherein the preset update condition includes at least one of the following: the second terminal device is system reset, the second terminal device is restored to factory settings, the first The second terminal device receives the new device activation credential.
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述设备二维码中嵌入有图像,所述第一根密钥隐写在所述图像中。The method according to any one of claims 8-11, wherein an image is embedded in the device two-dimensional code, and the first root key is steganographically written in the image.
  13. 根据权利要求8-12任一项所述的方法,其特征在于,所述设备二维码是基于所述第二终端设备的硬件信息生成的,所述硬件信息包括媒体介入控制MAC地址和/或设备序列号。The method according to any one of claims 8-12, wherein the device two-dimensional code is generated based on hardware information of the second terminal device, and the hardware information includes a media intervention control MAC address and/or or the device serial number.
  14. 根据权利要求8-13任一项所述的方法,其特征在于,所述第二终端设备使用所述根密钥解密所述第二终端设备的防伪信息对应的加密信息,包括:The method according to any one of claims 8-13, wherein the second terminal device uses the root key to decrypt the encrypted information corresponding to the anti-counterfeiting information of the second terminal device, comprising:
    所述第二终端设备直接使用所述根密钥解密所述第二终端设备的防伪信息对应的加密信息;或者,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. 根据权利要求8-14任一项所述的方法,其特征在于,所述设备激活凭证为软件令牌或者证书。The method according to any one of claims 8-14, wherein the device activation credential is a software token or a certificate.
  16. 根据权利要求8-15任一项所述的方法,其特征在于,所述第二终端设备为智能家居设备。The method according to any one of claims 8-15, wherein the second terminal device is a smart home device.
  17. 一种设备防伪方法,其特征在于,所述方法应用于包括凭证服务器、云服务器和终端设备的通信系统中;A device anti-counterfeiting method, characterized in that the method is applied in a communication system including a credential server, a cloud server and a terminal device;
    其中,所述凭证服务器用于为所述终端设备分配根密钥,所述云服务器用于执行权利要求1-7任一项所述的设备防伪方法,所述终端设备用于执行权利要求8-16任一项所述的设备防伪方法。Wherein, the credential server is used to assign a root key to the terminal device, the cloud server is used to execute the device anti-counterfeiting method according to any one of claims 1-7, and the terminal device is used to execute claim 8 - The device anti-counterfeiting method according to any one of 16.
  18. 一种设备防伪装置,其特征在于,所述装置包括存储器、以及与存储器耦合的处理器,所述存储器中存储代码,所述处理器运行所述存储器中的代码使得所述装置执行权利要求1-7任一项所述的设备防伪方法。A device anti-counterfeiting device, characterized in that the device includes a memory and a processor coupled to the memory, the memory stores codes, and the processor executes the codes in the memory so that the device executes claim 1 -7 The anti-counterfeiting method of any one of the devices.
  19. 一种设备防伪装置,其特征在于,所述装置包括存储器、以及与存储器耦合的处理器,所述存储器中存储代码,所述处理器运行所述存储器中的代码使得所述装置执行权利要求8-16任一项所述的设备防伪方法。A device anti-counterfeiting device, characterized in that the device comprises a memory and a processor coupled to the memory, the memory stores codes, and the processor executes the codes in the memory so that the device executes claim 8 - The device anti-counterfeiting method according to any one of 16.
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行权利要求1-16任一项所述的设备防伪方法。A computer-readable storage medium storing instructions in the computer-readable storage medium, when running on a computer, causes the computer to execute the device anti-counterfeiting method according to any one of claims 1-16.
  21. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行权利要求1-16任一项所述的设备防伪方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is made to execute the device anti-counterfeiting method according to any one of claims 1-16.
PCT/CN2021/085663 2020-06-29 2021-04-06 Method and apparatus for device anti-counterfeiting WO2022001272A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010603829.6 2020-06-29
CN202010603829.6A CN113935744A (en) 2020-06-29 2020-06-29 Equipment anti-counterfeiting method and device

Publications (1)

Publication Number Publication Date
WO2022001272A1 true WO2022001272A1 (en) 2022-01-06

Family

ID=79272843

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085663 WO2022001272A1 (en) 2020-06-29 2021-04-06 Method and apparatus for device anti-counterfeiting

Country Status (2)

Country Link
CN (1) CN113935744A (en)
WO (1) WO2022001272A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277194A (en) * 2022-07-27 2022-11-01 歌尔科技有限公司 Product authentication method, wearable device, watchband and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090070593A1 (en) * 2007-09-07 2009-03-12 Authentec, Inc. Finger sensing apparatus using unique session key and associated methods
CN102855510A (en) * 2011-07-01 2013-01-02 中国人民银行印制科学技术研究所 Anti-fake product and identification method thereof
US20170111788A1 (en) * 2015-10-14 2017-04-20 Sony Computer Entertainment America Llc Secure device pairing
CN107547203A (en) * 2016-06-29 2018-01-05 深圳长城开发科技股份有限公司 A kind of false proof source tracing method and system
CN108090527A (en) * 2016-11-22 2018-05-29 北京计算机技术及应用研究所 The anti-fake method of consumptive material is carried out using radio frequency identification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090070593A1 (en) * 2007-09-07 2009-03-12 Authentec, Inc. Finger sensing apparatus using unique session key and associated methods
CN102855510A (en) * 2011-07-01 2013-01-02 中国人民银行印制科学技术研究所 Anti-fake product and identification method thereof
US20170111788A1 (en) * 2015-10-14 2017-04-20 Sony Computer Entertainment America Llc Secure device pairing
CN107547203A (en) * 2016-06-29 2018-01-05 深圳长城开发科技股份有限公司 A kind of false proof source tracing method and system
CN108090527A (en) * 2016-11-22 2018-05-29 北京计算机技术及应用研究所 The anti-fake method of consumptive material is carried out using radio frequency identification

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277194A (en) * 2022-07-27 2022-11-01 歌尔科技有限公司 Product authentication method, wearable device, watchband and storage medium

Also Published As

Publication number Publication date
CN113935744A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
US20200028672A1 (en) Secure communication method and smart lock system based thereof
US9659160B2 (en) System and methods for authentication using multiple devices
US20180069841A1 (en) Computer-implemented cryptographic method for improving a computer network, and terminal, system and computer-readable medium for the same
CN102687483B (en) The provisional registration of equipment
US10951592B2 (en) Secure wireless communication between controllers and accessories
US20170201499A1 (en) Secure wireless communication between controllers and accessories
US9443421B2 (en) Method used in a system for remotely controlling an appliance
US20060190731A1 (en) Systems and methods for device registration using optical transmission
WO2018049116A1 (en) Systems and methods for device authentication
WO2015180261A1 (en) Smart home access method, control centre device and wearable terminal
JP6444304B2 (en) One-way key fob and vehicle pairing
US11057196B2 (en) Establishing shared key data for wireless pairing
CN101908113B (en) Authentication method and authentication system
JP2008199620A (en) Method, mobile terminal, processing apparatus and program for executing verification process
US11159329B2 (en) Collaborative operating system
KR20180119201A (en) Electronic device for authentication system
US20070183597A1 (en) Broadcast encryption based home security system
CN108605034A (en) Radio firmware updates
KR20200015605A (en) Systems and methods for managing temporary shared data sets and protecting communications
CN111181723A (en) Method and device for offline security authentication between Internet of things devices
WO2022001272A1 (en) Method and apparatus for device anti-counterfeiting
US20220329429A1 (en) System and method for authorizing access to smart devices in a local environment
CN113839958B (en) Communication encryption method, device, control system and storage medium for smart home
KR101790121B1 (en) Method and System for certificating electronic machines
JP2014197761A (en) Authentication system and authentication method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21832703

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21832703

Country of ref document: EP

Kind code of ref document: A1