A lock unlocking system for gun safety management

The server generates a symmetric key and encrypts the public key and feature code. The client decrypts and guides the user to enter verification information, ensuring multiple verifications for gun unlocking. It solves the security vulnerability of forging information to unlock guns in the existing technology, and significantly improves gun safety. Manage system security.

CN117424748BActive Publication Date: 2024-10-25ZHONGAN CHUANGKE (SHENZHEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311647754.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2024-10-25
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

The existing gun safety management system cannot effectively prevent guns from being illegally unlocked due to forged identity information and verification codes, and there are security loopholes and risks.

Method used

The server is used to generate a symmetric key and encrypt the public key and feature code. The client decrypts it to obtain the public key and feature code, instructs the user to enter verification information, encrypts it with the public key and sends it to the gun lock device. Only the correct key and feature code are used. Unlock the firearm under the conditions to ensure the accuracy and correctness of the verification information.

Benefits of technology

Through multiple verifications of symmetric keys, public keys and feature codes, the security of gun unlocking is improved, preventing simple forged information from unlocking guns, and significantly enhancing the security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117424748B_ABST
    Figure CN117424748B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of gun safety management, and specifically discloses an unlocking system for gun safety management, which uses a server to generate a symmetric key and sends it to a gun locking device and a client respectively, and then uses the symmetric key to encrypt a first public key and a first feature code. Only when the client has the correct symmetric key can it decode the first encrypted data to obtain a second public key and a second feature code that are the same as the first public key and the first feature code. The client guides the user to input the first verification information that meets the conditions through the second feature code, and then encrypts it through the second public key and sends it to the gun locking device. Only when the user has the correct second public key, the second encrypted data encrypted by the user can be decrypted by the gun locking device with the first private key, so as to obtain the second verification information that is the same as the first verification information, and then unlock the gun, which greatly improves the security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gun safety management, and in particular to an unlocking system for gun safety management. Background Art

[0002] At present, in order to ensure the safe use of guns, it is necessary to interact with the gun locking device through the client. This interaction includes steps such as entering a verification code and entering identity information to verify the identity and authority of the gun holder. The interaction between the client and the gun locking device makes the use of guns safer and more controllable.

[0003] However, the current interactive method cannot effectively deal with the problem of forging the above information. Criminals can bypass the current security mechanism by forging identity information, stealing verification codes, etc., to obtain guns and carry out criminal activities. This situation makes the current gun safety management have certain loopholes and risks. Therefore, people need a gun safety management unlocking system that can avoid unlocking guns by forging information. Summary of the invention

[0004] The purpose of the present invention is to provide an unlocking system for gun safety management to solve the following technical problems:

[0005] How to implement a gun unlocking system that can avoid gun unlocking through forged information for gun safety management.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] A lock unlocking system for gun safety management, comprising a server, a gun locking device and a client, wherein:

[0008] The server generates a symmetric key and sends it to the gun locking device and the client;

[0009] The gun locking device generates a first feature code, a first public key, and a first private key corresponding to the first public key, encrypts the first public key and the first feature code based on the symmetric key to obtain first encrypted data, and sends the first encrypted data to the client;

[0010] The client decrypts the first encrypted data based on the symmetric key to obtain a second public key and a second characteristic code;

[0011] The client obtains the first verification information input by the user according to the second feature code, encrypts the first verification information based on the second public key, obtains the second encrypted data and sends it to the gun locking device;

[0012] The gun locking device decrypts the second encrypted data according to the first private key to obtain the second verification information, and controls the unlocking of the gun according to the second verification information;

[0013] The first verification information and the second verification information are both verification information that the gun locking device needs to obtain, and the first feature code and the second feature code are both feature codes that characterize the type of verification information that the gun locking device needs to obtain;

[0014] The first public key and the first feature code are encrypted based on the symmetric key using the following formula:

[0015] C1=E(Km,P(Kpub,Fcode));

