CN116541823A - Verification method and device of key equipment, electronic equipment and storage medium - Google Patents

Verification method and device of key equipment, electronic equipment and storage medium Download PDF

Info

Publication number
CN116541823A
CN116541823A CN202310403074.9A CN202310403074A CN116541823A CN 116541823 A CN116541823 A CN 116541823A CN 202310403074 A CN202310403074 A CN 202310403074A CN 116541823 A CN116541823 A CN 116541823A
Authority
CN
China
Prior art keywords
application program
operating system
verification
key
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310403074.9A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nfs China Software Co ltd
Original Assignee
Nfs China Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nfs China Software Co ltd filed Critical Nfs China Software Co ltd
Priority to CN202310403074.9A priority Critical patent/CN116541823A/en
Publication of CN116541823A publication Critical patent/CN116541823A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a method and a device for verifying key equipment, wherein the method comprises the following steps: identifying a key device inserted into the electronic device by a compatible application installed in the electronic device; operating a second operating system driver in the key equipment through a compatible application program to acquire driving information and encryption information in the key equipment; the compatible application program is connected with the verification application program running in the first operating system, and the compatible application program is used for running an application program of the second operating system in the electronic equipment; responding to a verification request of a verification application program, packaging the driving information and the encryption information through a compatible application program, and then sending the driving information and the encryption information to the verification application program; and verifying the received driving information and the received encryption information through the verification application program to obtain a verification result of the key equipment. The method and the device solve the problem that the key device cannot be verified due to the fact that the driver of the key device is not matched with the operating system of the electronic device.

Description

