WO2014173244A1 - 一种智能密钥设备的工作方法 - Google Patents

一种智能密钥设备的工作方法 Download PDF

Info

Publication number
WO2014173244A1
WO2014173244A1 PCT/CN2014/075371 CN2014075371W WO2014173244A1 WO 2014173244 A1 WO2014173244 A1 WO 2014173244A1 CN 2014075371 W CN2014075371 W CN 2014075371W WO 2014173244 A1 WO2014173244 A1 WO 2014173244A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
channel
interrupt
bluetooth
usb
Prior art date
Application number
PCT/CN2014/075371
Other languages
English (en)
French (fr)
Inventor
陆舟
于华章
邵黎明
Original Assignee
飞天诚信科技股份有限公司
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 飞天诚信科技股份有限公司 filed Critical 飞天诚信科技股份有限公司
Priority to US14/888,958 priority Critical patent/US9817961B2/en
Publication of WO2014173244A1 publication Critical patent/WO2014173244A1/zh

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/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards

Definitions

  • the invention relates to a working method of a smart key device, and belongs to the field of information security. Background technique
  • the smart key device can well meet the needs of personal identity authentication.
  • the smart key device is usually a USB interface device, and is connected to the computer through a data communication interface of the computer. Because the smart key device has high security features, Therefore, many areas requiring high security use smart key devices for identity authentication to ensure operational security. For example, the banking system uses smart key devices to authenticate the refusal and the identity of the user.
  • the object of the present invention is to provide a working method of a smart key device, which can solve the problem that the interface on the mobile device is not uniform, and make the mobile payment more secure and convenient; the smart key device according to the present invention can Communicates with the computer's data communication interface and communicates with the handheld device.
  • Step S1 The smart key device is powered on and initialized;
  • Step S2 The smart key device reads the parameters of the Bluetooth module, determines whether the Bluetooth module parameter can be successfully read, and then switches the Bluetooth module to the connected state, and performs step S3; otherwise, directly executes step S3;
  • Step S3 The smart key device determines whether the working voltage is lower than a preset value, and indicates a low voltage state. After the first preset time, the smart key device is powered off, otherwise step S3 is continued;
  • the smart key device When the smart key device receives the interrupt trigger signal as the channel trigger signal, enter the corresponding interrupt triggered by the channel, and after performing the corresponding setting of the channel trigger, exit the corresponding interrupt triggered by the channel, and return to step S3;
  • the smart key device When the smart key device receives the interrupt trigger signal, it is an instruction trigger signal, enters an instruction interrupt, saves the channel identifier, determines the instruction type, and if the received instruction is an instruction that needs to perform identity authentication before the instruction operation is performed, The instruction performs identity authentication. After the authentication, the corresponding instruction operation is executed according to the instruction, and the corresponding instruction response is returned to the upper computer to exit the instruction interrupt, and the process returns to step S3; if the authentication fails, the upper machine returns an error command response and then exits the instruction interrupt.
  • step S3 if the received instruction is an instruction that does not need to perform identity authentication before executing the instruction operation, executing the corresponding instruction operation according to the instruction and returning the corresponding instruction response after returning to the corresponding instruction, and then returning to step S3;
  • the performing the corresponding instruction operation according to the instruction comprises: parsing the message data in the instruction to obtain key data, performing hash operation on the message data in the instruction to obtain a hash result, and saving, the key data Displayed on the LCD screen;
  • the executing button processing includes: determining the button type, if the button type is confirmation The key then signs the saved hash result to obtain the signature result and saves it. If the button type is the cancel button, the signature is cancelled.
  • the method further includes: when the smart key device receives the interrupt trigger signal is a timer trigger signal, entering a timer interrupt, clearing the timer, setting the sleep flag, entering the sleep, when being woken up The timer interrupt is exited, and the process returns to step S3.
  • the method further includes: when the smart key device receives the interrupt trigger signal is a timer trigger signal, enters a timer interrupt, clears the timer, sets the sleep flag, exits the timer interrupt, and returns to the step S3; said Step S3 further includes: determining whether the sleep flag is set, if yes, entering sleep, and continuing to perform step S3 when waking up; otherwise, proceeding to step S3.
  • the channel trigger signal in the method includes: inserting a USB trigger signal, extracting a USB trigger signal, a Bluetooth connection signal, and a Bluetooth disconnection signal; and the command trigger signal includes a USB communication signal and a Bluetooth communication signal;
  • the interrupt trigger signal received by the smart key device is a USB trigger signal inserted in the channel trigger signal, enter a USB interrupt, and perform steps A and B;
  • Step A Determine whether the sleep flag is set. If yes, reset the sleep flag, enable the USB channel, clear the identity, and perform step B. Otherwise, enable the USB channel, disable the Bluetooth channel, clear the identity, and perform the steps. B;
  • Step B Clear the button waiting for the logo, the LCD displays the initialization, and exits the USB interrupt;
  • Step C Turn off the USB channel enable, enable the Bluetooth channel enable, clear the identity, and exit the USB interrupt; when the interrupt trigger signal received by the smart key device is the Bluetooth connection signal in the channel trigger signal, Into the Bluetooth connection is interrupted, perform steps D and E;
  • Step D Determine whether the sleep flag is set, if yes, reset the sleep flag, enable the Bluetooth channel to enable, clear the identity, and perform step E; otherwise, determine whether the smart key device is connected to the host computer through the USB interface, Turn off the Bluetooth channel enable, go to step E, otherwise enable the Bluetooth channel to enable, clear the identity, and perform step E; Step E: Clear the button waiting for the logo, the LCD displays initialization, and the Bluetooth connection is interrupted;
  • the interrupt trigger signal received by the smart key device is a Bluetooth disconnection signal in the channel trigger signal, enter a Bluetooth disconnect interrupt, and perform step F;
  • Step F Set the sleep flag, turn off the Bluetooth channel enable, clear the identity, and then exit the Bluetooth disconnect interrupt; or,
  • the interrupt trigger signal received by the smart key device is a USB trigger signal inserted in the channel trigger signal, enter a USB interrupt, and perform steps A and B;
  • Step A Determine whether the sleep flag is set. If yes, reset the sleep flag, enable the USB channel to enable, clear the identity, and perform step B. Otherwise, determine whether the smart key device is connected to the host computer through the Bluetooth interface. Turn off the USB channel enable, perform step B, otherwise enable the USB channel to enable, clear the identity, and perform step B; Step B: Clear the button waiting for the logo, the LCD displays initialization, and exits the USB interrupt;
  • Step C judging whether the smart key device is connected to the upper computer through the bluetooth interface, and then exiting the USB interrupt; otherwise, setting the sleep flag, turning off the USB channel enable, clearing the identity, and exiting the USB interrupt;
  • the interrupt trigger signal received by the smart key device is a Bluetooth connection signal in the channel trigger signal
  • the Bluetooth connection is interrupted, and steps D and E are performed;
  • Step D Determine whether the sleep flag is set, reset the sleep flag, enable the Bluetooth channel, clear the identity, and perform step E; otherwise, disable the USB channel, enable the Bluetooth channel, clear the identity, and perform the steps. E;
  • Step E Clear the button waiting for the logo, the LCD display is initialized, and the Bluetooth connection is interrupted;
  • the interrupt trigger signal received by the smart key device is a Bluetooth disconnection signal in the channel trigger signal, enter a Bluetooth disconnect interrupt, and perform step F;
  • Step F determining whether the smart key device is connected to the host computer through the USB interface, then turning off the Bluetooth channel enable, opening the USB channel enable, clearing the identity identifier, exiting the Bluetooth disconnection interruption, otherwise turning off the Bluetooth channel, clearing the identity Mark, set the sleep flag, and exit the Bluetooth disconnect interrupt;
  • the performing according to the instruction The corresponding instruction operation and returning the corresponding instruction response to the host computer include: clearing the identity identifier, and then parsing the verification information from the identity verification instruction, determining whether the user identity is legal according to the verification information, and saving the identity identifier according to the The currently saved channel identifier returns a successful authentication response to the host computer, otherwise the host computer returns an identity verification failure response according to the currently saved channel identifier.
  • the method further includes: determining whether it is necessary to wait for the key operation; if the set button waits for the identification, the upper machine returns a corresponding command response, otherwise the upper machine returns a corresponding command response;
  • buttons waiting flag is set, and then the button processing is executed to exit the button interrupt, otherwise the button is directly interrupted.
  • a working method of a smart key device is provided, which may further include: Step S1: Powering on the smart key device;
  • Step S2 The smart key device reads the parameters of the Bluetooth module to determine whether the Bluetooth module parameters can be successfully read. If the Bluetooth module is switched to the connected state, step S3 is performed, otherwise step S3 is directly executed;
  • Step S3 The smart key device determines whether the working voltage is lower than a preset value, and indicates a low voltage state, and the smart key device is turned off after the first preset time; otherwise, step S4 is performed;
  • Step S4 The smart key device determines whether there is an interrupt identifier, if yes, step S5 is performed; otherwise, step S3 is continued;
  • the method includes: opening an interrupt;
  • the command trigger signal includes a USB communication signal and a Bluetooth communication signal;
  • the enter button is interrupted, the button interrupt flag is saved, and the button is interrupted;
  • Step S5 The smart key device determines an interrupt identifier type.
  • step S3 When the interrupt identifier is a plug/unplug USB interrupt identifier, the corresponding operation of the USB channel is performed, and then the process returns to step S3; when the interrupt identifier is a Bluetooth connection/Bluetooth disconnection interrupt identifier, the corresponding operation of the Bluetooth channel is performed. Returning to step S3;
  • the interrupt identifier is an instruction interrupt identifier
  • determining an instruction type if the received instruction is an instruction that needs to perform identity authentication before performing the corresponding instruction operation, performing identity authentication, such as performing an instruction operation according to the instruction according to the instruction. And returning to the corresponding command response to the upper computer and returning to step S3.
  • step S3 If the authentication is not passed, the upper machine returns an error command response and returns to step S3; if the received command is an instruction that does not require identity authentication before the corresponding instruction operation is performed, Performing the corresponding instruction operation according to the instruction and returning the corresponding instruction response to the upper computer to return to step S3; performing the corresponding instruction operation according to the instruction includes: parsing the message data in the instruction to obtain key data, The message data in the instruction is hashed to obtain a hash result and saved, and the key data is displayed on the liquid crystal screen; when the interrupt identifier is a key interrupt identifier, the button processing is performed, and then the process returns to step S3; Key processing includes: determining the type of the button, if the button type is a confirmation button The signed hash result stored signature result obtained and stored, if the key is a cancel key to cancel the type of signature.
  • the interrupt identifier is a USB interrupt identifier
  • the corresponding operation of the USB channel is performed, specifically, if the USB interrupt identifier is extracted, step A is performed;
  • Step A Turn off the USB channel enable, enable the Bluetooth channel enable, clear the USB interrupt flag, and clear the identity
  • Step B The smart key device determines whether to communicate with the host computer through the Bluetooth interface, and then turns off the Bluetooth channel. Enable, enable the USB channel enable, clear the USB interrupt flag, clear the identity, perform step C; otherwise, enable the USB channel to enable, clear the USB interrupt flag, and perform step C;
  • Step C Clear the button waiting for the logo, and the LCD display is initialized.
  • the interrupt identifier is a Bluetooth connection/Bluetooth disconnection interrupt identifier
  • the corresponding operation of the Bluetooth channel is specifically included, if the Bluetooth connection is interrupted, the steps D and E are performed;
  • Step D Determine whether the smart key device communicates with the host computer through the USB interface, and then clear the Bluetooth connection interruption identifier, and perform step E. Otherwise, enable the Bluetooth channel to enable, clear the Bluetooth connection interruption identifier, clear the identity identifier, and perform the steps. E;
  • Step E Clear the button waiting for the logo, and the LCD display is initialized
  • step F is performed
  • Step F Turn off the Bluetooth channel enable, turn on the USB channel enable, clear the Bluetooth disconnection interrupt flag, clear the identity, or two
  • the interrupt identifier is a USB interrupt identifier
  • the corresponding operation of the USB channel is performed, specifically, if the USB interrupt identifier is extracted, step A is performed;
  • Step A Turn off the USB channel enable, enable the Bluetooth channel enable, clear the USB interrupt flag, and clear the identity
  • Step B Determine whether the smart key device communicates with the host computer through the Bluetooth interface, and then clear the USB interrupt identifier, and perform step C. Otherwise, enable the USB channel to enable, clear the USB interrupt identifier, clear the identity, and perform the steps.
  • C
  • Step C Clear the button waiting for the logo, and the LCD display is initialized.
  • the interrupt identifier is a Bluetooth connection/Bluetooth disconnection interrupt identifier
  • the corresponding operation of the Bluetooth channel is specifically included, if the Bluetooth connection is interrupted, the steps D and E are performed;
  • Step D Determine whether the smart key device communicates with the host computer through the USB interface, if the USB channel is enabled, the Bluetooth channel is enabled, the Bluetooth connection interruption identifier is cleared, the identity is cleared, and step E is performed, otherwise the Bluetooth is turned on. Enable the channel, clear the Bluetooth connection interrupt flag, and perform step E;
  • Step E Clear the button waiting for the logo, and the LCD display is initialized
  • step F is performed
  • Step F determining whether the smart key device is connected to the host computer through the USB interface, then turning off the Bluetooth channel enable, turning on the USB channel enable, clearing the Bluetooth disconnection interrupt flag, clearing the identity, otherwise clearing the Bluetooth disconnection interruption Identify, clear the identity;
  • the performing the corresponding instruction operation according to the instruction and returning the corresponding instruction response to the upper computer includes: when the instruction is an identity verification instruction, first Clearing the identity identifier, and then parsing the verification information from the authentication command, determining whether the user identity is legal according to the verification information, and saving the identity identifier, and returning the identity verification success response according to the currently saved channel identifier, otherwise Returning an authentication failure response to the host computer according to the currently saved channel identifier;
  • the method further includes: determining whether it is necessary to wait for the key operation, and then setting the button to wait for the identification, and then returning the corresponding instruction response to the upper computer, otherwise directly returning the corresponding instruction response to the upper computer;
  • the method further includes: determining whether the button waiting flag is set, and executing the button processing to return to step S3; otherwise, directly returning to step S3.
  • the invention has the beneficial effects that the working method of the smart key device provided by the invention can solve the problem that the interface on the mobile device is not uniform, and the mobile payment is more secure and convenient.
  • the smart key device can communicate with a data communication interface of a computer and with a handheld device.
  • FIG. 1 is a flowchart of a working method of a smart key device provided by Embodiment 1;
  • FIG. 2 is a flowchart of processing of receiving a channel trigger signal by the smart key device in Embodiment 1;
  • FIG. 3 is a flowchart of a process in which a smart key device receives an instruction trigger signal in Embodiment 1;
  • Embodiment 5 is a flowchart of a working method of a smart key device provided in Embodiment 2;
  • FIG. 6 is a flow chart of a working method of a smart key device provided in Embodiment 3. detailed description
  • the working method of the smart key device provided in this embodiment can be applied to the communication between the smart key device and the USB interface terminal, and can also be applied to the communication between the smart key device and the Bluetooth terminal.
  • the method includes the following steps:
  • Step 1 The smart key device is powered on and initialized.
  • the smart key device is powered on in two ways, including USB interface power supply and battery power supply.
  • the battery power is controlled by the power button, and the device is turned on and off.
  • the power button no longer functions and the battery enters the charging mode.
  • the channel that the smart key device communicates is selected by the user when the device is powered on.
  • the smart key device further includes: the smart key device prompts the user to perform the channel through the LCD screen.
  • the smart key device There are two choices: 1) USB communication, 2) Bluetooth communication; the user can select up and down by the up/down keys, and confirm with the confirmation key.
  • the smart key device receives and confirms the user's confirmation information.
  • Channel identification In the subsequent communication process, the channel is selected for communication according to the channel identifier set and saved.
  • Step 2 The smart key device reads the parameters of the Bluetooth module, and determines whether the Bluetooth module parameters can be successfully read. If the Bluetooth module is switched to the connected state, step 3 is performed, otherwise step 3 is directly executed;
  • Step 3 The smart key device determines whether the working voltage is lower than a preset value, and then prompts a low voltage state, and the smart key device is shut down after the first preset time; otherwise, step 3 is continued;
  • the smart key device when the smart key device receives the channel trigger signal, it enters the corresponding interrupt triggered by the channel, and after performing the corresponding setting of the channel trigger, exits the corresponding interrupt triggered by the channel; return to step 3.
  • the channel trigger signal includes a USB trigger signal, a USB trigger signal, a Bluetooth connection signal, and a Bluetooth disconnect signal.
  • the smart key device enters a USB charging mode when the smart key device enters a USB interrupt, and the smart key device exits the USB charging mode when the smart key device enters a USB interrupt.
  • the instruction interrupt execution command interrupt processing is performed, and the command trigger signal includes a USB communication signal and a Bluetooth communication signal.
  • the instruction interrupt processing includes: saving a channel identifier, determining, according to the instruction type, whether it is an instruction requiring identity authentication, and if the received instruction is an instruction requiring identity authentication before performing the instruction operation, performing identity authentication on the instruction And determine whether to pass the identity authentication, if yes, execute the corresponding instruction operation according to the instruction and exit the instruction interrupt after returning the corresponding instruction response according to the saved channel identifier, otherwise, the channel is selected to be returned to the host computer according to the saved channel identifier.
  • the instruction interrupt is interrupted; if the received instruction is an instruction that does not need to perform identity authentication before the instruction operation is performed, the corresponding instruction operation is executed according to the instruction, and the channel is selected according to the saved channel identifier to return the corresponding instruction to the upper computer.
  • the instruction interrupt is exited; after the further exit instruction is interrupted, return to step 3.
  • the performing the corresponding instruction operation according to the instruction includes: parsing the message data in the instruction to obtain key data, performing hash operation on the message data in the instruction to obtain a hash result, and saving, the key Data is displayed on the LCD screen, set Button waiting for identification;
  • the executing button processing includes: determining a button type, and if the button type is a confirmation button, signing the saved hash result to obtain a signature result and saving, if the button type is a cancel button, canceling the signature.
  • the smart key device When the smart key device receives the interrupt trigger signal as a timer trigger signal, it enters the timer interrupt, clears the timer, sets the sleep flag to go to sleep, exits the timer interrupt when it wakes up, and returns to step 3.
  • the timer interrupt reaches a pre-agreed time trigger by the accumulative timing of a timer, that is, when the timer reaches the pre-agreed time, the timer interrupt is entered, and the timer is cleared.
  • step 3 further includes: determining whether the sleep flag is set, Then go to sleep, continue to perform step 3 when waking up; otherwise continue to step 3.
  • the smart key device further includes: the smart key device opening interrupt before receiving the interrupt trigger signal.
  • Example 2
  • the communication method of the smart key device provided by the embodiment provides a specific implementation of how the smart key device selects a USB channel or a Bluetooth channel during communication and how to implement channel switching.
  • the method includes the following steps:
  • Step 101 The smart key device is powered on and initialized.
  • the smart key device is powered on in two ways, including USB interface power supply and battery power supply.
  • the battery power is controlled by the power button, and the device is turned on and off.
  • the power button no longer functions and the battery enters the charging mode.
  • Step 102 Turn on the interrupt
  • Step 103 The smart key device reads the Bluetooth module parameters, determines whether the Bluetooth module parameters can be successfully read, if yes, step 104 is performed; otherwise, step 105 is performed;
  • the Bluetooth module parameters include: MAC content, PIN code, and device name; specifically, the smart key device reads the Bluetooth module parameters from the Bluetooth module, and determines whether the success is successful according to the last byte of the Bluetooth module parameter. Read the Bluetooth module parameters. If the last byte of the Bluetooth module parameter is 0x01, it means that the smart key device successfully reads the Bluetooth module parameters. Otherwise, it indicates that the smart key device failed to read the Bluetooth module parameters.
  • Step 104 The smart key device switches the Bluetooth module to a connected state.
  • the step is specifically to close the Bluetooth module status output pin.
  • Step 105 The smart key device determines whether the working voltage is lower than a preset value, and then prompts a low voltage state, after the first preset time, the smart key device is turned off; otherwise, step 106 is performed;
  • the power consumption may be low through the screen, and the power may be low by changing the color of the indicator light, or may be low by the buzzer; the first preset time may be 20s.
  • Step 106 Continue to step 105;
  • step 107 is performed;
  • Step 107 The smart key device determines the type of the interrupt according to the received interrupt trigger signal.
  • Step 108 Clear the timer, set the sleep flag, go to sleep, and retreat when the smart key device is woken up. Exiting the timer, returning to step 105;
  • the smart key device receives the timer trigger wake-up signal, enters the timer interrupt, then clears the timing, sets the sleep flag, and enters sleep.
  • the smart key device is woken up, it exits the timer interrupt, and returns to step 105.
  • the smart key device when the smart key device receives the interrupt trigger signal as a timer trigger signal, the timer interrupt is entered, the timing is cleared, the sleep flag is set, and the timer interrupt is exited, and the step is returned.
  • the step 105 further includes: determining whether the sleep flag is set, if yes, entering sleep, continuing to perform step 105 when waking up; otherwise continuing to step 105.
  • Step 109 Determine whether the sleep flag is set, if yes, go to step 110, otherwise go to step 111;
  • Step 110 Reset the hibernation flag, enable the USB channel to enable, clear the identity, and perform step 112;
  • Step 112 Clear the button waiting flag, the LCD screen is initialized, and the USB interrupt is exited, and the process returns to step 105. Further, the step may further include the smart key device prompting the current communication mode to be USB communication through the LCD screen. When the smart key device receives the USB trigger signal, enter the USB interrupt, and the smart key device exits the USB charging mode, and step 113 is performed;
  • Step 113 Turn off the USB channel enable, enable the Bluetooth channel enable, clear the identity, and exit the USB interrupt; return to step 105;
  • the Bluetooth connection is interrupted, and step 114 is performed;
  • Step 114 Determine whether the sleep flag is set, if yes, go to step 115, otherwise go to step 116;
  • Step 115 Reset the sleep flag, enable the Bluetooth channel to enable, clear the identity, and perform step 118;
  • Step 116 Determine whether the smart key device is connected to the host computer through the USB interface, if yes, go to step 117, otherwise, open the Bluetooth channel. Can, clear the identity, go to step 118;
  • Step 117 Turn off the Bluetooth channel enablement
  • Step 118 Clear the button waiting flag, the LCD screen is initialized, and the Bluetooth connection is interrupted.
  • the step may further include the smart key device prompting the current communication mode to be Bluetooth communication through the LCD screen.
  • the entering the Bluetooth connection interruption further includes: a pairing process of the smart key device and the terminal that sends the Bluetooth connection signal, where the smart key device is The terminal that sends the Bluetooth connection signal is the master device, for example, the master device is a PC, a mobile phone, a PAD, or the like.
  • the pairing process is specifically: the smart key device receives the Bluetooth connection signal sent by the master device, displays the name or ID of the master device through the LCD screen, waits for the user to select the master device to be connected, and when the smart key device receives the user
  • the PIN request is sent to the selected master device
  • the smart key device receives the PIN code sent by the master device and compares it with the PIN code stored by itself, and if the comparison is correct, establishes a connection with the master device, and continues to execute.
  • Step 114 otherwise the smart key device fails to establish a connection through the LCD display, clears the button waiting for the identifier, and exits the Bluetooth connection interruption.
  • Step 119 Set the sleep flag, turn off the Bluetooth channel enable, clear the identity, and then exit the Bluetooth disconnect interrupt; return to step 105;
  • Step 120 The channel identifier is saved, the instruction type is determined, and when it is the identity verification instruction, step 121 is performed, when other instructions are used. , performing step 124;
  • the channel identifier is set to 1
  • the channel identifier is set to 2.
  • the instruction type is determined according to the first four bytes of the instruction; whether the first four bytes of the instruction are the first preset value, and the instruction is the identity verification instruction, otherwise the instruction is another instruction; First preset value For 00 20 OB 11.
  • the other instructions include: a setting algorithm and a key information instruction, a message data hash instruction, a calculation signature instruction, a key information acquisition instruction, and a signature result instruction.
  • the setup algorithm and the key information instruction are received; if the first four bytes of the instruction are 00 2A 90 80, then the report is received.
  • Text data hash instruction if the first four bytes of the instruction are 00 22 41 B6, then the setup algorithm and the key information instruction are received; if the first four bytes of the instruction are 00 2A 90 80, then the report is received.
  • the instruction to obtain the signature result is received.
  • Step 121 parsing the verification information from the instruction
  • the verification information parsed from the command may be a password set by the user or a serial number or a serial number of the device.
  • Step 122 Determine, according to the verification information, whether the identity of the user is legal, if yes, go to step 123, otherwise, perform steps.
  • the smart key device determines whether the verification information matches the information stored or generated by itself, and the user identity is legal, otherwise it is illegal.
  • the verification information may be a combination of letters, data or other characters.
  • the steps 121 and 122 can also verify whether the user identity is legal in the following manner:
  • the smart key device prompts to input the biometric information through the LCD screen, and the smart key device receives the biometric input by the user through the built-in biometric sensing device.
  • the biometric information includes a fingerprint, a palm print, an iris, and the like.
  • Step 123 Save the identity, perform step 129;
  • Step 124 Determine whether the instruction is an instruction requiring identity authentication, if yes, go to step 125, otherwise go to step 126;
  • a partial read instruction is an instruction that does not require authentication.
  • Step 125 Determine whether the identity can be obtained, if yes, go to step 126, otherwise go to step 129;
  • Step 126 Perform the corresponding instruction operation;
  • the step is specifically as follows: when the instruction received by the smart key device is an instruction algorithm and a signature information instruction, A is executed; when the received instruction is a message data hash instruction, B is executed; when the received instruction is a calculation signature instruction Execute C; execute D when the received instruction is to obtain the key information instruction; and execute E when the received instruction is the instruction to obtain the signature result;
  • A setting a signature algorithm, a hash algorithm, and obtaining a user private key from the key file and storing it in the memory; specifically, obtaining a corresponding key from the key file according to the key ID and usage information in the setting algorithm and the signature information instruction User private key and store it in memory;
  • step 126 in this embodiment needs to output all the key information and confirm it after the user confirms, so as to effectively prevent the risk that the user transaction message is not easily detected after being replaced; preventing the hacker from fraudulently signing and enhancing the security of the signature Sex.
  • the above-mentioned corresponding operation ABC performed by this embodiment can also be implemented by two instructions, that is, in step 126: when the received instruction is a setting algorithm and a signature information instruction, A is executed; when the received instruction is a message data hash and 8 and ⁇ are executed sequentially when signing instructions.
  • step 126 ABC is sequentially executed when the received instruction is to set the resolution signature instruction.
  • Step 127 Determine whether it is necessary to wait for the button operation, if yes, go to step 128, otherwise go to step 129;
  • the received command is a calculation signature instruction, it is necessary to wait for a key operation.
  • Step 128 Set the button to wait for the identifier
  • Step 129 Determine the channel identifier. When the channel identifier is 1, perform step 130. When the channel identifier is 2, perform the step.
  • Step 130 Return the corresponding command response to the upper computer through the USB channel, exit the instruction interrupt, and return to step 105;
  • Step 131 Return the corresponding command response to the upper computer through the Bluetooth channel, exit the instruction interrupt, and return to step 105. Further, if the waiting button is timed out after executing the calculation of the signature instruction exit instruction interrupt, the button is cleared to wait for the identification, the liquid crystal rhino display is initialized, and the button is timed out.
  • the enter button is interrupted, and step 132 is performed;
  • Step 132 Determine whether the button waiting flag is set, if yes, go to step 133, otherwise, exit the button interrupt, return to step 105;
  • Step 133 Determine the type of the button, if it is the up/down button, go to step 134, if it is the confirmation button, go to step 135, if it is the cancel button, go to step 136;
  • Step 134 Display the key information by scrolling up/down the LCD screen, and then exiting the key interrupt, and returning to step 105; further, when all the key information is output and displayed, the message display completion flag is also set to be valid.
  • Step 135 Determine whether the message display completion flag is valid. If yes, use the user private key to sign the saved hash result, and determine whether the signature is successful. If the signature is successful, the LCD display operation is successful, save the signature result, and perform step 137, signing. If the LCD screen fails, the operation fails, and step 137 is performed; otherwise, the LCD screen indicates that the operation fails, and step 137 is performed;
  • Step 136 The LCD display operation is canceled, and then step 137 is performed;
  • Step 137 Clear the button waiting flag; exit the button interrupt, and return to step 105.
  • the Bluetooth connection is interrupted, and accordingly, compared with the above-mentioned preferred processing plug USB interrupt, only the interrupt processing of the following interrupt is different, as follows:
  • Step 109' determines whether the sleep flag is set, if yes, step 110' is performed; otherwise, step 11 is performed;
  • Step 110' Reset the hibernation flag, enable the USB channel to enable, clear the identity, and perform step 112';
  • Step 111' Determine whether the smart key device is connected to the host computer through the Bluetooth interface, then disable the USB channel, and perform the steps. 112'; otherwise, enable the USB channel to enable, clear the identity, and perform step 112';
  • Step 112 ′ clear the button waiting flag, the LCD screen is initialized; exit the USB interrupt; return to step 105; when the smart key device receives the USB trigger signal, enter the USB interrupt, and perform step 113 ′; ' : Determine whether the smart key device communicates with the host computer through the Bluetooth interface. If yes, exit the USB interrupt and return to step 105; otherwise, set the sleep flag, turn off the USB channel enable, clear the identity, and exit USB interrupt, return to step 105.
  • the Bluetooth connection is interrupted, and step 114' is performed;
  • Step 114' determining whether the sleep flag is set, if yes, executing step 115', otherwise performing step 116';
  • Step 115' reset the sleep flag, enable the Bluetooth channel enable, clear the identity, and perform step 117';
  • Step 116' Turn off the USB channel enable, enable the Bluetooth channel enable, clear the identity;
  • Step 117' clear the button waiting flag, the LCD screen is initialized; the Bluetooth connection is interrupted; and the process returns to step 105; further, the step may further include: the smart key device prompting the current communication mode to be Bluetooth communication through the LCD screen.
  • the entering the Bluetooth connection interruption further includes: a pairing process of the smart key device and the terminal that sends the Bluetooth connection signal, where the smart key device is The terminal that sends the Bluetooth connection signal is the master device, for example, the master device is a PC, a mobile phone, a PAD, or the like.
  • the pairing process is specifically: the smart key device receives the Bluetooth connection signal sent by the master device, displays the name or ID of the master device through the LCD screen, waits for the user to select the master device to be connected, and when the smart key device receives the user Choose indeed When the information is acknowledged, the PIN request is sent to the selected master device, and the smart key device receives the PIN code sent by the master device and compares it with the PIN code stored by itself, and if the comparison is correct, establish a connection with the master device, and continue the steps. 114', otherwise the smart key device fails to establish a connection through the LCD display, clears the button waiting for the logo, and exits the Bluetooth connection interruption.
  • Step 118 ' Determine whether the smart key device is connected to the host computer through the USB interface, if the Bluetooth channel is enabled, the USB channel is enabled, the identity is cleared, the Bluetooth disconnection is interrupted, and the process returns to step 105; otherwise, the Bluetooth channel is turned off. , clear the identity, set the sleep flag, exit the Bluetooth disconnect interrupt, and return to step 105.
  • the smart key device sets the channel identifier to 1, and further includes: turning off the Bluetooth channel enable;
  • the smart key device sets the channel identifier to 2, and further includes: turning off the USB channel enable.
  • step 126 performs the corresponding instruction operation as follows:
  • the method further includes: when the specified channel identifier is 1 When the USB channel is displayed, the Bluetooth channel is disabled and the USB channel is enabled.
  • the smart key device prompts “Communication mode from Bluetooth communication to USB communication” through the LCD screen, and clears the button waiting flag.
  • the specified channel identifier is 2, indicating the Bluetooth channel, the USB channel is disabled, and the Bluetooth channel is enabled.
  • the smart key device prompts "Communication mode from USB communication to Bluetooth communication" via the LCD screen. Also clear the button waiting for the logo.
  • the channel that the smart key device communicates is selected by the user when the device is powered on.
  • the smart key device further includes: the smart key device prompts the user to perform the channel through the LCD screen.
  • the smart key device There are two choices: 1) USB communication, 2) Bluetooth communication; the user can select up and down by the up/down keys, and confirm with the confirmation key.
  • the smart key device receives and confirms the user's confirmation information.
  • the channel identification in the subsequent communication process, communicates with the set and saved channels.
  • the method further includes: determining whether the interrupt type matches the currently saved channel identifier, and performing the corresponding operations of step 109 and step 114 in Embodiment 2, otherwise directly Exit interrupted.
  • Example 3
  • the working method of the smart key device provided by the embodiment provides a specific implementation of how the smart key device selects the USB channel or the Bluetooth channel during the communication process and how to implement the channel switching.
  • the method as shown in Figure 6, includes the following steps:
  • Step 201 The smart key device is powered on and initialized.
  • USB port power there are two ways to power on the device, including USB port power and battery power.
  • the battery power is controlled by the power button, and the device is turned on and off. In the USB port power mode, the power button no longer functions and the battery enters the charging mode.
  • Step 202 Turn on the interrupt
  • Step 203 The smart key device reads the Bluetooth module parameters, determines whether the Bluetooth module parameters can be successfully read, if yes, step 204 is performed, otherwise step 205 is performed;
  • the Bluetooth module parameters include: MAC content, PIN code, and device name; specifically, the smart key device reads the Bluetooth module parameters from the Bluetooth module, and determines whether the success is successful according to the last byte of the Bluetooth module parameter. Read the Bluetooth module parameters. If the last byte of the Bluetooth module parameter is 0x01, it means that the smart key device is The Bluetooth module parameters are read, otherwise the smart key device fails to read the Bluetooth module parameters.
  • Step 204 Switch the Bluetooth module to the connected state
  • the step is specifically to close the Bluetooth module status output pin.
  • Step 205 The smart key device determines whether the working voltage is lower than a preset value, and then prompts a low voltage state, and the smart key device is shut down after the first preset time; otherwise, step 206 is performed;
  • the power consumption can be low through the rhino screen, the electric quantity can be displayed by changing the color of the indicator light, or the electric quantity can be low by the buzzer; the first preset time can be 20s.
  • Step 206 The smart key device determines whether there is an interrupt identifier, and if yes, performs the next step, otherwise, the step is continued;
  • the smart key device When the smart key device receives the Bluetooth connection signal/Bluetooth disconnection signal, enter the Bluetooth connection interruption/Bluetooth disconnection interruption, save the Bluetooth connection interruption identifier/Bluetooth disconnection interruption flag, exit the Bluetooth connection interruption/Bluetooth disconnection interruption
  • the access instruction is interrupted, the instruction interrupt identifier is saved, the channel identifier is saved, and the exit instruction is interrupted;
  • the smart key device When the smart key device receives the timer trigger, it enters a timer interrupt, saves the timer interrupt identifier, and exits the timer interrupt;
  • the enter button is interrupted, the button interrupt flag is saved, and the button is interrupted.
  • Step 207 The smart key device determines an interrupt identifier type.
  • step 208 is performed;
  • Step 208 Turn off the USB channel enable, enable the Bluetooth channel enable, clear the USB interrupt identifier, clear the identity; return to step 205;
  • step 209 is performed;
  • Step 209 Determine whether the smart key device communicates with the host computer through the Bluetooth interface, if yes, go to step 210, otherwise go to step 211;
  • Step 210 Turn off the Bluetooth channel enable, open the USB channel enable, clear the USB interrupt identifier, clear the identity; perform step 215;
  • Step 211 Turn on the USB channel enable, clear the USB interrupt identifier; go to step 215;
  • Step 212 Determine whether the smart key device communicates with the host computer through the USB interface, if yes, go to step 213, otherwise go to step 214;
  • Step 213 Clear the Bluetooth connection interruption identifier, and perform step 215;
  • Step 214 Turn on the Bluetooth channel enable, clear the Bluetooth connection interruption identifier, clear the identity; perform step 215; Step 215: Clear the button waiting for the identification, the LCD displays initialization; Return to step 205;
  • step 216 is performed;
  • Step 216 Determine whether the smart key device is connected to the host computer through the USB interface, if the Bluetooth channel is enabled, the USB channel is enabled, the Bluetooth disconnection interrupt flag is cleared, the identity is cleared, and the process returns to step 205; otherwise, the Bluetooth device is cleared. Open the interrupt identifier, clear the identity, and return to step 205;
  • step 217 is performed;
  • Step 217 Clear the timer of the timer, clear the timer interrupt flag, and return to step 205;
  • step 218 Determine the type of the instruction; when it is the authentication instruction, execute step 219, and when it is another instruction, perform step 222;
  • the channel identifier is set to 1, and if the Bluetooth communication signal is received, the channel identifier is set to 2.
  • determining the instruction type according to the first four bytes of the instruction determining whether the first four bytes of the instruction are the first preset value, and then the instruction is an identity verification instruction, otherwise the instruction is another instruction;
  • the first preset value is 00 20 0B 11 .
  • the other instructions include: a setting algorithm and a key information instruction, a message data hash instruction, a calculation signature instruction, a key information acquisition instruction, and a signature result instruction.
  • the setup algorithm and the key information instruction are received; if the first four bytes of the instruction are 00 2A 90 80, then the report is received.
  • Text data hash instruction if the first four bytes of the instruction are 00 22 41 B6, then the setup algorithm and the key information instruction are received; if the first four bytes of the instruction are 00 2A 90 80, then the report is received.
  • the instruction to obtain the signature result is received.
  • Step 219 Parse the verification information from the instruction
  • the verification information parsed from the command may be a password set by the user or a serial number or a serial number of the device.
  • Step 220 Determine, according to the verification information, whether the identity of the user is legal, if yes, go to step 221, otherwise, perform steps.
  • the smart key device determines whether the verification information matches the information stored or generated by itself, and the user identity is legal, otherwise it is illegal.
  • the verification information may be a combination of letters, data or other characters.
  • the steps 219 and 220 can also verify whether the user identity is legal in the following manner:
  • the biometric information is input through the display prompt, and the smart key device receives the biometric information input by the user through the built-in biometric sensing device, and determines Whether the biometric information matches the pre-stored information, the user identity is legal, otherwise it is illegal.
  • Step 221 Save the identity, perform step 227;
  • Step 222 Determine whether the instruction is an instruction requiring authentication, if yes, go to step 223, otherwise perform step
  • a partial read instruction is an instruction that does not require authentication.
  • Step 223 Determine whether the identity can be obtained, if yes, go to step 224, otherwise go to step 227;
  • Step 224 Perform the corresponding instruction operation;
  • This step is specifically as follows:
  • the executed instruction operation is: setting a signature algorithm, a hash algorithm, and key information;
  • the executed instruction operation is: parsing the message data in the instruction to obtain key data and saving, and hashing the message data in the instruction to obtain a hash result And save;
  • the executed instruction operation is: displaying key data on the LCD screen, and setting a button waiting for the identifier;
  • the executed instruction operation is: performing an operation of acquiring a button information, and saving the obtained button information;
  • the executed instruction operation is: Performing an operation of obtaining a signature result, and saving the signature result.
  • Step 225 Determine whether it is necessary to wait for the key operation, if yes, go to step 226, otherwise go to step 227;
  • Step 226 Set the button to wait for the flag, and wait for the button to be interrupted
  • Step 227 Determine the channel identifier. When the channel identifier is 1, perform step 228. When the channel identifier is 2, perform steps. 229;
  • Step 228 Return the corresponding command response to the upper computer through the USB channel, and exit the instruction interrupt, and return to step 205;
  • Step 229 return the corresponding command response to the upper computer through the Bluetooth channel, exit the instruction interrupt, and return to step 205. If the key is interrupted, step 230 is performed.
  • Step 230 Determine whether the button waiting flag is set, if yes, go to step 231, otherwise go back to step 205;
  • Step 231 Determine the button type, if it is the up/down button, go to step 232, if it is the confirmation button, go to step 233. If it is a cancel key, step 234 is performed;
  • Step 232 Display key information by flipping up/down the LCD screen, and then exiting the key interrupt, and returning to step 205; further, when all the key information is output and displayed, the flag display completion flag is also set to be valid.
  • Step 233 Determine whether the message display completion flag is valid, and then use the user private key to sign the saved hash result to determine whether the signature is successful. If the signature is successful, the LCD display operation is successful and the signature result is saved, and step 235 is executed. If the LCD screen fails, the operation fails, and step 235 is performed; otherwise, the LCD screen indicates that the operation fails, and step 235 is performed;
  • Step 234 The LCD display operation is canceled, and step 235 is performed;
  • Step 235 Clear the button waiting for the flag, and return to step 205.
  • the Bluetooth connection is preferably interrupted. Accordingly, compared with the above-mentioned preferred processing of the USB interrupt, only the interrupt processing of the following interrupts is different, as follows:
  • step 209' is performed;
  • Step 209 ′ determining whether the smart key device communicates with the host computer through the Bluetooth interface, if yes, performing step 210 ′; otherwise, performing step 21 ⁇ ;
  • Step 210' clear the USB connection interruption identifier, and then perform step 215;
  • Step 21 Open the USB channel enable, clear the USB interrupt flag, clear the identity, and then go to step 215;
  • step 208' is performed;
  • Step 208' Turn off the USB channel enable, turn on the Bluetooth channel enable, clear the USB interrupt flag, clear the identity, and return to step 205;
  • Step 212' Determine whether the smart key device communicates with the host computer through the USB interface, if yes, go to step 213', otherwise go to step 214';
  • Step 213' Turn off the USB channel enable, turn on the Bluetooth channel enable, clear the Bluetooth connection interruption flag, clear the identity, and then go to step 215;
  • Step 214' Turn on the Bluetooth channel enable, clear the Bluetooth connection interruption identifier, and then go to step 215;
  • Step 216' Turn off the Bluetooth channel enable, turn on the USB channel enable, clear the Bluetooth disconnection interrupt flag, clear the identity mark; return to step 205.
  • step 218 Medium:
  • the smart key device sets the channel identifier to 1 and further includes: turning off the Bluetooth channel enable;
  • the smart key device sets the channel identifier to 2, and further includes: turning off the USB channel enable.
  • the instruction operation performed by the corresponding step 224 is specifically: Comparing the channel identifier and the current channel identifier specified in the switching channel instruction: if the two are the same, step 225 is directly performed; if the two are not the same, before proceeding to step 225, the method further includes: when the specified channel identifier is 1 When the USB channel is displayed, the Bluetooth channel is disabled. Enable the USB channel to enable. The smart key device prompts “Communication mode from Bluetooth communication to USB communication” through the LCD screen, and clears the button waiting flag. When the specified channel identifier is 2, that is, the Bluetooth channel is turned off, the USB channel is enabled, and the Bluetooth channel is enabled. The smart key device prompts "communication mode from USB communication to Bluetooth communication" through the LCD screen, and clears the button at the same time. Waiting for the logo.
  • the channel that the smart key device communicates is selected by the user when the device is powered on.
  • the smart key device further includes: the smart key device prompts the user to perform the channel through the LCD screen.
  • the smart key device There are two choices: 1. USB communication, 2. Bluetooth communication; the user can select up and down by the up/down keys, and confirm with the confirmation key.
  • the smart key device receives and confirms the user's confirmation information.
  • the channel identification in the subsequent communication process, communicates with the set and saved channels.
  • the method further includes: determining whether the interrupt identifier matches the currently saved channel identifier, and performing the corresponding operations in step 209 and step 212 in Embodiment 3 Otherwise, it returns directly to step 205.

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)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种智能密钥设备的工作方法,包括:设备上电初始化;设备读取蓝牙模块参数,判断是否能够成功读取蓝牙模块参数,是则将蓝牙模块切换至连接状态,执行下一步,否则直接执行下一步;设备判断工作电压是否低于预设值,是则提示低电压状态,第一预设时间后设备关机,否则设备一直检测工作电压并等待中断触发信号;当接收到中断触发信号则根据中断触发信号进入相应中断,执行相应中断处理后退出相应中断返回继续检测工作电压。本发明能够很好地解决移动设备上接口不统一的问题,使移动支付更加安全、便捷。