[0016] In the formula, C1 is the first encrypted data, Km is the symmetric key, Kpub is the first public key, Fcode is the first feature code, P(Kpub, Fcode) represents the concatenated plaintext obtained by concatenating the first public key Kpub and the first feature code Fcode based on a preset concatenation rule, and E(Km, P(Kpub, Fcode)) represents the encrypted concatenated plaintext P(Kpub, Fcode) based on the symmetric key Km.

[0017] As a further solution of the present invention: the step of encrypting the first public key and the first feature code based on the symmetric key to obtain the first encrypted data includes:

[0018] Obtaining a concatenated plaintext according to the first public key and the first characteristic code;

[0019] Divide the concatenated plaintext into multiple data blocks;

[0020] According to the symmetric key, the round key and subkey are generated by expansion;

[0021] Based on the round key and the subkey, multiple rounds of iterative encryption are performed on multiple data blocks, and the encryption results of each round are combined to obtain first encrypted data.

[0022] As a further solution of the present invention: the format of the feature code is a binary sequence of a preset length, each bit in the feature code corresponds to a type of verification information, and when the value in the feature code is 1, it indicates that the gun locking device needs to obtain the verification information of the type corresponding to the bit; when the value in the feature code is 0, it indicates that the gun locking device does not need to obtain the verification information of the type corresponding to the bit.

[0023] As a further solution of the present invention: the types of verification information include verification code, identity information of the person who takes the gun, identity information of the authorized person, gun storage warehouse ID, and gun ID.

[0024] As a further solution of the present invention: according to the first public key and the first characteristic code, a concatenated plaintext is obtained, including:

[0025] The concatenated plaintext is obtained by the following formula

[0026] P(Kpub,Iauth)=[B(Kpub|n),sep,Fcode,sep,B(Kpub|e)];

[0027] In the formula, B(Kpub|n) represents the first binary plaintext sequence obtained according to the modulus part Kpub|n in the first public key, B(Kpub|e) ​​represents the second binary plaintext sequence obtained according to the exponent part Kpub|e in the first public key, and sep is a preset separation mark sequence.

[0028] As a further solution of the present invention: the process of obtaining the first binary plaintext sequence according to the modulus part in the first public key includes:

[0029] Taking the binary number corresponding to the value of the modulus part in the first public key as the first binary sequence;

[0030] A preset escape character sequence is inserted into the leading positions of a plurality of numerical values ​​identical to the preset separation mark sequence in the first binary sequence to obtain a first binary plaintext sequence.

[0031] As a further solution of the present invention: the step of encrypting the first verification information based on the second public key to obtain the second encrypted data includes:

[0032] The second encrypted data is obtained by the following formula:

[0033] C2=(Iverif^Kpub|e)mod(Kpub|n);

[0034] In the formula, C2 is the second encrypted data, Iverif represents the first verification information, and mod represents the modulus operation.

[0035] Beneficial effects of the present invention:

[0036] The present invention provides an unlocking system for gun safety management, which uses a server to generate a symmetric key and sends it to a gun locking device and a client respectively, and then uses the symmetric key to encrypt a first public key and a first feature code. Only when the client has the correct symmetric key can it decode the first encrypted data to obtain the second public key and the second feature code that are the same as the first public key and the first feature code. The client guides the user to input the first verification information that meets the conditions through the second feature code, and then encrypts it through the second public key and sends it to the gun locking device. Only when the user has the correct second public key, the second encrypted data encrypted by the user can be decrypted by the gun locking device with the first private key, so as to obtain the second verification information that is the same as the first verification information, and then unlock the gun. Compared with the prior art, on the one hand, the client in the present invention not only needs to have the correct first verification information, but also needs to know what kind of verification information should be sent, which requires it to have the correct second feature code; on the other hand, the client in the present invention not only needs to ensure the accuracy of the first verification information, but also needs to know the correct second public key, so that the gun locking system can decode based on the first private key to obtain accurate second verification information. If the client wants to obtain the correct second public key and the second feature code, it also needs to have the correct symmetric key. The present invention further improves the unlocking requirements based on the verification information through three methods: symmetric key, second public key and second characteristic code, so that the gun cannot be correctly unlocked by simply forging information, which greatly improves the security. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention will be further described below in conjunction with the accompanying drawings.