Verification method and device of key equipment, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for verifying a key device, an electronic device, and a computer readable storage medium.
Background
The key device (ukey) is a small-sized storage device with a password authentication function, which is directly connected to the electronic device through a universal serial bus interface (USB, universal Serial Bus).
At present, a key device is often inserted into an electronic device to perform verification operation, the electronic device is often operated with an operating system such as Linux (an open source operating system), mac OS (an operating system operated on an apple computer), and the operating system of the electronic device is operated with a verification application program, and after the key device is inserted into the electronic device, data reading is performed through a driver provided by the key device, and information such as an encryption certificate is obtained for verification by the verification application program.
However, in the current scheme, the key device often provides a driver of a Windows (microsoft Windows operating system) system, so that when the electronic device runs with other operating systems such as Linux, mac OS, etc., the verification application cannot verify due to the discomfort of the driver.
Disclosure of Invention
The embodiment of the application provides a verification method and device of key equipment, which are used for solving the problem that an application program cannot be verified due to the fact that a driver is not adapted in the prior art.
In a first aspect, an embodiment of the present application provides a method for verifying a key device, which is applied to an electronic device running a first operating system, where the method includes:
identifying a key device inserted into the electronic device through a compatible application program installed in the electronic device;
running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment; the compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment;
responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program, and then sending the driving information and the encryption information to the verification application program;
and verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
In a second aspect, an embodiment of the present application provides an apparatus for authenticating a key device, where the apparatus includes:
the identification module is used for identifying the key equipment inserted into the electronic equipment through a compatible application program installed in the electronic equipment;
The reading module is used for running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment; the compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment;
the packaging module is used for responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program and then sending the driving information and the encryption information to the verification application program;
and the verification module is used for verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
In a third aspect, embodiments of the present application further provide an electronic device, including a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of the first aspect.
According to the embodiment of the application, under the condition that the driver of the second operating system provided by the key device is not matched with the first operating system of the electronic device, the driver is operated in the first operating system of the electronic device through the compatible application program, so that normal reading of the key device is achieved, after that, the compatible application program responds to the verification request of the verification application program, encryption information and the driving information obtained from the driver can be packaged and then sent to the verification application program, and therefore the verification application program can obtain data in the key device, and normal verification of the key device is achieved. The embodiment of the application solves the problem that the key equipment cannot be verified due to the fact that the driver of the key equipment is not matched with the operating system of the electronic equipment.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
FIG. 1 is a diagram of an implementation scenario provided by an embodiment of the present application;
Fig. 2 is a flowchart of steps of a method for verifying a key device according to an embodiment of the present application;
fig. 3 is a flowchart of specific steps of a method for verifying a key device according to an embodiment of the present application;
fig. 4 is a system block diagram of a method for verifying a key device according to an embodiment of the present application;
fig. 5 is a flowchart of an execution of a method for verifying a key device according to an embodiment of the present application
Fig. 6 is a block diagram of an authentication apparatus of a key device according to an embodiment of the present application;
FIG. 7 is a block diagram of an apparatus of the present application;
fig. 8 is a schematic diagram of a server in some embodiments of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, the term "and/or" as used in the specification and claims to describe an association of associated objects means that there may be three relationships, e.g., a and/or B, may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The term "plurality" in the embodiments of the present application means two or more, and other adjectives are similar thereto.
Referring to fig. 1, fig. 1 is an implementation scenario diagram provided in an embodiment of the present application, including: an electronic device 10 and a key device 20.
Wherein the electronic device 10 has a first operating system running therein, a verification application running in the first operating system, and a compatible application; the key device 20 stores therein a driver of the second operating system and encryption information; the key device 20 may be inserted into the electronic device 10. The authentication application is specifically used to authenticate the encrypted information in the key device 20, and the compatible application is used to run an application of the second operating system in the electronic device 10.
In the related art, since drivers of the second operating system are added to the key devices produced by many service manufacturers, the driver conflicts with the electronic device of the first operating system, so that the verification application program running in the first operating system of the electronic device cannot verify the key device normally through the drivers.
In order to solve the above problem, in the embodiment of the present application, a compatible application may be installed in an electronic device, where a function of the compatible application is to run a driver of a second operating system in the electronic device of a first operating system, and a conversion interface between the compatible application and a verification application is established, so that a subsequent compatible application and the verification application may directly perform data interaction. After the configuration is completed, the compatible application program can identify the key device inserted into the electronic device from a plurality of devices connected to the electronic device, then the compatible application program can obtain the driving information by running a second operating system driving program provided by the key device, read the encrypted information in the key device, respond to the verification request of the verification application program after the key device is read, package the driving information and the encrypted information through the conversion interface, and send the packaged driving information and the packaged encrypted information to the verification application program, so that the verification application program verifies the received driving information and the received encrypted information, and a verification result of the key device is obtained.
In summary, in the embodiment of the present application, when the driver of the second operating system provided by the key device and the first operating system of the electronic device are not matched, the driver may be operated in the first operating system of the electronic device by the compatible application program, so as to implement normal reading of the key device; after that, the compatible application program responds to the verification request of the verification application program, and can package the encryption information and the driving information obtained from the driving program and then send the package information to the verification application program, so that the verification application program obtains the data in the key device, and normal verification of the key device is realized. The embodiment of the application solves the problem that the verification application program cannot verify the key equipment because the driver of the key equipment is not matched with the operating system of the electronic equipment.
Fig. 2 is a flowchart of steps of a method for verifying a key device, which is applied to an electronic device running a first operating system and is shown in fig. 2, and the method may include:
and step 101, identifying the key device inserted into the electronic device through a compatible application program installed in the electronic device.
In this embodiment, referring to fig. 1, the key device 20 may be plugged into a corresponding slot of the electronic device 10 through a connection plug to implement thermal connection between the two, and in one implementation, the key device 20 may be connected to the electronic device 10 through a USB.
In practical application, a plurality of external devices (such as a mouse and a keyboard) are usually inserted into an electronic device, and in order to verify the inserted key device in the electronic device, the key device is first identified from the plurality of external devices connected to the electronic device through a compatible application program installed in the electronic device, and after the key device is identified, the key device can be read and verified later.
Specifically, since the second operating system driver provided by the key device is not matched with the first operating system of the electronic device, the embodiment of the application uses the compatible application program as a middleware, the compatible application program runs the second operating system driver to identify and read information in the key device, and the compatible application program forwards the read information to the verification application program to verify the key device. The embodiment of the application can specifically identify the device information of the key device from the device list of the first operating system by the compatible application program, and then write the device information of the key device into the device registry corresponding to the second operating system in the compatible application program, thereby completing the identification of the key device.
And 102, running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment.
The compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment.
In the embodiment of the present application, the compatible application is a compatible layer capable of running the first operating system (e.g., windows operating system) application on a plurality of first operating systems (e.g., linux, mac OS, berkeley software suite (BSD, berkeley Software Distribution), etc.).
In one implementation, the compatible application may be a Wine (Wine Is Not an Emulator) application, and Wine may run on a variety of first operating systems (e.g., linux, macOS, BSD, etc.), rather than emulating internal Windows logic like a virtual machine or simulator, wine translates interface calls of Windows into dynamic first operating system calls, eliminating memory occupation for performance and some other behavior, and thus enabling clean integration and running of Windows applications on the first operating system's electronic device.
In another implementation manner, the compatible application program of the present application may also be obtained after deep modification on the basis of Wine, where the design concept of the compatible application program includes: through analyzing the call tree of the Windows system (second operating system), the uppermost layer can be seen to be a Windows application program, the dynamic link library is called to the lower layer, and the dynamic link library is called to the Windows kernel to the lower layer; the call of the analysis Linux operating system (first operating system) is similar, linux calls the Linux dynamic library from the uppermost layer application and then calls the Linux kernel from the lower layer, so that the structures of the two call trees can be seen to be very similar. Therefore, the compatible application program can graft the branch of Windows on the Linux tree based on the principle, so that the compatible application program simulates the programming component interface of the Windows application program and a dynamic link library, systematically simulates the Windows kernel function and service, converts the interface call of the Windows application program into the call of the Linux operating system, and enables the Windows application program to be deployed and run on the Linux operating system like the original application program.
Specifically, when the compatible application program is run for the first time, a docking interface between the compatible application program and the verification application program can be established, so that conversion connection between the compatible application program and the verification application program is realized. After the key equipment inserted into the electronic equipment is identified, the second operating system driver in the key equipment can be operated in the compatible application program through the interface and the dynamic link library of the second operating system simulated by the compatible application program, so that the purpose of normally operating the second operating system driver on the electronic equipment of the first operating system is realized.
Furthermore, after the second operating system driver is operated, the compatible application program can obtain the driving information of the second operating system driver, and the key equipment is started to read the encryption information (such as encryption certificate) therein, so that the starting and information reading of the key equipment by the compatible application program are completed.
And step 103, responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program, and then sending the driving information and the encryption information to the verification application program.
In the embodiment of the application, since the compatible application program is configured to complete the connection with the verification application program, the verification request initiated by the verification application program can be sent to the compatible application program, and the compatible application program can package the driving information and the encryption information and then send the packaged driving information and the encryption information to the verification application program in response to the verification request of the verification application program. The compatible application program is used as a middleware, so that the information in the key equipment is read and converted into a form which can be identified by the verification application program of the first operating system through the docking interface, and the form is sent to the verification application program for use.
And 104, verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
In the embodiment of the application, after the verification application program obtains the driving information and the encryption information which can be identified by the application program, the encryption information can be verified through the driving information according to a verification mode preset for the key equipment, so that a verification result of the key equipment is obtained, and normal verification of the key equipment is completed.
Specifically, the encryption information of the key device comprises an encryption certificate, the verification application program can verify the content of the encryption certificate through the driving information, and if the verification of the content of the encryption certificate is correct, the key device is determined to be matched with the current service, so that the safe execution of the service is ensured.
In summary, in the embodiment of the present application, when the driver of the second operating system provided by the key device and the first operating system of the electronic device are not matched, the driver is operated in the first operating system of the electronic device by the compatible application program, so as to implement normal reading of the key device, and then the compatible application program responds to the verification request of the verification application program, can package the encrypted information and the driving information obtained from the driver, and then send the packaged encrypted information and the driving information to the verification application program, so that the verification application program obtains the data in the key device, and normal verification of the key device is implemented. The embodiment of the application solves the problem that the key equipment cannot be verified due to the fact that the driver of the key equipment is not matched with the operating system of the electronic equipment.
Fig. 3 is a flowchart of specific steps of a method for verifying a key device according to an embodiment of the present application, as shown in fig. 3, the method may include:
step 201, obtaining a device list of the first operating system through the compatible application program.
Optionally, the first operating system is a Linux operating system, and the second operating system is a Windows operating system.
In the embodiment of the present application, if the first operating system is a Linux operating system, the device information of the external device inserted into the electronic device is recorded in the device list of the first operating system, so that the device list of the first operating system is obtained, and then the key devices in all the external devices can be screened according to the information in the device list.
Alternatively, step 201 may be specifically implemented by the compatible application program traversing all inf files of the first operating system to obtain the device list.
In this embodiment of the present application, when the first operating system is a Linux operating system, the device list file for recording the current external device of the electronic device belongs to an inf file (Device INFormation File), where the inf file is a file for describing data information such as a device or a file, and the compatible application program traverses all inf files of the first operating system, so that a device list for recording the device information of the external device can be obtained.
And 202, identifying information of the key device inserted into the electronic device from the device list through the compatible application program.
In the embodiment of the present application, after the compatible application obtains the device list, the information matching with the key device may be found from the device information of each external device recorded in the device list, and the process may specifically find the external device consistent with the identifier of the key device by traversing the information of each external device recorded in the device list, and regards it as the key device.
And 203, adding information of the key equipment into an equipment registry corresponding to the second operating system through the compatible application program, and completing identification of the key equipment.
In the embodiment of the application, since the compatible application program runs the second operating system driver through the interface and the dynamic link library of the simulated second operating system, the second operating system simulated by the compatible application program is provided with the device registry, and the device registry is a file used by the second operating system to record information of the external device. The compatible application may add information of the key device previously identified from the device list of the first operating system to the device registry corresponding to the second operating system, thereby completing identification of the key device by the compatible application.
Optionally, step 202 may specifically include:
step 2021, obtaining, by the compatible application, device descriptors of the external devices recorded in the device list.
And step 2022, determining the device descriptor as an external device of a target device descriptor as the key device, wherein the target device descriptor is a device descriptor preset for the key device.
In this embodiment, for sub-steps 2021-2022, the device descriptors of the external devices of the electronic device are recorded in the device list, where the device descriptors include PID (Product ID) and VID (vendor ID).
Optionally, on the basis of sub-steps 2021-2022, step 203 may specifically include:
substep 2031, adding, by the compatible application, the target device descriptor of the key device in a device registry corresponding to the second operating system.
In the embodiment of the application, since the device registry is set in the second operating system simulated by the compatible application program, and the device registry is a file for recording information of the external device by the second operating system, the compatible application program can add the target device descriptor of the key device in the device registry, thereby completing the identification of the key device by the second operating system simulated by the compatible application program.
And 204, running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment.
The step may refer to step 102, and will not be described herein.
And step 205, responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program, and then sending the driving information and the encryption information to the verification application program.
This step may refer to step 103, and will not be described herein.
And step 206, verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
This step may refer to step 104, and will not be described herein.
Optionally, the method may further include:
step 207, in the case of starting the compatible application program for the first time, in response to a selection operation, selecting the verification application program from a plurality of application programs running in the first operating system.
In the embodiment of the application, in order to enable the compatible application program to establish a connection with the verification application program, the compatible application program is used as a middleware between the verification application program and the key device to assist the verification application program to verify the key device which is not matched with the driver, and under the condition that the compatible application program is started for the first time, the verification application program can be selected from a plurality of application programs running in a first operating system in response to a selection operation, and the purpose of selecting the verification application program is to establish a connection with the verification application program for the subsequent establishment of the compatible application program.
Step 208, replacing, by the compatible application, a first docking interface between the verification application and the first operating system with a second docking interface between the verification application and the compatible application.
The second docking interface is used for converting a format corresponding to the first operating system into a format corresponding to the second operating system and then transmitting the data under the condition that the verification application program transmits the data to the compatible application program; and under the condition that the compatible application program transmits data to the verification application program, the second docking interface is used for converting the format corresponding to the second operating system into the format corresponding to the first operating system and then transmitting the data.
In this embodiment of the present application, since the compatible application simulates a program of the second operating system, and the electronic device runs the first operating system, due to a difference between the two operating systems, a second docking interface between the authentication application and the compatible application needs to be set. The second docking interface may define a data conversion method of the first operating system and the second operating system, so as to play a role in data format conversion. Under the condition that the verification application program transmits data to the compatible application program, the second docking interface is used for converting the format corresponding to the first operating system into the format corresponding to the second operating system and then transmitting the data; and under the condition that the compatible application program transmits data to the verification application program, the second docking interface is used for converting the format corresponding to the second operating system into the format corresponding to the first operating system and then transmitting the data. Through the conversion function of the second docking interface, normal interaction of data between the verification application program and the compatible application program is truly achieved, so that the verification application program can identify and use data sent by the compatible application program, and the compatible application program can also identify and use data sent by the verification application program.
On the basis of steps 207-208, step 205 may specifically comprise:
step 2051, converting, by the second docking interface, the format of the verification request corresponding to the first operating system into the format corresponding to the second operating system, and then receiving, by the compatible application program.
In the embodiment of the invention, based on the setting of the second docking interface, when the verification application program sends the verification request to the compatible application program, the second docking interface can convert the format corresponding to the first operating system into the format corresponding to the second operating system and then receive the verification request by the compatible application program. Thus, after the verification request in the first operating system format is converted into the verification request in the second operating system format, the compatible application program can acquire and normally recognize the response.
And step 2052, responding to the verification request of the verification application program, converting the format of the driving information and the encryption information corresponding to the second operating system into the format corresponding to the first operating system through the second docking interface, packaging, and then sending to the verification application program.
In this embodiment of the present application, based on the setting of the second docking interface, when the compatible application program sends the driving information and the encryption information to the verification application program, the second docking interface may convert the format corresponding to the driving information and the encryption information from the second operating system into the format corresponding to the first operating system, and then receive the driving information and the encryption information from the verification application program. Thus, the driving information and the encryption information in the second operating system format can be converted into the first operating system format and then obtained and normally identified for use by the verification application program.
Optionally, the substep 2052 may specifically include:
and 20521, converting the format of the driving information and the encryption information corresponding to the second operating system into the format corresponding to the first operating system through the second docking interface of the compatible application program and packaging.
And step 20522, sending the packaged driving information and the encrypted information to the verification application program in a socket mode through the second docking interface of the compatible application program.
In this embodiment of the present application, for sub-steps 20521 to 20522, when the compatible application program sends the driving information and the encrypted information to the verification application program, the format corresponding to the driving information and the encrypted information from the second operating system may be specifically converted into the format corresponding to the first operating system through the second docking interface, and encapsulated, and the encapsulated driving information and encrypted information are sent to the verification application program in a socket manner, so as to implement interaction between the compatible application program and the verification application program at the second operating system end by bridging and establishing connection.
Specifically, when the first operating system is a Linux operating system and the second operating system is a Windows operating system, after the key device is identified, the compatible application program can add the driving information and the encryption information obtained by reading the key device to the encapsulation of the socket, and send the driving information and the encryption information to the verification application program at the Linux end in a manner of using an interface of an XMLHttpRequest (a set of interface functions, which can be called by multiple scripting languages) to send a hypertext transfer protocol (HTTP, hyper Text Transfer Protocol), so that interaction with the verification application program at the Linux end is realized.
It should be noted that, the compatible application program also realizes the function of clearing the HID (Human Interface Device, human-machine interface device) cache of the key device, because the compatible application program only records the HID of the key device inserted into the electronic device for the first time, and for other key devices inserted into the electronic device for the subsequent time, the compatible application program also uses the HID of the key device inserted into the electronic device for the first time, which results in that the HID cached by the electronic device is inconsistent with the HID of the key device actually accessed, and thus causes verification failure. Therefore, when the connection between the key device and the electronic device is released each time, the electronic device can clear the stored HID in the HID cache, so that the HID of the key device which is inserted later can be normally recorded and used, and the problem that the HID cached by the electronic device is inconsistent with the HID of the key device which is actually accessed is solved.
In summary, the overall scheme of the embodiment of the present application will be described with reference to fig. 4 and 5, where fig. 4 is a system block diagram of a method for verifying a key device, and fig. 5 is a flowchart for executing a method for verifying a key device.
Referring to fig. 4, the electronic device is running a Linux operating system, and a Linux verification application program is running in the Linux operating system. The compatible application program can interact data with the Linux verification application program through a socket service. The compatible application program in the electronic equipment can run the Windows drive of the key equipment through the Windows program, so that the key equipment is read, the drive information and the encryption information read from the key equipment are sent to the Linux verification application program through the Linux interface, and the normal verification of the key equipment by the electronic equipment is realized.
Referring to fig. 5, when verifying the key device by the electronic device, the compatible application program obtains the device information to search and start the key device, then runs the driver of the key device through the compatible application program and notifies the Linux interface to finish processing, then the compatible application program encapsulates the driver information and the encryption information through the Linux interface, then the socket server establishes an http link, sends the encapsulated data packet to the Linux verification application program in a socket mode, and after receiving, the Linux verification application program returns a request, and the return request is sequentially transmitted to the key device to finish verification.
In summary, in the embodiment of the present application, when the driver of the second operating system provided by the key device and the first operating system of the electronic device are not matched, the driver is operated in the first operating system of the electronic device by the compatible application program, so as to implement normal reading of the key device, and then the compatible application program responds to the verification request of the verification application program, can package the encrypted information and the driving information obtained from the driver, and then send the packaged encrypted information and the driving information to the verification application program, so that the verification application program obtains the data in the key device, and normal verification of the key device is implemented. The embodiment of the application solves the problem that the key equipment cannot be verified due to the fact that the driver of the key equipment is not matched with the operating system of the electronic equipment.
Fig. 6 is a block diagram of an authentication apparatus of a key device according to an embodiment of the present application, where the apparatus includes:
an identification module 301, configured to identify, by a compatible application installed in the electronic device, a key device inserted into the electronic device;
a reading module 302, configured to operate a second operating system driver in the key device through the compatible application program, and obtain driving information and encryption information in the key device; the compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment;
the packaging module 303 is configured to respond to a verification request of the verification application, package the driving information and the encryption information through the compatible application, and send the packaged driving information and the encrypted information to the verification application;
and the verification module 304 is configured to verify the received driving information and the received encrypted information through the verification application program, so as to obtain a verification result of the key device.
Optionally, the identifying module 301 includes:
a list obtaining sub-module, configured to obtain, by using the compatible application program, a device list of the first operating system;
An identification sub-module for identifying information of a key device inserted into the electronic device from the device list through the compatible application;
and the adding sub-module is used for adding the information of the key equipment into the equipment registry corresponding to the second operating system through the compatible application program to finish the identification of the key equipment.
Optionally, the list obtaining sub-module includes:
and the traversing unit is used for traversing all inf files of the first operating system through the compatible application program to obtain the equipment list.
Optionally, the identifying sub-module includes:
the identification unit is used for acquiring the device descriptors of all the external devices recorded in the device list through the compatible application program;
the determining unit is used for determining the device descriptor as an external device of a target device descriptor as the key device, wherein the target device descriptor is a device descriptor preset for the key device;
the adding sub-module comprises:
and the adding unit is used for adding the target device descriptor of the key device in the device registry corresponding to the second operating system through the compatible application program.
Optionally, the apparatus further includes:
the selecting module is used for responding to the selecting operation and selecting the verification application program from a plurality of application programs running in a first operating system under the condition of starting the compatible application program for the first time;
the configuration module is used for replacing a first docking interface between the verification application program and the first operating system with a second docking interface between the verification application program and the compatible application program through the compatible application program;
the second docking interface is used for converting a format corresponding to the first operating system into a format corresponding to the second operating system and then transmitting the data under the condition that the verification application program transmits the data to the compatible application program; and under the condition that the compatible application program transmits data to the verification application program, the second docking interface is used for converting the format corresponding to the second operating system into the format corresponding to the first operating system and then transmitting the data.
Optionally, the packaging module 303 includes:
the conversion sub-module is used for converting the format corresponding to the first operating system into the format corresponding to the second operating system through the second docking interface, and then receiving the verification request by the compatible application program;
And the sending sub-module is used for responding to the verification request of the verification application program, converting the format of the driving information and the encryption information corresponding to the second operating system into the format corresponding to the first operating system through the second docking interface, packaging the format, and then sending the format to the verification application program.
Optionally, the sending submodule includes:
the conversion unit is used for converting the format corresponding to the driving information and the encryption information from the second operating system into the format corresponding to the first operating system through the second docking interface of the compatible application program and packaging the driving information and the encryption information;
and the sending unit is used for sending the packaged driving information and the encrypted information to the verification application program in a socket mode through the second docking interface of the compatible application program.
Optionally, the first operating system is a Linux operating system, and the second operating system is a Windows operating system.
In summary, in the embodiment of the present application, when the driver of the second operating system provided by the key device and the first operating system of the electronic device are not matched, the driver is operated in the first operating system of the electronic device by the compatible application program, so as to implement normal reading of the key device, and then the compatible application program responds to the verification request of the verification application program, can package the encrypted information and the driving information obtained from the driver, and then send the packaged encrypted information and the driving information to the verification application program, so that the verification application program obtains the data in the key device, and normal verification of the key device is implemented. The embodiment of the application solves the problem that the key equipment cannot be verified due to the fact that the driver of the key equipment is not matched with the operating system of the electronic equipment.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The embodiment of the application provides a verification device of a key device, which comprises a memory and more than one program, wherein the more than one program is stored in the memory, and the more than one program is configured to be executed by more than one processor, and the method for performing one or more embodiments is included.
Fig. 7 is a block diagram illustrating an apparatus 800 for authenticating a key device according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 7, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing element 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice information processing mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect the on/off state of the device 800, the relative positioning of the components, such as the display and keypad of the apparatus 800, the sensor assembly 814 may also search for a change in position of the apparatus 800 or one component of the apparatus 800, the presence or absence of user contact with the apparatus 800, the orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 8 is a schematic diagram of a server in some embodiments of the present application. The server 1900 may vary considerably in configuration or performance and may include one or more central processing units (central processing units, CPU) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) that store applications 1942 or data 1944. Wherein the memory 1932 and storage medium 1930 may be transitory or persistent. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, a central processor 1922 may be provided in communication with a storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus (server or terminal), enables the apparatus to perform the above-described embodiment method.
A non-transitory computer-readable storage medium, when executed by a processor of an apparatus (server or terminal), enables the apparatus to perform the description of the embodiment methods described above, and thus, a detailed description thereof will not be provided herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the computer program product or the computer program embodiments related to the present application, please refer to the description of the method embodiments of the present application.
In addition, it should be noted that: embodiments of the present application also provide a computer program product or computer program that may include computer instructions that may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor can execute the computer instructions, so that the computer device performs the description of the method of the above embodiment, and thus, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the computer program product or the computer program embodiments related to the present application, please refer to the description of the method embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The foregoing description of the preferred embodiments of the present application is not intended to limit the invention to the particular embodiments of the present application, but to limit the scope of the invention to the particular embodiments of the present application.
The above detailed description of a method, apparatus, electronic device and computer readable storage medium for verifying a key device provided in the present application, where specific examples are applied to illustrate principles and embodiments of the present application, the above description of the examples is only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (11)

