A smart home identity access method and system based on a national secret algorithm
By using the SM2 public key encryption algorithm and the SM3 hash algorithm, the problem of information leakage in traditional smart home identity authentication is solved, realizing secure encryption and privacy protection of user information, and improving the security of smart home systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG INSPUR SCI RES INST CO LTD
- Filing Date
- 2024-08-07
- Publication Date
- 2026-07-07
Smart Images

Figure CN118644916B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a smart home identity access method and system based on Chinese cryptographic algorithms. Background Technology
[0002] Smart home (or Home Automation) is a system that uses a residence as a platform to integrate various home-related facilities, including structured cabling, network communication, security, automatic control, and audio-visual technologies, creating an efficient management system for residential facilities and daily household affairs. This system aims to enhance the security, convenience, comfort, and aesthetics of the home, while simultaneously achieving an environmentally friendly and energy-efficient living environment.
[0003] Smart home identity authentication refers to the technology used to identify and verify the identity of users of a smart home system. This technology uses multi-layered verification methods, such as biometric technology (e.g., fingerprint recognition, facial recognition) and traditional password or key verification, to ensure that only authorized users can access and control the smart home system.
[0004] Traditional smart home authentication technologies have raised concerns about privacy and security, such as the transmission and storage of user passwords and biometric information in plaintext, leading to the leakage of personal information and causing a series of security problems. Summary of the Invention
[0005] To address the technical problems mentioned above, this invention provides a smart home identity access method and system based on national cryptographic algorithms. This method fully considers user privacy protection and security issues, and helps prevent the leakage of personal information.
[0006] To achieve the above technical solution, in a first aspect, the present invention provides a smart home identity access method based on national cryptographic algorithms, comprising the following steps:
[0007] Step 1: When the smart lock senses the presence of a user, it triggers the identity access process and prompts the user to enter personal information, which includes: name, password and fingerprint information;
[0008] Step Two: The user enters their personal information as prompted;
[0009] Step 3: The smart door lock uses the SM2 public key of the smart home control center to encrypt the name, password and fingerprint using SM2 to obtain the encrypted name, encrypted password and encrypted fingerprint information, and then transmits the encrypted name, encrypted password and encrypted fingerprint information to the smart home control center;
[0010] Step 4: The smart home control center uses its private key to decrypt the received encrypted name, encrypted password, and encrypted fingerprint information using SM2 to obtain the name, password, and fingerprint information to be authenticated.
[0011] Step 5: The smart home control center concatenates the name to be authenticated and the password to be authenticated into a complete second string, and performs a hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result. The second hash result is used as the user's second private key.
[0012] Step Six: The smart home control center uses the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information to obtain the stored fingerprint information;
[0013] Step 7: The smart home control center compares the stored fingerprint information with the fingerprint information to be authenticated. If they match, the verification is successful and the smart door lock opens. If they do not match, the smart door lock refuses to open and prompts that the identity authentication has failed.
[0014] Furthermore, the method also includes:
[0015] Users register their personal information with the smart home control center; this personal information includes: name, password, and fingerprint information;
[0016] The smart home control center encrypts fingerprint information based on the name and password to obtain encrypted fingerprint information, and then stores the encrypted fingerprint information in the database.
[0017] Furthermore, the smart home control system encrypts fingerprint information based on a name and password to obtain encrypted fingerprint information, and stores the encrypted fingerprint information in a database, including:
[0018] The received name and password are concatenated into a first string, and the first string is hashed using the national cryptographic algorithm SM3 to obtain a 32-byte hash result. The hash result is then used as the user's first private key.
[0019] The SM2 key generation algorithm is invoked to generate the corresponding SM2 public key based on the user's first private key;
[0020] Based on the generated SM2 public key, the fingerprint information is encrypted using the SM2 encryption algorithm;
[0021] The encrypted fingerprint information is stored in a local database.
[0022] Secondly, this invention provides a smart home identity access system based on national cryptographic algorithms, including a smart door lock and a smart home control center, and further including:
[0023] The communication module is used for bidirectional communication between the smart lock and the smart home control center;
[0024] Smart door locks include:
[0025] The sensing unit is used to detect whether a user has unlocked the door;
[0026] Smart door locks include:
[0027] The input unit is used for users to input their name, password, and fingerprint information.
[0028] The smart door lock encryption unit is used to encrypt the user's input name, password and fingerprint information to obtain encrypted name, encrypted password and encrypted fingerprint information, and transmit the encrypted name, encrypted password and encrypted fingerprint information to the smart home control center through the communication module;
[0029] The execution unit is used to perform the unlocking action or refuse to unlock based on the comparison result;
[0030] The smart home control center includes:
[0031] The first control center decryption unit is used to use the private key of the smart home control center to perform SM2 decryption on the encrypted name, encrypted password and encrypted fingerprint information sent by the smart door lock, so as to obtain the name to be authenticated, the password to be authenticated and the fingerprint information to be authenticated.
[0032] The second private key generation unit is used to concatenate the name to be authenticated and the password to be authenticated into a complete second string, and to perform hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result, which is used as the user's second private key.
[0033] The second control center decryption unit is used to use the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information to obtain the stored fingerprint information.
[0034] The authentication unit is used to compare the stored fingerprint information with the fingerprint information to be authenticated and generate a comparison result.
[0035] Furthermore, the intelligent control center includes:
[0036] The registration unit is used to register with the intelligent control center by entering a name, password, and fingerprint information.
[0037] A fingerprint encryption unit is used to encrypt fingerprint information based on a name and password to obtain encrypted fingerprint information;
[0038] A database used to store encrypted fingerprint information.
[0039] Furthermore, the communication module is a wireless communication module.
[0040] Thirdly, the present invention provides a computer-readable storage medium including a stored program, wherein, when the program is running, it controls the device where the computer-readable storage medium is located to execute the above-described smart home identity access method based on national cryptographic algorithms.
[0041] The beneficial effects of this invention are as follows:
[0042] This invention uses the SM2 public key of the control center to encrypt the user's name, password, and fingerprint information using the smart lock. The smart home control center uses its own SM2 private key to decrypt the encrypted information using the smart lock. The name and password are concatenated into a complete string, and this string is hashed using the national cryptographic algorithm SM3. The hash result is used as the SM2 private key to decrypt the stored encrypted fingerprint information. The decrypted fingerprint information is then compared with the fingerprint information decrypted by the smart home control center using its own SM2 private key. Based on the comparison result, the smart lock is either opened or closed. This invention fully considers user privacy and security issues, thereby helping to prevent the leakage of personal information. Attached Figure Description
[0043] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0044] Figure 1 This is a flowchart of a smart home identity access method based on national cryptographic algorithms according to the present invention.
[0045] Figure 2 This is a schematic diagram of a smart home identity access system based on national cryptographic algorithms according to the present invention. Detailed Implementation
[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0047] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, each technical and scientific term used in these embodiments has the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0048] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0049] In this invention, terms such as "upper," "lower," "left," "right," "front," "back," "vertical," "horizontal," "side," and "bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used only to facilitate the description of the structural relationships of the various components or elements of this invention and do not specifically refer to any component or element in this invention. They should not be construed as limiting the invention.
[0050] In this invention, terms such as "fixed connection," "connected," and "linked" should be interpreted broadly, indicating a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can determine the specific meaning of these terms in this invention based on the specific circumstances, and they should not be construed as limitations on the invention.
[0051] It should be noted that smart home systems, including smart door locks and smart home monitoring centers, are well known to those skilled in the art, and therefore will not be described in detail in this embodiment.
[0052] Example 1:
[0053] This embodiment provides a smart home identity access method based on national cryptographic algorithms, including the following steps:
[0054] (a) Identity registration stage:
[0055] S1: Users register their personal information on the smart home control center. The user's personal information includes: name, password, and fingerprint information.
[0056] Specifically, for example, when a user registers at the smart home control center, they submit their name ( ),password( ) and fingerprint information ( )wait.
[0057] S2: The smart home control center concatenates the received name and password into a first string, performs a hash calculation on the first string using the national cryptographic algorithm SM3, obtains a 32-byte hash result, and uses the hash result as the user's first private key.
[0058] Specifically, the smart home control center receives the name ( ),password( ) and fingerprint information ( After that, concatenate the name and password as strings to form the first string. For the first string Perform an SM3 hash calculation to obtain the first hash result, and use the first hash result as the user's first private key. .
[0059] in, ; .
[0060] S3: The smart home control center calls the SM2 key generation algorithm to generate the corresponding SM2 public key based on the user's first private key.
[0061] Specifically, the smart home control center calls the SM2 key generation algorithm, using the user's first private key. Generate the corresponding SM2 public key ,in, .
[0062] S4: Based on the generated SM2 public key, the control center uses the SM2 encryption algorithm to encrypt the fingerprint information and stores the encrypted fingerprint information in the local database.
[0063] Specifically, the smart home control center is based on the generated SM2 public key. The user's fingerprint information is encrypted using the SM2 encryption algorithm to obtain encrypted fingerprint information. and encrypt fingerprint information Store in the local database.
[0064] (II) Identity Verification Stage:
[0065] Step 105: When the smart lock senses the presence of a user, it triggers the identity access process and prompts the user to enter personal information. The user enters their name, password, and fingerprint information as prompted.
[0066] Specifically, when a user approaches the smart lock, the smart lock senses the user's presence, triggers the identity access process, prompts the user to enter personal information, and the user enters a name and password and records fingerprint information according to the prompts;
[0067] Step 106: The smart lock uses the SM2 public key from the smart home control center to encrypt the name, password, and fingerprint information using SM2 to obtain the encrypted name, encrypted password, and encrypted fingerprint information.
[0068] Specifically, after receiving the personal information entered by the user, the smart lock uses the SM2 public key from the smart home control center. The name, password, and fingerprint information are encrypted using SM2 to obtain the encrypted name. Encryption password and encrypted fingerprint information .
[0069] in, ;
[0070] ;
[0071] .
[0072] Step 107: The smart lock sends the encrypted name, encrypted password, and encrypted fingerprint information to the smart home control center.
[0073] Specifically, smart door locks will , and Send to the smart home control center.
[0074] (III) Identity Verification Stage:
[0075] Step 108: The smart home control center uses its private key to perform SM2 decryption on the received encrypted name, encrypted password, and encrypted fingerprint information to obtain the name, password, and fingerprint information to be authenticated.
[0076] Specifically, the smart home control center uses its own private key. Sending messages to smart door locks , and Perform SM2 decryption to obtain the name to be authenticated. Password to be authenticated and fingerprint information to be authenticated .
[0077] in, , , .
[0078] Step 109: The smart home control center concatenates the name to be authenticated and the password to be authenticated into a complete second string, and performs a hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result. The second hash result is used as the user's second private key.
[0079] Specifically, the control center will and Connect them to get the second string. The second string is then subjected to an SM3 hash calculation to obtain a second hash result, which is used as the user's second private key. .
[0080] in, ; .
[0081] Step 110: The smart home control center uses the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information to obtain the stored fingerprint information.
[0082] Specifically, the smart home control center uses the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information (i.e., the result of encrypting pre-registered fingerprint information) to obtain the stored fingerprint information. This means obtaining the pre-recorded fingerprint information; among which, .
[0083] Step 111: The smart home control center compares the stored fingerprint information with the fingerprint information to be authenticated, generates a result feedback based on the comparison result, and sends the result feedback to the smart door lock.
[0084] Specifically, the smart home control center will store fingerprint information. fingerprint information to be authenticated A comparison is performed to generate comparison results, and feedback is generated based on the comparison results. .
[0085] Specifically, if the comparison results are the same, it means that the identity fingerprint information is consistent, the verification is successful, and a result feedback is generated. The value is 1. If the comparison results are different, it means that the fingerprint information is inconsistent, the verification fails, and the generated result is incorrect. The value is 0. .
[0086] The smart home control center sends the results back to the smart door lock.
[0087] Step 112: Based on the received feedback, the smart lock will either open or refuse to open.
[0088] If the smart lock receives the result and sends feedback If the smart lock receives a response, it will issue an open door command; If the user does not pass through the designated area, the door will be refused entry, and a message indicating that identity verification has failed will be displayed.
[0089] Example 2:
[0090] This embodiment provides a smart home identity access system based on national cryptographic algorithms, including a smart door lock 1 and a smart home control center 2. The smart door lock and smart home control center are existing technologies and will not be described in detail here. The system also includes a communication module 3 for bidirectional communication between the smart door lock and the smart home control center; wherein, the communication module adopts a wireless communication module.
[0091] The smart door lock 1 includes:
[0092] The sensing unit 1-1 is used to sense whether a user is unlocking the door.
[0093] Input units 1-2 are used for users to input their name, password, and fingerprint information.
[0094] The smart door lock encryption units 1-3 are used to encrypt the user's input name, password, and fingerprint information to obtain encrypted name, encrypted password, and encrypted fingerprint information, and transmit the encrypted name, encrypted password, and encrypted fingerprint information to the smart home control center through the communication module.
[0095] Execution units 1-4 are used to perform unlocking actions or refuse to unlock based on the comparison results.
[0096] Smart Home Control Center 2 includes:
[0097] The first control center decryption unit 2-1 is used to decrypt the encrypted name, encrypted password and encrypted fingerprint information sent by the smart door lock using the private key of the smart home control center, so as to obtain the name to be authenticated, the password to be authenticated and the fingerprint information to be authenticated.
[0098] The second private key generation unit 2-2 is used to concatenate the name to be authenticated and the password to be authenticated into a complete second string, and to perform hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result, which is then used as the user's second private key.
[0099] The second control center decryption unit 2-3 is used to decrypt the pre-stored encrypted fingerprint information using the user's second private key using SM2 to obtain the stored fingerprint information.
[0100] Authentication units 2-4 are used to compare the stored fingerprint information with the fingerprint information to be authenticated and generate a comparison result.
[0101] Registration units 2-5 are used to register with the intelligent control center by entering a name, password, and fingerprint information.
[0102] Fingerprint encryption units 2-6 are used to encrypt fingerprint information based on the name and password to obtain encrypted fingerprint information.
[0103] Databases 2-7 are used to store encrypted fingerprint information.
[0104] Example 3:
[0105] This embodiment provides a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the smart home identity access method based on the national cryptographic algorithm described in Embodiment 1.
[0106] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0107] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] Additionally, it should be noted that the flowcharts in the accompanying drawings illustrate methods according to embodiments of this disclosure. In the descriptions corresponding to the flowcharts or block diagrams in the drawings, the operations or steps corresponding to different blocks may occur in a different order than disclosed in the description; sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the function involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0110] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A smart home identity access method based on national cryptographic algorithms, characterized in that, Includes the following steps: Step 1: When the smart lock senses the presence of a user, it triggers the identity access process and prompts the user to enter personal information, which includes: name, password and fingerprint information; Step Two: The user enters their personal information as prompted; Step 3: The smart door lock uses the SM2 public key of the smart home control center to encrypt the name, password and fingerprint using SM2 to obtain the encrypted name, encrypted password and encrypted fingerprint information, and then transmits the encrypted name, encrypted password and encrypted fingerprint information to the smart home control center; Step 4: The smart home control center uses its private key to decrypt the received encrypted name, encrypted password, and encrypted fingerprint information using SM2 to obtain the name, password, and fingerprint information to be authenticated. Step 5: The smart home control center concatenates the name to be authenticated and the password to be authenticated into a complete second string, and performs a hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result. The second hash result is used as the user's second private key. Step Six: The smart home control center uses the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information to obtain the stored fingerprint information; Step 7: The smart home control center compares the stored fingerprint information with the fingerprint information to be authenticated. If they match, the verification is successful and the smart door lock opens. If they do not match, the smart door lock refuses to open and prompts that the identity authentication has failed.
2. The smart home identity access method based on national cryptographic algorithms according to claim 1, characterized in that, The method further includes: Users register their personal information with the smart home control center; this personal information includes: name, password, and fingerprint information; The smart home control center encrypts fingerprint information based on the name and password to obtain encrypted fingerprint information, and then stores the encrypted fingerprint information in the database.
3. The smart home identity access method based on national cryptographic algorithms according to claim 2, characterized in that, The smart home control system encrypts fingerprint information based on a name and password to obtain encrypted fingerprint information, and stores the encrypted fingerprint information in a database, including: The received name and password are concatenated into a first string, and the first string is hashed using the national cryptographic algorithm SM3 to obtain a 32-byte hash result. The hash result is then used as the user's first private key. The SM2 key generation algorithm is invoked to generate the corresponding SM2 public key based on the user's first private key; Based on the generated SM2 public key, the fingerprint information is encrypted using the SM2 encryption algorithm; The encrypted fingerprint information is stored in a local database.
4. A smart home identity access system based on national cryptographic algorithms, comprising a smart door lock and a smart home control center, characterized in that, Also includes: The communication module is used for bidirectional communication between the smart lock and the smart home control center; Smart door locks include: The sensing unit is used to detect whether a user has unlocked the door; The input unit is used for users to input their name, password, and fingerprint information. The smart door lock encryption unit is used to encrypt the user's input name, password and fingerprint information to obtain encrypted name, encrypted password and encrypted fingerprint information, and transmit the encrypted name, encrypted password and encrypted fingerprint information to the smart home control center through the communication module; The execution unit is used to perform the unlocking action or refuse to unlock based on the comparison result; The smart home control center includes: The first control center decryption unit is used to use the private key of the smart home control center to perform SM2 decryption on the encrypted name, encrypted password and encrypted fingerprint information sent by the smart door lock, so as to obtain the name to be authenticated, the password to be authenticated and the fingerprint information to be authenticated. The second private key generation unit is used to concatenate the name to be authenticated and the password to be authenticated into a complete second string, and to perform a hash calculation on the second string using the national cryptographic algorithm SM3 to obtain a 32-byte second hash result, which is then used as the user's second private key. The second control center decryption unit is used to use the user's second private key to perform SM2 decryption on the pre-stored encrypted fingerprint information to obtain the stored fingerprint information. The authentication unit is used to compare the stored fingerprint information with the fingerprint information to be authenticated and generate a comparison result.
5. The smart home identity access system based on national cryptographic algorithms according to claim 4, characterized in that, The smart home control center also includes: The registration unit is used to register with the intelligent control center by entering a name, password, and fingerprint information. A fingerprint encryption unit is used to encrypt fingerprint information based on a name and password to obtain encrypted fingerprint information; A database used to store encrypted fingerprint information.
6. The smart home identity access system based on national cryptographic algorithms according to claim 4, characterized in that, The communication module is a wireless communication module.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to execute the smart home identity access method based on the national cryptographic algorithm as described in any one of claims 1 to 3.