[0038] Figure 1 It is a schematic diagram of the unlocking system for gun safety management of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0040] See also Figure 1 As shown, the present invention is a lock unlocking system for gun safety management, the system includes a server, a gun locking device and a client, wherein:

[0041] The server generates a symmetric key and sends it to the gun locking device and the client;

[0042] The gun locking device generates a first feature code, a first public key, and a first private key corresponding to the first public key, encrypts the first public key and the first feature code based on the symmetric key to obtain first encrypted data, and sends the first encrypted data to the client;

[0043] The client decrypts the first encrypted data based on the symmetric key to obtain a second public key and a second characteristic code;

[0044] The client obtains the first verification information input by the user according to the second feature code, encrypts the first verification information based on the second public key, obtains the second encrypted data and sends it to the gun locking device;

[0045] The gun locking device decrypts the second encrypted data according to the first private key to obtain the second verification information, and controls the unlocking of the gun according to the second verification information;

[0046] The first verification information and the second verification information are both verification information that the gun locking device needs to obtain, and the first feature code and the second feature code are both feature codes that characterize the type of verification information that the gun locking device needs to obtain;

[0047] The first public key and the first feature code are encrypted based on the symmetric key using the following formula:

[0048] C1=E(Km,P(Kpub,Fcode));

[0049] In the formula, C1 is the first encrypted data, Km is the symmetric key, Kpub is the first public key, Fcode is the first feature code, P(Kpub, Fcode) represents the concatenated plaintext obtained by concatenating the first public key Kpub and the first feature code Fcode based on a preset concatenation rule, and E(Km, P(Kpub, Fcode)) represents the encrypted concatenated plaintext P(Kpub, Fcode) based on the symmetric key Km.

[0050] The present invention provides an unlocking system for gun safety management, which uses a server to generate a symmetric key and sends it to a gun locking device and a client respectively, and then uses the symmetric key to encrypt a first public key and a first feature code. Only when the client has the correct symmetric key can it decode the first encrypted data to obtain the second public key and the second feature code that are the same as the first public key and the first feature code. The client guides the user to input the first verification information that meets the conditions through the second feature code, and then encrypts it through the second public key and sends it to the gun locking device. Only when the user has the correct second public key, the second encrypted data encrypted by the user can be decrypted by the gun locking device with the first private key, so as to obtain the second verification information that is the same as the first verification information, and then unlock the gun. Compared with the prior art, on the one hand, the client in the present invention not only needs to have the correct first verification information, but also needs to know what kind of verification information should be sent, which requires it to have the correct second feature code; on the other hand, the client in the present invention not only needs to ensure the accuracy of the first verification information, but also needs to know the correct second public key, so that the gun locking system can decode based on the first private key to obtain accurate second verification information. If the client wants to obtain the correct second public key and the second feature code, it also needs to have the correct symmetric key. The present invention further improves the unlocking requirements based on the verification information through three methods: symmetric key, second public key and second characteristic code, so that the gun cannot be correctly unlocked by simply forging information, which greatly improves the security.

[0051] It is understandable that the server in the present invention can be a separately set key distribution server, and the gun locking device can be a structure such as a gun storage cabinet and a smart lock in a warehouse, which has facilities such as a display screen and a computing module to enable it to interact with the client and the user who takes the gun. The client can be any existing terminal device such as a user's mobile phone, computer, etc.