1. A method for verifying a key device, applied to an electronic device running a first operating system, comprising:
identifying a key device inserted into the electronic device through a compatible application program installed in the electronic device;
running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment; the compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment;
responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program, and then sending the driving information and the encryption information to the verification application program;
and verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
2. The method of authenticating a key device according to claim 1, wherein the identifying the key device inserted into the electronic device by a compatible application installed in the electronic device comprises:
Acquiring a device list of the first operating system through the compatible application program;
identifying, by the compatible application, information of a key device inserted into the electronic device from the device list;
and adding the information of the key equipment into an equipment registry corresponding to the second operating system through the compatible application program, and completing the identification of the key equipment.
3. The method for verifying the key device according to claim 2, wherein the obtaining, by the compatible application, the device list of the first operating system includes:
and traversing all inf files of the first operating system through the compatible application program to obtain the equipment list.
4. The authentication method of a key device according to claim 2, wherein the identifying, by the compatible application, information of a key device inserted into the electronic device from the device list includes:
acquiring device descriptors of all external devices recorded in the device list through the compatible application program;
determining the external device with the device descriptor as a target device descriptor as the key device, wherein the target device descriptor is a device descriptor preset for the key device;
The adding, by the compatible application, information of the key device in a device registry corresponding to the second operating system includes:
and adding a target device descriptor of the key device in a device registry corresponding to the second operating system through the compatible application program.
5. The method of authenticating a key device of claim 1, wherein the method further comprises:
under the condition of starting the compatible application program for the first time, responding to a selection operation, and selecting the verification application program from a plurality of application programs running in a first operating system;
replacing a first docking interface between the verification application and the first operating system with a second docking interface between the verification application and the compatible application through the compatible application;
the second docking interface is used for converting a format corresponding to the first operating system into a format corresponding to the second operating system and then transmitting the data under the condition that the verification application program transmits the data to the compatible application program; and under the condition that the compatible application program transmits data to the verification application program, the second docking interface is used for converting the format corresponding to the second operating system into the format corresponding to the first operating system and then transmitting the data.
6. The authentication method of a key device according to claim 5, wherein said transmitting, in response to an authentication request of the authentication application, the drive information and the encryption information to the authentication application after being packaged by the compatible application, includes:
the format corresponding to the verification request from the first operating system is converted into the format corresponding to the second operating system through the second docking interface, and then the verification request is received by the compatible application program;
and responding to the verification request of the verification application program, converting the format of the driving information and the encryption information corresponding to the second operating system into the format corresponding to the first operating system through the second docking interface, packaging the format, and then sending the format to the verification application program.
7. The method for verifying the key device according to claim 6, wherein the converting, through the second docking interface, the driving information and the encrypted information from the format corresponding to the second operating system to the format corresponding to the first operating system, and packaging the converted driving information and the encrypted information, and then sending the converted driving information and the encrypted information to the verification application program, includes:
converting the format corresponding to the driving information and the encryption information from the second operating system into the format corresponding to the first operating system through a second docking interface compatible with the application program, and packaging;
And sending the packaged driving information and the encrypted information to the verification application program in a socket mode through the second docking interface of the compatible application program.
8. The method according to any one of claims 1 to 7, wherein the first operating system is a Linux operating system and the second operating system is a Windows operating system.
9. An authentication apparatus of a key device, applied to an electronic device running a first operating system, characterized in that the apparatus comprises:
the identification module is used for identifying the key equipment inserted into the electronic equipment through a compatible application program installed in the electronic equipment;
the reading module is used for running a second operating system driver in the key equipment through the compatible application program to acquire driving information and encryption information in the key equipment; the compatible application program is connected with the verification application program running in the first operating system, and is used for running an application program of a second operating system in the electronic equipment;
the packaging module is used for responding to the verification request of the verification application program, packaging the driving information and the encryption information through the compatible application program and then sending the driving information and the encryption information to the verification application program;
And the verification module is used for verifying the received driving information and the received encrypted information through the verification application program to obtain a verification result of the key equipment.
10. An electronic device, comprising: a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 8.
CN202310403074.9A 2023-04-14 2023-04-14 Verification method and device of key equipment, electronic equipment and storage medium Pending CN116541823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310403074.9A CN116541823A (en) 2023-04-14 2023-04-14 Verification method and device of key equipment, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310403074.9A CN116541823A (en) 2023-04-14 2023-04-14 Verification method and device of key equipment, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116541823A true CN116541823A (en) 2023-08-04

