A method for realizing U-shield access control based on key negotiation

By adopting a key negotiation-based access control method in U-shield, the problem that existing U-shield access control cannot effectively identify the caller's intentions is solved, and higher security and reliability are achieved.

CN114915411BActive Publication Date: 2025-05-02NANJING WEICHUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210321016.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-03-29
Filing Date
2022-03-28
Publication Date
2025-05-02
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

The access control of the existing U-Shield is based on the Slave passive mode, and it is impossible to effectively identify the caller's good and malicious intentions, which poses security risks.

Method used

U-shield access control is implemented based on key negotiation, and the access permissions are ensured through key negotiation and binding between the terminal and the U-shield.

Benefits of technology

It improves the security of U-Shield access control, effectively identify and verify the identity of visitors through key negotiation and binding mechanisms, reducing the risk of malicious exploitation.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present disclosure discloses a method for realizing U shield access control based on key negotiation, including the following steps: S100, the caller uses the terminal to initiate an access request to the U shield; S200, after receiving the request, the terminal performs call service initialization, checks whether there is a key pair of the terminal in the terminal, if not, generates a key pair and saves it, if it already exists, continues; S300, the terminal generates a first random number, and sends it to the U shield together with the public key of the terminal; S400, the U shield checks whether there is a public key matching the terminal inside itself, if so, feeds back a signal to the terminal, and waits for any subsequent instruction request from the terminal to access the U shield; S500, if not, it means that the terminal and the U shield are not bound, and caches the public key of the terminal, and executes the binding of the U shield and the terminal. In this way, the present disclosure can provide a U shield access control solution that is different from the traditional Slave mode and safer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security, and in particular to a method for implementing U-shield access control based on key negotiation. Background Art

[0002] As for hardware physical shields, that is, the U shield commonly used in the financial field, it is widely used because of its ease of use. Hardware U shields often use USB interfaces, and products using Bluetooth or audio interfaces have also appeared. The access control of this type of U shield follows the Slave passive mode, usually passively receiving and processing external commands, but it cannot effectively identify the good or bad intentions of the caller, so when it is used maliciously, it will have adverse consequences.

[0003] However, with the continuous evolution of the digital world, the widespread use of USB shields will bring potential security risks. How to continuously improve the security of USB shields has always been an urgent problem to be solved. Summary of the invention

[0004] In view of this, the present disclosure discloses a method for implementing U-shield access control based on key negotiation, comprising the following steps:

[0005] S100, the caller uses the terminal to initiate an access request to the USB shield;

[0006] S200, after receiving the request, the terminal performs a call service initialization, checks whether there is a key pair of the terminal in the terminal, if not, generates and saves the key pair, if already exists, continues;

[0007] S300, the terminal generates a first random number and sends it to the U shield together with the public key of the terminal;

[0008] S400, the U shield checks whether there is a public key matching the terminal in itself, and if so, feeds back a signal to the terminal and waits for any subsequent instruction request from the terminal to access the U shield;

[0009] S500: If it does not exist, it means that the terminal and the U shield are not bound, and the public key of the terminal is cached, and the binding of the U shield and the terminal is executed.

[0010] Preferably, the step S500 performs the binding of the USB shield and the terminal according to the following steps:

[0011] S501, the U shield generates a first authorization code, and uses the public key of the terminal to encrypt the first random number and the first authorization code respectively to generate a first authorization code ciphertext and a first random number ciphertext;

[0012] S502, the U shield sends the first authorization code ciphertext, the first random number ciphertext and the public key of the U shield to the terminal;

[0013] S503. After receiving the first authorization code ciphertext and the first random number ciphertext, the terminal uses the private key of the terminal to decrypt the first authorization code ciphertext and the first random number ciphertext to obtain the second authorization code and the second random number; and compares the second random number with the first random number:

[0014] i. If they are not the same, then restart steps S200 to S500;

[0015] ii. If they are the same, then:

[0016] Use the public key of the U-Shield to encrypt the second authorization code to generate the second authorization code ciphertext. At the same time,

[0017] Use the terminal's own private key and the U-Shield public key to calculate the first intermediate value, and,

[0018] The first hash value is calculated using the second authorization code, the public key of the terminal, and the public key of the U shield, and,

[0019] Using the first intermediate value to perform encryption calculation on the first Hash value to obtain a first intermediate ciphertext;

[0020] Then send the first intermediate ciphertext and the second authorization code ciphertext to the U-Shield;

[0021] S504. After receiving the second authorization code, the U-Shield uses its own private key to decrypt the second authorization code ciphertext to obtain the third authorization code, and compares the third authorization code with the first authorization code:

[0022] a. If they are not the same, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal;

[0023] b. If they are the same, then:

[0024] Use the private key of the U-Shield itself and the public key of the terminal to calculate the second intermediate value.