[0052] In this embodiment, the server generates a symmetric key and distributes it to the gun locking device and the client, wherein the symmetric key is used for symmetric encryption. The symmetric encryption algorithm is an encryption method that uses the same key to encrypt and decrypt data. It mainly has the advantages of high efficiency, scalability, security, simplicity and adaptability. In this embodiment, only the client that is registered in the server and can communicate with the server normally can obtain the accurate symmetric key, and the symmetric key possessed by the client needs to be the same as that of the gun locking device in order to proceed with the subsequent steps to unlock the gun normally.

[0053] Specifically, in a preferred embodiment, encrypting the first public key and the first feature code based on the symmetric key to obtain the first encrypted data includes:

[0054] Obtaining a concatenated plaintext according to the first public key and the first characteristic code;

[0055] Divide the concatenated plaintext into multiple data blocks;

[0056] According to the symmetric key, the round key and subkey are generated by expansion;

[0057] Based on the round key and the subkey, multiple rounds of iterative encryption are performed on multiple data blocks, and the encryption results of each round are combined to obtain first encrypted data.

[0058] In the above process, the processes of dividing data blocks, expanding and generating round keys and subkeys are all existing symmetric encryption technologies, so they will not be explained in detail in this article.

[0059] It is worth noting that in this embodiment, the first public key and the first characteristic code are encrypted by a symmetric key, and the two data need to be concatenated before encryption to obtain a concatenated plaintext.

[0060] The first public key is used for asymmetric encryption. Asymmetric encryption is an encryption method that uses a pair of keys, namely a public key and a private key, in which the public key is used to encrypt data and the private key is used to decrypt data. The two keys are mathematically related, but the private key cannot be derived from the public key, ensuring the security of the data. The public key is usually represented by a pair of large integers. In the RSA algorithm, the public key consists of two main components: modulus and exponent. The modulus is usually represented by the product of a large prime number, and the exponent is a positive integer less than the modulus. Asymmetric encryption mainly has the advantages of security, convenient key distribution, and secure key exchange. It is particularly suitable for identity authentication scenarios. Asymmetric encryption algorithms play an important role in secure communication and data protection, but compared with symmetric encryption algorithms, asymmetric encryption algorithms have higher computational complexity and slower encryption and decryption speeds. Therefore, in the present invention, symmetric encryption and asymmetric encryption are used simultaneously to combine the advantages of both parties.

[0061] In the present invention, the client can ensure that the second public key obtained by decryption is consistent with the first public key only if it obtains the correct symmetric key. Then, the second encrypted data subsequently encrypted based on the second public key can be correctly decrypted by the gun locking device through the first private key for verification.

[0062] On the other hand, in practice, there are various verification information used to verify the identity of the user. In this embodiment, it may include at least one of a verification code, identity information of the person who takes the gun, identity information of the authorized person, gun storage ID, and gun ID. In this embodiment, a feature code is used to indicate the type of verification information required when the gun lock device is unlocked this time.

[0063] Specifically, in this embodiment, the format of the feature code is a binary sequence of a preset length, and each bit in the feature code corresponds to a type of verification information. When the value in the feature code is 1, it indicates that the gun locking device needs to obtain the verification information of the type corresponding to the bit. When the value in the feature code is 0, it indicates that the gun locking device does not need to obtain the verification information of the type corresponding to the bit.

[0064] For example, in a specific embodiment, the feature code is a 5-bit binary number, and each bit of the feature code from high to low represents the verification code, the identity information of the person who takes the gun, the identity information of the authorized person, the gun storage ID and the gun ID. Assume that when unlocking this time, the first feature code generated by the gun locking system is: 10101. Then the first feature code means that the gun locking device needs to obtain the correct verification code, the identity information of the authorized person (ID number, personnel number, etc.) and the gun ID before the gun can be unlocked.

[0065] For the client, only when the second feature code obtained by decoding is also 10101, can it guide the user to enter the verification code, the identity information of the authorized person and the gun ID. If the user enters the identity information of the person who takes the gun or does not enter the gun ID, or the verification code and other information entered are incorrect, the unlocking device will not be unlocked. This solves the problem of stealing guns by forging information.

