Portable electronic device and its secret information collation method

Abstract: There is provided a secret information collation method used between electronic apparatuses including a portable electronic device (2) and an information processing device (1), the portable electronic device including an arithmetic processing section (9) and a memory section (11) for storing therein a processing program to be executed by said arithmetic processing section and first secret infor­ mation, the portable electronic device collating second secret information inputted from the outside with the first secret information and performing predetermined operation in response to an operation request from the outside satisfying predetermined secret information relationship, the information processing device transmitting the second secret information to the electronic device and addressing the operation request to the electronic device, the secret information collation method comprising the steps of outputting, from the electronic device to the information processing device, a request for transmission of the second secret information, transmitting the second secret information from the information processing device to the electronic device upon input of the transmission request from the electronic device to the information processing device, collating in the electronic device, the second secret information with the first secret information stored in the memory section (11) of the electronic device upon input of the second secret information, and responding to the operation request addressed from the infomation processing device upon recognition of satisfaction of predetermined secret information relationship. Further, a portable electronic device (2) according to the present invention includes an arithmetic processing section (9) and a memory section (11) for storing therein a processing program to be executed by the arithmetic processing section and first secret information such as a secret identification number. The memory section (11) stores therein a secret information input processing program (11a) for calling upon an external information processing device to transfer second secret information corresponding to the first secret information, and a secret information collation program (11b).

