Abstract:
The present invention provides an encryption method in which the encryption device stores data to be encrypted received via the input/output interface in its own memory, converts the data to be encrypted in the memory into a format required by the output device and transmits the converted data to the output device via the management interface, and the output device outputs the received information. The present invention also provides an encryption device for implementing the above method. The encryption device determines whether confirmation information has been received from a management interface, encrypts the data to be encrypted in the memory if the answer is positive, while performs no encryption or prompts to input correct confirmation information if the answer is negative. With the present invention, the user is allowed to view the contents to be actually encrypted, thereby avoiding such a case as signature counterfeiting or tampering.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of Invention 
         [0002]    The present invention relates to the field of information security technology, in particular to a method for implementing encryption and a device thereof. 
         [0003]    2. Description of Prior Art 
         [0004]    The network has prevailed in the modern society. The popularization of network and e-commerce has given rise to the diversification of electronic encryption devices and systems, and various encryption methods are available currently, such as the electronic signature associated with the circulation of electronic documents, the professional certificate associated with network payment. 
         [0005]    To facilitate the following description, several terms are first explained. 
         [0006]    “Platform”: it means any product comprises a device containing data processing capability, the device containing data processing capability can be one or more packaged or unpackaged integrated circuits. Instances of all kinds of platforms include, but not limited to: a computer, such as Personal Digital Assistant (PDA), Notebook computer, desktop computer, workstation and server; any peripheral devices associated with the computer, such as printer, digital camera and digital video camera; a wireless communication device, such as mobile phone, intelligent mobile phone; a network terminal, such as ATM, POS machine, KIOSK information query terminal; and a TV set-top box, etc. 
         [0007]    “Link”: it is defined broadly as a channel for logic or physical communication, such as electrical wire, optical fiber, cable, bus (e.g., USB interface, 1394 interface, RS232 serial communication port, parallel printer port, internal LPC), PS2 interface, hard disk interface (ATAPI, SATA\SCSI), infrared/Bluetooth/Zigbee/WLAN, radio frequency (RF) or any other wireless channel of wireless signaling mechanism. 
         [0008]    “Public network environment”: it refers generally to a situation where there exists an untrusty “link” with another platform and comprises, but not limited to, a local area network such as intra-corporation Ethernet and network in a net club, Internet such as logon by computer dialing at home and logon by ADSL/LAN/Cable, a mobile phone network such as GPRS/CDMA/3G, and a moment when Bluetooth/WLAN means is started on a platform. 
         [0009]    On a “platform” in the “Public network environment”, the predominant technique for an electron signature device used thereon focuses mainly on a smart card having CPU. In general, the CPU-based smart card can support perfectly the technology of Public Key Infrastructure (PKI), and its security has been widely recognized and affirmed. Further, a security chip (TPM) in the computer also has a function similar to the smart card. Here, all devices having a chip based on CPU smart card or TPM are generically called encryption device. 
         [0010]    The existing encryption devices often have two types of structures as shown in  FIGS. 1 and 2 . 
         [0011]      FIG. 1  shows a schematic block diagram of a well-known encryption device in prior art, which comprises at least an input/output interface  101  and an execution unit  102 . The input/output interface  101  is an interface between the encryption device and a platform and used to receive data to be encrypted from the platform and transmit the data to the execution unit  102 , or it receives the encrypted data from the execution unit  102  and transmits the data to the platform. The execution unit  102  encrypts the received data. Generally, the execution unit  102  comprises an algorithm engine, a memory, a key-generating unit and a core processing unit having a RAM space. Obviously, the input/output interface  101  can receive Personal Identification Number (PIN) from the platform and send the information to the execution unit  102 . in this case, the execution unit  102  first verifies whether the PIN is legal, and encrypts the received data to be encrypted if it is legal, otherwise it conducts nothing or asks to input the correct PIN. 
         [0012]    For example, the USBKey often used in our daily life and the TPM mentioned in the Chinese Patent Application Publication No. CN1509546A, “Platform and Method for securely transmitting authorized data” are both embodied as the device shown in  FIG. 1 . 
         [0013]    All control operations or steps are fulfilled on the platform when the device shown in  FIG. 1  is used to perform encryption. In the existing public network environment, however, a hacker on the network can remotely monitor or record every action you have conducted on the platform, such as key input, handwriting input, voice input, on-screen display as well as all communication processes between the platform and the encryption device. Furthermore, the hacker may manipulate surreptitiously your platform from a remote side. Since the control on signature action, i.e., encryption action, is completed on the platform, there is a high risk that the user&#39;s signature is counterfeited or tampered during the process of connecting the encryption device to the platform, that is, inserting the encryption device into the platform. 
         [0014]      FIG. 2  shows a schematic block diagram of another existing encryption device in the prior art. The existing encryption device comprises at least an input/output interface  101 , an execution unit  102  and a management interface  201 . The input/output interface  101  and an execution unit  102  have the exact same functions as those of the device in  FIG. 1 . The management interface  201  is primarily responsible for encryption control, in particular, it controls such that the encryption can be performed only when the execution unit  102  has received encryption control information from the management interface  201  and checked that the encryption control information is correct, otherwise the execution unit  102  does not conduct encryption. Here, the encryption control information can be fingerprint, level signal, password or the like. For example, in the Chinese Patent Application Publication No. CN0609069Y, “Fingerprint Digital Signature Device”, an encryption device integrating a fingerprint sensor, a fingerprint identification device, an encryption device and a key generator together is proposed as an embodiment of the device shown in  FIG. 2 . 
         [0015]    Although the encryption control information needs to be inputted to enhance the security in control operations when the device of  FIG. 2  is applied to encryption, the case of counterfeiting or tampering the user&#39;s signature may occur due to the untrusty platform in the public network environment. 
         [0016]    No matter which encryption device as described above is used, what the user views on the display of the platform is normally just inputted information other than the actual contents to be encrypted. In other word, although the data to be encrypted can be viewed on the platform, such data are just the data inputted via a device like a keyboard, and they may not be the same as those saved in the memory of the encryption device. This is because, before the actual encryption, the hacker may intercept the data for encryption inputted via the platform, abandon the data, replace the data with illegal data and store them in the memory of the encryption device. That is, the actual contents to be encrypted are lost. Therefore, the existing devices and methods cannot guarantee the definite security and reliability of the data to be encrypted and avoid the occurrence of such a case as signature counterfeiting or tampering. 
       SUMMARY OF THE INVENTION 
       [0017]    In view of the above problems, the object of the present invention is to provide an encryption method which enables a user to view contents to be actually encrypted in addition to inputted information so as to ensure the security of the data to be encrypted and avoid the occurrence of signature counterfeiting or tampering. A further object of the present invention is to provide an encryption device for implementing the above encryption method. 
         [0018]    In order to achieve the above object, according to one aspect of the present invention, an encryption method is provided applicable to an encryption device comprising an input/output interface, a management interface and an output device, the method comprises the following steps of: 
         [0000]    a. storing, by the encryption device, data to be encrypted received via the input/output interface in a memory of the encryption device, converting the data to be encrypted in the memory into a format required by the output device, transmitting the converted data to the output device via the management interface and outputting the received information by the output device;
 
b. determining, by the encryption device, whether confirmation information has been received from the management interface, encrypting the data to be encrypted in the memory if the answer is positive, while performing no encryption or prompting to input correct confirmation information if the answer is negative.
 
         [0019]    Preferably, said output device outputs in the form of text, sound and/or image. 
         [0020]    Preferably, said step of converting by the encryption device the data to be encrypted in the memory into a format required by the output device comprises converting part or all of the entire data to be encryption into a format required by the output device. 
         [0021]    Preferably, the method further comprises the step of receiving, by said encryption device, a Personal Identification Number (PIN) from the input/output interface, determining whether the PIN is consistent with the pre-stored PIN, executing the step a if they are consistent with each other, otherwise performing no encryption or prompting to input correct PIN. 
         [0022]    Preferably, said confirmation information is a level signal, and said step of determining whether the confirmation information is legal comprises determining whether the received level signal is a preset high level or a low level. 
         [0023]    Preferably, said confirmation information is a character string, and said step of determining whether the confirmation information is legal comprises determining whether the received character string is identical to the pre-stored character string or not. 
         [0024]    Preferably, whether said confirmation information is legal is indicated by the status of a flag bit preset for representing whether said confirmation information is legal, and whether said encryption is completed is indicated by the status of a flag bit for representing whether said encryption is completed. 
         [0025]    According to another aspect of the present invention, there is provided an encryption device comprising: 
         [0000]    an input/output interface which receives data to be encrypted from a platform and transmits the data to an execution unit, or which receives the encrypted data from the execution unit and transmits the data to the platform;
 
an execution unit which receives and stores the data to be encrypted from the input/output interface, or which converts the stored data to be encrypted into a format required by an output device and transmits the converted data to the output device via a management interface, or which receives confirmation information from the management interface and encrypts the stored data to be encrypted after verifying the legality of the confirmation information;
 
a management interface which receives confirmation information from the outside and transmits the received confirmation information to the execution unit; and
 
an output device which receives the data to be encrypted from the execution unit via the management interface and outputs the data.
 
         [0026]    Preferably, said output device is a display, a printer or a speaker or any combination of them. 
         [0027]    Preferably, said display and/or speaker and/or printer contain a RAM unit. 
         [0028]    Preferably, said input/output interface comprises, but not limited to, serial port, parallel port, 1394 interface, USB interface, SIM card interface, iso14443 interface, iso7816 interface, infrared interface, Bluetooth interface, Zigbee interface, WLAN interface, radio frequency (RF) interface or wireless channel interface of a wireless signaling mechanism. 
         [0029]    Preferably, said management unit comprises, but not limited to, serial port, parallel port, universal input/output signal interface or wireless interface. 
         [0030]    According to the encryption method of the present invention, the encryption device stores data to be encrypted received via the input/output interface in its own memory, converts the data to be encrypted in the memory into a format required by the output device and transmits the converted data to the output device via the management interface, and the output device outputs the received information; the encryption device determines whether confirmation information has been received from the management interface, encrypts the data to be encrypted in the memory if the answer is positive, while performs no encryption or prompts to input correct confirmation information if the answer is negative. With the encryption method of the present invention, the user is allowed to view the contents to be actually encrypted, thereby avoiding such a case as signature counterfeiting or tampering. Further, the present invention provides an encryption device for implementing the above method. The present invention has a wide application to online transaction systems associated with bank and stock, e-payment password systems, documental electronic signature or mail signature systems, and it is secure and trustworthy to both of the holder of the encryption device and the reception part of the encrypted information. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0031]      FIG. 1  shows a schematic block diagram of a well-known encryption device in prior art; 
           [0032]      FIG. 2  shows a schematic block diagram of another well-known encryption device in prior art; 
           [0033]      FIG. 3  shows a schematic block diagram of an encryption device according to an embodiment of the present invention; and 
           [0034]      FIG. 4  shows a schematic flowchart for implementing an encryption method according to the embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       [0035]    Now, the present invention will be further elaborated in connection with the figures and the specific embodiment. 
         [0036]      FIG. 3  shows a schematic block diagram of an encryption device of a embodiment of the present invention. The encryption device of the embodiment comprises in addition to an input/output interface  101 , an execution unit  102 , a management interface  201  and an output device  301 . The input/output interface  101  is configured to receive data to be encrypted from a platform and transmit the data to the execution unit  102 , or it receives the encrypted data from the execution unit  102  and transmits the data to the platform. 
         [0037]    The execution unit  102  is configured to receive and store the data to be encrypted from the input/output interface  101 , or to convert the stored data to be encrypted into a format required by the output device  301  and transmit the converted data to the output device  301  via the management interface  201 . Further, the execution unit  102  also receives the confirmation information from the management interface  201  and encrypts the stored data to be encrypted after verifying the confirmation information is legal. The encryption algorithm can be a public cipher algorithm such as RSA, an elliptical curve algorithm, a symmetrical cipher algorithm such as DES or AES, or a hash algorithm such as SHA 1 , HMAC. 
         [0038]    The management interface  201  may receive the confirmation information from external devices and transmit the received confirmation information to the execution unit  102 . 
         [0039]    The output device  301  may receive the data to be encrypted from the execution unit  102  and output the data. 
         [0040]    Naturally, the input/output interface  101  can receive a PIN from the platform and send it to the execution unit  102 . The execution unit  102  first checks whether the PIN is legal or not, and then encrypts the received data if it is legal, otherwise performs nothing or prompts to input the correct PIN. 
         [0041]    The input/output interface  101  may comprise, but not limited to, serial port, parallel port, 1394 interface, USB interface, SIM card interface, iso14443 interface, iso7816 interface, infrared interface, Bluetooth interface, Zigbee interface, WLAN interface, radio frequency (RF) interface or wireless channel interface of a wireless signaling mechanism. The management unit  201  may comprise, but not limited to, serial port, parallel port, universal input/output signal interface or wireless interface. 
         [0042]    The output device  301  may be a display, a printer or a speaker or any combination of them, and the display and/or speaker and/or printer can contain a RAM unit or not. 
         [0043]    Next, the encryption method of the present inventive will be explained in detail with reference to  FIG. 4 . 
         [0044]      FIG. 4  shows a schematic flowchart for implementing the encryption method according to the embodiment of the present invention. 
         [0045]    At step  401 , the encryption device receives the data to be encrypted from the platform via the input/output interface and stores the data in its own memory. Here, the data to be encrypted is generally plain text. 
         [0046]    At step  402 , the encryption device converts the data to be encrypted stored in the memory into a format required by the output device and then transmits the converted data to the output device, which in turn output the received information. Here, the output device may output in the form of text, sound and/or image. 
         [0047]    The procedure of the encryption device converting the data to be encrypted stored in the memory into a format required by the output device may convert the entire data to be encrypted into the format required by the output device. In this way, the output device displays the entire data to be encrypted. Alternatively, only a part of the entire data to be encrypted may be converted into the format required by the output device. In this case, the output device displays the part of the data to be encrypted. Which output approach is employed may depend on the presetting by the user, and which part of the data to be encrypted is outputted is determined by the preset requirement of outputting format. 
         [0048]    At step  403 , the encryption device receives confirmation information from the management interface, determines whether the confirmation information is legal or not. If the confirmation information is legal, the flow will proceed to step  404 . If the confirmation information is not legal, the flow will proceed to step  405 . 
         [0049]    The legality of the confirmation information can be determined by setting a level signal. For example, assuming that a high level is set to represent the confirmation information is legal. Then, in determining the legality of the confirmation information, it is checked whether the received level signal is the preset high level, and the confirmation information is legal if the answer is YES, otherwise it is illegal. Obviously, a low level signal can also be set to represent that the confirmation information is legal, and the determination process is essentially the same as described above. In this case, the confirmation information is legal when the received level signal is the preset low level. 
         [0050]    As an example, in any practical application, a button can be preset, and the level generated upon the pressed status of the button can be set as the confirmation information. In this way, step  404  can be executed only when the button is pressed. The encryption device can learn whether the button is pressed by determining whether the received level is the preset level or not. Obviously, some processing against jitter needs to be added in practice to solve the problem that the encryption would be repeated every time the button is pressed. 
         [0051]    If the confirmation information is a character string, determining the legality of the confirmation information will comprises checking whether the received character string is identical to the character string pre-stored in the memory, and confirming its legality if they are identical, otherwise determining the confirmation information is illegal. It can be readily appreciated that the character string can be modified. 
         [0052]    For example, in reality, a password input device can be preset, and a password can be preset in the memory of the encryption device as the confirmation information. In this way, step  404  can be executed only when the user has inputted the correct password, and the encryption device can learn the correctness of the password inputted by the user by checking whether the received password coincides with that pre-stored in the memory. Obviously, some processing against jitter needs to be added in practice to solve the problem that the encryption would be repeated every time the matching is performed. 
         [0053]    At step  404 , the flag bit, which is preset for representing whether the confirmation information is legal, is set in a status of encryption permission, and the flow proceeds to step  406 . In the present embodiment, the flag bit for representing whether the confirmation information is legal is implemented by a register, and the status of the register is set as a status of encryption permission. Hereinafter, the register is called encryption permission register for clear description. 
         [0054]    At step  405 , the status of the preset encryption permission register is set as a status of encryption prohibition, and then the flow proceeds to step  406 . 
         [0055]    At step  406 , the encryption device checks whether the status of the encryption permission register is in the status of encryption permission, and the flow goes to step  407  if it is, while the flow turns to step  409  if it is in the status of encryption prohibition. 
         [0056]    At step  407 , the status of the encryption permission register is cleared, that is, being set in the status of encryption prohibition. Then, the encryption device encrypts the stored data to be encrypted. 
         [0057]    Here, the encryption algorithm can be a public cipher algorithm such as RSA, an elliptical curve algorithm, a symmetrical cipher algorithm such as DES or AES, or a hash algorithm such as SHA 1 , HMAC. 
         [0058]    At step  408 , after completing the above encryption, the flag bit, which is preset for representing whether the encryption process is completed, is set in a status of encryption completed, and then the encrypted data is transmitted to the platform. So far the flow is ended. 
         [0059]    In the present embodiment, the flag bit for representing whether the encryption process is completed is implemented with a further register. That is, the status of this register is set as the status of encryption completed. Hereinafter, the register is called encryption status register for clear description. 
         [0060]    At step  409 , the preset encryption status register is set in a status of encryption waiting. Thereafter, the device enters the standby status or prompts to input the correct confirmation information. 
         [0061]    In other words, when the execution unit in the encryption device detects the status of the encryption permission register is the status of encryption permission, it sets the encryption permission register in the status of encryption prohibition, encrypts the data, and sets the encryption status register in the status of encryption completed after the completion of encryption. On the other hand, the execution unit in the encryption device sets the encryption status register in the status of encryption waiting when it detects that the status of the encryption permission register is the status of encryption prohibition. 
         [0062]    Naturally, no flag bit needs to be set in the above flow, and the execution unit in the encryption device can encrypt the received data to be encrypted as long as it detects that the confirmation information is legal, and conduct no action or prompt to input the correct confirmation information when the confirmation information is detected as illegal. Accordingly, no register needs to be set when the encryption process is completed. 
         [0063]    Moreover, a PIN can be set in the memory of the encryption device in advance, and the encryption device first receives the PIN from the input/output interface, then checks the consistence between the received PIN and the pre-stored PIN. Step  401  is executed if the consistence holds. Otherwise, the encryption device has no action or prompt to input the correct PIN. 
         [0064]    The foregoing description gives only the preferred embodiment of the present invention. It should be understood that, to those ordinarily skilled in the art, various improvements and modifications can be made within the principle of the present invention and should be encompassed by the scope of the present invention.