[0066] Furthermore, in a preferred embodiment, obtaining the concatenated plaintext according to the first public key and the first characteristic code includes:

[0067] The concatenated plaintext is obtained by the following formula

[0068] P(Kpub,Iauth)=[B(Kpub|n),sep,Fcode,sep,B(Kpub|e)];

[0069] In the formula, B(Kpub|n) represents the first binary plaintext sequence obtained according to the modulus part Kpub|n in the first public key, B(Kpub|e) ​​represents the second binary plaintext sequence obtained according to the exponent part Kpub|e in the first public key, and sep is a preset separation mark sequence.

[0070] The meaning of the above formula is that the modulus part Kpub|n in the first public key and the exponent part Kpub|e in the first public key are respectively used as binary sequences, and the first feature code Fcode is inserted between the two. The three are separated by a preset separation mark sequence sep to facilitate the computer to identify different fields, so as to form a complete spliced ​​plaintext and improve data security.

[0071] When the modulus part and the exponent part of the first public key are converted into a binary sequence, the converted sequence may contain a numerical sequence that is the same as the preset segmentation mark sequence. Therefore, in order to avoid misjudgment and data confusion, in this embodiment, the process of obtaining the first binary plaintext sequence according to the modulus part in the first public key includes:

[0072] Taking the binary number corresponding to the value of the modulus part in the first public key as the first binary sequence;

[0073] A preset escape character sequence is inserted into the leading positions of a plurality of numerical values ​​identical to the preset separation mark sequence in the first binary sequence to obtain a first binary plaintext sequence.

[0074] It can be understood that the process of obtaining the second binary plaintext sequence is the same as above, and will not be described in detail in this article.

[0075] In the above process, the first digits of the multiple numerical values ​​identical to the preset separation mark sequence in the first binary sequence are inserted into the preset escape character sequence by means of escape characters, so as to avoid confusion with the preset separation mark sequence.

[0076] Further, in a preferred embodiment, encrypting the first verification information based on the second public key to obtain the second encrypted data includes:

[0077] The second encrypted data is obtained by the following formula:

[0078] C2=(Iverif^Kpub|e)mod(Kpub|n);

[0079] In the formula, C2 is the second encrypted data, Iverif represents the first verification information, and mod represents the modulus operation.

[0080] In summary, in the system provided in this embodiment, the gun can be correctly unlocked only when the first public key is the same as the second public key, the first feature code is the same as the second feature code, and the first verification information is the same as the second verification information.

[0081] The present invention provides an unlocking system for gun safety management, which uses a server to generate a symmetric key and sends it to a gun locking device and a client respectively, and then uses the symmetric key to encrypt a first public key and a first feature code. Only when the client has the correct symmetric key can it decode the first encrypted data to obtain the second public key and the second feature code that are the same as the first public key and the first feature code. The client guides the user to input the first verification information that meets the conditions through the second feature code, and then encrypts it through the second public key and sends it to the gun locking device. Only when the user has the correct second public key, the second encrypted data encrypted by the user can be decrypted by the gun locking device with the first private key, so as to obtain the second verification information that is the same as the first verification information, and then unlock the gun. Compared with the prior art, on the one hand, the client in the present invention not only needs to have the correct first verification information, but also needs to know what kind of verification information should be sent, which requires it to have the correct second feature code; on the other hand, the client in the present invention not only needs to ensure the accuracy of the first verification information, but also needs to know the correct second public key, so that the gun locking system can decode based on the first private key to obtain accurate second verification information. If the client wants to obtain the correct second public key and the second feature code, it also needs to have the correct symmetric key. The present invention further improves the unlocking requirements based on the verification information through three methods: symmetric key, second public key and second characteristic code, so that the gun cannot be correctly unlocked by simply forging information, which greatly improves the security.

