A cabinet door opening encryption control method, system, device and medium
Through the use of dynamic encryption keys and decryption factors, the problem of fingerprint leakage in the biometric access control system is solved, and the uniqueness of the password and high attack resistance are achieved every time the door is opened, meeting stricter security needs and flexibility.
Patent Information
- Application Number
- CN202411355490.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The existing biometric access control system is prone to leakage of fingerprints and cannot effectively meet security needs, and it will not be used once it is leaked.
By obtaining the user's fingerprint information for identity verification, generating a dynamic encryption key to encrypt the door opening password, ensuring that the password is different every time the door is opened, and using identity characteristics and device information to generate one-time dynamic decryption factors and passwords to achieve refined Permission control and attack resistance.
Effectively prevent passwords from being stolen and reused, improve the system's ability to resist attacks, adapt to different security needs and environmental changes, and achieve stricter access control and flexibility.
Smart Images

Figure CN118887753B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of encryption technology, and in particular to a cabinet door opening encryption control method, system, equipment and medium. Background Art
[0002] Cabinets are an indispensable part of electrical equipment and are the carriers of electrical control equipment. Therefore, cabinet doors are usually equipped with access control systems. With the development of modern mobile Internet technology, access control systems are gradually becoming intelligent. Common intelligent access control systems are biometric access control systems. In biometrics, such as fingerprint recognition, due to the high mobility of people, fingerprints are easily scattered in many corners of life, which increases the risk of leakage. In addition, human fingerprints cannot be changed throughout life. Once leaked, the fingerprint recognition function will be completely unusable and cannot meet security needs well. Summary of the invention
[0003] The main purpose of the present invention is to provide a cabinet door opening encryption control method, aiming to solve the technical problems in the prior art.
[0004] The present invention provides a cabinet door opening encryption control method, comprising:
[0005] Obtaining the user's fingerprint information and determining whether the fingerprint information matches the preset fingerprint information;
[0006] If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information;
[0007] Obtaining a corresponding door opening password according to the user device information, and obtaining a dynamic encryption key according to the door opening password;
[0008] Encrypt the door opening password according to the dynamic encryption key to obtain a dynamic encryption password;
[0009] Obtaining a dynamic decryption factor, and sending the dynamic decryption factor and the dynamic encryption password to a user device;
[0010] The user equipment decrypts the dynamic encryption password according to the dynamic decryption factor to obtain a door opening password, and controls the cabinet door to open based on the door opening password.
[0011] Preferably, the step of acquiring user equipment information according to the identity feature information comprises:
[0012] Acquire user biometric information according to the identity feature information, wherein the user biometric information includes a serial number, a height feature value, and a distribution feature of facial features;
[0013] Obtaining the facial area, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears according to the facial features distribution characteristics;
[0014] The body proportion value is calculated according to the height characteristic value, the face area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears, wherein the calculation formula is:
[0015] ;
[0016] in, Represents the body proportion value, Indicates the distance between the eyes and the tip of the nose, Indicates the distance between the eyes and the corners of the mouth, Indicates the distance between the eyes and the ears. Indicates the size of the face area. represents the height feature value;
[0017] According to the number, a pre-stored body proportion value corresponding to the number is obtained from a database;
[0018] Determining whether the pre-stored body proportion is the same as the body proportion value;
[0019] If the pre-stored body proportion is the same as the body proportion value, the user equipment information corresponding to the pre-stored body proportion value is obtained from the database.
[0020] Preferably, the step of obtaining a corresponding door opening password according to the user device information and obtaining a dynamic encryption key according to the door opening password comprises:
[0021] Obtaining the time point of the door opening instruction request, and obtaining a timestamp character according to the time point;
[0022] Acquire the device model and user ID information according to the user device information, and acquire the model character and ID character respectively according to the device model and user ID information;
[0023] Obtaining a door opening password according to the timestamp character, model character and ID character;
[0024] Generate a first random dynamic salt value through a random number generator according to the door opening password;
[0025] Extracting a plurality of random feature data of the door opening password, and obtaining a random probability of each feature data according to the plurality of random feature data;
[0026] The number of dynamic iterations is calculated according to the plurality of random feature data and random probability, wherein the calculation formula is:
[0027] ;
[0028] in, represents the number of dynamic iterations, Indicates Random feature data, Indicates A random probability, represents the number of random feature data, A sequence number representing random feature data;
[0029] The key value is calculated according to the door opening password, the first random dynamic salt value and the number of dynamic iterations, wherein the calculation formula is:
[0030] ;
[0031] in, Represents the key value, represents the model parameters, represents the number of dynamic iterations, Indicates the door opening password. Represents the first random dynamic salt value;
[0032] The key value is converted into a dynamic encryption key of corresponding length according to the door opening password.
[0033] Preferably, the step of obtaining the door opening password according to the timestamp character, model character and ID character comprises:
[0034] Performing a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value;
[0035] Using a hash algorithm to perform hash calculations on the model character and the ID character respectively to obtain a second hash value and a third hash value;
[0036] Connect the tail end of the first Hash value to the head end of the second Hash value, and connect the tail end of the second Hash value to the head end of the third Hash value to obtain a hash string;
[0037] Obtaining the repetition rate of each character according to the hash character string, and extracting a plurality of characters corresponding to the repetition rate reaching a preset value;
[0038] The plurality of characters are reorganized from large to small according to the repetition rate to obtain a door opening password.
[0039] Preferably, the step of encrypting the door opening password according to the dynamic encryption key to obtain the dynamic encrypted password comprises:
[0040] Encode the door opening password into a byte array, and divide the byte array into multiple character strings;
[0041] Circularly shifting the rows of each string and mixing them with the columns to obtain multiple data blocks;
[0042] XOR processing is performed on each of the data blocks with a dynamic encryption key to obtain multiple ciphertext blocks;
[0043] The plurality of ciphertext blocks are concatenated in the order of segmentation to obtain a dynamic encryption password.
[0044] Preferably, the step of the user equipment decrypting the dynamic encrypted password according to the dynamic decryption factor to obtain the door opening password comprises:
[0045] Obtaining a second random dynamic salt value according to the dynamic decryption factor;
[0046] Combining the second random dynamic salt value and the dynamic decryption factor using a key derivation function to obtain a dynamic decryption key;
[0047] The dynamic encryption password is decrypted by the dynamic decryption key to obtain the door opening password.
[0048] The present application also provides a cabinet door opening encryption control system, comprising:
[0049] The first acquisition module is used to obtain the user's fingerprint information and determine whether the fingerprint information matches the preset fingerprint information:
[0050] If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information;
[0051] A second acquisition module, used to acquire a corresponding door opening password according to the user device information, and acquire a dynamic encryption key according to the door opening password;
[0052] An encryption module, used for encrypting the door opening password according to the dynamic encryption key to obtain a dynamic encrypted password;
[0053] A generating module, used for obtaining a dynamic decryption factor, and sending the dynamic decryption factor and the dynamic encryption password to a user device;
[0054] The decryption module is used for the user equipment to decrypt the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password, and control the cabinet door to open based on the door opening password.
[0055] Preferably, the second acquisition module includes:
[0056] A first calculation unit, configured to perform a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value;
[0057] A second calculation unit is used to perform hash calculations on the model character and the ID character respectively by using a hash algorithm to obtain a second hash value and a third hash value;
[0058] a connecting unit, configured to connect the tail end of the first hash value with the head end of the second hash value, and connect the tail end of the second hash value with the head end of the third hash value to obtain a hash string;
[0059] An extraction unit, configured to obtain a repetition rate of each character according to the hash character string, and extract a plurality of characters corresponding to the repetition rate reaching a preset value;
[0060] The recombining unit is used to recombine the plurality of characters according to the repetition rate from large to small to obtain the door opening password.
[0061] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned cabinet door opening encryption control method when executing the computer program.
[0062] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned cabinet door opening encryption control method are implemented.
[0063] The beneficial effects of the present invention are as follows: the present invention performs user identity authentication through identity feature information to ensure that only authorized personnel can access the system, generates a dynamic encryption key through a door opening password to ensure that the password is different each time the door is opened, and this dynamic password can effectively prevent the password from being stolen and reused, thereby improving the system's anti-attack capability, and the door opening password generated based on user device information can achieve more refined authority control, and the use of dynamic encryption keys makes it impossible for attackers to access the cabinet through simple password tampering. Dynamic encryption passwords and decryption factors are usually used once, which avoids the risk of static passwords being reused, and the system can dynamically generate encryption factors and passwords to adapt to different security requirements and environmental changes, so as to better cope with new attack methods and security threats and improve the flexibility and adaptability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 The figure is a schematic diagram of a method flow according to an embodiment of the present invention.
[0065] Figure 2 FIG. 1 is a schematic diagram of a system structure according to an embodiment of the present invention.
[0066] Figure 3 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
[0067] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0068] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0069] like Figure 1-Figure 3 As shown, the present application provides a cabinet door opening encryption control method, comprising:
[0070] S1. Obtaining the user's fingerprint information and determining whether the fingerprint information matches the preset fingerprint information;
[0071] If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information;
[0072] S2. Obtain a corresponding door opening password according to the user device information, and obtain a dynamic encryption key according to the door opening password;
[0073] S3. Encrypt the door opening password according to the dynamic encryption key to obtain a dynamic encrypted password;
[0074] S4. Obtain a dynamic decryption factor, and send the dynamic decryption factor and the dynamic encryption password to the user device;
[0075] S5. The user device decrypts the dynamic encryption password according to the dynamic decryption factor to obtain a door opening password, and controls the cabinet door to open based on the door opening password.
[0076] As described in the above steps S1-S5, the cabinet is an indispensable component of electrical equipment and a carrier of electrical control equipment, so the cabinet door is usually equipped with an access control system. With the development of modern mobile Internet technology, the access control system has gradually become intelligent. The common intelligent access control system is the biometric access control system. In biometrics, such as fingerprint recognition, due to the high mobility of people, fingerprints are easily scattered in many corners of life, which increases the risk of leakage. In addition, human fingerprints cannot be changed throughout life. Once leaked, the fingerprint recognition function will be completely unusable and cannot meet security needs well. The present invention determines whether the fingerprint information matches the preset fingerprint information. If it matches, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information, the corresponding door opening password is obtained according to the user device information, the dynamic encryption key is obtained according to the door opening password, and the door opening password is encrypting according to the dynamic encryption key to obtain a dynamic encrypted password. In this way, user identity authentication is first performed through the identity feature information to ensure that only authorized personnel can access the system, and the user device information is obtained and the door opening password is generated based on this. This process ensures that the access rights of each user are bound to their device, thereby avoiding the risk of widespread password leakage. The dynamic encryption key is generated through the door opening password to ensure that the password is different each time the door is opened. This dynamic password can effectively prevent the password from being stolen and reused, and improves the system's anti-attack ability. The new password generated each time the door is opened has the characteristic of one-time use. Even if the password is leaked, it cannot be reused. The use of dynamic passwords reduces the security risks caused by password leakage or guessing. The door opening password generated based on the user device information can achieve more refined permission control. The use of dynamic encryption keys makes it impossible for attackers to simply tamper with the password to To access the cabinet, each key generated is based on the current state and encryption algorithm, so the attacker needs to crack the system's dynamic generation mechanism, which greatly increases the difficulty of the attack. Since the dynamic encryption password uses an encryption algorithm to protect the door opening password, it is more secure during transmission and storage. The mechanism of the dynamic encryption password can prevent replay attacks. Even if the attacker intercepts the encrypted password at a certain point in time, since the password generated each time is different, the attacker cannot reuse these passwords for attacks. By generating a dynamic decryption factor and sending the dynamic decryption factor and the dynamic encryption password to the user device, the user device decrypts the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password, and controls the cabinet door to open based on the door opening password. Since the dynamic decryption factor is generated by random changes, the dynamic elements in the decryption process are added, which makes the decryption complexity greatly increased even if the attacker intercepts the dynamic encryption password, because they also need to obtain or crack the dynamic decryption factor. Since the dynamic encryption password and the dynamic decryption factor are generated in real time, even if the attacker intercepts this data, the password and decryption factor obtained are only valid for the current session and cannot be replayed for future sessions.Dynamic encryption passwords and decryption factors are usually one-time use, that is, new passwords and factors are generated for each access, which avoids the risk of static passwords being reused. Dynamic encryption passwords and dynamic decryption factors use encryption technology during transmission to prevent data from being eavesdropped or tampered with during transmission. The system can dynamically generate encryption factors and passwords to adapt to different security requirements and environmental changes, which can better respond to new attack methods and security threats, improve the flexibility and adaptability of the system, and first identify the user through fingerprints, and then generate the corresponding door opening password based on the user's identity and device, and bind it to the user's device to achieve more fine-grained encryption control. ,
[0077] In one embodiment, the step S1 of acquiring user equipment information according to the identity feature information includes:
[0078] S11, acquiring user biometric information according to the identity feature information, wherein the user biometric information includes a serial number, a height feature value, and facial features distribution features;
[0079] S12, acquiring the facial area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears according to the facial features distribution characteristics;
[0080] S13, calculating the body proportion value according to the height characteristic value, the face area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears, wherein the calculation formula is:
[0081] ;
[0082] in, Represents the body proportion value, Indicates the distance between the eyes and the tip of the nose, Indicates the distance between the eyes and the corners of the mouth, Indicates the distance between the eyes and the ears. Indicates the size of the face area. represents the height feature value;
[0083] S14, acquiring a pre-stored body proportion value corresponding to the number from a database according to the number;
[0084] S15, determining whether the pre-stored body proportion is the same as the body proportion value;
[0085] If the pre-stored body proportion is the same as the body proportion value, the user equipment information corresponding to the pre-stored body proportion value is obtained from the database.
[0086] As described in the above steps S11-S15, the present invention obtains the number of the user's biological characteristic information, the height characteristic value and the distribution characteristics of the facial features through the identity characteristic information, and then obtains the facial area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears according to the distribution characteristics of the facial features, and calculates the body proportion value according to the height characteristic value, the facial area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears. In this way, by obtaining the user's biological characteristic information, such as height, facial area size, distribution of facial features, etc., accurate biological characteristic recognition can be performed. These features are It is difficult to forge, making identity authentication more reliable and improving security. Compared with traditional single biometric identification (such as using only facial recognition or fingerprint recognition), this method combines multiple features (such as facial features and height) to provide more comprehensive identity authentication. By calculating the body proportion value and comparing it with the preset standard value, it can effectively prevent attackers from using prostheses or pictures to impersonate. Even if the attacker can forge the user's facial image, it is much more difficult to forge the body proportions, which improves the system's anti-attack ability. Using biometric data for verification can prevent simple replay attacks. Because biometric features are highly unique and stable, and the comparison parameters are different for each login, even if the data is intercepted, it cannot be reused. By comprehensively considering height, face size and distribution of facial features, the system can more accurately identify the user's identity and ensure that only authorized users can access the cabinet, which helps to implement stricter access control policies. Then, the pre-stored body proportion value corresponding to the number is obtained from the database according to the number. By judging whether the pre-stored body proportion is the same as the body proportion value, if the same, the user device information corresponding to the pre-stored body proportion value is obtained from the database. By comparing the pre-stored body proportion value with the currently calculated body proportion value, accurate verification of the user's identity can be achieved. Further operations are allowed only when the pre-stored body proportion value completely matches the currently calculated body proportion value. If the pre-stored body proportion value is the same as the currently calculated value, the user device information is obtained from the database. This automated process reduces manual intervention and improves the efficiency of equipment management. The pre-stored body proportion value and user device information are usually encrypted and stored in the database, increasing the level of data protection.
[0087] In one embodiment, the step S2 of acquiring the corresponding door opening password according to the user device information and acquiring the dynamic encryption key according to the door opening password includes:
[0088] S21, obtaining the time point of the door opening instruction request, and obtaining a timestamp character according to the time point;
[0089] S22, acquiring a device model and user ID information according to the user device information, and acquiring a model character and an ID character according to the device model and user ID information respectively;
[0090] S23, obtaining a door opening password according to the timestamp character, model character and ID character;
[0091] S24, generating a first random dynamic salt value through a random number generator according to the door opening password;
[0092] S25, extracting a plurality of random feature data of the door opening password, and obtaining a random probability of each feature data according to the plurality of random feature data;
[0093] S26. Calculate the number of dynamic iterations according to the plurality of random feature data and random probability, wherein the calculation formula is:
[0094] ;
[0095] in, represents the number of dynamic iterations, Indicates Random feature data, Indicates A random probability, represents the number of random feature data, A sequence number representing random feature data;
[0096] S27. Calculate the key value according to the door opening password, the first random dynamic salt value and the number of dynamic iterations, wherein the calculation formula is:
[0097] ;
[0098] in, Represents the key value, represents the model parameters, represents the number of dynamic iterations, Indicates the door opening password. Represents the first random dynamic salt value;
[0099] The key value is converted into a dynamic encryption key of corresponding length according to the door opening password.
[0100] As described in the above steps S21-S27, the present invention obtains the time point of the door opening command request, obtains the timestamp character according to the time point, obtains the device model and user ID information according to the user device information, obtains the model character and ID character respectively according to the device model and the user ID information, and finally obtains the door opening password according to the timestamp character, the model character and the ID character. In this way, by using the timestamp character to generate the password, it is ensured that a unique password will be generated for each door opening request. Even if the password is leaked, the validity period of the password is very short due to the change of the timestamp, reducing the risk of the password being abused. The timestamp mechanism ensures that the password requested each time is unique, and the device model and user ID are used as parameters for password generation, so that the password is generated More complex and unpredictable, which provides multi-level security protection. Each user device combination has its own unique device model characters and ID characters, which increases the personalization and complexity of the password and makes it more difficult to crack the password. Password generation involves three factors: timestamp, device model and user ID. Compared with the authentication mechanism that only uses a single factor, this multi-factor authentication method provides higher security. By combining multiple information to generate passwords, the security of the authentication system is greatly enhanced. By dynamically generating passwords through timestamps and device information, the inherent vulnerabilities of the system can be effectively prevented from being exploited. At the same time, by recording the device model and user ID used to generate the password, the specific user and device can be tracked when a security incident occurs, which is convenient for subsequent audits and The investigation provides data support. According to the door opening password, a first random dynamic salt value is generated through a random number generator. By extracting multiple random feature data of the door opening password and obtaining the random probability of each feature data based on the multiple random feature data, the complexity of the password can be increased by generating a first random dynamic salt value and combining it with the door opening password. The introduction of this salt value ensures that even if the same door opening password is used multiple times, the final generated password hash value will be different, thereby improving the protection of the password. The dynamic salt value effectively prevents rainbow table attacks because attackers cannot directly crack the hash value through pre-calculated rainbow tables. Each generated salt value is unique, making it extremely difficult to crack the hash value. By extracting multiple random feature data of the password and The random probability of obtaining these characteristic data can increase the complexity and unpredictability of the password generation process. The use of random characteristic data and its probability increases the entropy value of the password (that is, the randomness of information). The higher the password entropy value, the stronger the security of the password, thereby enhancing the protection of the cabinet door. The dynamic iteration number is calculated according to multiple random characteristic data and random probabilities, and the key value is calculated according to the door opening password, the first random dynamic salt value and the dynamic iteration number. Finally, the key value is converted into a dynamic encryption key of the corresponding length according to the door opening password. The dynamic iteration number is calculated according to multiple random characteristic data and random probabilities, so that the iteration number is different each time the key value is calculated. This dynamism increases the complexity of password protection and makes the cracking process more difficult.By combining the door opening password, the first random dynamic salt value and the dynamic iteration number to calculate the key value, it is ensured that each generated encryption key is unique. The dynamic nature of the encryption key improves the encryption strength and makes the encrypted data more secure. The dynamic iteration number increases the complexity of the key calculation. The introduction of dynamic salt value and dynamic iteration number makes the encryption process of each password different. Even if the password is the same, the encryption result will be different, which increases the difficulty of password guessing attacks and ensures the security and adaptability of the cabinet door system in the face of various threats.
[0101] In one embodiment, the step S23 of obtaining the door opening password according to the timestamp character, model character and ID character includes:
[0102] S231, performing hash calculation on the timestamp character using a hash algorithm to obtain a first hash value;
[0103] S232, using a hash algorithm to perform hash calculations on the model character and the ID character respectively to obtain a second hash value and a third hash value;
[0104] S233, connecting the tail end of the first Hash value with the head end of the second Hash value, and connecting the tail end of the second Hash value with the head end of the third Hash value to obtain a hash string;
[0105] S234, obtaining the repetition rate of each character according to the hash character string, and extracting a plurality of characters corresponding to the repetition rate reaching a preset value;
[0106] S235, reorganize the plurality of characters according to the repetition rate from large to small to obtain a door opening password.
[0107] As described in the above steps S231-S235, the present invention uses a hash algorithm to perform hash calculations on the timestamp character, the model character, and the ID character, respectively, to obtain a first hash value, a second hash value, and a third hash value, and then connects the tail end of the first hash value with the head end of the second hash value, and connects the tail end of the second hash value with the head end of the third hash value to obtain a hash string. In this way, by performing hash processing on the timestamp character, the model character, and the ID character, three different hash values are obtained, and each hash value represents a specific input. In this way, multiple hashes can be used to increase the complexity of the final hash string. The tail end of the first hash value is connected to the head end of the second hash value, and the tail end of the second hash value is connected to the head end of the third hash value, and partial data of different hash values are mixed, so that the final hash string is more difficult to predict and crack. Since the output of the hash algorithm is irreversible, by connecting parts of different hash values, the hash string finally generated has higher randomness and unpredictability, making it more difficult to attack. It is difficult for an attacker to guess the final hash string based on known information. The repetition rate of each character is obtained according to the hash string, and multiple characters corresponding to the repetition rate reaching a preset value are extracted, and then the multiple characters are reorganized from large to small according to the repetition rate to obtain the door opening password. In this way, by analyzing the repetition rate of each character in the hash string and extracting the characters that reach the preset value, this method makes the generated password have a certain complexity and is not easy to be predicted or generated. The extracted characters are reorganized from large to small according to the repetition rate to ensure that the password contains the most frequently occurring characters, which can increase the complexity and difficulty of the password. The method of generating passwords is based on the repetition rate of characters, so that the password is not randomly generated, but obtained through specific rules. Even if the attacker understands the password generation rules, he still needs to crack the hash string to obtain the password, which greatly increases the difficulty of cracking. Hash strings usually have strong uniqueness. Generating passwords based on hash values ensures that each password is unique. This uniqueness increases the security of password protection.
[0108] In one embodiment, the step S3 of encrypting the door opening password according to the dynamic encryption key to obtain the dynamic encrypted password includes:
[0109] S31, encoding the door opening password into a byte array, and dividing the byte array into multiple character strings;
[0110] S32, performing cyclic shift on the rows of each character string and performing mixing processing with the columns to obtain multiple data blocks;
[0111] S33, performing XOR processing on each of the data blocks and the dynamic encryption key to obtain multiple ciphertext blocks;
[0112] S34, splicing the plurality of ciphertext blocks in the order of segmentation to obtain a dynamic encryption password.
[0113] As described in the above steps S31-S34, in the present invention, the door opening password is encoded into a byte array and divided into multiple strings, and the rows of each string are circularly shifted and mixed with the columns to obtain multiple data blocks. The door opening password is encoded into a byte array and divided into multiple strings, so that the representation of the password becomes complicated. Circular shifting the rows of each string will change the byte arrangement order of the password. This displacement increases the complexity of the password. The circular shift process can prevent the password from being easily restored because the row shift will disrupt the order of the password bytes. Mixing the columns increases the complexity and unpredictability of the password. Among them, row shift refers to circular shifting the rows in the data block, which can be achieved by keeping the first row of the data block unchanged, shifting the second row to the left by one byte, shifting the third row to the left by two bytes, and shifting the fourth row to the left by three bytes. Column mixing refers to treating each column of the data block as a polynomial and performing matrix multiplication with a fixed polynomial, which can be achieved by multiplying each column with a fixed matrix (4x4). The password byte array is segmented, cyclically shifted, and mixed in columns to make cracking more difficult, because the reverse operation is required to restore the original password. The password is segmented into multiple data blocks and processed, making the password safer during storage or transmission. Each data block is XORed with the dynamic encryption key to obtain multiple ciphertext blocks, and the multiple ciphertext blocks are spliced in the segmentation order to obtain the dynamic encryption password. By XORing each data block with the dynamic encryption key, the generated ciphertext block makes the original data block unreadable, which increases the complexity of the password. Since the dynamic encryption password generated each time is different, the XOR operation based on the dynamic key can effectively prevent replay attacks. Since the ciphertext block obtained by XORing each data block with the dynamic key forms the final dynamic encryption password after splicing, even if the attacker obtains part of the ciphertext block, it is still difficult to infer other parts or the entire password. The process of splicing the ciphertext blocks in the segmentation order ensures the consistency of the structure and order of the final password, and increases the stability and uniqueness of the password.
[0114] In one embodiment, the user device decrypts the dynamic encrypted password according to the dynamic decryption factor to obtain the door opening password step S5, including:
[0115] S51, obtaining a second random dynamic salt value according to the dynamic decryption factor;
[0116] S52, combining the second random dynamic salt value and the dynamic decryption factor using a key derivation function to obtain a dynamic decryption key;
[0117] S53. Decrypt the dynamic encrypted password using the dynamic decryption key to obtain a door opening password.
[0118] As described in the above steps S51-S53, the present invention obtains the second random dynamic salt value through the dynamic decryption factor, and uses the key derivation function to combine the second random dynamic salt value and the dynamic decryption factor to obtain a dynamic decryption key, and then decrypts the dynamic encryption password through the dynamic decryption key to obtain the door opening password. By using the dynamic decryption factor to generate the decryption key, the key generation is dynamic. The second random dynamic salt value is a randomly generated value used to combine with the dynamic decryption factor. The second random dynamic salt value and the dynamic decryption factor are combined through the key derivation function to generate a dynamic decryption key. The key derivation function usually includes complex calculation and processing steps, so that the generated key is more It increases security and the difficulty of cracking the key. The key generated by the key derivation function is based on dynamic information, so that the key is not static, but may be different each time it is decrypted. This dynamically generated key mechanism reduces the risk of static keys being leaked or reused. This method combines dynamic decryption factors, random salt values, and key derivation functions to provide multiple layers of protection for the system. The dynamic decryption factor, the second random dynamic salt value, and the key derivation function are used to generate and use dynamic decryption keys, which greatly improves the security of the cabinet door. It not only enhances the complexity and security of password and key management, but also prevents replay attacks, improves the protection capability of the decryption process, and makes the system more robust and difficult to crack.
[0119] The present application also provides a cabinet door opening encryption control system, comprising:
[0120] The first acquisition module is used to obtain the user's fingerprint information and determine whether the fingerprint information matches the preset fingerprint information:
[0121] If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information;
[0122] A second acquisition module, used to acquire a corresponding door opening password according to the user device information, and acquire a dynamic encryption key according to the door opening password;
[0123] An encryption module, used for encrypting the door opening password according to the dynamic encryption key to obtain a dynamic encrypted password;
[0124] A generating module, used for obtaining a dynamic decryption factor, and sending the dynamic decryption factor and the dynamic encryption password to a user device;
[0125] The decryption module is used for the user equipment to decrypt the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password, and control the cabinet door to open based on the door opening password.
[0126] In one embodiment, the second acquisition module includes:
[0127] A first calculation unit, configured to perform a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value;
[0128] A second calculation unit is used to perform hash calculations on the model character and the ID character respectively by using a hash algorithm to obtain a second hash value and a third hash value;
[0129] a connecting unit, configured to connect the tail end of the first hash value with the head end of the second hash value, and connect the tail end of the second hash value with the head end of the third hash value to obtain a hash string;
[0130] An extraction unit, configured to obtain a repetition rate of each character according to the hash character string, and extract a plurality of characters corresponding to the repetition rate reaching a preset value;
[0131] The recombining unit is used to recombine the plurality of characters according to the repetition rate from large to small to obtain the door opening password.
[0132] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned cabinet door opening encryption control method when executing the computer program.
[0133] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned cabinet door opening encryption control method are implemented.
[0134] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0136] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A cabinet door opening encryption control method, characterized in that: Applied to cabinet door systems, including: Obtaining the user's fingerprint information and determining whether the fingerprint information matches the preset fingerprint information; If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information; Obtaining the time point of the door opening instruction request, and obtaining a timestamp character according to the time point; Acquire the device model and user ID information according to the user device information, and acquire the model character and ID character respectively according to the device model and user ID information; Performing a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value; Using a hash algorithm to perform hash calculations on the model character and the ID character respectively to obtain a second hash value and a third hash value; Connect the tail end of the first Hash value to the head end of the second Hash value, and connect the tail end of the second Hash value to the head end of the third Hash value to obtain a hash string; Obtaining the repetition rate of each character according to the hash character string, and extracting a plurality of characters corresponding to the repetition rate reaching a preset value; Rearrange the plurality of characters according to the repetition rate from large to small to obtain a door opening password; Generate a first random dynamic salt value through a random number generator according to the door opening password; Extracting a plurality of random feature data of the door opening password, and obtaining a random probability of each feature data according to the plurality of random feature data; The number of dynamic iterations is calculated according to the plurality of random feature data and random probability, wherein the calculation formula is: ; in, represents the number of dynamic iterations, Indicates Random feature data, Indicates A random probability, represents the number of random feature data, A sequence number representing random feature data; The key value is calculated according to the door opening password, the first random dynamic salt value and the number of dynamic iterations, wherein the calculation formula is: ; in, Represents the key value, represents the model parameters, represents the number of dynamic iterations, Indicates the door opening password. Represents the first random dynamic salt value; Convert the key value into a dynamic encryption key of corresponding length according to the door opening password; Encrypt the door opening password according to the dynamic encryption key to obtain a dynamic encryption password; Obtaining a dynamic decryption factor, and sending the dynamic decryption factor and the dynamic encryption password to a user device; The user equipment decrypts the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password, and controls the cabinet door to open based on the door opening password.
2. The cabinet door opening encryption control method according to claim 1, characterized in that: The step of acquiring user equipment information according to the identity feature information comprises: Acquire user biometric information according to the identity feature information, wherein the user biometric information includes a serial number, a height feature value, and a distribution feature of facial features; Obtaining the facial area, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears according to the facial features distribution characteristics; The body proportion value is calculated according to the height characteristic value, the face area size, the distance between the eyes and the nose tip, the distance between the eyes and the mouth corners, and the distance between the eyes and the ears, wherein the calculation formula is: ; in, Represents the body proportion value, Indicates the distance between the eyes and the tip of the nose, Indicates the distance between the eyes and the corners of the mouth, Indicates the distance between the eyes and the ears. Indicates the size of the face area. represents the height feature value; According to the number, a pre-stored body proportion value corresponding to the number is obtained from a database; Determining whether the pre-stored body proportion is the same as the body proportion value; If the pre-stored body proportion is the same as the body proportion value, the user equipment information corresponding to the pre-stored body proportion value is obtained from the database.
3. The cabinet door opening encryption control method according to claim 1, characterized in that: The step of encrypting the door opening password according to the dynamic encryption key to obtain the dynamic encrypted password comprises: Encode the door opening password into a byte array, and divide the byte array into multiple character strings; Circularly shifting the rows of each string and mixing them with the columns to obtain multiple data blocks; XOR processing is performed on each of the data blocks with a dynamic encryption key to obtain multiple ciphertext blocks; The plurality of ciphertext blocks are concatenated in the order of segmentation to obtain a dynamic encryption password.
4. The cabinet door opening encryption control method according to claim 1, characterized in that: The step of the user equipment decrypting the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password comprises: Obtaining a second random dynamic salt value according to the dynamic decryption factor; Combining the second random dynamic salt value and the dynamic decryption factor using a key derivation function to obtain a dynamic decryption key; The dynamic encryption password is decrypted by the dynamic decryption key to obtain the door opening password.
5. A cabinet door opening encryption control system, characterized in that: include: The first acquisition module is used to obtain the user's fingerprint information and determine whether the fingerprint information matches the preset fingerprint information: If the fingerprint information matches the preset fingerprint information, the user's identity feature information is obtained, and the user device information is obtained according to the identity feature information; A second acquisition module is used to acquire the time point of requesting the door opening instruction, and acquire a timestamp character according to the time point; Acquire the device model and user ID information according to the user device information, and acquire the model character and ID character respectively according to the device model and user ID information; Performing a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value; Using a hash algorithm to perform hash calculations on the model character and the ID character respectively to obtain a second hash value and a third hash value; Connect the tail end of the first Hash value to the head end of the second Hash value, and connect the tail end of the second Hash value to the head end of the third Hash value to obtain a hash string; Obtaining the repetition rate of each character according to the hash character string, and extracting a plurality of characters corresponding to the repetition rate reaching a preset value; Rearrange the plurality of characters according to the repetition rate from large to small to obtain a door opening password; Generate a first random dynamic salt value through a random number generator according to the door opening password; Extracting a plurality of random feature data of the door opening password, and obtaining a random probability of each feature data according to the plurality of random feature data; The number of dynamic iterations is calculated according to the plurality of random feature data and random probability, wherein the calculation formula is: ; in, represents the number of dynamic iterations, Indicates Random feature data, Indicates A random probability, represents the number of random feature data, A sequence number representing random feature data; The key value is calculated according to the door opening password, the first random dynamic salt value and the number of dynamic iterations, wherein the calculation formula is: ; in, Represents the key value, represents the model parameters, represents the number of dynamic iterations, Indicates the door opening password. Represents the first random dynamic salt value; Convert the key value into a dynamic encryption key of corresponding length according to the door opening password; An encryption module, used for encrypting the door opening password according to the dynamic encryption key to obtain a dynamic encrypted password; A generating module, used for obtaining a dynamic decryption factor, and sending the dynamic decryption factor and the dynamic encryption password to a user device; The decryption module is used for the user equipment to decrypt the dynamic encryption password according to the dynamic decryption factor to obtain the door opening password, and control the cabinet door to open based on the door opening password.
6. The cabinet door opening encryption control system according to claim 5, characterized in that: The second acquisition module includes: A first calculation unit, configured to perform a hash calculation on the timestamp character using a hash algorithm to obtain a first hash value; A second calculation unit is used to perform hash calculations on the model character and the ID character respectively by using a hash algorithm to obtain a second hash value and a third hash value; a connecting unit, configured to connect the tail end of the first hash value with the head end of the second hash value, and connect the tail end of the second hash value with the head end of the third hash value to obtain a hash string; An extraction unit, configured to obtain a repetition rate of each character according to the hash character string, and extract a plurality of characters corresponding to the repetition rate reaching a preset value; The recombining unit is used to recombine the plurality of characters according to the repetition rate from large to small to obtain the door opening password.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Intelligent entrance guard control method, device and system
CN106504391A
Identity authentication system
CN110768942A