[0025] The second hash value is calculated using the first authorization code, the public key of the terminal, and the public key of the U shield, and,

[0026] Use the second intermediate value and the second hash value to perform encryption calculation to obtain the second intermediate ciphertext, and compare the first intermediate ciphertext with the second intermediate ciphertext. If they are the same, the public key of the terminal is persistently stored to complete the binding of the two. If they are not the same, it means a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal.

[0027] In addition, the present disclosure also discloses a method for binding a U shield to a terminal, comprising the following steps:

[0028] S10, the terminal generates a first random number and sends it to the U shield together with the public key of the terminal;

[0029] S20, the U shield checks whether there is a public key matching the terminal in itself, and if so, feeds back a signal to the terminal and waits for any subsequent instruction request from the terminal to access the U shield;

[0030] S30. If it does not exist, it means that the terminal and the USB shield are not bound, and the public key of the terminal is cached;

[0031] S40, the U shield generates a first authorization code, and uses the public key of the terminal to encrypt the first random number and the first authorization code respectively to generate a first authorization code ciphertext and a first random number ciphertext;

[0032] S50, the U shield sends the first authorization code ciphertext, the first random number ciphertext and the public key of the U shield to the terminal;

[0033] S60. After receiving the first authorization code ciphertext and the first random number ciphertext, the terminal uses the private key of the terminal to decrypt the first authorization code ciphertext and the first random number ciphertext to obtain the second authorization code and the second random number; and compares the second random number with the first random number:

[0034] i. If they are not the same, re-execute steps S10 to S30;

[0035] ii. If they are the same, then:

[0036] Use the public key of the U-Shield to encrypt the second authorization code to generate the second authorization code ciphertext. At the same time,

[0037] Use the terminal's own private key and the U-Shield public key to calculate the first intermediate value, and,

[0038] The first hash value is calculated using the second authorization code, the public key of the terminal, and the public key of the U shield, and,

[0039] Using the first intermediate value to perform encryption calculation on the first Hash value to obtain a first intermediate ciphertext;

[0040] Then send the first intermediate ciphertext and the second authorization code ciphertext to the U-Shield;

[0041] S70. After receiving the second authorization code, the U-Shield uses its own private key to decrypt the second authorization code ciphertext to obtain the third authorization code, and compares the third authorization code with the first authorization code:

[0042] a. If they are not the same, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal;

[0043] b. If they are the same, then:

[0044] Use the private key of the U-Shield itself and the public key of the terminal to calculate the second intermediate value.

[0045] The second hash value is calculated using the first authorization code, the public key of the terminal, and the public key of the U shield, and,

[0046] Use the second intermediate value and the second hash value to perform encryption calculation to obtain the second intermediate ciphertext, and compare the first intermediate ciphertext with the second intermediate ciphertext. If they are the same, the public key of the terminal is persistently stored to complete the binding of the two. If they are not the same, it means a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal.

[0047] Preferably,

[0048] The U shield can be a physical shield or a digital software shield.

[0049] Through the above technical solution, the present invention realizes a new U-shield access control solution, which is based on innovative key negotiation rather than the Slave passive mode adopted by the traditional U-shield, thereby improving the security of U-shield access control. DETAILED DESCRIPTION

[0050] In order to make those skilled in the art understand the technical solutions disclosed in the present disclosure, the technical solutions of various embodiments will be described below in conjunction with the embodiments, and the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The terms "first", "second", etc. adopted in the present disclosure are used to distinguish different objects, rather than to describe a specific order. In addition, "including" and "having" and any of their variations are intended to cover and not exclusively include. For example, a process, or method, or system, or product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, systems, products or devices.

[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present disclosure. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0052] In one embodiment, the present disclosure discloses a method for implementing USB-shield access control based on key negotiation, comprising the following steps:

[0053] S100, the caller uses the terminal to initiate an access request to the USB shield;

[0054] S200, after receiving the request, the terminal performs a call service initialization, checks whether there is a key pair of the terminal in the terminal, if not, generates and saves the key pair, if already exists, continues;

[0055] S300, the terminal generates a first random number and sends it to the U shield together with the public key of the terminal;

[0056] S400, the U shield checks whether there is a public key matching the terminal in itself, and if so, feeds back a signal to the terminal and waits for any subsequent instruction request from the terminal to access the U shield;

[0057] S500: If it does not exist, it means that the terminal and the U shield are not bound, and the public key of the terminal is cached, and the binding of the U shield and the terminal is executed.

[0058] Through the above technical solution, the present disclosure implements a new U-shield access control solution, which is based on innovative key negotiation rather than the slave passive mode adopted by the traditional U-shield, and improves the security of U-shield access control. It can be understood that this is based on whether there is a binding relationship between the U-shield and the terminal, which is confirmed by the key.

[0059] In another embodiment,

[0060] The U shield can be a hardware physical shield or a digital software shield.

[0061] When it is a software digital shield, the digital shield at least includes one or more interfaces to interact with systems or interfaces outside the digital shield (for example, with the terminal in the present disclosure).

[0062] It can be understood that, typically, the hardware physical shield can be various products with hardware interfaces, such as a hardware physical shield in the form of a USB flash drive, or a card-type one-card pass with a USB interface, or a hardware physical shield with a Bluetooth interface or an audio interface. However, it is more necessary to explain that the software digital shield can be a digital file of various formats, and its interface is implemented by adopting a digital interface for reading and writing files or other suitable API technologies, so that through access to such digital files, the software digital shield can interact with the system or interface outside the digital shield, including different accesses such as read-only and read-write. Obviously, the hardware physical shield generally has higher security than the software digital shield, but this does not prevent the present disclosure from using existing digital encryption technology or monitoring technology or other digital security technology to improve the security of the software digital shield. Obviously, the U shield referred to in the present disclosure is more general, which covers the traditional hardware U shield and also incorporates the new connotation: digital shield. In fact, U shield has become a product name, and people are still accustomed to calling it U shield even though it no longer uses a Bluetooth shield with a USB interface. Similarly, the terminal of the present disclosure can also be a virtual terminal.

[0063] In another embodiment, the step S500 performs the binding of the USB shield and the terminal according to the following steps:

[0064] S501, the U shield generates a first authorization code, and uses the public key of the terminal to encrypt the first random number and the first authorization code respectively to generate a first authorization code ciphertext and a first random number ciphertext;

[0065] S502, the U shield sends the first authorization code ciphertext, the first random number ciphertext and the public key of the U shield to the terminal;

[0066] S503. After receiving the first authorization code ciphertext and the first random number ciphertext, the terminal uses the private key of the terminal to decrypt the first authorization code ciphertext and the first random number ciphertext to obtain the second authorization code and the second random number; and compares the second random number with the first random number:

[0067] i. If they are not the same, then restart steps S200 to S500;

[0068] ii. If they are the same, then:

[0069] Use the public key of the U-Shield to encrypt the second authorization code to generate the second authorization code ciphertext. At the same time,

[0070] Use the terminal's own private key and the U-Shield public key to calculate the first intermediate value, and,

[0071] The first hash value is calculated using the second authorization code, the public key of the terminal, and the public key of the U shield, and,

[0072] Using the first intermediate value to perform encryption calculation on the first Hash value to obtain a first intermediate ciphertext;

[0073] Then send the first intermediate ciphertext and the second authorization code ciphertext to the U-Shield;

[0074] S504. After receiving the second authorization code, the U-Shield uses its own private key to decrypt the second authorization code ciphertext to obtain the third authorization code, and compares the third authorization code with the first authorization code:

[0075] a. If they are not the same, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal;

[0076] b. If they are the same, then:

[0077] Use the private key of the U-Shield itself and the public key of the terminal to calculate the second intermediate value.

[0078] The second hash value is calculated using the first authorization code, the public key of the terminal, and the public key of the U shield, and,

[0079] Use the second intermediate value and the second hash value to perform encryption calculation to obtain the second intermediate ciphertext, and compare the first intermediate ciphertext with the second intermediate ciphertext. If they are the same, the public key of the terminal is persistently stored to complete the binding of the two. If they are not the same, it means a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal.

[0080] It can be understood that the above embodiment provides a detailed solution for binding the USB shield referred to in the present disclosure with the terminal, and takes into account enough situations.

[0081] Furthermore, in another embodiment, the present disclosure also discloses a method for binding a USB shield to a terminal, comprising the following steps:

[0082] S10, the terminal generates a first random number and sends it to the U shield together with the public key of the terminal;

[0083] S20, the U shield checks whether there is a public key matching the terminal in itself, and if so, feeds back a signal to the terminal and waits for any subsequent instruction request from the terminal to access the U shield;

[0084] S30. If it does not exist, it means that the terminal and the USB shield are not bound, and the public key of the terminal is cached;

[0085] S40, the U shield generates a first authorization code, and uses the public key of the terminal to encrypt the first random number and the first authorization code respectively to generate a first authorization code ciphertext and a first random number ciphertext;

[0086] S50, the U shield sends the first authorization code ciphertext, the first random number ciphertext and the public key of the U shield to the terminal;

[0087] S60. After receiving the first authorization code ciphertext and the first random number ciphertext, the terminal uses the private key of the terminal to decrypt the first authorization code ciphertext and the first random number ciphertext to obtain the second authorization code and the second random number; and compares the second random number with the first random number:

[0088] i. If they are not the same, re-execute steps S10 to S30;

[0089] ii. If they are the same, then:

[0090] Use the public key of the U-Shield to encrypt the second authorization code to generate the second authorization code ciphertext. At the same time,

[0091] Use the terminal's own private key and the U-Shield public key to calculate the first intermediate value, and,

[0092] The first hash value is calculated using the second authorization code, the public key of the terminal, and the public key of the U shield, and,

[0093] Using the first intermediate value to perform encryption calculation on the first Hash value to obtain a first intermediate ciphertext;

[0094] Then send the first intermediate ciphertext and the second authorization code ciphertext to the U-Shield;

[0095] S70. After receiving the second authorization code, the U-Shield uses its own private key to decrypt the second authorization code ciphertext to obtain the third authorization code, and compares the third authorization code with the first authorization code:

[0096] a. If they are not the same, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal;

[0097] b. If they are the same, then:

[0098] Use the private key of the U-Shield itself and the public key of the terminal to calculate the second intermediate value.

[0099] The second hash value is calculated using the first authorization code, the public key of the terminal, and the public key of the U shield, and,

[0100] Use the second intermediate value and the second hash value to perform encryption calculation to obtain the second intermediate ciphertext, and compare the first intermediate ciphertext with the second intermediate ciphertext. If they are the same, the public key of the terminal is persistently stored to complete the binding of the two. If they are not the same, it means a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal.

[0101] Those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, modules, and units involved are not necessarily required for the present invention.

[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0103] In several embodiments provided in the present disclosure, it should be understood that the disclosed technical solutions can be implemented as corresponding functional units, processors and even systems, wherein the various parts of the system can be located in one place or distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit can be integrated in a processing unit, or each unit can exist separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a smart phone, a personal digital assistant, a wearable device, a laptop, a tablet computer) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage media include: U disk, read-only memory unit (ROM), random access memory unit (RAM), mobile hard disk, magnetic disk or optical disk and other media that can store program code, and are not limited to different interfaces or transmission methods such as USB, Bluetooth or audio.

[0104] As described above, the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A method for implementing U-shield access control based on key negotiation, comprising the following steps: S100, the caller uses the terminal to initiate an access request to the USB shield; S200, after receiving the request, the terminal performs a call service initialization, and checks whether there is a key pair of the terminal in the terminal. If not, a key pair is generated and saved. If it already exists, the terminal continues; S300, the terminal generates a first random number and sends it to the U shield together with the public key of the terminal; S400, the U shield checks whether there is a public key matching the terminal in itself, and if so, feeds back a signal to the terminal and waits for any subsequent instruction request from the terminal to access the U shield; S500: If it does not exist, it means that the terminal and the USB shield are not bound, and the public key of the terminal is cached, and the binding of the USB shield and the terminal is executed; in, The step S500 performs the binding between the USB shield and the terminal according to the following steps: S501, the U shield generates a first authorization code, and uses the public key of the terminal to encrypt the first random number and the first authorization code respectively to generate a first authorization code ciphertext and a first random number ciphertext; S502, the U shield sends the first authorization code ciphertext, the first random number ciphertext and the public key of the U shield to the terminal; S503. After receiving the first authorization code ciphertext and the first random number ciphertext, the terminal uses the private key of the terminal to decrypt the first authorization code ciphertext and the first random number ciphertext to obtain the second authorization code and the second random number; and compares the second random number with the first random number: i. If they are not the same, then restart steps S200 to S500; ii. If they are the same, then: Use the public key of the U-Shield to encrypt the second authorization code to generate the second authorization code ciphertext. At the same time, Use the terminal's own private key and the U-Shield public key to calculate the first intermediate value, and, The first hash value is calculated using the second authorization code, the public key of the terminal, and the public key of the U shield, and, Using the first intermediate value to perform encryption calculation on the first Hash value to obtain a first intermediate ciphertext; Then send the first intermediate ciphertext and the second authorization code ciphertext to the U-Shield; S504. After receiving the second authorization code, the U-Shield uses its own private key to decrypt the second authorization code ciphertext to obtain the third authorization code, and compares the third authorization code with the first authorization code: a. If they are not the same, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal; b. If they are the same, then: Use the private key of the U-Shield itself and the public key of the terminal to calculate the second intermediate value. The second hash value is calculated using the first authorization code, the public key of the terminal, and the public key of the U shield, and, Use the second intermediate value and the second hash value to perform encryption calculation to obtain a second intermediate ciphertext, and compare the first intermediate ciphertext with the second intermediate ciphertext. If they are the same, the public key of the terminal is persistently stored to complete the binding between the two. If they are different, it indicates a calculation error or a man-in-the-middle attack, the access is terminated, and the result is fed back to the terminal.

Citation Information

Patent Citations

  • Method and device for key generation and proving authenticity

    CN101124767A

  • USB (universal serial bus)-key and application method thereof

    CN102904719A