[0082] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. An unlocking system for gun safety management, characterized in that: It includes server, gun locking device and client, among which: The server generates a symmetric key and sends it to the gun locking device and the client; The gun locking device generates a first feature code, a first public key, and a first private key corresponding to the first public key, encrypts the first public key and the first feature code based on the symmetric key to obtain first encrypted data, and sends the first encrypted data to the client; The client decrypts the first encrypted data based on the symmetric key to obtain a second public key and a second characteristic code; The client obtains the first verification information input by the user according to the second feature code, encrypts the first verification information based on the second public key, obtains the second encrypted data and sends it to the gun locking device; The gun locking device decrypts the second encrypted data according to the first private key to obtain the second verification information, and controls the unlocking of the gun according to the second verification information; The first verification information and the second verification information are both verification information that the gun locking device needs to obtain, and the first feature code and the second feature code are both feature codes that characterize the type of verification information that the gun locking device needs to obtain; The first public key and the first feature code are encrypted based on the symmetric key using the following formula: C1=E(Km,P(Kpub,Fcode)); In the formula, C1 is the first encrypted data, Km is the symmetric key, Kpub is the first public key, Fcode is the first feature code, P(Kpub, Fcode) represents the concatenated plaintext obtained by concatenating the first public key Kpub and the first feature code Fcode based on a preset concatenation rule, and E(Km, P(Kpub, Fcode)) represents the encrypted concatenated plaintext P(Kpub, Fcode) based on the symmetric key Km.

2. The unlocking system for gun safety management according to claim 1, characterized in that: The step of encrypting the first public key and the first feature code based on the symmetric key to obtain the first encrypted data includes: Obtaining a concatenated plaintext according to the first public key and the first characteristic code; Divide the concatenated plaintext into multiple data blocks; According to the symmetric key, the round key and subkey are generated by expansion; Based on the round key and the subkey, multiple rounds of iterative encryption are performed on multiple data blocks, and the encryption results of each round are combined to obtain first encrypted data.

3. The unlocking system for gun safety management according to claim 2, characterized in that: The format of the feature code is a binary sequence of a preset length. Each bit in the feature code corresponds to a type of verification information. When the value in the feature code is 1, it means that the gun locking device needs to obtain the verification information of the type corresponding to the bit. When the value in the feature code is 0, it means that the gun locking device does not need to obtain the verification information of the type corresponding to the bit.

4. The unlocking system for gun safety management according to claim 3, characterized in that: The types of verification information include verification code, identity information of the person who takes the gun, identity information of the authorized person, gun storage warehouse ID, and gun ID.

5. The unlocking system for gun safety management according to claim 3, characterized in that: According to the first public key and the first characteristic code, the concatenated plaintext is obtained, including: The concatenated plaintext is obtained by the following formula P(Kpub,Iauth)=[B(Kpub|n),sep,Fcode,sep,B(Kpub|e)]; In the formula, B(Kpub|n) represents the first binary plaintext sequence obtained according to the modulus part Kpub|n in the first public key, B(Kpub|e) ​​represents the second binary plaintext sequence obtained according to the exponent part Kpub|e in the first public key, and sep is a preset separation mark sequence.

6. The unlocking system for gun safety management according to claim 5, characterized in that: The process of obtaining the first binary plaintext sequence according to the modulus part in the first public key includes: Taking the binary number corresponding to the value of the modulus part in the first public key as the first binary sequence; A preset escape character sequence is inserted into the leading positions of a plurality of numerical values ​​identical to the preset separation mark sequence in the first binary sequence to obtain a first binary plaintext sequence.

7. The unlocking system for gun safety management according to claim 5, characterized in that: The step of encrypting the first verification information based on the second public key to obtain second encrypted data includes: The second encrypted data is obtained by the following formula: C2=(Iverif^Kpub|e)mod(Kpub|n); In the formula, C2 is the second encrypted data, Iverif represents the first verification information, and mod represents the modulus operation.