Safety equipment verification method, electronic equipment and computer readable storage medium
The security device verification method using non-Internet communication and cryptographic protocols effectively authenticates devices by deriving unique keys, ensuring accurate verification and protecting genuine devices' security.
Patent Information
- Application Number
- CN202411120183.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-03
AI Technical Summary
In blockchain business, the lack of central organization makes it difficult to verify the authenticity of security devices, as users may purchase fake or modified devices, compromising the security of the master key.
A security device verification method using a communication method other than Internet connection, such as Bluetooth or USB, involving unique identification, elliptic curve algorithm, and BIP32 protocol to derive private and public keys, ensuring verification accuracy through signature checking.
Ensures accurate verification of authentic devices while preventing counterfeit devices from passing verification, even if their private keys are not leaked, and safeguards the security of genuine devices' private keys.
Smart Images

Figure CN119066645A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of device authentication, and in particular, relates to a security device authentication method, an electronic device and a computer-readable storage medium. Background Art
[0002] In blockchain business, since there is no central organization, the master key of each user is only protected by the user himself. Therefore, the user will save his master key in the security chip of the security device provided by the business platform. Although the business platform provides a purchase channel for genuine security devices, users may still buy fake devices or second-hand modified devices from other channels, making it difficult to ensure the security of the master key.
[0003] Since security devices do not have networking capabilities, how to verify whether they are authentic is an urgent problem that needs to be solved. Summary of the invention
[0004] Based on this, in order to solve the above technical problems, a security device verification method, an electronic device and a computer-readable storage medium are provided.
[0005] The technical solution adopted by the present invention is as follows:
[0006] As a first aspect of the present invention, a security device verification method is provided, characterized in that the method is based on a communication method other than an Internet connection, and includes:
[0007] Sending information to be signed to the security device;
[0008] Acquire feedback information returned by the security device, wherein the feedback information is information after the security device signs the information to be signed according to its internal private key, and includes unique identification information of the security device;
[0009] Based on the public key generation method of the authentic security device, the public key is determined by the unique identification information, and the feedback information is verified by the public key. If the verification passes, the security device is authentic.
[0010] As a second aspect of the present invention, there is provided an electronic device, characterized in that it comprises a storage module, wherein the storage module comprises instructions loaded and executed by a processor, wherein when the instructions are executed, the processor executes a security device verification method according to the first aspect.
[0011] As a third aspect of the present invention, a computer-readable storage medium is provided, which stores one or more programs, and is characterized in that when the one or more programs are executed by a processor, a security device verification method of the above-mentioned first aspect is implemented.
[0012] The present invention provides a verification mechanism for security devices that do not have networking functions. Authentic devices can definitely pass the verification, while non-authentic devices that do not have this mechanism will definitely not pass the verification. Even if non-authentic devices also have the same mechanism, as long as the private key of each authentic device is not leaked, non-authentic devices will definitely not pass the signature verification, thereby ensuring the accuracy of security device verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments:
[0014] Figure 1 A flowchart of a security device verification method provided by an embodiment of the present invention;
[0015] Figure 2 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The following will illustrate the implementation methods of the present invention in conjunction with the drawings in the specification. It should be noted that the implementation methods involved in this specification are not exhaustive and do not represent the only implementation methods of the present invention. The following corresponding embodiments are only for the purpose of clearly illustrating the invention content of the patent of the present invention, and are not intended to limit its implementation methods. For ordinary technicians in this field, different forms of changes and modifications can be made on the basis of the description of this embodiment. All obvious changes or modifications that belong to the technical concept and invention content of the present invention are also within the scope of protection of the present invention.
[0017] like Figure 1 As shown, the embodiment of the present application provides a security device verification method for authenticating the security device through a user device. The user device can be a mobile phone or other device with networking function, and the security device does not have networking function. The two communicate in a non-Internet connection manner, such as transmitting information through Bluetooth or USB. Of course, under the premise that both have display and code scanning functions, they can also transmit information through QR code, such as one party displays the QR code and the other party scans the QR code to obtain information and realize information transmission.
[0018] The genuine equipment provider assigns a unique identification information, such as the SN code, to each genuine security device. At the same time, the genuine equipment provider uses its master key as a random number and obtains the parent private key and parent public key based on the random number through the elliptic curve algorithm. After obtaining the parent private key, the genuine equipment provider derives a unique private key for each genuine security device based on the BIP32 protocol and the parent private key. The derivation path is the unique identification information of the corresponding security device. Each private key is pre-burned into the security chip of the corresponding security device when the security device is produced. The parent public key can be stored in the server.
[0019] Similarly, a unique public key can be derived for each authentic security device based on the bip32 protocol and the parent public key, and the derivation path is the unique identification information of the corresponding security device.
[0020] Of course, the private key of each authentic security device can also be generated in other ways based on the parent private key and the unique identification information of the security device, and the public key of each authentic security device can also be generated in other ways based on the parent public key and the unique identification information of the security device.
[0021] The above hierarchical mechanism makes the server-side information (parent public key) and the producer-storage information (each private key) simple and orderly.
[0022] Among them, due to the use of elliptic curve algorithm, the private key can be derived to generate the public key, but the public key cannot be reversed to generate the private key.
[0023] The principle of the security device verification method of the embodiment of the present application is: let the device to be verified use its own private key to sign, then use the public key generation method of the genuine security device, use the unique identification information of the device to be verified to determine the public key, and verify the signature through the public key. If the device to be verified is an authentic device, it will definitely pass the signature verification. Figure 1 As shown, the specific process of the method of the embodiment of the present application is as follows:
[0024] S101. A user device obtains unique identification information of a security device in response to an input operation of a user.
[0025] The unique identification information is usually attached to the security device in the form of a label. After the user finds the unique identification information, he can enter the unique identification information of the security device through the operation interface provided by the user device. The security device refers to the security device to be verified by the user.
[0026] S102: The user device generates information to be signed, where the information to be signed includes a generation time of the information to be signed and unique identification information.
[0027] Among them, the function of the generation time of the information to be signed is, on the one hand, to provide step S106 with a timeout judgment function, and on the other hand, because the time is variable, it can be used as a random code to ensure that the information to be signed is different each time, thereby improving security.
[0028] In this embodiment, the user device can send unique identification information to the server, and the server generates the information to be signed and returns it to the user device, so that the server can monitor the first verification time of the device. Of course, the generation of the information to be signed can also be implemented locally on the user device.
[0029] S103: The user device sends the information to be signed to the security device.
[0030] S104: After receiving the information to be signed, the security device signs the information to be signed according to its internal private key and returns it to the user device.
[0031] S105. The user device obtains feedback information returned by the security device.
[0032] S106. The user equipment compares the difference between the current time and the generation time of the information to be signed in the feedback information with the threshold value to determine whether it has timed out. If not, the next step is executed. Otherwise, the feedback information is invalid.
[0033] The threshold can be set to 5 minutes.
[0034] It should be pointed out that in actual applications, there may be situations where multiple authentic security devices need to cross-verify. Therefore, after the authentic security device receives the information to be signed, it can first use its own unique identification information to compare with the unique identification information in the information to be signed. If there is inconsistency, an error prompt is given and no signature is performed. Of course, for the scenario of single device verification, step S101 can be omitted, that is, the information to be signed in step S102 may not contain the unique identification information. The security device only needs to return the unique identification information to the user device as part of the feedback information in step S104.
[0035] S107. The user device determines the public key based on the public key generation method of the genuine security device through the unique identification information, and verifies the signature of the feedback information through the public key. If the signature verification passes, the security device is genuine, otherwise, it is counterfeit.
[0036] If the security device is verified to be authentic, the user device can give a corresponding prompt, such as "the device is authentic", and record the time, address and number of times of this verification, etc.
[0037] Among them, the user device uses the elliptic curve algorithm to verify the signature.
[0038] In this embodiment, the user equipment determines the public key through the following steps:
[0039] S71. Obtain the parent public key from the server.
[0040] S72. Calculate the public key of the security device according to the unique identification information in the feedback information and the acquired parent public key.
[0041] Of course, the user device can also send the unique identification information to the server, and the server will calculate the public key of the security device based on the unique identification information and the parent public key, and return it to the user device. Alternatively, the server can pre-calculate and store the public key of each security device. After the user device sends the unique identification information to the server, the server will return the corresponding public key. If the server cannot return the public key, it means that the unique identification information cannot be matched to the corresponding public key, which means that the security device is not genuine.
[0042] Since the public key cannot be reversed to generate the private key, even if the server is hacked, the private key in the security device will not be leaked.
[0043] From the above, it can be seen that a security device verification method of an embodiment of the present application provides a verification mechanism for security devices that do not have networking functions. Authentic devices can definitely pass the verification, and non-authentic devices that do not have this mechanism will definitely not pass the verification. Even if non-authentic devices also have the same mechanism, as long as the private key of each authentic device is not leaked, non-authentic devices will definitely not be able to pass the signature verification step (step S107), thereby ensuring the accuracy of security device verification.
[0044] At the same time, since the public key cannot be reversed to generate the private key, even if the server is hacked, or the above-mentioned information to be signed and feedback information are leaked, the private key of the genuine device cannot be reversed, ensuring the security of the private key of each genuine device, and further ensuring the accuracy of this verification mechanism.
[0045] In addition, the timeout judgment function further ensures the safety and reliability of the entire verification process.
[0046] Same as above idea, Figure 2 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention is shown.
[0047] Exemplarily, the electronic device includes a storage module 21 and a processor 22, the storage module 21 includes instructions loaded and executed by the processor 22, and when the instructions are executed, the processor 22 performs the functions of the user device in the above-mentioned security device verification method in this specification.
[0048] It should be understood that the processor 22 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors, or a plurality of other processors.
[0049] (Digital Signal Processor, DSP), Application Specific Integrated Circuit
[0050] (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0051] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores one or more programs. When the one or more programs are executed by a processor, the functions of the user device in the above-mentioned security device verification method are implemented.
[0052] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0053] As is known to those of ordinary skill in the art, the term computer-readable storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0054] Exemplarily, the computer-readable storage medium may be an internal storage unit of the electronic device of the aforementioned embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device.
[0055] The electronic device and computer-readable storage medium provided in the aforementioned embodiments provide a verification mechanism for security devices that do not have networking capabilities. Authentic devices can definitely pass the verification, while non-authentic devices that do not have this mechanism will definitely not pass the verification. Even if non-authentic devices also have the same mechanism, as long as the private key of each authentic device is not leaked, non-authentic devices will definitely not be able to pass the signature verification step (step S107), thereby ensuring the accuracy of the security device verification.
[0056] At the same time, since the public key cannot be reversed to generate the private key, even if the server is hacked, or the above-mentioned information to be signed and feedback information are leaked, the private key of the genuine device cannot be reversed, ensuring the security of the private key of each genuine device, and further ensuring the accuracy of this verification mechanism.
[0057] In addition, the timeout judgment function further ensures the safety and reliability of the entire verification process.
[0058] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A security device verification method, It is characterized in that The method is based on non-internet connected communication methods, including: Sending information to be signed to the security device; Acquire feedback information returned by the security device, wherein the feedback information is information after the security device signs the information to be signed according to its internal private key, and includes unique identification information of the security device; Based on the public key generation method of the authentic security device, the public key is determined by the unique identification information, and the feedback information is verified by the public key. If the verification passes, the security device is authentic.
2. A security device verification method according to claim 1, It is characterized in that The private key of each authentic security device is generated based on the parent private key and the unique identification information of the security device, and the public key of each authentic security device is generated based on the parent public key and the unique identification information of the security device.
3. A security device verification method according to claim 2, It is characterized in that The parent private key and parent public key are generated by the elliptic curve algorithm. The private key of each authentic security device is derived based on the parent private key, based on the BIP32 protocol and using the unique identification information of the device as the derivation path. The public key of each authentic security device is derived based on the parent public key, based on the BIP32 protocol and using the unique identification information of the device as the derivation path.
4. A security device verification method according to claim 3, It is characterized in that The method for generating a public key based on an authentic security device, determining the public key of the security device through the unique identification information, further comprises: Obtain the parent public key from the server; The public key of the security device is calculated according to the unique identification information of the security device in the feedback information and the parent public key.
5. A security device verification method according to claim 4, It is characterized in that The information to be signed includes the time when the information to be signed was generated, and the method further includes: After obtaining the feedback information returned by the security device, the difference between the current time and the generation time of the information to be signed in the feedback information is compared with the threshold to determine whether it has timed out. If not, the next step is executed.
6. A security device verification method according to claim 5, It is characterized in that Also includes: In response to an input operation by a user, obtaining unique identification information of the security device; Generate information to be signed, where the information to be signed includes the time when the information to be signed was generated and the unique identification information.
7. A security device verification method according to claim 6, It is characterized in that The unique identification information is the SN code of the security device.
8. A security device verification method according to claim 5, It is characterized in that The threshold is 5 minutes.
9. An electronic device, It is characterized in that It comprises a storage module, wherein the storage module comprises instructions loaded and executed by a processor, and when the instructions are executed, the processor executes a security device verification method according to any one of claims 1-8.
10. A computer-readable storage medium storing one or more programs, It is characterized in that When the one or more programs are executed by the processor, a security device verification method as described in any one of claims 1-8 is implemented.
