Unlocking method, key resetting method, device, terminal, lock, system
By performing the unlocking operation on the key device side and using the ciphertext information provided by the target device for decryption and operation, the problem of low compatibility of smart door locks is solved and the user experience is improved.
Patent Information
- Application Number
- CN202110453074.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-26
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-04-26
AI Technical Summary
Existing smart door locks have low compatibility and are difficult to be compatible with various mobile phones or IoT products, resulting in poor user experience.
By performing the unlocking operation on the key device side, the lock device does not perform cryptographic operations, but uses the ciphertext information provided by the target device to decrypt, determine the operation key, and send the token to be compared to the lock device to complete the unlocking process.
It improves the compatibility of smart locks, improves user experience, and solves the problem of low compatibility of lock devices.
Smart Images

Figure CN115331330B
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart lock technology, and in particular to an unlocking method, a key resetting method, a device, a terminal, a lock, and a system. Background Art
[0002] The current unlocking process of smart door locks requires data exchange between key devices (such as mobile phones or IoT products) and lock devices, as well as corresponding calculations to complete the unlocking process. However, current lock devices have low compatibility and are difficult to be compatible with various mobile phones or IoT products. They are not convenient for standardized industry services, resulting in a poor user experience. Summary of the invention
[0003] The embodiments of the present application provide an unlocking method, a key resetting method, an apparatus, a terminal, a lock, and a system. The unlocking method can be used to execute the unlocking process on the key device side. The lock device, as a storage device, does not perform cryptographic operations, thereby solving the problems of low compatibility of lock devices and poor user experience in the prior art.
[0004] In a first aspect, an embodiment of the present application provides an unlocking method, comprising: obtaining first ciphertext information provided by one or more target devices; decrypting the first ciphertext information and the second ciphertext information stored in a local device respectively to obtain corresponding first plaintext information and second plaintext information; determining an operation key based on the first plaintext information and the second plaintext information, and operating a first token stored in the local device based on the operation key to obtain a second token to be compared; and sending the second token to be compared to a locking device; wherein the one or more target devices include at least the locking device.
[0005] Furthermore, obtaining the first ciphertext information provided by one or more target devices includes: obtaining lock information provided by a lock device; or respectively obtaining lock information provided by a lock device and secondary key information provided by a secondary key device; wherein the lock information includes a lock ciphertext with a first mark, and the secondary key information includes a secondary key ciphertext with the first mark.
[0006] In one embodiment, if only the first ciphertext information provided by one target device is obtained, the one target device may be a lock device, and the obtained first ciphertext information includes the lock information provided by the lock device. If the first ciphertext information provided by multiple target devices is obtained, the multiple target devices include a lock device and a secondary key device, and the first ciphertext information provided by the lock device and the secondary key device may be obtained respectively, specifically including the lock information provided by the lock device and the secondary key information provided by the secondary key device. The secondary key device may be a cloud or IoT product (smart watch, smart speaker, tablet, etc.).
[0007] Furthermore, before obtaining the first ciphertext information provided by one or more target devices, it also includes: establishing a secure channel with one or more target devices, and communicating with the one or more target devices through the secure channel; wherein, establishing a secure channel with one or more target devices includes: establishing a first secure channel with a lock device; or establishing secure channels with a lock device and a secondary key device respectively, wherein a first secure channel is established with the lock device and a second secure channel is established with the secondary key device; wherein, obtaining the lock information provided by the lock device includes: obtaining the lock information sent by the lock device through the first secure channel; obtaining the lock information provided by the lock device and the secondary key information provided by the secondary key device respectively includes: obtaining the lock information sent by the lock device through the first secure channel and obtaining the secondary key information provided by the secondary key device through the second secure channel.
[0008] Further, the decrypting of the first ciphertext information and the second ciphertext information stored in the local device respectively to obtain the corresponding first plaintext information and the second plaintext information includes: a first decryption operation or a second decryption operation; wherein the first decryption operation includes: obtaining the master key ciphertext with the first mark in the second ciphertext information; performing access operations on the lock ciphertext and the master key ciphertext respectively to obtain the corresponding lock plaintext and master key plaintext; the second decryption operation includes: obtaining the master key ciphertext with the first mark in the second ciphertext information; performing access operations on the lock ciphertext, the master key ciphertext and the secondary key ciphertext respectively to obtain the corresponding lock plaintext, master key plaintext and secondary key plaintext; wherein the access operation includes: performing access control on the current user, and when the current user is authenticated as legitimate through the access control and the access object is in an encrypted state, performing a decryption operation on the access object; wherein the access control includes one or more of the following: biometric identification authentication, local device location authentication, and distance authentication between the local device and the lock device.
[0009] Further, the obtaining of the master key ciphertext with the first mark in the second ciphertext information includes: obtaining multiple key ciphertexts with the first mark in the second ciphertext information; and determining that the key ciphertext with the key type of the master key among the multiple key ciphertexts with the first mark is the master key ciphertext. The key ciphertext can be matched by the first mark, and the master key ciphertext can be obtained by the key type.
[0010] Furthermore, the decryption operation on the access object includes: if the access object is the master key ciphertext, decrypting the master key ciphertext according to the hardware unique key of the local device to restore the master key plaintext; if the access object is the lock ciphertext and / or the secondary key ciphertext, decrypting the lock ciphertext and / or the secondary key ciphertext according to the trusted device key to restore the lock plaintext and / or the secondary key plaintext.
[0011] In the second aspect, an embodiment of the present application also provides an unlocking method, including: sending a first ciphertext information to a master key device; obtaining a second token to be compared sent by the master key device; and comparing the second token to be compared with a local second token stored in a local device, and unlocking if the second token to be compared is the same as the local second token.
[0012] Furthermore, before sending the first ciphertext information to the master key device, it also includes: establishing a first security channel with the master key device, and communicating with the master key device through the first security channel; wherein, sending the first ciphertext information to the master key device includes: sending lock information to the master key device through the first security channel, and the lock information includes a lock ciphertext with a first mark.
[0013] In a third aspect, an embodiment of the present application further provides an unlocking method, comprising: sending first ciphertext information to a master key device, where the first ciphertext information may include secondary key information.
[0014] Furthermore, before sending the first ciphertext information to the master key device, it also includes: establishing a second security channel with the master key device, and communicating with the master key device through the second security channel; the secondary key information includes a secondary key ciphertext with a first mark. It should be noted that if the secondary key device is a cloud device (storing secondary key information in the cloud), a second security channel can be established with the master key device before sending the first ciphertext information to the master key device. If the secondary key device is an IoT device in the smart key system, a third security channel is established with the master key device before sending the first ciphertext information to the master key device (distinguishing the second security channel between the end and the cloud, the security channel between the end and the end is called the third security channel).
[0015] In a fourth aspect, an embodiment of the present application further provides an unlocking method, comprising: obtaining first ciphertext information provided by one or more target devices; decrypting the first ciphertext information and the shared key ciphertext stored in the local device respectively to obtain the corresponding first plaintext information and the shared key plaintext; determining an operation key according to the first plaintext information and the shared key plaintext, and operating the first token stored in the local device according to the operation key to obtain a second token to be compared; and sending the second token to be compared to a locking device, wherein the one or more target devices at least include the locking device. Before executing the above unlocking step, the shared key device can receive the shared key information and the first token sent by the master key device through the third security channel, and the shared key information includes a shared key ciphertext with a first mark.
[0016] In the fifth aspect, an embodiment of the present application also provides an unlocking method, including: obtaining backup key information and a first token; obtaining lock information provided by a locking device; determining an operation key based on the backup key information and the lock information, and performing an operation on the first token based on the operation key to obtain a second token to be compared; and sending the second token to be compared to the locking device.
[0017] In a sixth aspect, an embodiment of the present application also provides a key resetting method, comprising: sending a destruction instruction to one or more target devices, so that the one or more target devices destroy the corresponding key according to the destruction instruction, and the one or more target devices include at least a lock device; generating N keys through a key data model, setting the key types of two of the N keys to master key and lock, N≥2, and N is a positive integer; encrypting the key whose key type is the lock through a first key to obtain a corresponding lock ciphertext, and marking the lock ciphertext to obtain a lock ciphertext with a first mark; encrypting the key whose key type is the master key through a second key to obtain a master key ciphertext, and marking the master key ciphertext to obtain a master key ciphertext with the first mark; operating a first token through an original key to obtain a second token; sending lock information and token information to the lock device, the lock information including the lock ciphertext with the first mark, and the token information including the second token; and saving the master key information and the first token locally, the master key information including the master key ciphertext with the first mark. Among them, sending a destruction instruction to one or more target devices can be an operation of actively executing the destruction instruction, and can also be an operation of forcibly executing the destruction operation after the user completes downloading the backup key information from the backup key device (cloud).
[0018] Furthermore, after generating N keys through the key data model, it also includes: setting the key type of one of the N keys to a backup key; encrypting the key of the backup key type through the first key to obtain a corresponding backup key ciphertext, and marking the backup key ciphertext to obtain a backup key ciphertext with the first mark; sending the backup key information to a backup key device, so that the backup key device saves the received backup key information, and the backup key information includes the backup key ciphertext with the first mark.
[0019] Furthermore, after generating N keys through the key data model, it also includes: setting the key type of one or more keys among the N keys to a secondary key; encrypting the key with the key type of the secondary key through the first key to obtain the corresponding secondary key ciphertext, and marking the secondary key ciphertext to obtain the secondary key ciphertext with the first mark; sending the secondary key information to the corresponding secondary key device, so that the secondary key device saves the received secondary key information, and the secondary key information includes the secondary key ciphertext with the first mark.
[0020] Furthermore, after generating N keys through the key data model, it also includes: setting the key type of one or more keys among the N keys to a shared key; encrypting the key with the key type of the shared key through the second key to obtain the corresponding shared key ciphertext, and marking the shared key ciphertext to obtain the shared key ciphertext with the first mark; saving the shared key information locally, the shared key information including the shared key ciphertext with the first mark.
[0021] In the seventh aspect, an embodiment of the present application also provides a key processing device, including: a processor and a memory, the memory being used to store at least one instruction, and the instruction being loaded and executed by the processor to implement the unlocking method provided in the first aspect, the fourth aspect, the fifth aspect or the key resetting method provided in the fifth aspect.
[0022] In an eighth aspect, an embodiment of the present application further provides a key processing device, comprising: a processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the unlocking method provided in the second aspect is implemented.
[0023] In the ninth aspect, an embodiment of the present application further provides a key processing device, comprising: a processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the unlocking method provided in the third aspect is implemented.
[0024] In one implementation, the key processing device provided in the seventh aspect, the eighth aspect and the ninth aspect may be a chip.
[0025] Furthermore, an embodiment of the present application also provides a chip, which is connected to a memory, or the chip has an integrated memory (such as the key processing device provided in the seventh, eighth and ninth aspects). When the program or instruction stored in the memory is executed, the corresponding unlocking method or key resetting method is implemented.
[0026] In the tenth aspect, an embodiment of the present application further provides a user terminal, comprising a terminal body and the key processing device provided in the seventh aspect.
[0027] In the eleventh aspect, an embodiment of the present application also provides a smart lock, including a smart lock body and a key processing device provided in the eighth aspect.
[0028] In the twelfth aspect, an embodiment of the present application also provides a cloud server, including a server body and the key processing device provided in the ninth aspect.
[0029] In the thirteenth aspect, the embodiment of the present application also provides a smart key system, including the user terminal provided in the tenth aspect and the smart lock provided in the eleventh aspect, wherein the user terminal can be used as a master key device, a secondary key device or a shared key device in the smart key system, and the smart lock can be used as a lock device in the smart key system.
[0030] Furthermore, the smart key system may also include the cloud server provided in the twelfth aspect, wherein the cloud server may serve as a backup key device or a secondary key device in the smart key system.
[0031] In the fourteenth aspect, an embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the unlocking method provided in any one of the first aspect, the second aspect, the third aspect, the fourth aspect and the fifth aspect or the key resetting method provided in the sixth aspect is implemented.
[0032] Through the above technical solution, by obtaining the first ciphertext information provided by the target device, specifically at least the ciphertext information provided by the lock device is obtained. The first ciphertext information and the second ciphertext information stored in the local device are decrypted respectively to obtain the corresponding first plaintext information and the second plaintext information, and then the operation key is restored according to the first plaintext information and the second plaintext information. The first token is operated by the operation key to obtain the second token to be compared, and then the second token to be compared is sent to the lock device. The lock device compares the received second token to be compared with the local second token. Through verification, if the second token to be compared is consistent with the local second token, it proves that the device (master key device) that sends the unlocking request holds the key certification information, and then the unlocking can be performed. It can solve the problems of low compatibility of lock devices and low user experience in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1a This is a schematic diagram of the fixed password unlocking mode;
[0035] Figure 1b This is a schematic diagram of the temporary password unlocking mode;
[0036] Figure 1c This is a schematic diagram of the biometric key unlocking mode;
[0037] Figure 1d This is a schematic diagram of the smart access card unlocking mode;
[0038] Figure 1e This is a schematic diagram of the mobile phone APP unlocking mode;
[0039] Figure 2 This is the structure diagram of the secure Bluetooth car key;
[0040] Figure 3 A schematic diagram of a system architecture provided for an embodiment of the present application;
[0041] Figure 4 A diagram of a key device architecture provided for yet another embodiment of the present application;
[0042] Figure 5 A schematic diagram of a key activation process provided in yet another embodiment of the present application;
[0043] Figure 6A flowchart of an unlocking method provided in yet another embodiment of the present application;
[0044] Figure 6a A schematic diagram of a master key unlocking application scenario provided in yet another embodiment of the present application;
[0045] Figure 6b A schematic diagram of an application scenario of unlocking a primary or secondary key provided in yet another embodiment of the present application;
[0046] Figure 6c A schematic diagram of a process of unlocking a lock using a master key device provided in yet another embodiment of the present application;
[0047] Figure 6d A schematic diagram of a shared key unlocking application scenario provided in yet another embodiment of the present application;
[0048] Figure 6e A schematic diagram of a process of unlocking a shared key device provided in yet another embodiment of the present application;
[0049] Figure 7 A schematic diagram of a backup key unlocking application scenario provided in yet another embodiment of the present application;
[0050] Figure 8 A flowchart of a key resetting method provided in yet another embodiment of the present application;
[0051] Figure 8a A schematic diagram of a process of resetting a key after using a backup key provided in yet another embodiment of the present application;
[0052] Figure 8b A schematic diagram of a key destruction process provided in yet another embodiment of the present application;
[0053] Figure 8c A schematic diagram of a key reset application scenario provided in yet another embodiment of the present application;
[0054] Fig. 9 This is a schematic structural diagram of a key processing device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] Smart door locks are widely used, and there are many types of smart door locks. Smart door lock users are concerned about the security of their smart door locks and whether they have a more user-friendly design. The attack surface for the security quality of smart door locks is concentrated in the following aspects: firmware / hardware, business layer, communication, etc. Due to the low price of lock devices, the security of the key calculation process of the door lock firmware / hardware is relatively weak.
[0057] There are 5 typical smart door locks on the market:
[0058] The first type: Cloud + lock collaboration, single feature authentication of user identity. This single feature authentication can be unlocking by password. Figure 1a This is a schematic diagram of unlocking with a fixed password, such as Figure 1a As shown, the user can enter the password on the input interface of the smart door lock to unlock it, and the smart door lock can upload the door opening record or alarm information to the cloud via WiFi.
[0059] The second type: cloud + lock + terminal collaboration, single feature authentication of user identity. This single feature authentication can unlock the temporary key provided by the householder to the visitor. Figure 1b This is a schematic diagram of the temporary password unlocking mode, such as Figure 1b As shown, the cloud can send the temporary password configured for the first time to the terminal used by the homeowner, and then the homeowner can remotely inform the visitor of the temporary password through the terminal. The visitor can unlock the door by entering the temporary password on the input interface of the smart door lock. The smart door lock can upload the door opening record or alarm information to the cloud via WiFi, and the cloud will notify the homeowner of the door opening information, alarm information, and user information.
[0060] The third type: Cloud + lock collaboration, single feature authentication of user identity. This single feature authentication can be unlocked by a biometric key. Figure 1c This is a schematic diagram of the biometric key unlocking mode. Figure 1c As shown, the user can perform biometric key authentication on the authentication interface of the smart door lock, such as fingerprint recognition. The smart door lock uploads the biometric key provided by the user to the cloud via WiFi. After the cloud verification is passed, the verification message is sent to the smart door lock. The smart door lock is unlocked when the verification message indicates that the verification is passed. Similarly, it has the corresponding functions of the above-mentioned door opening record and alarm message, which will not be repeated here.
[0061] The fourth type: Cloud + lock + terminal collaboration, authentication device identity. The authentication device can be a smart access control card. Figure 1d This is a schematic diagram of the smart access card unlocking mode, such as Figure 1dAs shown in the figure, the user uses the access card issued and activated by the main station to unlock the door. Similarly, the smart door lock can upload the unlocking information, networking information, and unlocking records to the cloud via WiFi, and the cloud can send alarm information to the smart door lock. The main station can log in to the management system to communicate with the cloud and perform corresponding management operations.
[0062] The fifth type: Cloud + lock + terminal collaboration, single feature authentication of user identity. Single feature authentication can unlock the user's smart terminal with a key. Figure 1e This is a schematic diagram of the mobile phone APP unlocking mode, such as Figure 1e As shown, the user can open an account through the corresponding APP installed in the smartphone, and upload the APP account information and the device information of the mobile phone to the cloud. The cloud will send the initial key to the APP of the user's smartphone. The user can use the smartphone to communicate with the smart door lock in the near field and unlock it with the initial key. When a visitor needs to unlock, the cloud can send the unlocking key to the visitor's smartphone AAP. The visitor user can use the smartphone to communicate with the smart door lock in the near field and unlock it with the unlocking key. Similarly, the corresponding functions of the above-mentioned door opening records and alarm messages are not repeated here.
[0063] The above unlocking scheme has at least the following defects:
[0064] 1. The door lock has weak security capabilities (no security chip and trusted execution environment) and performs too many operations, such as biometric comparison and encryption and decryption operations.
[0065] 2. Without a unified model / system, it is difficult to be compatible with various mobile phones / IoT products and facilitate standardized industry business.
[0066] 3. Over-reliance on the cloud when unlocking the door. The cloud cannot prove its innocence and cannot safely handle abnormal situations: network disconnection, power outage, etc.
[0067] 4. People’s authentication is mostly based on a single feature, not strong identity authentication. (There are three types of identity authentication for people: knowledge, possessions, and biometrics. Using more than two types of authentication at the same time is strong identity authentication.)
[0068] In addition to the above-mentioned door locks, smart locks can also be car locks. Based on the unified standard of the automotive industry (CarConnectivity Consortium Digital Key), the system is built to place digital keys in security chips and car doors through the car manufacturer's cloud. When unlocking, the mobile phone car key needs near field (NFC / Bluetooth) to compare the digital key in the security chip and the car door.
[0069] Figure 2 This is a diagram of the secure Bluetooth car key structure, such as Figure 2As shown, the Bluetooth car key improves the security of the car lock by preventing Bluetooth relay. However, the solution still has the following defects: it is limited to car smart door lock services, relies on NFC / Bluetooth and security chips, and the cloud cannot prove its innocence.
[0070] In order to overcome the defects of the above-mentioned smart door locks and Bluetooth car keys, the embodiments of the present application provide an unlocking method, a key resetting method, an apparatus, a terminal, a lock, and a system, and focus on reducing the attack surface of firmware / hardware, so that no real key (i.e., digital key) appears in the lock device, no cryptographic operations are performed, and all cryptographic operations are performed in a secure chip or a trusted execution environment, and the above-mentioned defects are solved.
[0071] The present application embodiment provides a smart key system, Figure 3 A schematic diagram of a system architecture provided for an embodiment of the present application is shown in FIG. Figure 3 As shown, the system architecture provided by the present application includes rich devices, thin devices, cloud devices and smart key data models.
[0072] Rich devices: Integrated security chip / trusted execution environment key calculation / authentication and authorization / attribute-based access control capabilities to achieve the management of business key generation, sharing, use, destruction and retrieval.
[0073] In the application scenario, the rich device can be a key device. An application scenario can include multiple rich devices, that is, it can include multiple key devices, where the types of key devices include master key devices and sub-key devices, and thus the rich device can be used as a master key device or a sub-key device.
[0074] Thin device: As a carrier of encrypted and non-confidential key materials, it does not perform cryptographic operations and cooperates with rich devices to complete the use and destruction of keys.
[0075] In an application scenario, the thin device may be a lock device, and the lock device is unique in an application scenario.
[0076] Cloud device: As a carrier of encrypted and non-confidential key materials, it does not perform cryptographic operations and cooperates with rich devices to complete the use, destruction and retrieval of keys.
[0077] In the application scenario, the cloud device may also be a key device, wherein the type of the key device also includes a backup key device and a secondary key device.
[0078] Smart key data model: used for information transmission and processing within the distributed smart key system. Specifically, key data can be processed through the factors of "lock", "key type", "token" and "access control". The factor information of "lock", "key", "token" and "access control" is shown in Table 1:
[0079] Table 1
[0080]
[0081] In the smart key system, rich devices, thin devices, and cloud devices all contain trusted keys (trusted device keys), and devices with trusted keys are mutually trusted devices, so the devices in the smart key system are mutually trusted devices. The trusted device key can include a key derived from a fixed password or a trusted device group key provided by the terminal device operator. Among them, the trusted device group key provided by the terminal device operator can be the user's login account and password on the terminal device. For example, two terminal devices log in with the same login account and password. After successful login, the two devices are mutually trusted devices.
[0082] When the devices in the smart key system are mutually trusted devices, rich devices can provide trusted key strong device services, thin devices can provide trusted key weak device services, and cloud devices can provide trusted key cloud services.
[0083] Trusted Key Strong Device Service:
[0084] 1. Secure channel technology, communication with the cloud / lock device / shared key device.
[0085] 2. Call the trusted key high-security service, issue instructions, and transmit key data.
[0086] 3. End-to-cloud access control technologies, such as temporary text messages, preset questions, passwords, and biometrics.
[0087] Trusted key weak device service:
[0088] 1. Integrate secure channels to communicate with trusted key high-security services.
[0089] 2. Compare data and unlock capabilities.
[0090] Trusted Key Cloud Service:
[0091] 1. Integrate a secure channel to communicate with the end side and transparently transmit data.
[0092] 2. End-to-cloud access control technologies, such as temporary text messages, preset questions, passwords, and biometrics.
[0093] In addition, rich devices can also provide trusted key high-security services:
[0094] 1. Cryptographic operations, generate / recover / clear / transfer keys protected by hardware HUK and proof of key possession.
[0095] 2. Integrated access control (authentication & authorization) capabilities, access control is achieved through authorization through authentication (face / fingerprint / location / distance from the door lock), attributes, etc.
[0096] 3. When the device is damaged / restored to factory default, an abnormal mark is set in the non-erasable area.
[0097] The key operations performed by rich devices are all based on a high-security environment (secure chip and / or trusted execution environment). Figure 4 A key device architecture diagram provided for another embodiment of the present application, such as Figure 4 As shown, when the rich device is used as a key device, the trusted key high-security service provided by the key device (rich) requires the use of a physical component application processor (AP), and the AP runs the trusted execution environment (TEE), the first security computing module (Mobile Secure Processor, MSP), the second security computing module (Secure Enclave Processor, SEP) and / or other types of security chips (Secure Element, SE) key calculation and hardware unique key (Hardware Unique Key, HUK) capabilities.
[0098] Before using the key (secret key) to unlock, the corresponding key activation operation needs to be performed. Figure 5 A schematic diagram of a key activation process is provided for another embodiment of the present application, such as Figure 5 As shown, in the key activation stage, the master key device is required to transmit data to the lock device and the cloud device respectively. In one embodiment, in order to ensure the security of the transmitted data, the master key device can establish a secure channel with the lock device and the cloud device respectively, wherein the master key device establishes a first secure channel with the lock device and a second secure channel with the cloud device. In this embodiment, the user can perform corresponding operations on the application (Application, APP) interface in the master key device to authorize the establishment of the above-mentioned first secure channel and the second secure channel. For example, the user sends an activation instruction through the master key device APP to trigger the operation of authorizing the establishment of the above-mentioned secure channel, and can also trigger the authorization to establish the above-mentioned secure channel in other ways, which are not limited here.
[0099] It should be noted that the technology for protecting the confidentiality and integrity of transmitted information in the secure channel eleven provided in any embodiment of the present application is not limited to the transmission method and may include transmission technologies such as code scanning, NFC, WIFI, Bluetooth, etc.
[0100] The user sends an activation instruction through the master key device APP in a high-security environment, which may include access control information, and the access control information may include face authentication or location. That is, the user's facial features and location information are saved in advance to facilitate face recognition or location recognition in the subsequent access control process. Other access control methods can also be used in this application, not limited to face recognition and location. The master key device generates N keys (secret keys) A0, A1, A2, A3, ...An according to the smart key data model in a security chip or a trusted execution environment, 2≤n, and n is a positive integer. The operation of generating N keys (secret keys) A0, A1, A2, A3, ...An includes sharding the original key to obtain the above-mentioned N keys (secret keys) A0, A1, A2, A3, ...An, and any N keys of the generated N keys can be restored to obtain the original key, where 2≤n, and n is a positive integer. For example, the Shamir cipher fragmentation algorithm may be used to perform fragmentation calculation and recovery calculation on the original key. Other algorithms may also be used in other embodiments of the present application, which are not limited here.
[0101] In one implementation, n may be greater than or equal to 2, that is, the smart key data model generates at least two keys, and key types are set for the at least two generated keys, wherein the key types of the at least two keys include at least a master key and a lock.
[0102] In another embodiment, n may be greater than or equal to 3, that is, the smart key data model generates at least three keys, and key types are set for the at least three keys generated, wherein the key types of the at least three keys include at least a master key, a lock, and a backup key.
[0103] In another embodiment, n can also be greater than or equal to 4, that is, the smart key data model generates at least four keys, and key types are set for the at least four keys generated, wherein the key types of the at least four keys include at least a master key, a lock, a backup key, and a secondary key.
[0104] In another embodiment, n can also be greater than or equal to 5, that is, the smart key data model generates at least five keys, and key types are set for the at least five keys generated, wherein the key types of the at least five keys include at least a master key, a lock, a backup key, a secondary key, and a shared key.
[0105] After setting the key type based on any of the above implementations, multiple keys with the key type can also be encrypted through the master key device APP in a high-security environment. The above encryption operation on multiple keys requires at least obtaining the master key information, lock information and token information.
[0106] Operations on generating lock information
[0107] The key type is a lock key (i.e., a lock plaintext) is encrypted by a first key to obtain a lock ciphertext, and the lock ciphertext is marked to obtain a lock ciphertext with a first mark, and the generated lock information includes the lock ciphertext with the first mark. The generated lock information can be sent to the lock device through the first secure channel, so that the lock device saves the received lock information.
[0108] About the operation of generating master key information
[0109] The master key (i.e., the master key plaintext) is encrypted by the second key type to obtain the master key ciphertext, and the master key ciphertext is marked identically according to the mark of the lock ciphertext to obtain the master key ciphertext with the first mark, and the generated master key information includes the master key ciphertext with the first mark. The generated master key information can be stored on the master key device side.
[0110] About the operation of generating token information
[0111] The first token is subjected to a preset operation to obtain a second token, and the generated token information includes the first token or the second token. The token information including the first token can be stored on the master key device side, and the token information including the second token can be sent to the lock device through the first security channel, so that the lock device stores the received token information including the second token.
[0112] In a basic implementation, if the smart key data model generates at least two keys, the at least two keys include at least key A0 and key A1, and in the key type setting operation, key A0 is set as a master key and key A1 is set as a lock.
[0113] The key type is a lock key (i.e., lock plaintext) is encrypted by the first key to obtain a lock ciphertext, which may specifically include using a trusted device key to encrypt the key A1 (lock plaintext) to obtain a lock ciphertext. A mark "1" is set for the lock ciphertext, and the generated lock information includes a lock ciphertext with a mark "1". Further, the first token B1 can be operated in a one-way manner by the original key. For example, the first token B1 can be operated in a one-way manner by a hash operation message authentication code (Hash-based Message Authentication Code, HMAC) by the original key to obtain a second token B2, and the generated token information includes the second token B2. In the present application, the algorithm for performing a one-way operation on the first token B1 is not limited to HMAC. The master key device can send the lock information and the token information including the second token B2 to the [Trusted Key Weak Device Service] of the lock device through the first secure channel, that is, the lock device saves the received lock information and the token information including the second token B2. In a feasible implementation, the algorithm information of the corresponding algorithm of the shard calculation and the recovery calculation can also be sent to the lock device, wherein the algorithm information includes the algorithm name and the number of keys required to recover the original key. For example, the algorithm of the shard calculation and the recovery calculation is the Shamir algorithm, and it is set that two keys are required to recover the original key, that is, the original key can be recovered by the Shamir algorithm based on the two keys of the master key plaintext and the lock plaintext. Furthermore, the corresponding algorithm information includes "Shamir&2", wherein "Shamir" indicates that the Shamir algorithm is used, and "2" indicates that two keys are required to recover the original key. If the Shamir algorithm is also used, but three keys are required to recover the original key, the corresponding algorithm information includes "Shamir&3". The expression of this algorithm information is applicable to other algorithms and the number of keys required to recover the original key.
[0114] Encrypting the key of the master key (i.e., the master key plaintext) by the second key type to obtain the master key ciphertext may include encrypting the key A0 (master key plaintext) using the hardware unique key (HUK) to obtain the master key ciphertext. Setting a mark "1" for the master key ciphertext, and then generating the master key information includes the master key ciphertext with the mark "1". The master key device may write the master key information to the disk, that is, save the generated master key information locally.
[0115] On the basis of the basic implementation method, in one or more other implementation methods involving one or more of a backup key, a secondary key, and a shared key, the above-mentioned encryption, marking and transmission operations are also required.
[0116] Specifically, if the smart key data model generates at least three keys, the at least three keys may include key A2 in addition to key A0 and key A1 in the above basic implementation, and in the key type setting operation, key A2 may be set as a backup key. The key A2 (backup key plaintext) may be encrypted using a first key (e.g., a trusted device key) to obtain a backup key ciphertext, and a mark "1" may be set for the backup key ciphertext. The generated backup key information may include a backup key ciphertext with a mark "1" and a first token, wherein the number of times the backup key can be used may also be limited. In one implementation, the number of valid uses of the backup key may be set to once. The master key device may transmit the backup key information to the cloud disk through a second secure channel, that is, the cloud device saves the received backup key information.
[0117] If the smart key data model generates at least four keys, the at least four keys may include key A2 and key A3 in addition to key A0 and key A1 in the above basic implementation mode, and in the key type setting operation, key A2 may be set as a backup key, and key A3 may be set as a secondary key. Key A3 (secondary key plaintext) may be encrypted using a trusted device key to obtain a secondary key ciphertext, and a mark "1" may be set for the secondary key ciphertext. The generated secondary key information may include a secondary key ciphertext with a mark "1". The master key device may send the secondary key information to the secondary key device through a secure channel between the master key device and the secondary key device, that is, the secondary key device saves the received secondary key information. In some embodiments, multiple keys may be set as secondary keys, and the corresponding secondary key devices may be distributed to the secondary key devices in the smart key system. Among them, the secondary key device may be a cloud device or an IoT device in the smart key system, such as a user's smart watch, tablet computer, etc. For example, if the smart key system includes two sub-keys, one for the cloud device and the other for the smart watch, then the two different sub-key information (the first sub-key information and the second sub-key information) generated need to be sent to the cloud device and the smart watch through corresponding security channels, respectively, wherein the first sub-key information can be sent to the cloud device, and the second sub-key information can be sent to the smart watch. The generation method of the backup key information is the same as above and will not be repeated.
[0118] If the smart key data model generates at least five keys, the at least five keys may include key A2, key A3 and key A4 in addition to key A0 and key A1 in the above basic implementation mode, and in the key type setting operation, key A2 may be set as a backup key, key A3 may be set as a secondary key, and key A4 may be set as a shared key. Key A4 (shared key plaintext) may be encrypted using HUK to obtain a shared key ciphertext, and a mark "1" may be set for the shared key ciphertext, thereby generating shared key information including a shared key ciphertext with a mark "1". The master key device may save the shared key information to a disk, that is, save the generated shared key information locally. The generation method of the backup key information and secondary key information is the same as above and will not be repeated.
[0119] It should be noted that a master key device can store multiple sets of keys, that is, a master key device can be used to unlock multiple lock devices.
[0120] The smart key system provided based on the embodiment of the present application can execute the corresponding unlocking method to provide a safe and highly compatible smart lock service.
[0121] Figure 6 A flowchart of an unlocking method provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the unlocking method includes the following steps:
[0122] Step 601: Obtain first ciphertext information provided by one or more target devices.
[0123] The one or more target devices at least include a lock device.
[0124] Step 602: Decrypt the first ciphertext information and the second ciphertext information stored in the local device respectively to obtain corresponding first plaintext information and second plaintext information.
[0125] Step 603: Determine a calculation key according to the first plaintext information and the second plaintext information, and perform a one-way calculation on the first token stored in the local device according to the calculation key to obtain a second token to be compared.
[0126] Step 604: Send the second token to be compared to the locking device.
[0127] about Figure 6 In the embodiment shown, in one implementation, first ciphertext information provided by a target device may be obtained, and the target device may be a lock device. Correspondingly, the first ciphertext information provided by the lock device may include lock information, wherein the lock information includes a lock ciphertext with a first mark.
[0128] Figure 6a A schematic diagram of a master key unlocking application scenario provided by an embodiment of the present application is as follows: Figure 6a As shown, the scenario includes a master key device 611 and a lock device 612, that is, the master key is used to unlock the device. Specifically, the master key device 611 obtains the lock information provided by the lock device 612, and then the master key device 611 recovers the original key according to the lock information and the locally stored master key information, and performs a one-way operation on the locally stored first token according to the calculated original key to obtain the second token. The calculated second token is the token to be compared (so it is called the second token to be compared). The master key device 611 further sends the second token to be compared to the lock device 612. In addition to the storage function, the lock device 612 can also provide a data comparison function. Specifically, the obtained second token to be compared can be compared with the locally stored second token (to distinguish it from the above-mentioned second token to be compared, it can be called the local second token). If the second token to be compared is consistent with the local second token, it can be unlocked.
[0129] The following is an explanation of the unlocking method through a specific example.
[0130] First embodiment
[0131] Application scenario: includes a master key device 611 and a lock device 612, wherein a smart phone serves as the master key device 611 and a smart door lock serves as the lock device 612.
[0132] Figure 6c A schematic diagram of a process of unlocking a door using a key provided in an embodiment of the present application is shown in FIG. Figure 6cAs shown, the user can operate on the APP interface of the smartphone, for example, click the touch button on the interface to authorize the establishment of a first security channel between the smartphone and the smart door lock. After the first security channel is established, the smart door lock sends the lock information to the smartphone through the first security channel. The lock information may include a lock ciphertext with a mark "1". In other implementable methods, the smart door lock may also send both the algorithm information and the lock information to the smartphone. The algorithm information includes "Shamir&2", where "Shamir" indicates that the Shamir algorithm is used, and "2" indicates that two keys (may be the master key plaintext and the lock plaintext) are required to restore the original key. The smartphone locally stores the master key information, which includes the master key ciphertext with a mark "1", and the same mark as the lock is set on the key to indicate that the key with the mark "1" is used to open the lock with the mark "1". Therefore, the key ciphertext with the mark "1" and the key type of "master key" can be queried and obtained in the smartphone through the mark "1" in the lock information, that is, the master key information is obtained. After obtaining the lock information, the trusted device key can be used to restore the lock plaintext. When the user accesses the master key ciphertext, it triggers access control (face authentication) for the current user. After the user passes the face authentication, the master key plaintext can be restored using HUK. Then, based on the obtained lock plaintext and master key plaintext, the original key X is restored through the Shamir algorithm, and the original key X is used to perform a one-way HMAC operation on the token B1 stored locally on the smartphone to obtain the token B2 (to be compared), and the token B2 (to be compared) is sent to the smart door lock through the first security channel. The smart door lock compares the received token B2 (to be compared) with the locally stored token B2 (local token), and unlocks the door if they are consistent.
[0133] about Figure 6 In another embodiment, the embodiment shown in FIG. Figure 6b As shown, the first ciphertext information provided by multiple target devices can be obtained. It should be noted that the multiple target devices must at least include a lock device 612. On this basis, the multiple target devices may also include a secondary key device 613. Among them, both the cloud device and the IoT device in the smart key system can serve as the secondary key device 613. Specifically, the lock information provided by the lock device 612 and the secondary key information provided by the secondary key device 613 can be obtained respectively, wherein the lock information includes a lock ciphertext with a first mark, and the secondary key information includes a secondary key ciphertext with a first mark. In the example Figure 6bAs shown, the scenario includes a master key device 611, a lock device 612 and a secondary key device 613. In this scenario, the master key and the secondary key are used together to unlock the key. Specifically, the master key device 611 recovers the original key based on the lock information provided by the lock device 612, the secondary key information provided by the secondary key device 613 and the master key information stored locally in the master key device, and performs a one-way operation on the first token stored locally according to the calculated original key to obtain the second token to be compared. After the master key device obtains the lock information provided by the lock device, the master key device 611 can also send the lock information to the secondary key device 613, and then the secondary key device 613 can send the secondary key information with the same mark to the master key device 611 according to the mark information in the lock information (for example, the mark "1" of the lock ciphertext).
[0134] The master key device 611 further sends the second token to be compared to the lock device 612. The lock device 612 can compare the acquired second token to be compared with the local second token stored locally, and can unlock the door if the second token to be compared is consistent with the local second token.
[0135] The following is an explanation through specific examples:
[0136] Second embodiment
[0137] Application scenario: includes a main key device 611, a lock device 612 and a secondary key device 613, wherein a smart phone serves as the main key device 611, a smart door lock serves as the lock device 612, and a smart watch serves as the secondary key device 613.
[0138] Figure 6c A schematic diagram of a process of unlocking a door using a key provided in an embodiment of the present application is shown in FIG. Figure 6cAs shown, the user can operate on the APP interface of the smartphone, for example, click the touch button on the interface to authorize the establishment of a first security channel between the smartphone and the smart door lock, and the establishment of a third security channel between the smartphone and the smart watch. After the first and third security channels are established, the smart door lock sends the lock information to the smartphone through the first security channel. The smart watch sends the secondary key information to the smartphone through the third security channel. The lock information may include a lock ciphertext with a mark "1", and the secondary key information includes a secondary key ciphertext with a mark "1". In other implementable methods, the smart door lock can also send both the algorithm information and the lock information to the smartphone. The algorithm information includes "Shamir&3", where "Shamir" means that the Shamir algorithm is used, and "3" means that three keys (may be master key plaintext, lock plaintext and secondary key plaintext) are required to restore the original key. The key ciphertext with a mark "1" and a key type of "master key" is queried and obtained in the smartphone through the mark "1" in the lock information, that is, the master key information is obtained. After obtaining the lock information and the secondary key information, the trusted device key can be used to restore the lock plaintext and the secondary key plaintext respectively. When the user accesses the master key ciphertext, it triggers the access control (face recognition) of the current user. After the user passes the face recognition, the master key plaintext can be restored using HUK. Then, based on the obtained lock plaintext, master key plaintext and secondary key plaintext, the original key X is restored through the Shamir algorithm, and the original key X is used to perform a one-way HMAC operation on the token B1 stored locally on the smartphone to obtain the token B2 (to be compared), and the token B2 (to be compared) is sent to the smart door lock through the first security channel. The smart door lock compares the received token B2 (to be compared) with the locally stored token B2 (local token), and unlocks the door if they are consistent.
[0139] about Figure 6In another implementation of the embodiment shown, the first ciphertext information provided by multiple target devices can be obtained. It should be noted that the multiple target devices must at least include a lock device 612. On this basis, the multiple target devices can also include a shared key device 614. Among them, the trusted device in the smart key system can serve as the shared key device 614. Specifically, the shared key device 614 can obtain the shared key information and the first token provided by the master key device 611, wherein the shared key information includes a shared key ciphertext with a first mark. It should be noted that when the master key device generates the shared key information or sends the shared key information to the visitor, the valid use time or valid number of uses of the shared key can be set. For example, before sending the shared key information to the visitor, the shared key can be set to be valid within 24 hours, or the valid number of uses of the shared key can be set to 5 times when the shared key information is generated. The valid use time or valid number of uses can be set accordingly according to user needs and is not limited again. In the unlocking stage, the shared key device 614 can also obtain the lock information provided by the lock device 612, and the lock information includes a lock ciphertext with a first mark. As Figure 6d As shown, the scenario includes a master key device 611, a lock device 612 and a shared key device 614. In this scenario, the shared key is used to unlock the key. Specifically, the shared key device 614 recovers the original key based on the lock information provided by the lock device 612 and the shared key information stored locally in the shared key device 614, and performs a one-way operation on the locally stored first token based on the calculated original key to obtain the second token to be compared. The master key device further sends the second token to be compared to the lock device 612. The lock device 612 can compare the acquired second token to be compared with the locally stored local second token. If the second token to be compared is consistent with the local second token, the lock can be unlocked.
[0140] The following is an explanation through specific examples:
[0141] Third embodiment
[0142] Application scenario: including a master key device 611, a lock device 612, and multiple shared key devices 614, wherein the tablet computer of the public place manager is used as the master key device 611, the smart door lock is used as the lock device 612, and the smart phone held by each temporary user is used as the shared key device 614. The public place may be a smart unmanned hotel, and the smart door lock may be any smart lock in the public place, such as an elevator switch, a room door lock, a restaurant door lock, etc. Each temporary user may be a customer or staff member in the public place, etc.
[0143] When a user checks in at a hotel, the user's smartphone can apply to join the hotel's smart key system so that the tablet computer and the user's smartphone can trust each other. The tablet computer can set the valid use time of the shared key (valid before 12:00 the next day) according to the user's check-in end time (such as 12:00 the next day), and send the token B1 and the shared key information with the valid use time setting to the user's smartphone. Figure 6e A schematic diagram of a process of unlocking a shared key device provided in another embodiment of the present application is as follows: Figure 6e As shown, the user can operate on the APP interface of the smartphone, for example, click the touch button on the interface to authorize the establishment of a first security channel between the smartphone and the smart door lock. After the first security channel is established, the smart door lock sends the lock information to the smartphone through the first security channel. The lock information may include a lock ciphertext with a mark "1". In other implementable methods, the smart door lock may also send both the algorithm information and the lock information to the smartphone. The algorithm information includes "Shamir&2", where "Shamir" indicates that the Shamir algorithm is used, and "2" indicates that two keys (which can be shared key plaintext and lock plaintext) are required to restore the original key. The smartphone locally stores shared key information, which includes a shared key ciphertext with a mark "1". After obtaining the lock information, the trusted device key (which can be obtained synchronously after mutual trust with the tablet computer) can be used to restore the lock plaintext. When the user accesses the shared key ciphertext, access control (face authentication) for the current user is triggered. After the user passes the face authentication, the shared key plaintext can be restored using HUK. Among them, when the user's smartphone joins the smart key system, the facial feature information of the occupant can be uploaded to the system to facilitate facial authentication during subsequent access control. In other embodiments, access control can also be performed by means of a text message verification code. Then, based on the obtained lock plaintext and shared key plaintext, the original key X is restored by Shamir algorithm operation, and the original key X is used to perform HMAC one-way operation on the token B1 stored locally on the smartphone to obtain the token B2 (to be compared), and the token B2 (to be compared) is sent to the smart door lock through the first security channel. The smart door lock compares the received token B2 (to be compared) with the locally stored token B2 (local token), and unlocks if they are consistent.
[0144] It should be noted that the HUK of different devices is different.
[0145] During the user application process, the master key may be lost. For example, the smartphone (master key device) used by the user is lost or damaged. To ensure that the user can continue to perform the unlocking operation through other devices, as described in the above activation stage, the backup key information can be stored in the cloud, and the user can further perform the unlocking operation by downloading the backup key information. To ensure the security of the system, the number of valid uses of the backup key can be set during the generation of the backup key information. In one implementation, the number of valid uses of the backup key is set to once, and the backup key information can be destroyed after being downloaded, and the key can be reactivated after the backup key is used to unlock. Among them, the backup key in the cloud can be destroyed during the destruction stage. If the cloud also stores a sub-key with the same mark as the backup key, it can be destroyed together.
[0146] In one implementation, the user may also actively destroy the key or actively reset the key, wherein actively resetting the key includes an operation of destroying the key currently in use.
[0147] Figure 7 A schematic diagram of a backup key unlocking application scenario provided in yet another embodiment of the present application is shown in FIG. Figure 7 As shown, the user sends a request message for downloading backup key information to the backup key device 615 through the new master key device 611a. The backup key device 615 triggers access control based on the request message for downloading backup key information. The access control method may include SMS verification code, answering preset questions, providing passwords or biometric identification. Among them, the new master key device 611a can be logged in through the account and password of the original master key device 611 to replace the original master key device 611. After the user passes the access control of the backup key device 615, the backup key device 615 allows the new master key device 611 to download the backup key information. After the new master key device 611 completes downloading the backup key information, the new master key device 611 sends a destruction instruction to the backup key device 615, so that the backup key device 615 forcibly destroys the backup key and activates a new key according to the destruction instruction. After obtaining the backup key information, the backup key is used to unlock the key. The unlocking process can be the same as Figure 6c The unlocking process provided by the illustrated embodiment is the same and will not be described again here.
[0148] After using the backup key, the key reset operation (including destruction and reopening) can be triggered. Figure 8 A flowchart of a key resetting method provided in another embodiment of the present application is shown as follows: Figure 8 As shown, the key reset method includes the following steps:
[0149] Step 801: Send a destruction instruction to one or more target devices, so that the one or more target devices destroy corresponding keys according to the destruction instruction, and the one or more target devices at least include a lock device.
[0150] Step 802: Generate N keys through the key data model, set the key types of two keys among the N keys to be master key and lock, N≥2, and N is a positive integer.
[0151] Step 803: Encrypt the key of the lock type by using the first key to obtain a corresponding lock ciphertext, and mark the lock ciphertext to obtain a lock ciphertext with a first mark.
[0152] Step 804: Encrypt a key whose key type is the master key by using a second key to obtain a master key ciphertext, and mark the master key ciphertext to obtain a master key ciphertext with the first mark.
[0153] Step 805: Calculate the first token using the original key to obtain the second token.
[0154] Step 806: Send lock information and token information to the lock device, the lock information including the lock ciphertext with the first mark, and the token information including the second token.
[0155] Step 807: The master key information and the first token are stored locally, wherein the master key information includes the master key ciphertext with the first mark.
[0156] Figure 8 The key resetting method provided in the illustrated embodiment is described in detail through the following specific embodiments:
[0157] Fourth embodiment
[0158] Figure 8a A flowchart of resetting a key after using a backup key is provided in another embodiment of the present application, such as Figure 8a As shown, the user can use another device (which can be Figure 7The new master key device 611a provided in the illustrated embodiment (e.g., a new smart phone) is operated on the APP interface, for example, by clicking the touch button on the interface to authorize the new smart phone to establish a security channel with the backup key device (cloud) and the lock device, respectively, wherein the new smart phone can establish a first security channel with the lock device (e.g., smart car lock), and establish a second security channel with the backup key device (cloud), and communicate with the backup key device (cloud) through the second security channel. After the second security channel is established, the new smart phone can request the backup key device (cloud) to download the backup key information, and the backup key device (cloud) triggers fingerprint recognition according to the request information for downloading the backup key information. After the fingerprint recognition authentication is passed, the backup key device (cloud) allows the new smart phone to download the backup key information, and after the download is completed, the new smart phone sends a backup key destruction instruction to the backup key device (cloud), so that the backup key device (cloud) destroys the backup key information stored in the cloud according to the backup key destruction instruction. After the new smart phone establishes the first security channel with the smart car lock, the smart car lock sends the lock information and algorithm information to the new smart phone. The lock information may include a lock ciphertext with a mark of "1", and the algorithm information includes "Shamir&2", where "Shamir" indicates that the Shamir algorithm is used, and "2" indicates that two keys (which may be the backup key plaintext and the lock plaintext) are required to restore the original key. After obtaining the lock information, the new smart phone can use the trusted device key to restore the lock plaintext. When the user accesses the backup key ciphertext, the access control of the current user (for example, face authentication) is triggered. After the user passes the face authentication, the backup key plaintext can be restored using the HUK (universal HUK) in the new mobile phone. Then, according to the obtained lock plaintext and backup key plaintext, the original key X is restored by Shamir algorithm operation, and the original key X is used to perform HMAC one-way operation on the first token (token B1) to obtain the second token (to be compared token B2), and the token B2 (to be compared token) is sent to the smart car lock. The smart car lock compares the received token B2 to be compared with the locally stored token B2 (local token), and unlocks the car if they are consistent.
[0159] After unlocking is completed, the new smartphone performs a key reset operation. Figure 8b A schematic diagram of a key destruction process is provided for another embodiment of the present application, such as Figure 8bAs shown, the user can operate on the APP interface of the new smartphone, for example, click the touch button on the interface to authorize the new smartphone to establish a security channel with the backup key device (cloud) and the lock device respectively, wherein the new smartphone can establish a first security channel with the lock device (e.g., smart car lock) and a second security channel with the backup key device (cloud), and communicate with the backup key device (cloud) through the second security channel. If there is a secondary key device, the new smartphone can also establish a third security channel with the secondary key device, and communicate with the secondary key device through the third security channel. The user can send a destruction instruction to the lock device and the secondary key device (if any) through the new smartphone, and the destruction instruction information may include the tag information of the key (e.g., tag "1"), wherein, if the backup key has been used to unlock, the tag information in the destruction instruction information is the tag information of the backup key. The lock device and the secondary key device (if any) destroy the corresponding keys stored in each according to the key destruction instruction information, that is, the lock device destroys the lock information, and the secondary key device destroys the corresponding secondary key information. The lock device also needs to destroy the stored second token. Among them, it should be noted that after the backup key is downloaded, the backup key information has been destroyed, but a destruction instruction still needs to be sent to the backup key device. The reason is that the backup key device (cloud) can also be used as a secondary key device. Therefore, when the backup key device (cloud) is used as a secondary key device, when the backup key has been destroyed, it is still necessary to send a key destruction instruction to the backup key device (cloud) so that the backup key device (cloud) destroys the corresponding secondary key according to the key destruction instruction.
[0160] If the user actively destroys a set of keys (which may include lock information, master key information, backup key information, and secondary key information), the mark corresponding to the set of keys will be used as the mark information in the destruction instruction information. The lock device, backup key device, and secondary key device (if any) destroy the corresponding keys stored in each according to the key destruction instruction information, and the master key device destroys the corresponding master key information (with corresponding marks) and key information to be shared stored locally, and the lock device also needs to destroy the stored second token.
[0161] After the key destruction process is completed, the key re-activation process can be continued. Figure 8c A schematic diagram of a key reset application scenario provided in yet another embodiment of the present application is shown in FIG. Figure 8c As shown, the master key device 611 or the new master key device 611a can save the generated master key information locally, send the generated lock information and the second token to the lock device 612 for storage, and if the backup key information is generated, send the backup key information to the backup key device (cloud) for storage; if the secondary key information is generated, send the secondary key information to the corresponding secondary key device for storage. The specific activation steps can be as follows Figure 5 The key activation process provided in the illustrated embodiment is the same or similar and will not be described in detail here.
[0162] It should be noted that the unlocking process in this application complies with the principle of zero-knowledge proof, that is, the prover proves to the verifier and makes him believe that he knows or owns a certain message, but the proof process cannot leak any information about the proven message to the verifier.
[0163] Fig. 9 A structural diagram of a key processing device provided in yet another embodiment of the present application is shown in FIG. Fig. 9 As shown, the device may include a processor 901 and a memory 902, wherein the memory 902 is used to store at least one instruction, and when the instruction is loaded and executed by the processor 901, the Figure 6 The unlocking method provided by the illustrated embodiment.
[0164] In another embodiment, the memory 902 in the device is used to store at least one instruction, and when the instruction is loaded and executed by the processor 901, it implements the following unlocking method: obtaining the first ciphertext information provided by one or more target devices; decrypting the first ciphertext information and the shared key ciphertext stored in the local device respectively to obtain the corresponding first plaintext information and shared key plaintext; determining the operation key according to the first plaintext information and the shared key plaintext, and operating the first token stored in the local device according to the operation key to obtain the second token to be compared; and sending the second token to be compared to the lock device, wherein the one or more target devices at least include the lock device. Before executing the above unlocking step, the shared key device can receive the shared key information and the first token sent by the master key device through the third security channel, and the shared key information includes the shared key ciphertext with the first mark.
[0165] In another embodiment, the memory 902 in the device is used to store at least one instruction, which is loaded and executed by the processor 901 to implement the following unlocking method: obtain backup key information and a first token; obtain lock information provided by a lock device; determine a calculation key based on the backup key information and the lock information, and calculate the first token based on the calculation key to obtain a second token to be compared; and send the second token to be compared to the lock device.
[0166] In another embodiment, the memory 902 in the device is used to store at least one instruction, which is loaded and executed by the processor 901 to implement Figure 8 The illustrated embodiment provides a key resetting method.
[0167] In one embodiment, Fig. 9The key processing device provided in the illustrated embodiment may be a chip. Furthermore, the embodiment of the present application also provides a chip, the chip is connected to a memory, or the chip is integrated with a memory, and when the program or instruction stored in the memory is executed, the corresponding unlocking method or key resetting method is implemented.
[0168] The embodiment of the present application also provides a user terminal, which may include a terminal body and Fig. 9 The illustrated embodiment provides a key processing device.
[0169] The present application also provides a smart lock, which may include a lock body and a Fig. 9 The illustrated embodiment provides a key processing device.
[0170] The present application also provides a cloud server, which may include a server body and Fig. 9 The illustrated embodiment provides a key processing device.
[0171] An embodiment of the present application also provides a smart key system that may include the above-mentioned user terminal and smart lock, and in one implementation, may also include the above-mentioned cloud server.
[0172] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the unlocking method or key resetting method provided in any of the above embodiments is implemented.
[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0174] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0175] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0177] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0178] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An unlocking method, characterized in that: The method comprises: Obtaining first ciphertext information and algorithm information provided by one or more target devices, wherein the algorithm information is used to indicate determining a calculation key by using the first plaintext information and the second plaintext information; Decrypting the first ciphertext information and the second ciphertext information stored in the local device respectively to obtain corresponding first plaintext information and second plaintext information; Determine a calculation key according to the first plaintext information and the second plaintext information, and calculate the first token stored in the local device according to the calculation key to obtain a second token to be compared; and sending the second token to be compared to the locking device; The one or more target devices at least include the lock device.
2. The method according to claim 1, characterized in that The obtaining of first ciphertext information provided by one or more target devices includes: Obtaining lock information provided by the lock device; or Respectively obtaining lock information provided by the lock device and secondary key information provided by the secondary key device; The lock information includes a lock ciphertext with a first mark, and the secondary key information includes a secondary key ciphertext with the first mark.
3. The method according to claim 2, characterized in that Before obtaining the first ciphertext information provided by one or more target devices, the method further includes: Establishing a secure channel with the one or more target devices, and communicating with the one or more target devices through the secure channel; The establishing of a secure channel with the one or more target devices includes: establishing a first secure channel with the locking device; or A security channel is established with the lock device and the secondary key device respectively, wherein the first security channel is established with the lock device and the second security channel is established with the secondary key device.
4. The method according to claim 2, characterized in that: Decrypting the first ciphertext information and the second ciphertext information stored in the local device to obtain the corresponding first plaintext information and second plaintext information includes: a first decryption operation or a second decryption operation; Wherein, the first decryption operation includes: Obtaining a master key ciphertext having the first mark in the second ciphertext information; Performing access operations on the lock ciphertext and the master key ciphertext respectively to obtain corresponding lock plaintext and master key plaintext; The second decryption operation includes: Obtaining a master key ciphertext having the first mark in the second ciphertext information; Performing access operations on the lock ciphertext, the master key ciphertext and the secondary key ciphertext respectively to obtain corresponding lock plaintext, master key plaintext and secondary key plaintext; The access operation includes: Performing access control on the current user, and when the current user is authenticated as legitimate through the access control and the access object is in an encrypted state, performing a decryption operation on the access object; The access control includes one or more of the following: biometric identification authentication, local device location authentication, and distance authentication between the local device and the lock device.
5. The method according to claim 4, characterized in that The step of obtaining the master key ciphertext having the first mark in the second ciphertext information includes: Acquire a plurality of key ciphertexts having the first mark from the second ciphertext information; and A key ciphertext whose key type is a master key among a plurality of key ciphertexts having the first mark is determined as the master key ciphertext.
6. The method according to claim 4, characterized in that The decrypting operation on the access object comprises: If the access object is the master key ciphertext, decrypting the master key ciphertext according to the hardware unique key of the local device to restore the master key plaintext; If the access object is the lock ciphertext and / or the secondary key ciphertext, the lock ciphertext and / or the secondary key ciphertext is decrypted according to the trusted device key to restore the lock plaintext and / or the secondary key plaintext.
7. An unlocking method, characterized in that: The method comprises: Sending first ciphertext information and algorithm information to a master key device, wherein the first ciphertext information includes lock information, and the algorithm information is used to indicate that a calculation key is determined by first plaintext information and second plaintext information, wherein the first plaintext information is determined by the first ciphertext information, and the second plaintext information is determined by second ciphertext information stored in a local device; Obtaining a second token to be compared sent by the master key device; and The second token to be compared is compared with the local second token stored in the local device. If the second token to be compared is the same as the local second token, the key is unlocked.
8. The method according to claim 7, characterized in that Before sending the first ciphertext information to the master key device, the method further includes: Establishing a first secure channel with a master key device, and communicating with the master key device through the first secure channel; The lock information includes a lock ciphertext having a first mark.
9. An unlocking method, characterized in that: The method comprises: Obtaining first ciphertext information and algorithm information provided by one or more target devices, wherein the algorithm information is used to indicate determining a computing key by using the first plaintext information and the shared key plaintext; Decrypting the first ciphertext information and the shared key ciphertext stored in the local device respectively to obtain corresponding first plaintext information and shared key plaintext; Determine a computing key according to the first plaintext information and the shared key plaintext, and compute the first token stored in the local device according to the computing key to obtain a second token to be compared; and sending the second token to be compared to the locking device; The one or more target devices at least include the lock device.
10. An unlocking method, characterized in that: The method comprises: Get the backup key information and the first token; Obtain lock information and algorithm information provided by the lock device, wherein the algorithm information is used to indicate that a calculation key is determined by first plaintext information and second plaintext information, wherein the first plaintext information is determined by the lock information, and the second plaintext information is determined by the backup key information; Determine a calculation key according to the backup key information and the lock information, and calculate the first token according to the calculation key to obtain a second token to be compared; and The second token to be compared is sent to the locking device.
11. A key resetting method, characterized in that: The method comprises: Sending a destruction instruction to one or more target devices, so that the one or more target devices destroy corresponding keys according to the destruction instruction, the one or more target devices at least including a lock device; Generate N keys through the key data model, set the key types of two keys among the N keys to be master key and lock, N≥2, and N is a positive integer; Encrypting the key of the lock type by using a first key to obtain a corresponding lock ciphertext, and marking the lock ciphertext to obtain a lock ciphertext with a first mark; Encrypting a key whose key type is the master key by using a second key to obtain a master key ciphertext, and marking the master key ciphertext to obtain a master key ciphertext having the first mark; The first token is operated by the original key to obtain the second token; Sending lock information and token information to the lock device, the lock information including the lock ciphertext with the first mark, and the token information including the second token; and The master key information and the first token are stored locally, wherein the master key information includes the master key ciphertext with the first mark.
12. The method according to claim 11, characterized in that After the N keys are generated by the key data model, the method further includes: Setting the key type of one of the N keys to a backup key; Encrypting the key whose key type is a backup key by using the first key to obtain a corresponding backup key ciphertext, and marking the backup key ciphertext to obtain a backup key ciphertext having the first mark; The backup key information is sent to the backup key device, so that the backup key device saves the received backup key information, wherein the backup key information includes the backup key ciphertext with the first mark.
13. The method according to claim 11, characterized in that After the N keys are generated by the key data model, the method further includes: Setting the key type of one or more keys among the N keys to secondary key; Encrypting the key whose key type is a secondary key by using the first key to obtain a corresponding secondary key ciphertext, and marking the secondary key ciphertext to obtain a secondary key ciphertext having the first mark; The secondary key information is sent to a corresponding secondary key device, so that the secondary key device saves the received secondary key information, wherein the secondary key information includes the secondary key ciphertext with the first mark.
14. The method according to any one of claims 11 to 13, characterized in that After the N keys are generated by the key data model, the method further includes: Setting the key type of one or more keys among the N keys to a shared key; Encrypting the key whose key type is a shared key by using the second key to obtain a corresponding shared key ciphertext, and marking the shared key ciphertext to obtain a shared key ciphertext having the first mark; The shared key information is stored locally, wherein the shared key information includes the shared key ciphertext having the first mark.
15. A key processing device, characterized in that: The device comprises: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, it is used to implement the unlocking method according to any one of claims 1 to 6, claims 9 and claim 10, or the key resetting method according to any one of claims 11 to 14.
16. A key processing device, characterized in that: The device comprises: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the unlocking method according to any one of claims 7 or 8 is implemented.
17. A user terminal, characterized in that: The user terminal includes the key processing device according to claim 15 .
18. A smart lock, characterized in that: The smart lock includes the key processing device according to claim 16.
19. A smart key system, characterized in that: The system includes the user terminal described in claim 17 and the smart lock described in claim 18.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the unlocking method according to any one of claims 1 to 10 or the key resetting method according to any one of claims 11 to 14 is implemented.