Description: BACKGROUND OF THE INVENTION The present invention relates to a portable electronic device and its secret information collation method, and in particular to a secret information collation scheme for IC card data processing system in which it is hard to perform illegal access from the readout terminal side and security of IC cards can be improved. In a conventional information processing system using IC cards or the like as described in JP-A-52-7646, for example, secret information such as a secret identification number is collated at the IC card side in response to a directive given from the terminal side. Upon coincidence, access to a memory contained in the IC card is permitted and transactions processing can be continued. When the results in the above described collation is noncoincidence, the number of times of noncoincidence is administered. If the number of times of error reaches a predetermined number or more, the illegal IC card is excluded. By doing so, illegal use of an IC card caused by forgery or fraud is prevented. SUMMARY OF THE INVENTION In case of a conventional IC card, however, operation is performed in response to a directive issued from the outside. Under the above described collation of information contained in the IC card and error administration alone, therefore, a person skilled in the operation can cause illegal operation with respect to the IC card and spy out secret information stored in a memory of the IC card. There is also a danger of secret information such as a secret identification number being stolen. An object of the present invention is to solve the above described problems of the prior art and provide a secret information collation method for a portable electronic device such as an IC card which makes it hard to gain illegal access from the terminal side and steal secret information stored inside and which is excellent in preserving secrecy. EP-A-0 030 381 discloses a method in accordance with the prior art portion of claim 1 while WO-A-88 00743 discloses a portable electronic device in accordance with the prior art portion of claim 9. Using the present invention as defined in claims 1 and 9, secret information (such as a secret identification number) which is important in system operation is stored beforehand in the portable electronic device (such as an IC card), and the portable electronic device controls an external device, which is the other party, in accordance with a processing program stored therein so that an operator of the external device may input secret information to the external device and the secret information thus inputted may be transferred from the external device. When the portable electronic device is an IC card and the external device is a terminal device in which the IC card is insertable, for example, the terminal device becomes active and displays an input message such as a secret identification number on its display unit. The terminal device derives secret information such as a secret identification number inputted via a keyboard by an operator in accordance with the input message. The terminal device then transmits the secret information thus derived or secret information, which has been inputted in accordance with a previous message and which is held within the terminal device, to the IC card. Upon receiving secret information, the electronic device such as the IC card compares secret information transmitted from the external device with secret information held in the internal memory. Depending upon whether the result is coincidence or not, the electronic device continues the processing or stops or inhibits the operation. In this way, the portable electronic device addresses a request for collation of secret information, makes the external device, which is the other party, transfer secret information derived by the external device, and performs collation internally, illegal access from the terminal device being made hard. Further, readout of secret information to the outside becomes substantially impossible. As a result, security of a portable electronic device against unfair practices such as forgery and fraud can be improved. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block configuration diagram of a terminal device and an IC card according to a preferred embodiment of the present invention; Fig. 2 is an exterior view of the terminal device shown in Fig. 1; Fig. 3A is an exterior view of the terminal device having a display section and an input section such as a keyboard; Fig. 3B is a configuration diagram of a preferred embodiment using a host computer; Fig. 3C is a detailed configuration diagram of a connection device used in Fig. 3B; Figs. 4A and 4B are flow charts showing the operation of the terminal device and the IC card; and Fig. 5 is a flow chart showing an example of a variant. DESCRIPTION OF THE PREFERRED EMBODIMENTS A preferred embodiment of the present invention will hereafter be described in detail by referring to drawings. With reference to Fig. 1, numeral 1 denotes a handy terminal device (hereafter abbreviated to terminal device) having therein a card interface 7 such as an IC card reader/writer. An IC card 2 is mounted on the above described card interface 7 to send/receive information to/from the card interface 7. This card interface 7 has electrical interface function with respect to the IC card 2 and is coupled to the IC card 2 via a connector or in a noncontact state. The terminal device 1 has an IC card control operation mode in which the terminal device controls its hardware and operates in response to commands given from the IC card 2 (or the terminal device 1 may be a terminal device set in this control operation state). In addition to the above described card interface 7, the terminal device 1 comprises an external interface 6 for communicating with an external host computer or the like, a program memory 4 for storing therein information and a processing program, a keyboard 5 for inputting a secret identification number and the like, a display section 8 having an LCD display for performing guidance display and the like, and a processor 3 for controlling these sections. On the other hand, the IC card 2 comprises a memory 11 for storing therein processing programs and information such as a secret identification number and transactions data, an external interface 10 for external connection, and a processor 9 for controlling these sections. Besides the secret identification number, transactions data and various processing programs, a secret information input processing program 11a, which is used by the IC card 2 to call upon the terminal device 1 to transfer secret information when the IC card 2 is inserted into the terminal device 1, and a secret identification number collation processing program 11b are stored beforehand in the memory 11. The memory 11 comprises a RAM and an EEPROM. In particular, the above described programs may be beforehand in the EEPROM in the down load form. It doesn't matter what kinds of memories programs are stored in. Fig. 2 is an example of an exterior view of the terminal device 1 and the IC card 2. When the IC card 2 is inserted into the terminal device 1, the IC card 2 is connected to the processor 3 via a bus by the IC card interface 7. Power is supplied from the terminal device 1 to the IC card 2 to activate the IC card 2. In the initial state caused by insertion of the IC card 2, the terminal device 1 is set at such an operation mode that the terminal device 1 is controlled by the IC card. Upon receiving power from the terminal device 1, the IC card 2 first starts the secret information input processing program 11a at predetermined timing. Processing of the secret information input processing program 11a is control processing of the IC card 2 upon the terminal device 1 whereby the IC card 2 controls the terminal device 1. In this processing, the terminal device 1 first executes input processing of a secret identification number and a series of operation is performed under the control of the IC card 2 as shown in Fig. 4A until the inputted secret identification number is transmitted to the IC card 2. Cooperative processing between the IC card 2 and the terminal device 1 performed when the above described secret information processing program 11a and secret identification number collation program 11b are started will now be described. First of all, when an IC card 2 meeting standards has been inserted into the terminal device 1, the terminal device 1 supplies power to the IC card 2 to activate the IC card 2 (step 400). The IC card 2 activated by this power supply compares the number of times of secret identification number collation noncoincidence held in the memory 11 with a prescribed value (step 431). If the number of times of noncoincidence exceeds the prescribed number of times, a lock state is caused and transactions processing is not performed. Unless the number of times of noncoincidence exceeds the prescribed value, the IC card 2 transmits a predetermined command to the terminal device and sets the terminal device 1 into the operation mode (step 433). While waiting for the order of the operation mode, the terminal device supervises timeout. If the operation mode is not ordered for a prescribed time or longer, the terminal device returns to its initial state (step 403). In accordance with the secret information input processing program 11a comprising steps 435 to 445, the IC card 2 transmits a command of secret identification number input toward the terminal device 1 (step 435). Upon input of this command, the terminal device 1 confirms the secret identification number input command (step 410). The terminal device then displays a message "Input your secret identification number", for example, on the display section 8 (step 415). If the predetermined secret identification number is inputted from the keyboard 5 on the basis of the order displayed on the display section 8, the secret identification number thus inputted is temporarily stored into the program memory 4. If a request for transmission of the secret identification number is then inputted from the IC card 2 (step 440), the terminal device 1 transfers the inputted secret identification number described before to the IC card 2 on the basis of this command. The IC card 2 waits until this secret identification number is transferred (step 445). Upon transfer of the secret identification number, the IC card 2 begins processing based upon the secret identification number collation processing program 11b comprising steps 450 to 465. In the processing of this secret identification number processing program 11b, the secret identification number transferred from the terminal device 1 is compared with the secret identification number stored in the memory 11 included in the IC card 2 (step 450). In case of coincidence, transactions processing is performed between the IC card 2 and the terminal device 1 (steps 430 and 455). On the other hand, unless the secret identification numbers are noncoincident as a result of collation processing at the step 450, the number of times of noncoincidence is increased by one at step 460. At step 465, this count is compared with the predetermined prescribed value stored in the memory 11. If the count is less than this prescribed value, the IC card returns to the step 435 to transmit a request for reinput of the secret identification number to the terminal device 1. If it is judged at the step 465 that the prescribed value is exceeded, the IC card 2 itself is brought into the lock state and does not operate thereafter. The IC card 2 thus becomes unusable. In the above described collation operation at step 450, transaction processing is begun when the predetermined secret identification number stored in the memory 11 of the IC card 2 is identical with the secret identification number inputted from the terminal device 1. However, it is not necessary that they are completely identical, but such codes having fixed mutual interrelation that all digits become zero when respective corresponding digits are added, for example, may be used. Further, the degree of security of secret identification number collation may also be raised by disposing step 445′, whereat predetermined conversion processing is applied to the inputted secret identification number, between the step 445, whereat transfer of the secret identification number is waited, and the collation step succeeding the step 445 as exemplified in Fig. 5 and thereby implementing a configuration using a secret identification number which has undergone so-called scramble processing. Further, as shown in Fig. 4B, it is also possible to use such a configuration that the IC card 2 is immediately brought into the lock state by interrupt processing if there should be inputted from the terminal device 1 a command requesting for readout of the secret identification number incorporated in the memory of IC card 2. In the processing heretofore described, only commands for activating the hardware of the terminal device 1 are transmitted from the IC card 2 to the terminal device 1. The terminal device 1 need not recognize or judge that the processing is input processing of a secret identification number, for example. Figs. 3A and 3B show examples of the whole configuration. Fig. 3A shows a case where the terminal device 1 having the display section and the input section such as a keyboard as described above is used. Fig. 3A thus corresponds to Fig. 1. In this case, the terminal device 1 may be further connected to a host computer. Fig. 3B shows a system so configured that a connection device 13 may be provided with a part of the function of the terminal device 1 and a host computer 12 such as a personal computer may be connected to the connection device 13 via a line or the like. In the same way as the terminal device 1, the host computor 12 shown in Fig. 3B has an input section comprising a keyboard and a display section comprising a display. The connection device 13 comprises neither an input section nor a display. As shown in a block diagram of Fig. 3C, the connection device 13 comprises the memory 4, the external interface 6, the card interface 7, and the processor 3. In this system, the connection device 13 has only function of connecting and activating the IC card 2 and external communication function. A request for inputting a secret identification number transmitted from the IC card 2 is handled by the host computer 12. The host computer 12 is controlled by the IC card 2. In case secret information is a secret identification number, the IC card 2 thus orders input and display of the secret identification number. As a result, the terminal device 1 or the host computer 12 is controlled, and the IC card 2 can administer the operation of the terminal device 1 or the host computer 12. In the foregoing description of the preferred embodiment, the IC card has been mentioned as an example of a portable electronic device, and its operation is locked if collation of secret information results in an error a predetermined number of times or more. For example, it is made impossible to read, write and collate information from the outside. The terminal device or the host computer in the preferred embodiment heretofore described is not limited to that shown in Fig. 3A or 3B, but may be an exclusive terminal device such as an ATM. Further, by using a rewritable device (such as an EEPROM) in a part of the memory 11 included in the IC card 2 in the preferred embodiment, the processing program shown in Figs. 4A and 4B can be rewritten to make the processing, which is performed when collation results in noncoincidence, suitable to application. Further, since processing procedure such as collation is defined by the processing program stored within a portable electronic device such as the IC card 2, it is possible to perform collation processing to such a degree as to meet requirements, and processing which differs depending upon each portable electronic device can be realized in an identical system. As a result, a flexible system can be constructed. As a matter of fact, the secret information such as a secret identification number in the preferred embodiment may be information held within the terminal device or the host computer instead of information inputted via the input section such as a keyboard. Input processing of a secret identification number may be performed beforehand in the terminal device or the like, and a secret identification number inputted beforehand and held in the device may be transmitted to the IC card in accordance with a command stored in the IC card. In this way, secret information which is important in system operation is stored beforehand in a portable electronic device, and the portable electronic device controls an external device, which is the other party, in accordance with a processing program stored therein so that an operator of the external device may input secret information to the external device and the secret information thus inputted may be transferred from the external device. Therefore, illegal access from the external device to the portable electronic device is prevented, and readout of secret information to the outside becomes substantially impossible. As a result, security of a portable electronic device against unfair practices such as forgery and fraud can be improved.

Claims: A secret information collation method used between electronic apparatuses including a portable electronic device (2) and an information processing device (1), said portable electronic device including an arithmetic processing section (9) and a memory section (11) for storing therein a processing program to be executed by said arithmetic processing section and first secret information, said portable electronic device collating second secret information inputted from the outside with said first secret information and performing predetermined operation in response to an operation request from the outside satisfying predetermined secret information relationship, said information processing device transmitting said second secret information to said electronic device and addressing said operation request to said electronic device, said secret information collation method comprising the steps of: transmitting said second secret information from said information processing device to said electronic device, collating, in said electronic device, said second secret information with the first secret information stored in the memory section (11) of said electronic device upon input of said second secret information; and responding to the operation request addressed from said information processing device upon recognition of satisfaction of predetermined secret information relationship, characterised in that a step is included of outputting, from said electronic device to said information processing device, a request for transmission of said second secret information, and in that transmission of the second secret information from the information processing device to the electronic device is carried out upon input of said transmission request from said electronic device to said information processing device. A secret information collation method according to claim 1, wherein said electronic device comprises an IC card. A secret information collation method according to claim 1 or 2, wherein said first secret information is equivalent to said second secret information. A secret information collation method according to claim 1 or 2, wherein said second secret information after it has undergone predetermined conversion processing is equivalent to said first secret information. A secret information collation method according to any preceding claim, wherein said information processing device (1) comprises a display section (8) for displaying a message to urge input of said second secret information to said information processing device; and the message is displayed on said display section in response to a request, addressed by said electronic device, for transmission of said second secret information. A secret information collation method according to any preceding claim, wherein said electronic device outputs a retransmission request to said information processing device in the case where satisfaction of predetermined secret information relationship is not recognised in collation of said first secret information with said second secret information; said electronic device counts times of non-recognition of satisfaction of predetermined secret information relationship; and said electronic device rejects an operation request addressed by said information processing device when said count exceeds a predetermined value. A secret information collation method according to any preceding claim, wherein if said information processing device makes enquiries about said first secret information, said electronic device rejects an operation request from said information processing device. A secret information collation method according to any preceding claim, wherein after said second secret information has been inputted to said information processing device via an input section (5) thereof, said information processing device holds therein said second secret information and transmits said second secret information to said electronic device in response to a request addressed by said electronic device. A portable electronic device (2) including an arithmetic processing section (9) and a memory section (11) for storing therein a processing program to be executed by said arithmetic processing section and first secret information such as a secret identification number, said memory section (11) storing therein a secret information collation program (11b), characterised in that the memory section (11) also stores therein a secret information input processing program (11a) for calling upon an external information processing device to transfer second secret information corresponding to said first secret information. A portable electronic device according to claim 9, wherein said electronic device comprises an IC card having an EEPROM as said memory section. A portable electronic device according to claim 10, wherein said electronic device comprises an IC card having said secret information processing program described on said EEPROM by means of download processing. A portable electronic device according to claim 9, wherein said electronic device comprises an IC card, and the IC card comprises: a non-coincidence times counter for counting times of non-coincidence in said secret information collation; and inhibit means for making impossible to read, write and collate information from the outside when the number of times of coincidence is not less than a predetermined number. A portable electronic device according to claim 9, 10, 11 or 12, wherein said electronic device comprises an IC card having means for inhibiting collation when said electronic device receives said enquiry command of secret information from the outside.

Inventors: SHINAGAWA TORU, SHINAGAWA, TORU
Applicants: HITACHI MAXELL, HITACHI MAXELL LTD.
Application year: 1989
Main classification: G07F7
IPC codes: G06Q40, G06F21, G07F7