Description

一种智能密钥设备的工作方法 技术领域
本发明涉及一种智能密钥设备的工作方法, 属于信息安全领域。 背景技术
智能密钥设备能够很好地满足个人身份认证的需要, 现有技术中智能密钥设备通常为 USB接口设备, 通过计算机的数据通讯接口与计算机连接, 由于智能密钥设备具有高安全 的特性, 所以, 很多要求安全性较高的领域都釆用智能密钥设备进行身份认证, 以保证操 作的安全性。 例如, 银行系统利用智能密钥设备认证拒员和用户的身份。
随着科技的发展, 通过便携的手持设备替代计算机与智能密钥设备结合使用进行身份 认证变得越来越普及, 在使用上述智能密钥设备的过程中, 发明人发现现有技术中至少存 在如下问题: 由于手持设备的接口与智能密钥设备的接口不统一, 造成使用两者进行通信 变得困难。 发明内容
本发明的目的是提出一种智能密钥设备的工作方法, 其能够很好地解决移动设备上接 口不统一的问题, 使移动支付更加安全、 便捷; 根据本发明的智能密钥设备, 既能与计算 机的数据通讯接口进行通信, 又能与手持设备实现通信。
为此, 根据本发明的一个方面, 提供了一种智能密钥设备的工作方法, 包括: 步骤 S 1: 智能密钥设备上电初始化;
步骤 S2:所述智能密钥设备读取蓝牙模块参数,判断是否能够成功读取蓝牙模块参数, 是则将蓝牙模块切换至连接状态, 执行步骤 S3 , 否则直接执行步骤 S3 ;
步骤 S3 : 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第 一预设时间后所述智能密钥设备关机, 否则继续执行步骤 S3 ;
当所述智能密钥设备收到中断触发信号是通道触发信号时,进入通道触发的相应中断, 执行通道触发的相应设置后退出通道触发的相应中断, 返回步骤 S3 ;
当所述智能密钥设备收到中断触发信号是指令触发信号时, 进入指令中断, 保存通道 标识, 判断指令类型, 若收到的指令是在执行指令操作前需要进行身份认证的指令, 则对 所述指令进行身份认证, 通过认证则根据所述指令执行相应指令操作并向上位机返回相应 指令响应后退出指令中断, 返回步骤 S3 ; 未通过认证则向上位机返回错误指令响应后退出 指令中断, 返回步骤 S3 ; 若收到的指令是在执行指令操作前不需要进行身份认证的指令, 则根据所述指令执行相应指令操作并向上位机返回相应指令响应后退出指令中断, 返回步 骤 S3; 所述根据所述指令执行相应指令操作包括: 对所述指令中报文数据进行解析得到关 键数据, 对所述指令中报文数据进行哈希运算得到哈希结果并保存, 将所述关键数据在液 晶屏上显示;
当所述智能密钥设备收到中断触发信号是按键触发信号时, 进入按键中断, 执行按键 处理后退出按键中断, 返回步骤 S3 ; 所述执行按键处理包括: 判断按键类型, 若按键类型 为确认键则对保存的所述哈希结果进行签名得到签名结果并保存, 若按键类型为取消键则 取消签名。
优选地, 所述方法还包括: 当所述智能密钥设备收到中断触发信号是定时器触发信号 时, 进入定时器中断, 计时清零, 将休眠标识置位, 进入休眠, 当被唤醒时退出定时器中 断, 返回步骤 S3。
优选地, 所述方法还包括: 当所述智能密钥设备收到中断触发信号是定时器触发信号 时, 进入定时器中断, 计时清零, 将休眠标识置位, 退出定时器中断, 返回步骤 S3 ; 所述 步骤 S3还包括: 判断休眠标识是否置位, 是则进入休眠, 当被唤醒时继续执行步骤 S3; 否则, 继续执行步骤 S3。
优选地, 该方法中所述通道触发信号包括插 USB触发信号、 拔 USB触发信号、 蓝牙 连接信号和蓝牙断开信号; 所述指令触发信号包括 USB通信信号和蓝牙通信信号;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的插 USB 触发信号 时, 进入插 USB中断, 执行步骤 A和 B;
步骤 A: 判断休眠标识是否置位, 是则将休眠标识复位, 打开 USB通道使能, 清除身 份标识, 执行步骤 B; 否则打开 USB通道使能, 关闭蓝牙通道使能, 清除身份标识, 执行 步骤 B;
步骤 B: 清除按键等待标识, 液晶屏显示初始化, 退出插 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的拔 USB 触发信号 时, 进入拔 USB中断, 执行步骤 C;
步骤 C: 关闭 USB通道使能, 打开蓝牙通道使能, 清除身份标识, 退出拔 USB中断; 当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 D和 E;
步骤 D: 判断休眠标识是否置位, 是则将休眠标识复位, 打开蓝牙通道使能, 清除身 份标识, 执行步骤 E; 否则判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则 关闭蓝牙通道使能, 执行步骤 E, 否则打开蓝牙通道使能, 清除身份标识, 执行步骤 E; 步骤 E: 清除按键等待标识, 液晶屏显示初始化, 退出蓝牙连接中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 F;
步骤 F: 将休眠标识置位, 关闭蓝牙通道使能, 清除身份标识, 然后退出蓝牙断开中 断; 或者是,
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的插 USB 触发信号 时, 进入插 USB中断, 执行步骤 A和 B;
步骤 A: 判断休眠标识是否置位, 是则将休眠标识复位, 打开 USB通道使能, 清除身 份标识, 执行步骤 B; 否则判断所述智能密钥设备是否通过蓝牙接口与上位机连接, 是则 关闭 USB通道使能, 执行步骤 B, 否则打开 USB通道使能, 清除身份标识, 执行步骤 B; 步骤 B: 清除按键等待标识, 液晶屏显示初始化, 退出插 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的拔 USB 触发信号 时, 进入拔 USB中断, 执行步骤 C;
步骤 C: 判断所述智能密钥设备是否通过蓝牙接口与上位机连接, 是则退出拔 USB中 断; 否则将休眠标识置位, 关闭 USB通道使能, 清除身份标识, 退出拔 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 D和 E;
步骤 D: 判断休眠标识是否置位, 是则将休眠标识复位, 打开蓝牙通道使能, 清除身 份标识, 执行步骤 E; 否则关闭 USB通道使能, 打开蓝牙通道使能, 清除身份标识, 执行 步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化, 退出蓝牙连接中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 F;
步骤 F: 判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除身份标识, 退出蓝牙断开中断, 否则关闭蓝牙通道, 清除 身份标识, 将休眠标识置位, 退出蓝牙断开中断;
该方法中当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执 行相应指令操作并向上位机返回相应指令响应包括: 先清身份标识, 然后从所述身份验证 指令中解析出验证信息, 根据所述验证信息判断用户身份是否合法, 是则保存身份标识, 根据当前保存的通道标识向上位机返回身份验证成功响应, 否则根据当前保存的通道标识 向上位机返回身份验证失败响应;
所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则向上位机返回相应指令响应;
所述进入按键中断后包括, 判断按键等待标识是否置位, 是则执行按键处理后退出按 键中断, 否则直接退出按键中断。
根据本发明的另外一方面, 提供了一种智能密钥设备的工作方法, 还可以是包括: 步骤 S 1: 智能密钥设备上电初始化;
步骤 S2:所述智能密钥设备读取蓝牙模块参数,判断是否能够成功读取蓝牙模块参数, 是则将蓝牙模块切换至连接状态后执行步骤 S3 , 否则直接执行步骤 S3 ;
步骤 S3 : 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第 一预设时间后所述智能密钥设备关机; 否则执行步骤 S4;
步骤 S4: 所述智能密钥设备判断是否存在中断标识, 是则执行步骤 S5 , 否则继续执行 步骤 S3 ;
所述步骤 S4之前包括: 打开中断;
当所述智能密钥设备收到插 /拔 USB触发信号时,进入插 /拔 USB中断,保存插 /拔 USB 中断标识, 退出插 /拔 USB中断;
当所述智能密钥设备收到蓝牙连接 /蓝牙断开信号时, 进入蓝牙连接 /蓝牙断开中断, 保 存蓝牙连接 /蓝牙断开中断标识, 退出蓝牙连接 /蓝牙断开中断;
当所述智能密钥设备收到指令触发信号时, 进入指令中断, 保存指令中断标识, 保存 当前通道标识, 退出指令中断; 所述指令触发信号包括 USB通信信号和蓝牙通信信号; 当所述智能密钥设备收到按键触发信号时, 进入按键中断, 保存按键中断标识, 退出 按键中断;
步骤 S5: 所述智能密钥设备判断中断标识类型;
当所述中断标识为插 /拔 USB中断标识时,则执行 USB通道的相应操作后返回步骤 S3; 当所述中断标识为蓝牙连接 /蓝牙断开中断标识时, 则执行蓝牙通道的相应操作后返回 步骤 S3 ;
当所述中断标识为指令中断标识时, 判断指令类型, 若收到的指令是执行相应指令操 作前需要进行身份认证的指令, 则进行身份认证 , 如通过认证则根据所述指令执行相应指 令操作并向上位机返回相应指令响应后返回步骤 S3 , 如未通过认证则向上位机返回错误指 令响应后返回步骤 S3 ; 若收到的指令是执行相应指令操作前不需要进行身份认证的指令, 则根据所述指令执行相应指令操作并向上位机返回相应指令响应后返回步骤 S3; 所述根据 所述指令执行相应指令操作包括: 对所述指令中报文数据进行解析得到关键数据, 对所述 指令中报文数据进行哈希运算得到哈希结果并保存, 将所述关键数据在液晶屏上显示; 当所述中断标识为按键中断标识时, 则执行按键处理后返回步骤 S3 ; 所述执行按键处 理包括: 判断按键类型, 若按键类型为确认键则对保存的所述哈希结果进行签名得到签名 结果并保存, 若按键类型为取消键则取消签名。
优选地, 该方法中, 当所述中断标识为插 /拔 USB中断标识时执行 USB通道的相应操 作具体包括, 若为拔 USB中断标识, 则执行步骤 A;
步骤 A: 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身份 标识;
若为插 USB中断标识, 则执行步骤 B和 C;
步骤 B: 所述智能密钥设备判断是否通过蓝牙接口与上位机通信, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除插 USB中断标识, 清除身份标识, 执行步骤 C; 否则打 开 USB通道使能, 清除插 USB中断标识, 执行步骤 C;
步骤 C: 清除按键等待标识, 液晶屏显示初始化;
当所述中断标识为蓝牙连接 /蓝牙断开中断标识时执行蓝牙通道的相应操作具体包括, 若为蓝牙连接中断标识, 则执行步骤 D和 E;
步骤 D: 判断所述智能密钥设备是否通过 USB接口与上位机通信, 是则清除蓝牙连接 中断标识, 执行步骤 E, 否则打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身份标识, 执行步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化;
若为蓝牙断开中断标识, 则执行步骤 F;
步骤 F: 关闭蓝牙通道使能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身份 标识 或者是二
当所述中断标识为插 /拔 USB中断标识时执行 USB通道的相应操作具体包括, 若为拔 USB中断标识, 则执行步骤 A;
步骤 A: 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身份 标识;
若为插 USB中断标识, 则执行步骤 B和 C;
步骤 B: 判断所述智能密钥设备是否通过蓝牙接口与上位机通信, 是则清除插 USB中 断标识, 执行步骤 C, 否则打开 USB通道使能, 清除插 USB中断标识, 清除身份标识, 执行步骤 C;
步骤 C: 清除按键等待标识, 液晶屏显示初始化;
当所述中断标识为蓝牙连接 /蓝牙断开中断标识时执行蓝牙通道的相应操作具体包括, 若为蓝牙连接中断标识, 则执行步骤 D和 E;
步骤 D: 判断所述智能密钥设备是否通过 USB接口与上位机通信, 是则关闭 USB通 道使能, 打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身份标识, 执行步骤 E, 否则 打开蓝牙通道使能, 清除蓝牙连接中断标识, 执行步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化;
若为蓝牙断开中断标识, 则执行步骤 F;
步骤 F: 判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身份标识, 否则清除蓝牙断开中 断标识, 清除身份标识;
该方法中当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执 行相应指令操作并向上位机返回相应指令响应包括: 当所述指令是身份验证指令时, 先清 身份标识, 然后从所述身份验证指令中解析出验证信息, 根据所述验证信息判断用户身份 是否合法, 是则保存身份标识, 根据当前保存的通道标识向上位机返回身份验证成功响应, 否则根据当前保存的通道标识向上位机返回身份验证失败响应;
所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则直接向上位机返回相应指令响应; 所述若为按键中断标识时还包括, 判断按键等待标识是否置位, 是则执行按键处理后 返回步骤 S3 , 否则直接返回步骤 S3。
本发明的有益效果是: 本发明提供的智能密钥设备的工作方法, 能够很好的解决移动 设备上接口不统一的问题, 使移动支付更加安全、 便捷。
根据本发明的智能密钥设备, 既能与计算机的数据通讯接口进行通信, 又能与手持设 备实现通信。 附图说明
图 1实施例 1提供的一种智能密钥设备工作方法流程图;
图 2是实施例 1中智能密钥设备收到通道触发信号的处理流程图;
图 3是实施例 1中智能密钥设备收到指令触发信号的处理流程图;
图 4是实施例 1中智能密钥设备收到按键触发信号的处理流程图;
图 5是实施例 2提供的一种智能密钥设备工作方法流程图;
图 6是实施例 3提供的一种智能密钥设备工作方法流程图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式做 进一步的详细描述。
实施例 1
本实施例提供的一种智能密钥设备的工作方法, 既可以应用于智能密钥设备与 USB接 口终端的通信, 也可以应用于智能密钥设备与蓝牙终端的通信。 如图 1所示该方法包括以 下步骤:
步骤 1 : 智能密钥设备上电初始化;
具体地, 智能密钥设备上电有两种方式, 包括 USB接口供电和电池供电。 其中电池供 电利用电源键进行控制, 实现设备的开关机。 而在 USB接口供电模式中, 电源键不再起作 用, 同时电池进入充电模式。
本实施例中, 优选地, 还可以在开机时由用户选择智能密钥设备通信的通道, 则智能 密钥设备上电初始化并打开中断后还包括: 智能密钥设备通过液晶屏提示用户进行通道选 择, 共包括两种: 1)USB通信, 2)蓝牙通信; 用户可以通过上 /下翻键进行上下选择, 并利 用确认键进行确认, 智能密钥设备接收到用户的确认信息后设置并保存通道标识, 在之后 的通信过程中, 根据设置并保存的通道标识选择通道进行通信。
步骤 2: 所述智能密钥设备读取蓝牙模块参数, 判断是否能够成功读取蓝牙模块参数, 是则将蓝牙模块切换至连接状态后执行步骤 3 , 否则直接执行步骤 3;
步骤 3: 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第 一预设时间后智能密钥设备关机; 否则继续执行步骤 3;
如图 2所示, 当所述智能密钥设备收到中断触发信号是通道触发信号时, 进入通道触 发的相应中断, 执行通道触发的相应设置后退出通道触发的相应中断; 返回步骤 3。
进一步地, 所述通道触发信号包括插 USB触发信号、 拔 USB触发信号、 蓝牙连接信 号和蓝牙断开信号。
优选地, 当所述智能密钥设备进入插 USB中断时所述智能密钥设备进入 USB充电模 式, 当所述智能密钥设备进入拔 USB中断时所述智能密钥设备退出 USB充电模式。
如图 3所示, 当所述智能密钥设备收到中断触发信号是指令触发信号时, 进入指令中 断执行指令中断处理, 所述指令触发信号包括 USB通信信号和蓝牙通信信号。 所述指令中 断处理包括: 保存通道标识, 根据指令类型判断是否是需要进行身份认证的指令, 若收到 的指令是在执行指令操作前需要进行身份认证的指令, 则对所述指令进行身份认证 , 并判 断是否通过身份认证, 如果是, 则根据所述指令执行相应指令操作并根据保存的通道标识 向上位机返回相应指令响应后退出指令中断, 否则根据保存的通道标识选择通道向上位机 返回错误指令响应后退出指令中断; 若收到的指令是在执行指令操作前不需要进行身份认 证的指令, 则根据所述指令执行相应指令操作并根据保存的通道标识选择通道向上位机返 回相应指令响应后退出指令中断; 进一步的退出指令中断后返回步骤 3。 其中所述根据所 述指令执行相应指令操作包括: 对所述指令中报文数据进行解析得到关键数据 , 对所述指 令中报文数据进行哈希运算得到哈希结果并保存, 将所述关键数据在液晶屏上显示, 置位 按键等待标识;
如图 4所示, 当所述智能密钥设备收到的中断触发信号是按键触发信号时, 进入按键 中断, 执行按键处理后退出按键中断, 然后返回步骤 3。 其中所述执行按键处理包括: 判 断按键类型,若按键类型为确认键则对保存的所述哈希结果进行签名得到签名结果并保存, 若按键类型为取消键则取消签名。
当所述智能密钥设备收到中断触发信号为定时器触发信号时, 进入定时器中断, 计时 清零, 将休眠标识置位, 进入休眠, 当被唤醒时退出定时器中断, 返回步骤 3。
本实施例中, 具体地, 定时器中断通过一个定时器的累加计时达到预先约定的时间触 发, 即当定时器的计时达到预先约定的时间时, 进入定时器中断, 定时器的计时清零, 将 休眠标识置位, 进入休眠。
上述方式是智能密钥设备在定时器中断中进入休眠的情况, 进一步地, 智能密钥设备 还可以是在步骤 1-3 的主循环中进入休眠, 具体为: 当所述智能密钥设备收到中断触发信 号为定时器触发信号时, 进入定时器中断, 计时清零, 将休眠标识置位, 退出定时器中断, 返回步骤 3; 所述步骤 3还包括: 判断休眠标识是否置位, 是则进入休眠, 当被唤醒时继 续执行步骤 3; 否则继续执行步骤 3。
所述智能密钥设备接收中断触发信号之前还包括: 所述智能密钥设备打开中断。 实施例 2
在实施例 1 的基础上, 本实施例提供的一种智能密钥设备的通信方法, 给出了智能密 钥设备在通信过程中如何选择 USB通道或蓝牙通道以及如何实现通道的切换的具体实现方 式, 如图 5所示, 包括以下步骤:
步骤 101 : 智能密钥设备上电初始化;
具体地, 智能密钥设备上电有两种方式, 包括 USB接口供电和电池供电。 其中电池供 电利用电源键进行控制, 实现设备的开关机。 而在 USB接口供电模式中, 电源键不再起作 用, 同时电池进入充电模式。
步骤 102: 打开中断;
步骤 103: 所述智能密钥设备读取蓝牙模块参数, 判断是否能够成功读取蓝牙模块参 数, 是则执行步骤 104, 否则执行步骤 105;
在本实施例中, 蓝牙模块参数包括: MAC内容、 PIN码和设备名称; 具体地, 智能密 钥设备从蓝牙模块中读取蓝牙模块参数, 并根据蓝牙模块参数的最后一个字节判断是否成 功读取蓝牙模块参数, 如果蓝牙模块参数的最后一个字节是 0x01 , 则表示智能密钥设备成 功读取蓝牙模块参数 , 否则表示智能密钥设备读取蓝牙模块参数失败。
步骤 104: 所述智能密钥设备将蓝牙模块切换至连接状态;
在本实施例中, 本步骤具体为将蓝牙模块状态输出引脚闭合。
步骤 105: 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第一预设时间后智能密钥设备关闭; 否则执行步骤 106;
在本实施例中, 可以通过屏幕显示电量低, 可以通过变换指示灯颜色显示电量低, 也 可以通过蜂鸣提示电量低; 所述第一预设时间可以是 20s。
步骤 106: 继续执行步骤 105;
当所述智能密钥设备接收到中断触发信号则执行步骤 107;
步骤 107: 所述智能密钥设备才艮据收到的中断触发信号判断中断类型;
若事先约定同时出现插 USB中断和蓝牙连接中断时, 优选处理插 USB中断, 则相应 地, 不同的中断类型执行的中断处理具体如下:
当智能密钥设备收到定时器触发唤醒信号时, 进入定时器中断, 执行步骤 108;
步骤 108: 计时清零, 将休眠标识置位, 进入休眠, 当所述智能密钥设备被唤醒时退 出定时器中断, 返回步骤 105;
具体地, 当计时器计时达到预先约定的休眠时间, 智能密钥设备会收到定时器触发唤 醒信号, 进入定时器中断, 然后将计时清零, 将休眠标识置位, 进入休眠, 当所述智能密 钥设备被唤醒时退出定时器中断, 返回执行步骤 105。
本实施例中, 还可以是: 当所述智能密钥设备收到中断触发信号为定时器触发信号时, 进入定时器中断, 计时清零, 将休眠标识置位, 退出定时器中断, 返回步骤 105; 而所述 步骤 105还包括: 判断休眠标识是否置位, 是则进入休眠, 当被唤醒时继续执行步骤 105; 否则继续执行步骤 105。
当智能密钥设备收到插 USB触发唤醒信号时, 进入插 USB中断, 智能密钥设备进入 USB充电模式, 执行步骤 109;
步骤 109: 判断休眠标识是否置位, 是则执行步骤 110, 否则执行步骤 111 ;
步骤 110: 将休眠标识复位, 打开 USB通道使能, 清除身份标识, 执行步骤 112; 步骤 111 : 打开 USB通道使能, 关闭蓝牙通道使能, 清除身份标识;
步骤 112: 清除按键等待标识, 液晶屏显示初始化, 退出插 USB中断, 返回步骤 105; 进一步地,本步骤还可以包括智能密钥设备通过液晶屏提示当前通信模式为 USB通信。 当智能密钥设备收到拔 USB触发信号时, 进入拔 USB中断, 智能密钥设备退出 USB 充电模式, 执行步骤 113 ;
步骤 113: 关闭 USB通道使能,打开蓝牙通道使能, 清除身份标识,退出拔 USB中断; 返回步骤 105;
当智能密钥设备收到蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 114;
步骤 114: 判断休眠标识是否置位, 是则执行步骤 115 , 否则执行步骤 116;
步骤 115: 将休眠标识复位, 打开蓝牙通道使能, 清除身份标识, 执行步骤 118; 步骤 116: 判断智能密钥设备是否通过 USB接口与上位机连接, 是则执行步骤 117, 否则打开蓝牙通道使能, 清除身份标识, 执行步骤 118;
步骤 117: 关闭蓝牙通道使能;
步骤 118: 清除按键等待标识, 液晶屏显示初始化, 退出蓝牙连接中断; 返回步骤 105; 进一步地,本步骤还可以包括智能密钥设备通过液晶屏提示当前通信模式为蓝牙通信。 本实施例中, 优选地, 当智能密钥设备收到蓝牙连接信号时, 在进入蓝牙连接中断中 还包括: 智能密钥设备与发送蓝牙连接信号的终端的配对过程, 其中向智能密钥设备发送 蓝牙连接信号的终端为主设备, 例如, 所述主设备为 PC机、 手机、 PAD等。
所述配对过程具体为: 智能密钥设备收到主设备发来的蓝牙连接信号, 通过液晶屏显 示主设备的名称或 ID, 等待用户选择要连接的主设备, 当智能密钥设备接收到用户选择确 认信息时向所选择主设备发送验 PIN请求, 智能密钥设备接收主设备发来的 PIN码与自身 存储的 PIN码进行比对, 比对正确则与所述主设备建立连接, 继续执行步骤 114, 否则智 能密钥设备通过液晶屏显示建立连接失败, 清除按键等待标识, 退出蓝牙连接中断。
当智能密钥设备收到蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 119;
步骤 119: 将休眠标识置位, 关闭蓝牙通道使能, 清除身份标识, 然后退出蓝牙断开 中断; 返回步骤 105;
当智能密钥设备收到 USB通信信号或蓝牙通信信号时,进入指令中断,执行步骤 120; 步骤 120: 保存通道标识, 判断指令类型, 当是身份验证指令时执行步骤 121 , 当是其 他指令时, 执行步骤 124;
本实施例中具体地, 如果是收到 USB通信信号, 则将通道标识置为 1 , 如果是收到蓝 牙通信信号, 则将通道标识置为 2。
本实施例中具体地, 根据指令的前四个字节判断指令类型; 判断指令的前四个字节是 否是第一预设值, 是则指令为身份验证指令, 否则指令为其他指令; 优选地, 第一预设值 为 00 20 OB 11。
所述其他指令包括: 设置算法和密钥信息指令、 报文数据哈希指令、 计算签名指令、 获取按键信息指令、 获取签名结果指令。
优选地,如果指令的前四个字节是 00 22 41 B6,则收到的是设置算法和密钥信息指令; 如果指令的前四个字节是 00 2A 90 80, 则收到的是报文数据哈希指令;
如果指令的前四个字节是 00 2A 9E 00, 则表示收到的是计算签名指令;
如果指令的前四个字节是 80 E5 00 00, 则表示收到的是获取按键信息指令; 如果指令的前四个字节是 80 E3 00 00, 则表示收到的是获取签名结果指令。
步骤 121 : 从指令中解析出验证信息;
本实施例中具体地, 从指令中解析出的验证信息可以是用户事先设定的密码或一串随 机数或设备序列号等。
步骤 122: 根据验证信息判断用户身份是否合法, 是则执行步骤 123 , 否则执行步骤
129;
具体地: 智能密钥设备判断验证信息是否与自身存储的或生成的信息匹配, 是则用户 身份合法, 否则不合法。 所述验证信息可以为字母、 数据或其他字符的组合。
进一步地, 步骤 121和 122还可以釆用以下方式验证用户身份是否合法: 智能密钥设 备通过液晶屏提示输入生物特征信息, 智能密钥设备通过自带的生物特征感应装置接收用 户输入的生物特征信息, 并判断所述生物特征信息是否与预先存储的信息匹配, 是则用户 身份合法, 否则不合法。 所述生物特征信息包括指紋、 掌紋、 虹膜等。
步骤 123 : 保存身份标识, 执行步骤 129;
步骤 124: 判断指令是否是需要进行身份认证的指令, 是则执行步骤 125 , 否则执行步 骤 126;
例如, 部分读指令属于不需要身份验证的指令。
步骤 125: 判断是否能够获取到身份标识, 是则执行步骤 126 , 否则执行步骤 129; 步骤 126: 执行相应指令操作;
本步骤具体为: 当智能密钥设备接收到的指令是设置算法和签名信息指令时执行 A; 当收到的指令是报文数据哈希指令时执行 B; 当收到的指令是计算签名指令时执行 C; 当 收到的指令是获取按键信息指令时执行 D; 当收到的指令是获取签名结果指令时执行 E;
A: 设置签名算法、 哈希算法以及从密钥文件中获取用户私钥并存储到内存中; 具体 地,根据设置算法和签名信息指令中的密钥 ID和用途信息从密钥文件中获取对应的用户私 钥并存储到内存中;
B:对指令中的报文数据进行解析得到关键数据并保存至显示緩存区,对指令中的报文 数据进行哈希运算得到哈希结果并保存;
C: 将显示緩存区的关键数据在液晶屏上显示, 置位按键等待标识;
D: 执行获取按键信息操作, 保存获取到的按键信息;
E: 执行获取签名结果操作, 保存签名结果。
本实施例步骤 126的方法需要将关键信息全部输出显示并经过用户确认后, 才能进行 签名, 有效防止用户交易报文被替换后不容易被察觉的风险; 防止黑客骗签, 增强了签名 的安全性。
本实施例执行的上述相应操作 ABC还可以通过两条指令实现, 即步骤 126中: 当收到 的指令为设置算法和签名信息指令时执行 A; 当收到的指令是报文数据哈希和签名指令时 顺序执行 8和〇。
本实施例中执行的上述相应操作 ABC还可以通过一条指令来实现, 则步骤 126中: 当 收到的指令为设置解析签名指令时顺序执行 ABC。
步骤 127: 判断是否需要等待按键操作, 是则执行步骤 128, 否则执行步骤 129; 本实施例中, 当收到的指令是计算签名指令时, 需要等待按键操作。
步骤 128: 置位按键等待标识;
步骤 129: 判断通道标识, 通道标识为 1 时执行步骤 130, 通道标识为 2时执行步骤
131 ;
步骤 130: 通过 USB通道向上位机返回相应指令响应, 退出指令中断, 返回步骤 105; 步骤 131 : 通过蓝牙通道向上位机返回相应指令响应, 退出指令中断, 返回步骤 105。 进一步地, 当执行完计算签名指令退出指令中断后如果等待按键超时, 则清除按键等 待标识, 液晶犀显示初始化, 并提示按键超时。
当智能密钥设备收到按键信号时, 进入按键中断, 执行步骤 132;
步骤 132: 判断按键等待标识是否置位, 是则执行步骤 133 , 否则退出按键中断, 返回 步骤 105;
步骤 133 :判断按键类型,若为上 /下翻键则执行步骤 134,若为确认键则执行步骤 135 , 若为取消键则执行步骤 136;
步骤 134: 通过液晶屏上 /下翻页显示关键信息, 然后退出按键中断, 返回步骤 105; 进一步地, 当完成关键信息全部输出并显示时, 还包括将报文显示完成标志设为有效。 步骤 135: 判断报文显示完成标志是否有效, 是则使用用户私钥对保存的哈希结果进 行签名, 判断签名是否成功, 签名成功则液晶屏显示操作成功, 保存签名结果, 执行步骤 137, 签名失败则液晶屏提示操作失败, 执行步骤 137; 否则液晶屏提示操作失败, 执行步 骤 137;
步骤 136: 液晶屏显示操作取消, 然后执行步骤 137;
步骤 137: 清除按键等待标识; 退出按键中断, 返回步骤 105。
若事先约定同时出现插 USB中断和蓝牙连接中断时, 优选地, 处理蓝牙连接中断, 则 相应地, 与上述优选处理插 USB中断相比, 仅以下中断的中断处理不同, 具体如下: 当所述智能密钥设备收到插 USB触发信号时, 进入插 USB中断, 执行步骤 109' ; 步骤 109': 判断休眠标识是否置位, 是则执行步骤 110' , 否则执行步骤 11 Γ; 步骤 110' : 将休眠标识复位, 打开 USB通道使能, 清除身份标识, 执行步骤 112' ; 步骤 111' : 判断所述智能密钥设备是否通过蓝牙接口与上位机连接, 是则关闭 USB通 道使能, 执行步骤 112' ; 否则打开 USB通道使能, 清除身份标识, 执行步骤 112' ;
步骤 112' : 清除按键等待标识,液晶屏显示初始化;退出插 USB中断;返回步骤 105; 当所述智能密钥设备收到拔 USB触发信号时, 进入拔 USB中断, 执行步骤 113' ; 步骤 113' : 判断所述智能密钥设备是否通过蓝牙接口与上位机通信, 如果是, 则退出 拔 USB中断, 返回步骤 105; 否则将休眠标识置位, 关闭 USB通道使能, 清除身份标识, 退出拔 USB中断, 返回步骤 105。
当所述智能密钥设备收到蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 114' ;
步骤 114' : 判断休眠标识是否置位, 是则执行步骤 115' , 否则执行步骤 116' ;
步骤 115' : 将休眠标识复位, 打开蓝牙通道使能, 清除身份标识, 执行步骤 117' ; 步骤 116' : 关闭 USB通道使能, 打开蓝牙通道使能, 清除身份标识;
步骤 117' :清除按键等待标识,液晶屏显示初始化;退出蓝牙连接中断;返回步骤 105; 进一步地, 本步骤还可以包括: 智能密钥设备通过液晶屏提示当前通信模式为蓝牙通 信。
本实施例中, 优选地, 当智能密钥设备收到蓝牙连接信号时, 在进入蓝牙连接中断中 还包括: 智能密钥设备与发送蓝牙连接信号的终端的配对过程, 其中向智能密钥设备发送 蓝牙连接信号的终端为主设备, 例如, 所述主设备为 PC机、 手机、 PAD等。
所述配对过程具体为: 智能密钥设备收到主设备发来的蓝牙连接信号, 通过液晶屏显 示主设备的名称或 ID , 等待用户选择要连接的主设备, 当智能密钥设备接收到用户选择确 认信息时向所选择主设备发送验 PIN请求, 智能密钥设备接收主设备发来的 PIN码与自身 存储的 PIN码进行比对, 比对正确则与所述主设备建立连接, 继续执行步骤 114' , 否则智 能密钥设备通过液晶屏显示建立连接失败, 清除按键等待标识, 退出蓝牙连接中断。
当所述智能密钥设备收到蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 118';
步骤 118 ': 判断智能密钥设备是否通过 USB接口与上位机连接 , 是则关闭蓝牙通道使 能, 打开 USB通道使能, 清除身份标识, 退出蓝牙断开中断, 返回步骤 105; 否则关闭蓝 牙通道, 清除身份标识, 将休眠标识置位, 退出蓝牙断开中断, 返回步骤 105。
或者是事先约定按照先到先得的原则进入指令中断, USB通道和蓝牙通道, 先接收到 指令的通道先进行指令处理, 具体地, 当智能密钥设备收到 USB通信信号或蓝牙通信信号 时, 进入指令中断, 在步骤 120中:
如果是收到 USB通信信号, 所述智能密钥设备将通道标识置为 1 , 则还包括: 关闭蓝 牙通道使能;
如果收到蓝牙通信信号, 所述智能密钥设备将通道标识置为 2, 则还包括: 关闭 USB 通道使能。
或者是通过一条切换通道指令实现 USB和蓝牙通道的切换;
相应地, 如果所述智能密钥设备接收到的是切换通道指令时, 进入指令中断, 步骤 126 执行相应指令操作具体为:
比较所述切换通道指令中指定的通道标识与当前通道标识: 如果两者相同, 则直接执 行步骤 127; 如果两者不相同时, 则进入步骤 127之前还包括: 当所述指定的通道标识为 1 即表示 USB通道时, 则关闭蓝牙通道使能, 打开 USB通道使能, 智能密钥设备通过液晶 屏提示 "通信模式由蓝牙通信转为 USB通信", 同时清除按键等待标识。 当所述指定的通道 标识为 2即表示蓝牙通道时, 则关闭 USB通道使能, 打开蓝牙通道使能。 智能密钥设备通 过液晶屏提示 "通信模式由 USB通信转为蓝牙通信"。 同时清除按键等待标识。
本实施例中, 优选地, 还可以在开机时由用户选择智能密钥设备通信的通道, 则智能 密钥设备上电初始化并打开中断后还包括: 智能密钥设备通过液晶屏提示用户进行通道选 择, 共包括两种: 1)USB通信, 2)蓝牙通信; 用户可以通过上 /下翻键进行上下选择, 并利 用确认键进行确认, 智能密钥设备接收到用户的确认信息后设置并保存通道标识, 在之后 的通信过程中, 釆用设置并保存的通道进行通信。 相应地, 在判断中断类型为插 USB中断 或蓝牙连接中断时, 还包括: 判断中断类型是否与当前保存的通道标识相符, 是则执行实 施例 2中步骤 109和步骤 114的相应操作, 否则直接退出中断。 实施例 3
在实施例 1 的基础上, 本实施例提供的一种智能密钥设备的工作方法, 给出了智能密 钥设备在通信过程中如何选择 USB通道或蓝牙通道以及如何实现通道的切换的具体实现方 式, 如图 6所示, 包括以下步骤:
步骤 201 : 智能密钥设备上电初始化;
具体地, 设备上电有两种方式, 包括 USB口供电和电池供电。 其中电池供电利用电源 键进行控制, 实现设备的开关机。 而在 USB口供电模式中, 电源键就不再起作用, 同时电 池进入充电模式。
步骤 202: 打开中断;
步骤 203: 所述智能密钥设备读取蓝牙模块参数, 判断是否能够成功读取蓝牙模块参 数, 是则执行步骤 204, 否则执行步骤 205;
在本实施例中, 蓝牙模块参数包括: MAC内容、 PIN码和设备名称; 具体地, 智能密 钥设备从蓝牙模块中读取蓝牙模块参数, 并根据蓝牙模块参数的最后一个字节判断是否成 功读取蓝牙模块参数, 如果蓝牙模块参数的最后一个字节是 0x01 , 则表示智能密钥设备成 功读取蓝牙模块参数, 否则智能密钥设备读取蓝牙模块参数失败。
步骤 204: 将蓝牙模块切换至连接状态;
在本实施例中, 本步骤具体为将蓝牙模块状态输出引脚闭合。
步骤 205: 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第一预设时间后智能密钥设备关机; 否则执行步骤 206;
在本实施例中, 可以通过犀幕显示电量低, 可以通过变换指示灯颜色显示电量低, 也 可以通过蜂鸣提示电量低; 所述第一预设时间可以是 20s。
步骤 206: 所述智能密钥设备判断是否存在中断标识, 是则执行下一步, 否则继续执 行本步骤;
在上述步骤 202和步骤 206之间包括:
当所述智能密钥设备收到插 /拔 USB触发信号时,进入插 /拔 USB中断,保存插 /拔 USB 中断标识, 退出插 /拔 USB中断;
当所述智能密钥设备收到蓝牙连接信号 /蓝牙断开信号时,进入蓝牙连接中断 /蓝牙断开 中断, 保存蓝牙连接中断标识 /蓝牙断开中断标识, 退出蓝牙连接中断 /蓝牙断开中断; 当所述智能密钥设备收到 USB通信信号或蓝牙通信信号时, 进入指令中断, 保存指令 中断标识, 保存通道标识, 退出指令中断;
当所述智能密钥设备收到定时器触发时, 进入定时器中断, 保存定时器中断标识, 退 出定时器中断;
当所述智能密钥设备收到按键信号时, 进入按键中断, 保存按键中断标识, 退出按键 中断。
步骤 207: 所述智能密钥设备判断中断标识类型;
若事先约定同时出现插 USB中断和蓝牙连接中断时, 优选处理插 USB中断, 则相应 地, 不同的中断标识类型执行的中断处理具体如下:
若为拔 USB中断标识, 则执行步骤 208;
步骤 208: 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身份 标识; 返回步骤 205;
若为插 USB中断标识, 则执行步骤 209;
步骤 209:判断所述智能密钥设备是否通过蓝牙接口与上位机通信,是则执行步骤 210, 否则执行步骤 211 ;
步骤 210: 关闭蓝牙通道使能, 打开 USB通道使能, 清除插 USB中断标识, 清除身份 标识; 执行步骤 215;
步骤 211 : 打开 USB通道使能, 清除插 USB中断标识; 执行步骤 215;
若为蓝牙连接中断标识, 则执行步骤 212;
步骤 212:判断所述智能密钥设备是否通过 USB接口与上位机通信,是则执行步骤 213 , 否则执行步骤 214;
步骤 213: 清除蓝牙连接中断标识, 执行步骤 215;
步骤 214: 打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身份标识; 执行步骤 215; 步骤 215: 清除按键等待标识, 液晶屏显示初始化; 返回步骤 205;
若为蓝牙断开中断标识, 则执行步骤 216;
步骤 216: 判断智能密钥设备是否通过 USB接口与上位机连接, 是则关闭蓝牙通道使 能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身份标识, 返回步骤 205; 否则清 除蓝牙断开中断标识, 清除身份标识, 返回步骤 205;
若为定时器中断标识, 则执行步骤 217;
步骤 217: 将定时器计时清零, 清除定时器中断标识, 返回步骤 205;
若为指令中断标识, 则执行步骤 218。 步骤 218: 判断指令类型; 当是身份验证指令时执行步骤 219, 当是其他指令时, 执行 步骤 222;
本实施例中, 具体地, 如果是收到 USB通信信号, 则将通道标识置为 1 , 如果是收到 蓝牙通信信号, 则将通道标识置为 2。
本实施例中, 具体地, 根据指令的前四个字节判断指令类型; 判断指令的前四个字节 是否是第一预设值, 是则指令为身份验证指令, 否则指令为其他指令; 优选地, 第一预设 值为 00 20 0B 11。
所述其他指令包括: 设置算法和密钥信息指令、 报文数据哈希指令、 计算签名指令、 获取按键信息指令、 获取签名结果指令。
优选地,如果指令的前四个字节是 00 22 41 B6,则收到的是设置算法和密钥信息指令; 如果指令的前四个字节是 00 2A 90 80, 则收到的是报文数据哈希指令;
如果指令的前四个字节是 00 2A 9E 00, 则表示收到的是计算签名指令;
如果指令的前四个字节是 80 E5 00 00, 则表示收到的是获取按键信息指令; 如果指令的前四个字节是 80 E3 00 00, 则表示收到的是获取签名结果指令。
步骤 219: 从指令中解析出验证信息;
本实施例中具体地, 从指令中解析出的验证信息可以是用户事先设定的密码或一串随 机数或设备序列号等。
步骤 220: 根据验证信息判断用户身份是否合法, 是则执行步骤 221 , 否则执行步骤
227;
具体地: 智能密钥设备判断验证信息是否与自身存储的或生成的信息匹配, 是则用户 身份合法, 否则不合法。 所述验证信息可以为字母、 数据或其他字符的组合。
进一步地, 步骤 219和 220还可以釆用以下方式验证用户身份是否合法: 通过显示屏 提示输入生物特征信息, 智能密钥设备通过自带的生物特征感应装置接收用户输入的生物 特征信息, 并判断所述生物特征信息是否与预先存储的信息匹配, 是则用户身份合法, 否 则不合法。
步骤 221 : 保存身份标识, 执行步骤 227;
步骤 222: 判断指令是否是需要身份验证的指令, 是则执行步骤 223 , 否则执行步骤
224;
例如, 部分读指令属于不需要身份验证的指令。
步骤 223: 判断是否能够获取到身份标识, 是则执行步骤 224 , 否则执行步骤 227; 步骤 224: 执行相应指令操作;
本步骤具体为:
当收到的指令是设置算法和签名信息指令时, 执行的指令操作为: 设置签名算法、 哈 希算法以及密钥信息;
当收到的指令是报文数据哈希指令时, 执行的指令操作为: 对指令中的报文数据进行 解析得到关键数据并保存, 对指令中的报文数据进行哈希运算得到哈希结果并保存;
当收到的指令是计算签名指令时, 执行的指令操作为: 将关键数据在液晶屏上显示, 置位按键等待标识;
当收到的指令是获取按键信息指令时, 执行的指令操作为: 执行获取按键信息操作, 保存获取到的按键信息;
当收到的指令是获取签名结果指令时, 执行的指令操作为: 执行获取签名结果操作, 保存签名结果。
步骤 225 : 判断是否需要等待按键操作, 是则执行步骤 226, 否则执行步骤 227;
步骤 226: 置位按键等待标识, 等待按键中断;
步骤 227: 判断通道标识, 通道标识为 1 时执行步骤 228 , 通道标识为 2时执行步骤 229;
步骤 228: 通过 USB通道向上位机返回相应指令响应, 退出指令中断, 返回步骤 205 ; 步骤 229: 通过蓝牙通道向上位机返回相应指令响应, 退出指令中断, 返回步骤 205。 若为按键中断标识, 则执行步骤 230。
步骤 230: 判断按键等待标识是否置位, 是则执行步骤 231 , 否则返回步骤 205; 步骤 231 :判断按键类型,若为上 /下翻键则执行步骤 232,若为确认键则执行步骤 233 , 若为取消键则执行步骤 234;
步骤 232: 通过液晶屏上 /下翻页显示关键信息, 然后退出按键中断, 返回步骤 205; 进一步地, 当完成关键信息全部输出并显示时, 还包括将报文显示完成标志设为有效。
步骤 233 : 判断报文显示完成标志是否有效, 是则使用用户私钥对保存的哈希结果进 行签名, 判断签名是否成功, 签名成功则液晶屏显示操作成功并保存签名结果, 执行步骤 235 , 签名失败则液晶屏提示操作失败, 执行步骤 235; 否则液晶屏提示操作失败执行步骤 235;
步骤 234: 液晶屏显示操作取消, 执行步骤 235;
步骤 235: 清除按键等待标识, 返回步骤 205。
若事先约定同时出现插 USB中断和蓝牙连接中断时, 优选蓝牙连接中断, 则相应地, 与上述优选处理插 USB中断相比, 仅以下中断的中断处理不同, 具体如下:
若为插 USB中断标识, 则执行步骤 209';
步骤 209' : 判断所述智能密钥设备是否通过蓝牙接口与上位机通信, 是则执行步骤 210' , 否则执行步骤 21 Γ ;
步骤 210': 清除 USB连接中断标识, 然后执行步骤 215;
步骤 21Γ : 打开 USB通道使能, 清除插 USB中断标识, 清除身份标识, 然后执行步 骤 215;
若为拔 USB中断标识, 则执行步骤 208';
步骤 208' : 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身 份标识, 返回步骤 205;
若为蓝牙连接中断标识, 则执行 212' ;
步骤 212' : 判断所述智能密钥设备是否通过 USB接口与上位机通信, 是则执行步骤 213' , 否则执行步骤 214' ;
步骤 213' : 关闭 USB通道使能, 打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身 份标识, 然后执行步骤 215;
步骤 214' : 打开蓝牙通道使能, 清除蓝牙连接中断标识, 然后执行步骤 215;
若为蓝牙断开中断标识, 则执行 216' ;
步骤 216' : 关闭蓝牙通道使能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身 份标识; 返回步骤 205。
或者是, 事先约定按照先到先得的原则进入指令中断, USB通道和蓝牙通道, 先接收 到指令的通道先进行指令处理, 具体地, 当智能密钥设备存在指令中断标识时,在步骤 218 中:
如果收到 USB通信信号, 所述智能密钥设备将通道标识置为 1后还包括: 关闭蓝牙通 道使能;
如果收到蓝牙通信信号, 所述智能密钥设备将通道标识置为 2后还包括: 关闭 USB通 道使能。
或者是, 通过一条切换通道指令实现 USB和蓝牙通道的切换;
如果步骤 218中所述智能密钥设备接收到的是切换通道指令时, 相应的步骤 224执行 的指令操作具体为: 比较所述切换通道指令中指定的通道标识与当前通道标识: 如果两者相同, 则直接执 行步骤 225; 如果两者不相同时, 则进入步骤 225之前还包括: 当所述指定的通道标识为 1 即表示 USB通道时则关闭蓝牙通道使能, 打开 USB通道使能, 智能密钥设备通过液晶屏 提示"通信模式由蓝牙通信转为 USB通信", 同时清除按键等待标识。 当所述指定的通道标 识为 2即表示蓝牙通道时则关闭 USB通道使能, 打开蓝牙通道使能, 智能密钥设备通过液 晶屏提示"通信模式由 USB通信转为蓝牙通信" , 同时清除按键等待标识。
本实施例中, 优选地, 还可以在开机时由用户选择智能密钥设备通信的通道, 则智能 密钥设备上电初始化并打开中断后还包括: 智能密钥设备通过液晶屏提示用户进行通道选 择, 共包括两种: 1.USB 通信, 2.蓝牙通信; 用户可以通过上 /下翻键进行上下选择, 并利 用确认键进行确认, 智能密钥设备接收到用户的确认信息后设置并保存通道标识, 在之后 的通信过程中, 釆用设置并保存的通道进行通信。 相应地, 在判断中断标识类型为插 USB 中断标识或蓝牙连接中断标识时, 还包括: 判断中断标识是否与当前保存的通道标识相符, 是则执行实施例 3中步骤 209和步骤 212的相应操作, 否则直接返回步骤 205。
以上所述的实施例只是本发明较优选的具体实施方式, 本领域的技术人员在本发明的 技术方案范围内进行的通常变化和替换都应包含在本发明的保护范围内。

Claims

权利要求书
1. 一种智能密钥设备的工作方法, 其特征在于, 所述方法包括:
步骤 S 1: 智能密钥设备上电初始化;
步骤 S2:所述智能密钥设备读取蓝牙模块参数,判断是否能够成功读取蓝牙模块参数, 是则将蓝牙模块切换至连接状态, 执行步骤 S3 , 否则直接执行步骤 S3 ;
步骤 S3 : 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第 一预设时间后所述智能密钥设备关机, 否则继续执行步骤 S3 ;
当所述智能密钥设备收到中断触发信号是通道触发信号时,进入通道触发的相应中断, 执行通道触发的相应设置后退出通道触发的相应中断, 返回步骤 S3 ;
当所述智能密钥设备收到中断触发信号是指令触发信号时, 进入指令中断, 保存通道 标识, 判断指令类型, 若收到的指令是在执行指令操作前需要进行身份认证的指令, 则对 所述指令进行身份认证, 通过认证则根据所述指令执行相应指令操作并向上位机返回相应 指令响应后退出指令中断, 返回步骤 S3 ; 未通过认证则向上位机返回错误指令响应后退出 指令中断, 返回步骤 S3 ; ; 若收到的指令是在执行指令操作前不需要进行身份认证的指令, 则根据所述指令执行相应指令操作并向上位机返回相应指令响应后退出指令中断, 返回步 骤 S3; 所述根据所述指令执行相应指令操作包括: 对所述指令中报文数据进行解析得到关 键数据, 对所述指令中报文数据进行哈希运算得到哈希结果并保存, 将所述关键数据在液 晶屏上显示;
当所述智能密钥设备收到中断触发信号是按键触发信号时, 进入按键中断, 执行按键 处理后退出按键中断, 返回步骤 S3 ; 所述执行按键处理包括: 判断按键类型, 若按键类型 为确认键则对保存的所述哈希结果进行签名得到签名结果并保存, 若按键类型为取消键则 取消签名。
2. 根据权利要求 1所述的工作方法, 其特征在于, 所述方法还包括: 当所述智能密钥 设备收到中断触发信号是定时器触发信号时, 进入定时器中断, 计时清零, 将休眠标识置 位, 进入休眠, 当被唤醒时退出定时器中断, 返回步骤 S3 , 或者
当所述智能密钥设备收到中断触发信号是定时器触发信号时, 进入定时器中断, 计时 清零, 将休眠标识置位, 退出定时器中断, 返回步骤 S3 ;
所述步骤 S3还包括: 判断休眠标识是否置位, 是则进入休眠, 当被唤醒时继续执行步 骤 S3; 否则继续执行步骤 S3。
3. 根据权利要求 1所述的工作方法,其特征在于,所述通道触发信号包括插 USB触发 信号、 拔 USB触发信号、 蓝牙连接信号和蓝牙断开信号; 所述指令触发信号包括 USB通 信信号和蓝牙通信信号;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的插 USB 触发信号 时, 进入插 USB中断, 执行步骤 A和 B;
步骤 A: 判断休眠标识是否置位, 是则将休眠标识复位, 打开 USB通道使能, 清除身 份标识, 执行步骤 B; 否则打开 USB通道使能, 关闭蓝牙通道使能, 清除身份标识, 执行 步骤 B;
步骤 B: 清除按键等待标识, 液晶屏显示初始化, 退出插 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的拔 USB 触发信号 时, 进入拔 USB中断, 执行步骤 C;
步骤 C: 关闭 USB通道使能, 打开蓝牙通道使能, 清除身份标识, 退出拔 USB中断; 当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 D和 E;
步骤 D: 判断休眠标识是否置位, 是则将休眠标识复位, 打开蓝牙通道使能, 清除身 份标识, 执行步骤 E; 否则判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则 关闭蓝牙通道使能, 执行步骤 E, 否则打开蓝牙通道使能, 清除身份标识, 执行步骤 E; 步骤 E: 清除按键等待标识, 液晶屏显示初始化, 退出蓝牙连接中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 F;
步骤 F: 将休眠标识置位, 关闭蓝牙通道使能, 清除身份标识, 然后退出蓝牙断开中 断;
当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执行相应指 令操作并向上位机返回相应指令响应包括: 先清身份标识, 然后从所述身份验证指令中解 析出验证信息, 根据所述验证信息判断用户身份是否合法, 是则保存身份标识, 根据当前 保存的通道标识向上位机返回身份验证成功响应, 否则根据当前保存的通道标识向上位机 返回身份验证失败响应;
所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则直接向上位机返回相应指令响应; 所述进入按键中断后包括, 判断按键等待标识是否置位, 是则执行按键处理后退出按 键中断, 否则直接退出按键中断。
4. 根据权利要求 1所述的工作方法,其特征在于,所述通道切换信号包括插 USB触发 信号、 拔 USB触发信号、 蓝牙连接信号和蓝牙断开信号; 所述指令触发信号包括 USB通 信信号和蓝牙通信信号;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的插 USB 触发信号 时, 进入插 USB中断, 执行步骤 A和 B;
步骤 A: 判断休眠标识是否置位, 是则将休眠标识复位, 打开 USB通道使能, 清除身 份标识, 执行步骤 B; 否则判断所述智能密钥设备是否通过蓝牙接口与上位机连接, 是则 关闭 USB通道使能, 执行步骤 B, 否则打开 USB通道使能, 清除身份标识, 执行步骤 B; 步骤 B: 清除按键等待标识, 液晶屏显示初始化, 退出插 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的拔 USB 触发信号 时, 进入拔 USB中断, 执行步骤 C;
步骤 C: 判断所述智能密钥设备是否通过蓝牙接口与上位机连接, 是则退出拔 USB中 断; 否则将休眠标识置位, 关闭 USB通道使能, 清除身份标识, 退出拔 USB中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙连接信号时, 进入蓝牙连接中断, 执行步骤 D和 E;
步骤 D: 判断休眠标识是否置位, 是则将休眠标识复位, 打开蓝牙通道使能, 清除身 份标识, 执行步骤 E; 否则关闭 USB通道使能, 打开蓝牙通道使能, 清除身份标识, 执行 步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化, 退出蓝牙连接中断;
当所述智能密钥设备收到的中断触发信号是所述通道触发信号中的蓝牙断开信号时, 进入蓝牙断开中断, 执行步骤 F;
步骤 F: 判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除身份标识, 退出蓝牙断开中断, 否则关闭蓝牙通道, 清除 身份标识, 将休眠标识置位, 退出蓝牙断开中断;
当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执行相应指 令操作并向上位机返回相应指令响应包括: 先清身份标识, 然后从所述身份验证指令中解 析出验证信息, 根据所述验证信息判断用户身份是否合法, 是则保存身份标识, 根据当前 保存的通道标识向上位机返回身份验证成功响应, 否则根据当前保存的通道标识向上位机 返回身份验证失败响应; 所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则向上位机返回相应指令响应;
所述进入按键中断后包括, 判断按键等待标识是否置位, 是则执行按键处理后退出按 键中断, 否则直接退出按键中断。
5. 根据权利要求 3所述的工作方法, 其特征在于, 当所述智能密钥设备收到的中断触 发信号是所述通道触发信号中的蓝牙连接信号时, 所述进入蓝牙连接中断还包括: 所述智 能密钥设备与上位机进行配对, 配对成功则继续执行步骤 D和 E, 配对失败则所述智能密 钥设备通过液晶屏显示建立连接失败, 清除按键等待标识, 退出蓝牙连接中断。
6. 根据权利要求 1所述的工作方法,其特征在于, 当保存的所述通道标识为 USB通道 标识时, 还包括关闭蓝牙通道使能; 当保存的所述通道标识为蓝牙通道标识时, 还包括关 闭 USB通道使能。
7. 根据权利要求 1所述的工作方法, 其特征在于,
当所述在执行指令操作前需要进行身份认证的指令是设置算法和签名信息指令时, 所 述根据所述指令执行相应指令操作并向上位机返回相应指令响应包括: 设置签名算法、 哈 希算法以及从密钥文件中获取用户私钥并存储到内存中, 根据当前保存的通道标识向上位 机返回设置算法和签名信息指令响应;
当所述在执行指令操作前需要进行身份认证的指令是报文数据哈希指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 对指令中的报文数据进行 解析得到关键数据并保存至显示緩存区, 对指令中的报文数据进行哈希运算得到哈希结果 并保存, 根据当前保存的通道标识向上位机返回报文数据哈希指令响应;
当所述在执行指令操作前需要进行身份认证的指令是计算签名指令时, 所述根据所述 指令执行相应指令操作并向上位机返回相应指令响应包括: 将显示緩存区的关键数据在液 晶屏上显示, 置位按键等待标识, 并根据当前保存的通道标识向上位机返回计算签名指令 响应;
当所述在执行指令操作前需要进行身份认证的指令是获取按键信息指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 执行获取按键信息操作 , 保存获取到的按键信息, 根据当前保存的通道标识向上位机返回获取按键信息指令响应; 当所述在执行指令操作前需要进行身份认证的指令是获取签名结果指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 执行获取签名结果操作 , 保存签名结果, 根据当前保存的通道标识向上位机返回获取签名结果指令响应。
8. 根据权利要求 1所述的工作方法, 其特征在于, 当所述在执行指令操作前需要进行 身份认证的指令是切换通道指令时, 所述根据所述指令执行相应指令操作包括: 比较所述 切换通道指令中指定的通道标识与当前保存的通道标识, 如果两者相同, 则根据当前保存 的通道标识向上位机返回通道切换成功响应; 如果两者不相同, 则将当前保存的通道标识 更改为所述指定的通道标识, 当所述指定的通道标识为 USB通道标识时, 关闭蓝牙通道使 能, 打开 USB通道使能, 当所述指定的通道标识为蓝牙通道标识时, 关闭 USB通道使能, 打开蓝牙通道使能。
9. 根据权利要求 1所述的工作方法, 其特征在于, 所述按键处理具体为:
步骤 D-1 : 判断按键等待标识是否置位, 是则执行步骤 D-2, 否则退出按键中断; 步骤 D-2:判断按键类型,若为上 /下翻键则执行步骤 D-3 ,若为确认键则执行步骤 D-4, 若为取消键则执行步骤 D-5;
步骤 D-3: 通过液晶屏上 /下翻页显示关键信息, 当所述关键信息全部输出并显示时, 将报文显示完成标志设为有效, 然后退出按键中断;
步骤 D-4: 判断报文显示完成标志是否有效, 是则使用用户私钥对保存的哈希结果进 行签名, 否则通过液晶屏显示操作失败; 签名成功则通过液晶屏显示操作成功, 保存签名 结果, 签名失败则显示操作失败, 然后执行步骤 D-6;
步骤 D-5: 通过液晶屏显示操作取消, 然后执行步骤 D-6;
步骤 D-6: 清除按键等待标识; 退出 4 t中断。
10. 根据权利要求 1 所述的工作方法, 其特征在于, 所述智能密钥设备接收所述中断 触发信号之前还包括: 所述智能密钥设备通过液晶屏提示用户进行通道选择, 所述智能密 钥设备接收到用户的选择通道信息后设置并保存通道标识。
11. 一种智能密钥设备的工作方法, 其特征在于, 所述方法包括:
步骤 S 1: 智能密钥设备上电初始化;
步骤 S2:所述智能密钥设备读取蓝牙模块参数,判断是否能够成功读取蓝牙模块参数, 是则将蓝牙模块切换至连接状态后执行步骤 S3 , 否则直接执行步骤 S3;
步骤 S3 : 所述智能密钥设备判断工作电压是否低于预设值, 是则提示低电压状态, 第 一预设时间后所述智能密钥设备关机; 否则执行步骤 S4;
步骤 S4: 所述智能密钥设备判断是否存在中断标识, 是则执行步骤 S5 , 否则继续执行 步骤 S3 ;
所述步骤 S4之前包括: 打开中断;
当所述智能密钥设备收到插 /拔 USB触发信号时,进入插 /拔 USB中断,保存插 /拔 USB 中断标识, 退出插 /拔 USB中断;
当所述智能密钥设备收到蓝牙连接 /蓝牙断开信号时, 进入蓝牙连接 /蓝牙断开中断,保 存蓝牙连接 /蓝牙断开中断标识, 退出蓝牙连接 /蓝牙断开中断;
当所述智能密钥设备收到指令触发信号时, 进入指令中断, 保存指令中断标识, 保存 当前通道标识, 退出指令中断; 所述指令触发信号包括 USB通信信号和蓝牙通信信号; 当所述智能密钥设备收到按键触发信号时, 进入按键中断, 保存按键中断标识, 退出 按键中断;
步骤 S5: 所述智能密钥设备判断中断标识类型;
当所述中断标识为插 /拔 USB中断标识时,则执行 USB通道的相应操作后返回步骤 S3; 当所述中断标识为蓝牙连接 /蓝牙断开中断标识时, 则执行蓝牙通道的相应操作后返回 步骤 S3;
当所述中断标识为指令中断标识时, 判断指令类型, 若收到的指令是执行相应指令操 作前需要进行身份认证的指令, 则进行身份认证 , 如通过认证则根据所述指令执行相应指 令操作并向上位机返回相应指令响应后返回步骤 S3 , 如未通过认证则向上位机返回错误指 令响应后返回步骤 S3; 若收到的指令是执行相应指令操作前不需要进行身份认证的指令, 则根据所述指令执行相应指令操作并向上位机返回相应指令响应后返回步骤 S3; 所述根据 所述指令执行相应指令操作包括: 对所述指令中报文数据进行解析得到关键数据, 对所述 指令中报文数据进行哈希运算得到哈希结果并保存, 将所述关键数据在液晶屏上显示; 当所述中断标识为按键中断标识时, 则执行按键处理后返回步骤 S3; 所述执行按键处 理包括: 判断按键类型, 若按键类型为确认键则对保存的所述哈希结果进行签名得到签名 结果并保存, 若按键类型为取消键则取消签名。
12. 根据权利要求 11所述的工作方法, 其特征在于, 当所述中断标识为插 /拔 USB中 断标识时执行 USB通道的相应操作具体包括, 若为拔 USB中断标识, 则执行步骤 A; 步骤 A: 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身份 标识;
若为插 USB中断标识, 则执行步骤 B和 C;
步骤 B: 所述智能密钥设备判断是否通过蓝牙接口与上位机通信, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除插 USB中断标识, 清除身份标识, 执行步骤 C; 否则打 开 USB通道使能, 清除插 USB中断标识, 执行步骤 C; 步骤 c: 清除按键等待标识, 液晶屏显示初始化;
当所述中断标识为蓝牙连接 /蓝牙断开中断标识时执行蓝牙通道的相应操作具体包括, 若为蓝牙连接中断标识, 则执行步骤 D和 E;
步骤 D: 判断所述智能密钥设备是否通过 USB接口与上位机通信, 是则清除蓝牙连接 中断标识, 执行步骤 E, 否则打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身份标识, 执行步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化;
若为蓝牙断开中断标识, 则执行步骤 F;
步骤 F: 关闭蓝牙通道使能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身份 标识;
当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执行相应指 令操作并向上位机返回相应指令响应包括: 当所述指令是身份验证指令时, 先清身份标识, 然后从所述身份验证指令中解析出验证信息, 根据所述验证信息判断用户身份是否合法, 是则保存身份标识, 根据当前保存的通道标识向上位机返回身份验证成功响应, 否则根据 当前保存的通道标识向上位机返回身份验证失败响应;
所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则向上位机返回相应指令响应;
所述若为按键中断标识时还包括, 判断按键等待标识是否置位, 是则执行按键处理后 返回步骤 S3 , 否则直接返回步骤 S3。
13. 根据权利要求 11所述的工作方法, 其特征在于, 当所述中断标识为插 /拔 USB中 断标识时执行 USB通道的相应操作具体包括, 若为拔 USB中断标识, 则执行步骤 A; 步骤 A: 关闭 USB通道使能, 打开蓝牙通道使能, 清除拔 USB中断标识, 清除身份 标识;
若为插 USB中断标识, 则执行步骤 B和 C;
步骤 B: 判断所述智能密钥设备是否通过蓝牙接口与上位机通信, 是则清除插 USB中 断标识, 执行步骤 C, 否则打开 USB通道使能, 清除插 USB中断标识, 清除身份标识, 执行步骤 C;
步骤 C: 清除按键等待标识, 液晶屏显示初始化;
当所述中断标识为蓝牙连接 /蓝牙断开中断标识时执行蓝牙通道的相应操作具体包括, 若为蓝牙连接中断标识, 则执行步骤 D和 E;
步骤 D: 判断所述智能密钥设备是否通过 USB接口与上位机通信, 是则关闭 USB通 道使能, 打开蓝牙通道使能, 清除蓝牙连接中断标识, 清除身份标识, 执行步骤 E, 否则 打开蓝牙通道使能, 清除蓝牙连接中断标识, 执行步骤 E;
步骤 E: 清除按键等待标识, 液晶屏显示初始化;
若为蓝牙断开中断标识, 则执行步骤 F;
步骤 F: 判断所述智能密钥设备是否通过 USB接口与上位机连接, 是则关闭蓝牙通道 使能, 打开 USB通道使能, 清除蓝牙断开中断标识, 清除身份标识, 否则清除蓝牙断开中 断标识, 清除身份标识;
当所述不需要进行身份认证的指令是身份验证指令时, 所述根据所述指令执行相应指 令操作并向上位机返回相应指令响应包括: 当所述指令是身份验证指令时, 先清身份标识, 然后从所述身份验证指令中解析出验证信息, 根据所述验证信息判断用户身份是否合法, 是则保存身份标识, 根据当前保存的通道标识向上位机返回身份验证成功响应, 否则根据 当前保存的通道标识向上位机返回身份验证失败响应;
所述根据所述指令执行相应指令操作之后还包括: 判断是否需要等待按键操作, 是则 置位按键等待标识后向上位机返回相应指令响应, 否则直接向上位机返回相应指令响应; 所述若为按键中断标识时还包括, 判断按键等待标识是否置位, 是则执行按键处理后 返回步骤 S3 , 否则直接返回步骤 S3。
14. 根据权利要求 11所述的工作方法,其特征在于, 当保存的所述通道标识为 USB通 道标识时, 还包括关闭蓝牙通道使能; 当保存的所述通道标识为蓝牙通道标识时, 还包括 关闭 USB通道使能。
15. 根据权利要求 13所述的工作方法, 其特征在于, 当所述中断标识为蓝牙连接中断 标识时还包括: 所述智能密钥设备与上位机进行配对, 配对成功则继续执行步骤 D和 E, 配对失败则所述智能密钥设备通过液晶屏显示建立连接失败, 清除按键等待标识。
16. 根据权利要求 11所述的工作方法, 其特征在于,
当所述在执行指令操作前需要进行身份认证的指令是设置算法和签名信息指令时, 所 述根据所述指令执行相应指令操作并向上位机返回相应指令响应包括: 设置签名算法、 哈 希算法以及从密钥文件中获取用户私钥并存储到内存中, 根据当前保存的通道标识向上位 机返回设置算法和签名信息指令响应;
当所述在执行指令操作前需要进行身份认证的指令是报文数据哈希指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 对指令中的报文数据进行 解析得到关键数据并保存至显示緩存区, 对指令中的报文数据进行哈希运算得到哈希结果 并保存, 根据当前保存的通道标识向上位机返回报文数据哈希指令响应;
当所述在执行指令操作前需要进行身份认证的指令是计算签名指令时, 所述根据所述 指令执行相应指令操作并向上位机返回相应指令响应包括: 将显示緩存区的关键数据在液 晶屏上显示, 置位按键等待标识, 根据当前保存的通道标识向上位机返回计算签名指令响 应;
当所述在执行指令操作前需要进行身份认证的指令是获取按键信息指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 执行获取按键信息操作 , 保存获取到的按键信息, 根据当前保存的通道标识向上位机返回获取按键信息指令响应; 当所述在执行指令操作前需要进行身份认证的指令是获取签名结果指令时, 所述根据 所述指令执行相应指令操作并向上位机返回相应指令响应包括: 执行获取签名结果操作 , 保存签名结果, 根据当前保存的通道标识向上位机返回获取签名结果指令响应。
17. 根据权利要求 11所述的工作方法, 其特征在于, 当所述在执行指令操作前需要进 行身份认证的指令是切换通道指令时, 所述根据所述指令执行相应指令操作包括: 比较所 述切换通道指令中指定的通道标识与当前保存的通道标识, 如果两者相同, 则根据当前保 存的通道标识向上位机返回通道切换成功响应; 如果两者不相同, 则将当前保存的通道标 识更改为所述指定的通道标识, 当所述指定的通道标识为 USB通道标识时, 关闭蓝牙通道 使能, 打开 USB通道使能, 当所述指定的通道标识为蓝牙通道标时, 关闭 USB通道使能, 打开蓝牙通道使能。
18. 根据权利要求 11所述的工作方法, 其特征在于, 所述按键处理具体为: 步骤 D- 1: 判断按键等待标识是否置位, 是则执行步骤 D-2 , 否则直接返回步骤 S3; 步骤 D-2:判断按键类型,若为上 /下翻键则执行步骤 D-3 ,若为确认键则执行步骤 D-4, 若为取消键则执行步骤 D-5;
步骤 D-3: 通过液晶屏上 /下翻页显示关键信息, 当所述关键信息全部输出并显示时, 将报文显示完成标志设为有效;
步骤 D-4: 判断报文显示完成标志是否有效, 是则使用用户私钥对保存的哈希结果进 行签名, 否则通过液晶屏显示操作失败; 签名成功则通过液晶屏显示操作成功, 保存签名 结果, 签名失败则通过液晶屏显示操作失败, 然后执行步骤 D-6;
步骤 D-5: 通过液晶屏显示操作取消, 然后执行步骤 D-6;
步骤 D-6: 清除按键等待标识。
19. 根据权利要求 11所述的工作方法, 其特征在于, 所述打开中断后还包括: 当所述 智能密钥设备收到定时器触发信号时, 进入定时器中断, 保存定时器中断标识, 退出定时 器中断;
相应的所述步骤 S5中判断中断标识类型还包括: 若为定时器中断标识, 将定时器计时 清零, 清除定时器中断标识。
20. 根据权利要求 11所述的工作方法, 其特征在于, 所述打开中断之后还包括: 所述 智能密钥设备通过液晶屏提示用户进行通道选择, 所述智能密钥设备接收到用户的选择通 道信息后设置并保存通道标识。
PCT/CN2014/075371 2013-04-27 2014-04-15 一种智能密钥设备的工作方法 WO2014173244A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/888,958 US9817961B2 (en) 2013-04-27 2014-04-15 Working method of smart key device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310151543.9A CN103246839B (zh) 2013-04-27 2013-04-27 一种智能密钥设备的工作方法
CN201310151543.9 2013-04-27

Publications (1)

Publication Number Publication Date
WO2014173244A1 true WO2014173244A1 (zh) 2014-10-30

Family

ID=48926353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/075371 WO2014173244A1 (zh) 2013-04-27 2014-04-15 一种智能密钥设备的工作方法

Country Status (3)

Country Link
US (1) US9817961B2 (zh)
CN (1) CN103246839B (zh)
WO (1) WO2014173244A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141756A (zh) * 2015-07-29 2015-12-09 飞天诚信科技股份有限公司 一种处理异常的方法和装置

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246839B (zh) * 2013-04-27 2015-10-28 飞天诚信科技股份有限公司 一种智能密钥设备的工作方法
CN105099709B (zh) * 2015-08-28 2018-03-30 北京坚石诚信科技有限公司 一种智能密钥设备及其工作方法和工作装置
CN107545426A (zh) * 2016-06-27 2018-01-05 李明 确定支付装置的方法和系统以及交易方法和系统
CN108269091B (zh) * 2018-01-25 2022-03-29 北京明华联盟科技有限公司 待机处理方法、装置、系统及计算机可读存储介质
CN111835689B (zh) * 2019-04-22 2021-06-15 华为技术有限公司 数字钥匙的身份认证方法、终端设备及介质
CN111064743B (zh) * 2019-12-28 2021-09-28 飞天诚信科技股份有限公司 一种安全输入密码的方法及系统
CN112737739B (zh) * 2020-12-25 2022-08-23 艾体威尔电子技术(北京)有限公司 一种两设备间多包通讯的方法
CN113573273B (zh) * 2021-08-02 2023-09-15 重庆优米工业自动化设备有限公司 一种基于蓝牙传输的无线智能采集同步方法及系统
CN114278191A (zh) * 2021-11-08 2022-04-05 浙江零跑科技股份有限公司 一种后尾门智能开启方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137394A (zh) * 2011-03-10 2011-07-27 中国科学院上海微系统与信息技术研究所 网络接入下加密移动通信终端系统及方法
CN102983892A (zh) * 2012-11-19 2013-03-20 深圳市文鼎创数据科技有限公司 蓝牙配对方法及系统
CN103052062A (zh) * 2012-12-06 2013-04-17 深圳市文鼎创数据科技有限公司 用于移动终端与智能密钥设备通讯的转接装置及通讯方法
CN103207964A (zh) * 2013-03-15 2013-07-17 飞天诚信科技股份有限公司 一种多功能智能密钥设备及其工作方法
CN103246839A (zh) * 2013-04-27 2013-08-14 飞天诚信科技股份有限公司 一种智能密钥设备的工作方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680973B2 (en) * 2007-06-08 2010-03-16 Igt Sideband signal for USB with interrupt capability
FR2961328B1 (fr) * 2010-06-15 2012-07-20 Oberthur Technologies Dispositif et procede de securisation de l'acces a une fonction
KR101621266B1 (ko) * 2010-09-10 2016-05-16 삼성전자주식회사 단일 블루투스 채널을 이용한 블루투스 기기간 연결 방법 및 상기 방법을 이용하는 블루투스 기기
FR2969335B1 (fr) 2010-12-17 2013-07-05 Oberthur Technologies Module materiel de securite et procede de traitement dans un tel module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137394A (zh) * 2011-03-10 2011-07-27 中国科学院上海微系统与信息技术研究所 网络接入下加密移动通信终端系统及方法
CN102983892A (zh) * 2012-11-19 2013-03-20 深圳市文鼎创数据科技有限公司 蓝牙配对方法及系统
CN103052062A (zh) * 2012-12-06 2013-04-17 深圳市文鼎创数据科技有限公司 用于移动终端与智能密钥设备通讯的转接装置及通讯方法
CN103207964A (zh) * 2013-03-15 2013-07-17 飞天诚信科技股份有限公司 一种多功能智能密钥设备及其工作方法
CN103246839A (zh) * 2013-04-27 2013-08-14 飞天诚信科技股份有限公司 一种智能密钥设备的工作方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141756A (zh) * 2015-07-29 2015-12-09 飞天诚信科技股份有限公司 一种处理异常的方法和装置

Also Published As

Publication number Publication date
US9817961B2 (en) 2017-11-14
US20160117493A1 (en) 2016-04-28
CN103246839A (zh) 2013-08-14
CN103246839B (zh) 2015-10-28

Similar Documents

Publication Publication Date Title
WO2014173244A1 (zh) 一种智能密钥设备的工作方法
US9787393B2 (en) Method for realizing bluetooth-binding between smart key device and mobile device
JP4933519B2 (ja) 生体認証装置を備えるコンピュータ
JP5476363B2 (ja) 生体認証装置を利用したコンピュータの起動方法およびコンピュータ
US9589160B2 (en) Working method for smart card reader
CN103312517B (zh) 一种双用途设备共用显示屏和按键的实现方法
KR20160139010A (ko) 지문 인식에 기반한 단말기 및 이의 대기 상태에서의 로그인 방법, 시스템
US20190392436A1 (en) Fingerprint recognition card and method for operating power source by using fingerprint recognition card
WO2017118339A1 (zh) 一种信息图像显示方法及装置
WO2022012616A1 (zh) 近场通信nfc的信息显示方法、装置及电子设备
US20140347161A1 (en) Authorizing system and method of portable electronic device
JP2007299034A (ja) 情報処理装置および認証制御方法
WO2014005414A1 (zh) 一种非接触式烧写种子的方法及系统
CN115562895B (zh) 一种电子设备的异常恢复方法和设备
WO2014183500A1 (zh) 一种动态令牌的工作方法
WO2016008447A1 (zh) 实现智能密钥设备模式间切换的方法和装置
CN112667067A (zh) 支付方法、装置及电子设备
TWI529559B (zh) Computer system with wake-up authentication and its computer equipment
US20020091946A1 (en) Method and apparatus for activating a computer after user authentication by a password, program, and program storage medium therefor
TWI430133B (zh) 生物感測啟動裝置、生物特徵感測控制之啟動管理系統及其方法
CN202713139U (zh) 一种电源适配器
CN103684785A (zh) 一种具有按键保护功能的动态令牌及其工作方法
CN104079411A (zh) 一种复合型密码装置及该装置共用显示屏和按键的方法
JP4567166B2 (ja) 情報処理装置
WO2023142748A1 (zh) 设备解锁方法、装置、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14788858

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 14888958

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 14788858

Country of ref document: EP

Kind code of ref document: A1