Family

ID=87456868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310403074.9A Pending CN116541823A (en) 2023-04-14 2023-04-14 Verification method and device of key equipment, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116541823A (en)

Similar Documents

Publication Publication Date Title
JP6626440B2 (en) Method and apparatus for playing multimedia files
US9886264B2 (en) Method and device for upgrading firmware
WO2017113842A1 (en) Intelligent device control method and apparatus
US11360834B2 (en) Application interaction method and apparatus
US20240192986A1 (en) Application handoff method and apparatus
JP6422997B2 (en) Business process execution method, apparatus, system, program, and recording medium
AU2019461393A1 (en) Screen sharing processing method, apparatus and device, and storage medium
CN111901695B (en) Video content interception method, device and equipment and computer storage medium
CN105100074A (en) Data operation processing method, device and terminal equipment
CN111221559A (en) Application updating method and device, storage medium, terminal and server
JP2016537904A (en) WI-FI network connection method, apparatus, program, and recording medium
EP3051772A1 (en) Method and apparatus for accessing network
CN104811776A (en) Multimedia playing method and device
JP2017503289A (en) Terminal verification method, apparatus, program, and recording medium
CN104881304A (en) Resource downloading method and device
CN107562500B (en) Debugging device, method and equipment
CN115185717A (en) Interface calling method and device, electronic equipment and storage medium
EP4266202A1 (en) Data protection method and system, and medium and electronic device
CN110278273B (en) Multimedia file uploading method, device, terminal, server and storage medium
CN114741292A (en) Test script management method and device, electronic equipment and storage medium
CN114416127A (en) Terminal software upgrading method, terminal software upgrading device and storage medium
CN113726905B (en) Data acquisition method, device and equipment based on home terminal equipment
CN116541823A (en) Verification method and device of key equipment, electronic equipment and storage medium
CN114428737A (en) Communication method, device, equipment and storage medium based on micro service system
CN115225627A (en) File transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination