Ukey authentication method and device, equipment and storage medium
By building a universal desktop application and login page, using unified middleware to interact with multiple Ukeys, the adaptation problem of cloud platforms when integrating national secret Ukeys is solved, reducing development costs and improving system maintainability.
Patent Information
- Application Number
- CN202411227131.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-03
AI Technical Summary
When integrating the national secret Ukey, cloud platforms need to adapt to equipment from multiple manufacturers, resulting in high development costs, low system maintenance and flexibility, and lack of a general Ukey adaptation and docking solution.
By building a universal desktop application and a universal login page, using unified middleware to interact with multiple Ukeys, implementing the adaptation of Ukeys from different manufacturers, interacting with the Ukey driver through preset standard Restful interfaces and Ukey drivers, obtaining and verifying user information and certificates. Reduce development complexity.
There is no need to develop adaptation code separately for each Ukey manufacturer, which realizes unified adaptation to Ukeys of different manufacturers, reduces development costs and operation and maintenance workload, and improves the maintainability and flexibility of the system.
Smart Images

Figure CN119011154A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology security, and in particular to a Ukey authentication method, device, equipment and storage medium. Background Art
[0002] With the widespread application of cloud computing technology, cloud platforms have become an important carrier for key information infrastructure, digital platforms, etc. In order to ensure the information security on cloud platforms and prevent risks such as leakage and tampering of important data, the state has issued a series of policy documents and put forward clear requirements for the application of passwords on cloud platforms.
[0003] In the cloud platform password application security assessment, integrating the national secret Ukey has become a common practice to improve login security. However, when there are many cloud platforms, different cloud centers purchase different national secret equipment (such as Ukey, signature verification server, cipher machine, etc.) during the national secret evaluation, which requires the cloud platform to be able to adapt and support Ukey from multiple manufacturers. Usually, each Ukey manufacturer will provide desktop applications and integrated sample codes for its own Ukey. In the integrated sample code, it is generally interacted with the desktop application by calling the Restful interface provided by the desktop application or directly using the websocket method. Therefore, due to the lack of corresponding standards, desktop applications from different manufacturers only support docking with the Ukey of this manufacturer, and the Restful interface parameters and return values exposed by the desktop application are also very different. This leads to the need for the cloud platform to develop multiple login pages to adapt to docking with Ukey from different manufacturers, which not only increases the development cost, but also reduces the maintainability and flexibility of the system. Therefore, developing a universal Ukey adaptation and docking solution has become an urgent problem to be solved by the current cloud platform. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a Ukey authentication method, device, equipment and storage medium, which can interact with multiple Ukeys through a unified middleware to achieve the adaptation of Ukeys from different manufacturers by building a universal desktop application and a universal login page, and connecting to Ukey drivers of multiple manufacturers through the universal login application. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a Ukey authentication method, including:
[0006] Receiving a user's login request through a preset universal login page, and acquiring user information and a corresponding personal identification code input by the user through the preset universal login page based on the login request;
[0007] Sending a first verification request corresponding to the personal identification code to a preset universal desktop application by using a preset client program through the preset universal login page, and verifying the personal identification code by using the preset universal desktop application after the preset universal desktop application receives the first verification request;
[0008] If the personal identity code verification is successful, a second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature are sent to the preset server based on the second verification request through the preset universal desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; the preset signature is signature data obtained based on the user information.
[0009] Optionally, the obtaining of the user information and the corresponding personal identification code input by the user through the preset universal login page includes:
[0010] Utilizing the preset universal login page to interact with the preset standard RESTful interface of the preset universal desktop application to obtain the user information and the personal identification code input by the user;
[0011] Accordingly, before sending the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature to the preset server, it also includes:
[0012] The preset universal login page is used to interact with the preset standard Restful interface of the preset universal desktop application, and the Ukey certificate sent by the Ukey driver is obtained.
[0013] Optionally, before obtaining the Ukey certificate sent by the Ukey driver, the method further includes:
[0014] The preset universal desktop application and several of the Ukey drivers are connected according to the preset interface specification to obtain the Ukey certificate sent by the Ukey driver through the preset universal desktop application.
[0015] Optionally, the step of docking the preset universal desktop application and the plurality of Ukey drivers according to the preset interface specification includes:
[0016] The interface function in the preset dynamic link library is obtained, and the preset universal desktop application and several of the Ukey drivers are connected according to the interface function and the preset interface specification.
[0017] Optionally, the verifying the personal identification code by using the preset universal desktop application includes:
[0018] The preset universal desktop application is used to call the library files of each Ukey driver, and the personal identification code is verified according to the library file based on the preset verification rules.
[0019] Optionally, the Ukey authentication method further includes:
[0020] Call the random number in the preset server, and call the preset signature interface driven by the corresponding Ukey through the preset universal desktop application to generate the preset signature according to the user name in the user information and the random number, and send the preset signature to the preset server; the preset signature is obtained by signing the user name and the random number with the built-in private key of Ukey;
[0021] Accordingly, the using the preset server to verify the user includes:
[0022] The preset server is used to verify the user based on the preset signature, the user information and the Ukey certificate.
[0023] Optionally, the using the preset server to verify the user based on the preset signature, the user information and the Ukey certificate includes:
[0024] Using the preset server to determine whether the user information and the Ukey certificate match;
[0025] If the user information matches the Ukey certificate, the preset signature verification server in the preset server is used to verify the user based on the preset signature.
[0026] In a second aspect, the present application provides a Ukey authentication device, including:
[0027] An information acquisition module, used to receive a user's login request through a preset universal login page, and acquire user information and a corresponding personal identification code input by the user through the preset universal login page based on the login request;
[0028] An identity verification module, configured to send a first verification request corresponding to the personal identification code to a preset universal desktop application through the preset universal login page by using a preset client program, and verify the personal identification code by using the preset universal desktop application after the preset universal desktop application receives the first verification request;
[0029] A user verification module is used to send a second verification request to the preset universal desktop application through the preset universal login page if the personal identity code verification is successful, and send the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature to the preset server based on the second verification request through the preset universal desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; the preset signature is signature data obtained based on the user information.
[0030] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned Ukey authentication method.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned Ukey authentication method when executed by a processor.
[0032] In this application, a user's login request is first received through a preset universal login page, and the user information and the corresponding personal identity identification code entered by the user through the preset universal login page are obtained based on the login request. Then, a first verification request corresponding to the personal identity identification code is sent to a preset universal desktop application through the preset universal login page using a preset client program, and after the preset universal desktop application receives the first verification request, the personal identity identification code is verified using the preset universal desktop application; if the verification is successful, a second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, Ukey certificate and preset signature are sent to the preset server based on the second verification request through the preset universal desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful. In this way, this application builds a universal desktop application and a universal login page, and connects to the Ukey drivers of multiple manufacturers through the universal login application, so that developers can interact with multiple Ukeys through a unified middleware to achieve adaptation to Ukeys from different manufacturers. There is no need to develop adaptation code separately for each Ukey manufacturer. This can effectively solve the problem that when web application login authentication is integrated with Ukey, it is necessary to develop adaptation for each manufacturer's Ukey separately and the adaptation program cannot be reused. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0034] Figure 1 A Ukey authentication method flow chart provided for this application;
[0035] Figure 2 A schematic diagram of a general login page provided for this application;
[0036] Figure 3 A schematic diagram of a universal Ukey adaptation connection solution provided for this application;
[0037] Figure 4 A specific Ukey authentication method flow chart provided for this application;
[0038] Figure 5 A login verification flow chart integrating Ukey authentication provided for this application;
[0039] Figure 6 A schematic diagram of the structure of a Ukey authentication device provided for this application;
[0040] Figure 7 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0041] 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.
[0042] At present, with many cloud platforms, different cloud centers purchase different national security equipment during national security assessments. In addition, since desktop applications of different manufacturers only support docking with their own Ukeys, cloud platforms need to develop multiple sets of login pages to adapt to docking with Ukeys from different manufacturers, reducing the maintainability and flexibility of the system. This application builds a universal desktop application and a universal login page, and docks Ukey drivers from multiple manufacturers through a universal login application, so that developers can interact with multiple Ukeys through a unified middleware and achieve adaptation to Ukeys from different manufacturers.
[0043] See also Figure 1As shown, an embodiment of the present invention discloses a Ukey authentication method, including:
[0044] Step S11: receiving a user's login request through a preset universal login page, and acquiring user information and a corresponding personal identification code input by the user through the preset universal login page based on the login request.
[0045] In this embodiment, Figure 2 After receiving the user's login request, the preset universal login page shown can obtain the user information and the corresponding personal identification number (PIN) entered by the user through the preset universal login page based on the login request. It is understandable that the above user information may include the user name entered by the user and the corresponding password. Figure 3 As shown in the figure, when the user fills in the login account, login password, Ukey PIN code, and clicks Figure 2 After clicking the login button shown in , the interaction with the universal desktop application can be triggered, and the preset universal login page is used to interact with the preset standard Restful interface of the preset universal desktop application to obtain the user information and personal identification code entered by the user. It can be understood that the web application can be integrated with Ukey authentication, mainly the integration of the web login page (preset universal login page) and Ukey. The universal login page interacts with the standard Restful interface exposed by the universal desktop application to realize the subsequent call of Ukey's verification PIN code, certificate reading, signature and other operations.
[0046] Step S12: Send a first verification request corresponding to the personal identification code to a preset universal desktop application through the preset universal login page using a preset client program, and after the preset universal desktop application receives the first verification request, verify the personal identification code using the preset universal desktop application.
[0047] In this embodiment, after the universal login page obtains the user's information and PIN code, the first verification request corresponding to the personal identity identification code is sent to the preset universal desktop application through the preset universal login page using the preset client program, and after the preset universal desktop application receives the first verification request, the preset universal desktop application is used to verify the personal identity identification code.
[0048] Based on the above technical solution, Figure 3As shown, this embodiment mainly involves four parts: universal login page, universal desktop application, Ukey driver library, and Ukey. Among them, the universal desktop application is connected to the universal login page upward, providing a standard Restful interface for the universal login page, and is connected to the Ukey manufacturer driver downward according to the password industry standard GM / T 0016-2012 "Intelligent Password Key Password Application Interface Specification". In this way, since the Ukey drivers of different manufacturers all follow the password industry standard GM / T0016-2012 "Intelligent Password Key Password Application Interface Specification", the universal desktop application only needs to develop a set of adaptation codes according to the standard specification, and there is no need to do adaptation development for different manufacturers. The above-mentioned universal desktop application can provide standard Restful interfaces, which can be implemented by a variety of programming languages such as Java, Go, etc. through mature frameworks, and connected to the Ukey driver (dll). It can be understood that different programming languages have different docking methods. During development, the corresponding development language and docking method can be selected according to actual needs. In a specific embodiment, the universal desktop application listens to port 8222 by default and only receives POST requests. The standard Restful interfaces provided to the universal login page upward are:
[0049] Verify PIN code interface:
[0050] Request URI: http: / / 127.0.0.1:8222
[0051] Request Method: POST
[0052] Request parameters:
[0053] {
[0054] "Function" : "SOF_Login",
[0055] "PassWd" : "PIN code"
[0056] };
[0057] Export signature certificate interface:
[0058] Request URI: http: / / 127.0.0.1:8222
[0059] Request Method: POST
[0060] Request parameters:
[0061] {
[0062] "Function" : "SOF_ExportUserCert"
[0063] };
[0064] Calculate signature interface:
[0065] Request URI: http: / / 127.0.0.1:8222
[0066] Request Method: POST
[0067] Request parameters:
[0068] {
[0069] "Function" : "SOF_SignData",
[0070] "InData" : "Original data to be signed"
[0071] }.
[0072] When the general desktop application is connected to the Ukey manufacturer driver, the general desktop application can call the interface function defined in the password industry standard GM / T 0016-2012. Among them, the above functions are usually exposed by the dynamic link library (dll) provided by the Ukey manufacturer, and different programming languages call dll files in different ways. For example, in the Go language, syscall.LoadDLL (in the golang.org / x / sys / windows / syscall package) is used to load the underlying functions of the Windows DLL file, and the PIN code verification, signature calculation and other functions in the dll are called through the handle returned after the successful loading. It is understandable that when implementing a general desktop application in multiple programming languages, different methods can be used to connect to the Ukey driver library.
[0073] This embodiment also includes a set of Ukey driver libraries, which are provided by different Ukey manufacturers and comply with the cryptographic industry standard GM / T 0016-2012, and are used to achieve physical interaction with Ukey. Ukey drivers from different manufacturers include drivers provided by each Ukey manufacturer for the corresponding Ukey, and these drivers comply with the cryptographic industry standard GM / T 0016-2012 "Intelligent Password Key Password Application Interface Specification". Therefore, general desktop applications can be called according to the interface specifications defined in the GM / T 0016-2012 specification, thereby ensuring the compatibility of Ukeys from different manufacturers at the interface level, allowing developers to develop unified middleware to interact with these Ukeys. Compared with the solution of publishing the newly adapted code to the production environment, this embodiment only requires the client computer to update the new Ukey driver to the local driver directory, which does not involve changes in the production environment, saves operation and maintenance work costs, and helps to improve operation and maintenance deployment efficiency. Among them, the above-mentioned GM / T0016-2012 "Intelligent Password Key Password Application Interface Specification" stipulates the intelligent password key password application interface based on the PKI (Public Key Infrastructure) password system, and describes the functions, data types, parameter definitions and device security requirements of the password application interface. Based on the above technical solution, this embodiment proposes a new adaptation docking method based on the GM / T 0016-2012 Intelligent Password Key Password Application Interface Specification to achieve the universal authentication integration docking of Ukey. The standard Restful interface defined by this specification includes the verification PIN code interface, the export signature certificate interface and the calculation signature interface implemented by multiple programming languages through mature frameworks. The specific interface specifications include:
[0074] 1. Verify PIN:
[0075] Function prototype:
[0076] ULONG DEVAPI SKF_VerifyPIN (HAPPLICATION hApplication, ULONGulPINType, LPSTR szPIN, ULONG *pulRetryCount);
[0077] Functional description:
[0078] Verify the PIN code. If the verification is successful, the corresponding permissions will be obtained. If the PIN code is incorrect, the number of retries of the PIN code will be returned. When the number of retries is 0, it means that the PIN code has been locked.
[0079] parameter:
[0080] hApplication [IN] application handle;
[0081] ulPINType [IN] PIN type;
[0082] szPIN [IN] PIN value;
[0083] pulRetryCount [OUT] The number of retries returned after an error.
[0084] 2. Export digital certificate:
[0085] Function prototype:
[0086] ULONG DEVAPI SKF_ExportCertificate(HCONTAINER hContainer, BOOLbSignFlag, BYTE* pbCert, ULONG *pulCertLen);
[0087] Functional description:
[0088] Export the digital certificate from the container;
[0089] parameter:
[0090] hContainer [IN] container handle;
[0091] bSignFlag [IN] TRUE indicates a signature certificate, FALSE indicates an encryption certificate;
[0092] pbCert [OUT] points to the certificate content buffer. If this parameter is not NULL, the digital certificate content is returned.
[0093] pulCertLen [IN / OUT] indicates the length of the pbCert buffer when input and the length of the certificate content when output.
[0094] 3. ECC Signature (Elliptic Curve Cryptography, a digital signature technology based on elliptic curve cryptography):
[0095] Function prototype:
[0096] ULONG DEVAPI SKF_ECCSignData (HCONTAINER hContainer, BYTE *pbData, ULONG ulDataLen, PECCSIGNATUREBLOB pSignature);
[0097] Functional description:
[0098] ECC digital signature uses the ECC algorithm and the specified private key hKey to digitally sign the specified data pbData, and the signed result is stored in pSignature;
[0099] parameter:
[0100] hContainer [IN] key container handle;
[0101] pbData [IN] data to be signed;
[0102] ulDataLen [IN] The length of the data to be signed, which must be less than the key modulus length;
[0103] pSignature [OUT] Signature value.
[0104] It can be understood that the Ukey of the above-mentioned different manufacturers, namely USBKey (Universal Serial Bus Key, smart password key), is a small storage device that is directly connected to the computer via USB (Universal Serial Bus, universal serial bus interface), has password verification function, is reliable and high-speed, and can realize identity authentication, electronic signature / seal, secure email, file encryption and decryption, data encryption and decryption, transmission encryption, establishment of transaction trust relationship, transaction information encryption, etc.
[0105] Step S13: If the personal identity code verification is successful, a second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature are sent to the preset server through the preset universal desktop application based on the second verification request, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; the preset signature is signature data obtained based on the user information.
[0106] In this embodiment, if the personal identification code is successfully verified, a second verification request is sent to the preset general desktop application through the preset general login page, and the user information, Ukey certificate and preset signature are sent to the preset server based on the second verification request through the preset general desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; wherein the above-mentioned preset signature is the signature data obtained based on the user information. In addition, before sending the user information, Ukey certificate and preset signature to the preset server, it is necessary to use the preset general login page to interact with the preset standard Restful interface of the preset general desktop application, and dock the preset general desktop application and several Ukey drivers according to the preset interface specification, so as to obtain the Ukey certificate sent by the Ukey driver through the preset general desktop application. And when docking the preset general desktop application and several Ukey drivers according to the preset interface specification, the interface function in the preset dynamic link library can be obtained first, and the preset general desktop application and several Ukey drivers can be docked according to the interface function and the preset interface specification.
[0107] This embodiment can receive a user's login request through a preset universal login page, and obtain the user information and the corresponding personal identity identification code entered by the user through the preset universal login page based on the login request, and then send a first verification request corresponding to the personal identity identification code to a preset universal desktop application through the preset universal login page using a preset client program, and after the preset universal desktop application receives the first verification request, use the preset universal desktop application to verify the personal identity identification code through the pre-acquired Ukey certificate; if the verification is successful, send a second verification request to the preset universal desktop application through the preset universal login page, and send the user information, Ukey certificate and preset signature to the preset server based on the second verification request through the preset universal desktop application, so as to use the preset server to verify the user, and determine that the user login is successful after the user verification is successful. In this way, by building a universal desktop application and a universal login page, and connecting to the Ukey drivers of multiple manufacturers through the universal login application, developers can interact with multiple Ukeys through a unified middleware to achieve adaptation to Ukeys from different manufacturers. There is no need to develop adaptation code separately for each Ukey manufacturer. This can effectively solve the problem that when the same product needs to be adapted and connected to different national encryption Ukeys, it is necessary to adapt and connect each Ukey separately and the code cannot be reused. When there is a new Ukey manufacturer adaptation requirement, the workload of adaptation and connection can be greatly reduced.
[0108] Based on the previous embodiment, this application can build a universal desktop application and a universal login page, and connect the Ukey drivers of multiple manufacturers through the universal login application to achieve the adaptation of Ukeys of different manufacturers. Next, this embodiment will elaborate on the process of user identity authentication through Ukey. Figure 4 As shown, the embodiment of the present application discloses a Ukey authentication method, including:
[0109] Step S21: Sending a first verification request corresponding to the personal identity identification code to a preset universal desktop application through a preset universal login page using a preset client program.
[0110] Step S22: After the preset universal desktop application receives the first verification request, the preset universal desktop application is used to call the library files of each Ukey driver, and the personal identification code is verified according to the library file based on the preset verification rules.
[0111] In this embodiment, Figure 5 As shown, after the preset universal desktop application receives the first verification request, the preset universal desktop application is used to call the library files of each Ukey driver, and the personal identification code is verified according to the preset verification rules in the library file. That is to say, the login page can send a Restful request to the universal desktop application through a web client program (such as JavaScript), and after receiving the request, the universal desktop application can verify the provided PIN code, wherein the above verification process can be specifically implemented by calling the internally integrated multi-vendor Ukey driver (dll file), and follows the password industry standard GM / T 0016-2012 "Intelligent Password Key Password Application Interface Specification". It can be understood that the above PIN code usually contains 6 digits, and the Restful request sent by the above universal login page to the universal desktop application through the web client program can include a PIN code verification request, a Ukey signature interface call request and a certificate export request, so that the universal desktop application can implement the PIN code verification, signature data calculation and certificate export functions of the Ukey by calling the interface function defined in the password industry standard GM / T 0016-2012.
[0112] Step S23: If the personal identity code verification is successful, a second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature are sent to the preset server through the preset universal desktop application based on the second verification request, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful.
[0113] In this embodiment, Figure 5 As shown, if the personal identity code verification is successful, the random number in the preset server is called, and the preset signature interface of the corresponding Ukey driver is called through the preset general desktop application to generate a preset signature according to the user name and random number in the user information, and the preset signature is sent to the preset server, so that the server can verify the user based on the preset signature, user information and Ukey certificate after receiving the signature; wherein the above-mentioned preset signature can be obtained by signing the user name and random number with the built-in private key of Ukey.
[0114] And when verifying the user, the preset server can be used to determine whether the user information and the Ukey certificate match; if the user information and the Ukey certificate match, the preset signature verification server in the preset server is used to verify the user based on the preset signature. That is to say, in this embodiment, after the PIN code verification is passed, the web client program will send a Restful request to the universal desktop application again, and then the universal desktop application will call the signature interface driven by Ukey according to the standard specification, so that Ukey can sign the original data based on the built-in private key to ensure data integrity. It can be understood that it is usually only necessary to provide the original data to be signed to the above-mentioned signature interface to implement the signing process. And in this embodiment, before submitting the login request, the web client program sends a Restful request to the universal desktop application, so that the universal desktop application calls the certificate export interface driven by Ukey according to the standard specification to export the Ukey certificate, where the obtained certificate is a base64-encoded string. After that, the web client program can combine the login username, password, signature data and certificate to submit the complete login information to the backend so that the business system backend can verify the submitted username and password. At the same time, the backend verifies the signature data to ensure the integrity and authenticity of the data, and after the verification is passed, it is determined that the user has logged in successfully.
[0115] For a more specific processing procedure of the above step S21, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0116] In this embodiment, first, a first verification request corresponding to a personal identification code is sent to a preset general desktop application using a preset client program through a preset general login page. After the preset general desktop application receives the first verification request, the preset general desktop application is used to call the library files of each Ukey driver, and the personal identification code is verified based on the preset verification rules according to the library file. If the personal identification code is successfully verified, a second verification request is sent to the preset general desktop application through the preset general login page, and the user information, Ukey certificate and preset signature are sent to the preset server based on the second verification request through the preset general desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful. Combined with the previous embodiment, it effectively solves the problem that when the application login authentication is integrated with Ukey, it is necessary to develop adaptation for each manufacturer's Ukey separately, and the adaptation program cannot be reused. At the same time, by verifying the data, the integrity and authenticity of the data can be further ensured.
[0117] See also Figure 6 As shown, the embodiment of the present application also discloses a Ukey authentication device, including:
[0118] The information acquisition module 11 is used to receive a user's login request through a preset universal login page, and acquire the user information and corresponding personal identification code input by the user through the preset universal login page based on the login request;
[0119] The identity verification module 12 is used to send a first verification request corresponding to the personal identification code to a preset universal desktop application through the preset universal login page using a preset client program, and after the preset universal desktop application receives the first verification request, verify the personal identification code using the preset universal desktop application;
[0120] The user verification module 13 is used to send a second verification request to the preset general desktop application through the preset general login page if the personal identity code verification is successful, and send the user information, the Ukey certificate pre-acquired by the preset general desktop application and the preset signature to the preset server based on the second verification request through the preset general desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; the preset signature is signature data obtained based on the user information.
[0121] In this embodiment, the user's login request can be received through a preset universal login page, and the user information and corresponding personal identification code entered by the user through the preset universal login page can be obtained based on the login request, and then the first verification request corresponding to the personal identification code is sent to the preset universal desktop application by using the preset client program through the preset universal login page, and after the preset universal desktop application receives the first verification request, the personal identification code is verified by using the preset universal desktop application; if the verification is successful, the second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, Ukey certificate and preset signature are sent to the preset server based on the second verification request through the preset universal desktop application, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful. In this way, by constructing a universal desktop application and a universal login page, and connecting the Ukey drivers of multiple manufacturers through the universal login application, developers can interact with multiple Ukeys through a unified middleware to achieve adaptation of Ukeys of different manufacturers, without the need to develop adaptation code separately for each Ukey manufacturer, which can effectively solve the problem that when web application login authentication is integrated with Ukey, adaptation development needs to be done separately for each manufacturer's Ukey, and the adaptation program cannot be reused.
[0122] In some specific embodiments, the information acquisition module 11 specifically includes:
[0123] An information acquisition unit, configured to interact with a preset standard RESTful interface of the preset universal desktop application using the preset universal login page to acquire the user information and the personal identification code input by the user;
[0124] Correspondingly, the user verification module 13 further includes:
[0125] The certificate acquisition unit is used to interact with the preset standard Restful interface of the preset universal desktop application using the preset universal login page, and obtain the Ukey certificate sent by the Ukey driver.
[0126] In some specific embodiments, the identity verification module 12 further includes:
[0127] The driver docking submodule is used to dock the preset universal desktop application and several Ukey drivers according to the preset interface specification, so as to obtain the Ukey certificate sent by the Ukey driver through the preset universal desktop application.
[0128] In some specific embodiments, the driving docking submodule specifically includes:
[0129] The driver docking unit is used to obtain the interface function in the preset dynamic link library, and dock the preset universal desktop application and several of the Ukey drivers according to the interface function and the preset interface specification.
[0130] In some specific embodiments, the identity verification module 12 specifically includes:
[0131] The identity authentication unit is used to use the preset universal desktop application to call the library files of each Ukey driver, and verify the personal identification code based on the preset verification rules according to the library file.
[0132] In some specific embodiments, the Ukey authentication device further includes:
[0133] A signature generation module is used to call the random number in the preset server, and call the preset signature interface driven by the corresponding Ukey through the preset universal desktop application to generate the preset signature according to the user name in the user information and the random number, and send the preset signature to the preset server; the preset signature is obtained by signing the user name and the random number with the built-in private key of Ukey;
[0134] Accordingly, the user verification module 13 specifically includes:
[0135] The first user verification unit is used to verify the user based on the preset signature, the user information and the Ukey certificate using the preset server.
[0136] In some specific embodiments, the user verification module 13 specifically includes:
[0137] A certificate verification unit, used to use the preset server to determine whether the user information and the Ukey certificate match;
[0138] The second user verification unit is used to verify the user based on the preset signature using the preset signature verification server in the preset server if the user information matches the Ukey certificate.
[0139] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0140] Figure 7A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the Ukey authentication method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0141] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0142] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0143] Among them, the operating system 221 is used to manage and control various hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the Ukey authentication method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0144] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed Ukey authentication method is implemented. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0145] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0146] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0147] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0148] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0149] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A Ukey authentication method, characterized in that: include: Receiving a user's login request through a preset universal login page, and acquiring user information and a corresponding personal identification code input by the user through the preset universal login page based on the login request; Sending a first verification request corresponding to the personal identification code to a preset universal desktop application by using a preset client program through the preset universal login page, and verifying the personal identification code by using the preset universal desktop application after the preset universal desktop application receives the first verification request; If the personal identification code verification is successful, a second verification request is sent to the preset universal desktop application through the preset universal login page, and the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature are sent to the preset server through the preset universal desktop application based on the second verification request, so as to verify the user by using the preset server, and determine that the user login is successful after the user verification is successful; The preset signature is signature data obtained based on the user information.
2. The Ukey authentication method according to claim 1, characterized in that: The obtaining of the user information and the corresponding personal identification code input by the user through the preset universal login page includes: Utilizing the preset universal login page to interact with the preset standard RESTful interface of the preset universal desktop application to obtain the user information and the personal identification code input by the user; Accordingly, before sending the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature to the preset server, it also includes: The preset universal login page is used to interact with the preset standard Restful interface of the preset universal desktop application, and the Ukey certificate sent by the Ukey driver is obtained.
3. The Ukey authentication method according to claim 2, characterized in that: Before obtaining the Ukey certificate sent by the Ukey driver, the method further includes: The preset universal desktop application and several of the Ukey drivers are connected according to the preset interface specification to obtain the Ukey certificate sent by the Ukey driver through the preset universal desktop application.
4. The Ukey authentication method according to claim 3, characterized in that: The docking of the preset universal desktop application and the plurality of Ukey drivers according to the preset interface specification includes: The interface function in the preset dynamic link library is obtained, and the preset universal desktop application and several of the Ukey drivers are connected according to the interface function and the preset interface specification.
5. The Ukey authentication method according to claim 1, characterized in that: The verifying the personal identification code by using the preset universal desktop application includes: The preset universal desktop application is used to call the library files of each Ukey driver, and the personal identification code is verified according to the library file based on the preset verification rules.
6. The Ukey authentication method according to any one of claims 1 to 5, characterized in that: Also includes: Call the random number in the preset server, and call the preset signature interface of the corresponding Ukey driver through the preset universal desktop application to generate the preset signature according to the user name in the user information and the random number, and send the preset signature to the preset server; The preset signature is obtained by signing the username and the random number using the built-in private key of Ukey; Accordingly, the using the preset server to verify the user includes: The preset server is used to verify the user based on the preset signature, the user information and the Ukey certificate.
7. The Ukey authentication method according to claim 6, characterized in that: The using the preset server to verify the user based on the preset signature, the user information and the Ukey certificate includes: Using the preset server to determine whether the user information and the Ukey certificate match; If the user information matches the Ukey certificate, the preset signature verification server in the preset server is used to verify the user based on the preset signature.
8. A Ukey authentication device, characterized in that: include: An information acquisition module, used to receive a user's login request through a preset universal login page, and acquire user information and a corresponding personal identification code input by the user through the preset universal login page based on the login request; An identity verification module, configured to send a first verification request corresponding to the personal identification code to a preset universal desktop application through the preset universal login page by using a preset client program, and verify the personal identification code by using the preset universal desktop application after the preset universal desktop application receives the first verification request; A user verification module, configured to send a second verification request to the preset universal desktop application through the preset universal login page if the personal identification code verification is successful, and send the user information, the Ukey certificate pre-acquired by the preset universal desktop application and the preset signature to the preset server through the preset universal desktop application based on the second verification request, so as to verify the user using the preset server, and determine that the user login is successful after the user verification is successful; The preset signature is signature data obtained based on the user information.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the Ukey authentication method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the Ukey authentication method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Virtualization desktop safety certification method and system based on USB-Key
CN104378206A
Secure login method and device of terminal equipment and nonvolatile storage medium
CN115883104A
Unified security authentication method and system for power regulation and control system
CN116112242A
Remote signature permission verification method and device, storage medium and processor
CN117097482A
System and method for preventing unauthorized access to information
US20130311784A1
Cited By
Standard password channel cross-platform password-free login method and system based on UKey
CN119814335A
