IC Card and an identification system thereof

Abstract: A plurality of secret data for identifying IC cards is stored in a memory which is provided in an IC circuit incor­ porated in the IC card (11). When an IC card (11) is supplied to an issuer from a manufacturer, a sealed sheet (17) on which a production master key (PMK) data is printed is separately sent to the issuer from the manufacturer. The PMK data printed on the sealed sheet (17) is supplied to the IC card (11) to be compared with a PMK data stored therein. The entrance of a primary account number (PAN) data to the IC card is allowed only when a coincidence signal is ob­ tained. An initialization personal identification number (IPIN) data is printed on a sealed sheet (27) which is sepa­ rately sent to a card holder from the issuer. At the card holders stage, the IPIN data and an IPIN data stored in the IC card (11) are compared with each other. The registration of the personal identification number to the IC card (11) may be performed only when a coincidence signal is obtained.

Description: The present invention relates to an IC card incorporating an IC circuit and an IC card identification system for identifying various IC card states wherein the IC card is supplied to a card holder or a customer through an issuer such as a manufacturer or a bank and the card holder goes shopping in a store. A conventional magnetic card has a magnetic coating which is formed on the surface thereof and on which a key code or a confidential number, an account number and so on are magnetically recorded. The magnetic contents such as the key code are known to at least bank personnel since the holder as a user must submit his key code to the bank. In addition, a magnetic record can be relatively easy accessed. Because of this, the private key code of the magnetic card cannot be kept secret. In place of such a magnetic card, an IC card incorporating an IC has been recently proposed that disables easy reading of recording contents. US-A-4 105 156 defining the closest prior art discloses an "IC card" comprising a plurality of memory means for storing identification data and personal data of a cardholder, interface means for controlling input/output data with respect to the IC card and comparing means for comparing external data supplied through the interface means with the identification data stored in the memory means. When the externally supplied code data coincides with the identification data, it is allowed that a user can write his/her personal identification number (PIN). From US-A-4 357 529 there is known a multi-level security apparatus in which PIN data selected by a user is encoded for several times using a part of an account number data so as to store the encoded PIN data into a card or other data-carrying medium. US-A-3 890 599 shows an arrangement for protecting and authenticating a document in which card authentication data previously affixed to the document, particularly a ticket, is checked whether it is pre-stored in a database of a central storage means so as to identify the validity of the document. US-A-4 453 074 shows a protection system for an intelligent card in which a code is stored which is the encryption of a concatenation user secret password and a common reference text. When the IC card is connected to the terminal, the encrypted data is decrpyted at the terminal so as to check whether an input password and the decrypted pass word coincide with each other and whether a text stored in the terminal and the decrypted text coincide which each other, thereby identifying the IC card. However, there are many opportunities for unfair practice on such IC cards. It is very difficult to prevent such unfair practice in a construction of conventional IC cards and the identification systems. It is an object of the present invention to prevent theft or foggery of an IC card during dispatch of an IC card from a manufacturer to an IC card issuer and from the issuer to the holder, to provide an IC card which cannot be subject to unfair practice when it is used and an IC card identification system. To accomplish the above objection, there is provided an IC card having an IC circuit which comprises first memory means for storing at least a plurality of personal data of a cardholder, identification data memory means for storing identification data, interface means for controlling input/output data with respect to the IC-card and comparing means for comparing external data supplied through said interface means with the identification data stored in said identification data memory means, characterized in that said identification data memory means includes second memory means for storing production master key (PMK) data and initialization personal identification number (IPIN) data preset by a manufacturer and third memory means for storing personal identification number (PIN) entered by a card holder and said IC circuit further comprises designating means for designating the PMK data in said second memory means at an issuing stage, changing means for changing said designating means to designate the IPIN data from the PMK data when said comparing means detects a coincidence between the external data and the PMK data and permitting means for permitting the card holder to enter the PIN data into said third memory means when said comparing means detects a coincidence between the external data and the IPIN data and permitting means for permitting the card holder to enter the PIN data into said third memory means when said comparing means detects a coincidence between the external data and the IPIN data. The essential feature of the present invention is to input two different types of identification data, namely the production master key (PMK) data and initialization personal identification number (IPIN) data into the identification data memory means of the IC card when the IC card is manufactured. Further, designating means are provided for designating the PMK data in an issuing stage and, when another PMK data externally supplied coincides with the PMK data stored in the identification data memory means, the operation of the designating means is switched to designate the IPIN data. Advantages and embodiments of the IC card are definded in subclaims 2 to 6. The invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 shows card identification steps for an IC card to be supplied from a manufacturer to a holder through an issuer; Fig. 2 is a perspective view showing an outer appearance of a POS (point of sales) terminal; Fig. 3 is a block diagram of an IC circuit incorporated in an IC card; Fig. 4 is a block diagram of the POS terminal shown is Fig. 2; Fig. 5 is a flow chart for explaining an operation performed in the IC card manufactured by the manufacturer before the IC card is sent to an issuer; Fig. 6 is a flow chart for explaining an operation performed in the IC card before the IC card is issued from the issuer to the holder; Fig. 7 is a flow chart for explaining an operation performed in the IC card before the holder himself issues the IC card sent from the issuer; Fig. 8 is a flow chart for explaining an identification operation in the IC card when the IC card is used; Fig. 9 is a flow chart for explaining an identification operation of the IC card at the POS terminal; Fig. 10 is a flow chart for explaining an on-line identification operation of the IC card at the POS terminal; Fig. 11 is a flow chart for explaining an on-line identification operation of an IC card at a host computer; Fig. 12 shows a ROM table for storing data representing correspondence between a public key code stored in the POS terminal and the issuer code; and Fig. 13 is a representation schematically showing a data base configuration at the host computer. A preferred embodiment of the present invention will be described with reference to the accompanying drawings. The overall system will be described with reference to Fig. 1. Fig. 1 shows the relationship between a manufacturer 1 for manufacturing an IC card, an issuer 2 such as a bank for issuing an IC card, and a card holder 3 who uses the IC card. The manufacturer 1 manufactures an IC card 11 which will be described in detail later. The manufacturer 1 manufactures the IC card 11 and writes a predetermined code on the IC card 11 using an IC card issuing machine 12. The IC card 11 incorporates an IC circuit to be described in detail later. A connector 11a is arranged on the upper surface of the IC card 11. When the IC card 11 is mounted in the IC card issuing machine 12, the IC card 11 is connected to an internal circuit of the IC card issuing machine 12 through the connector 11a. The IC card issuing machine 12 has a card insertion port 13, a keyboard 14, a display panel 15 and a printer 16. Various codes such as "CA", "IPIN", "PMK" are selectively written on the IC card 11 in accordance with input data entered by an operator at the keyboard 14. The code "CA" (Card Authenticator) comprises a random 64-bit code which can be used as key for encryption/decryption. The code "IPIN" (Initialization Personal Identification Number) comprises a random 6-bit code which is used until a personal identification number (PIN) is used. The code "PMK" (Production Master Key Code) represents a random code assigned to each manufactured group. The code "PMK" is kept secret even within the manufacturing plant. The code "PRK" (Private Key Code) comprises a decryption code which has a relationship in one-to-one correspondence with the encryption code "Public Key Code" assigned to a POS terminal (to be described later). When a predetermined code is written by the IC card issuing machine 12 on the IC card 11, only the code "PMK" is printed by the printer 16 on a printing paper sheet 17. The manufacturer 1 separately seals the IC card 11 recorded with the predetermined code and the paper sheet 17 printed with the code "PMK". The IC card 11 and the paper sheet 17 are sent to the issuer 2. The issuer 2 loads the IC card 11 in an IC issuing machine 22 and reads the content of the code "PMK" on the paper sheet 17 sent from the manufacturer 1 and enters the content in the IC card issuing machine 22. Furthermore, the issuer 2 enters a code number "PAN" (Primary Account Number) for the IC card 11 in the IC card issuing machine 22. The code number is constituted by numerals. This may also be constituted by alpha-numeric characters. The IC card issuing machine 22 comprises a card insertion port 23, a keyboard 24, a display panel 25 and a printer 26 in the same manner as the IC issuing machine 12. When the IC card is entered to the IC card issuing machine 22, the code "PMK" written in the IC card 11 is compared with input data "PMK" entered at the keyboard 24 in the IC card. Only when a coincidence between the code "PMK" written in the IC card 11 and the input data "PMK" is established, is the account number "PAN" written in the IC card 11. The code "IPIN" is read out from the IC card 11 and is printed on a printing paper sheet 27. The IC card 11 written with the account number "PAN" and the paper sheet 27 printed with the "IPIN" are separately sealed and are sent to the card holder 3. When the card holder 3 receives the IC card 11 and the paper sheet 27 from the issuer 2, the card holder 3 goes to a card holder IC card issuing machine 32 which is installed on the issuer's premises. The card holder 3 then loads the IC card 11 into the IC card issuing machine 32, and the content of the code "IPIN" printed on the paper sheet 27 sent from the issuer 2 is read and entered in the IC card issuing machine 32. The card holder 3 enters any personal identification number "PIN". The IC card issuing machine 32 comprises a card insertion port 33, a keyboard 34, a display panel 35 and printer 36 in the same manner as in the IC card issuing machine 22. When the IC card is put into the IC card issuing machine 32 the code "IPIN" stored in the IC card 11 is compared with the input data "IPIN" entered at the keyboard 24 in the IC card. Only when a coincidence is established, is the personal identification number "PIN" written in the IC card 11. In this manner, the IC card issuing procedures are completed, and this IC card is then ready for use. Fig. 2 shows the outer appearance of a POS terminal 41 in which the IC card 11 is used. The POS terminal 41 comprises a card insertion port 42, a keyboard 43, a display panel 44 and the like. The keyboard 43 has numeric keys 46, an enter key 47 and a cancel key 48. The internal circuit of the POS terminal 41 will be described in detail later. An IC circuit incorporated in the IC card 11 will be described in detail with reference to Fig. 3. Referring to Fig. 3, a serial interface 51 is arranged between the connector 11a and an internal system bus 52. When the IC card 11 is loaded in the POS terminal 41, the IC card 11 receives a reset signal RESET and a system clock CLOCK from the POS terminal 41 through the connector 11a, and is connected to a Vcc power supply, a Vpp power supply and a ground line GND. The Vcc power supply serves as a system drive power supply and is set at a voltage of + 5 V. The Vpp power supply serves as a data write power supply for an EP-POM (Erasable-Programmable ROM) 61 (to be described later) and is set at a voltage of + 25 V. A working RAM block 53, a system programming ROM block 54, a system controller 55, an ALU 56 for RSA decryption, a data latch 57, a cancel latch 58, an EP-ROM write controller 59, and an EP-ROM read controller 60 are connected to the system bus 52. The programming ROM block 54 stores various types of system programs and a test program 54a for testing the function of the IC card 11. The system controller 55 has a judgment area 55a therein. The system controller 55 supplies operation instructions a to i to respective circuits in response to a data reception signal from the interface 51 and in accordance with the operating conditions of the respective circuits. The EP-ROM write controller 59 controls the write operation of the EP-ROM 61 in accordance with an instruction from the system controller 55. The EP-ROM 61 is a memory to which data can be written only once and which comprises a programmable memory which has three memory areas 61a, 61b and 61c. The memory area 61a stores the codes "CA", "IPIN", "PAN", "CHN", "EPD", "PRK" and "RTN". The memory area 61b stores the codes "PMK", "IPIN" and "PIN". The memory area 61c has flags of "Select 1", "Select 2" and "Invalid". The code "CHN" stored in the memory area 61a represents a "card holder's name". The code "EPD" represents an "Expiration Data". The code "RTN" represents the number of reentry operations when wrong data is entered. A plurality of memory area portions are provided for the code "PTN" to reenter the data a plurality of times. The "Select 1", "Select 2" and "Invalid" flags stored in the memory area 61c are initially set at logic "1". When a control signal i1 is supplied from the system controller 55 to the EP-ROM write controller 59, the EP-ROM write controller 59 sends out data onto a data bus DBI for the memory areas 61b and 61c. However, when a control signal i2 is supplied from the system controller 55 to the EP-ROM write controller 59, the controller 59 sends out data onto a data bus DB2 for the memory area 61a. The codes "IPIN" and "PIN" stored in the memory area 61b are selected by a first selector 62 and are supplied to a second selector 63. The code "PMK" stored in the memory area 61b is read out and supplied to the second selector 63. The first and second selectors 62 and 63 are selectively operated in accordance with the logical states of the flags "Select 1" and "Select 2". More particularly, when the "Select 1" flag is set at logic "1", the first selector 62 selects the code "IPIN". However, when the "Select 1" flag goes to logic "0", the first selector 62 selects the code "PIN". Similarly, when the "Select 2" flag is set at logic "1", the second selector 63 selects the code "PMK"; but when the "Select 2" flag goes to logic "0", the second selector 63 selects the output from the first selector 62. An output from the second selector 63 together with data held by the data latch 57 is supplied to a comparator 64. The comparator 64 compares the output from the second selector 63 and the data from the data latch 57 in response to the control signal h from the system controller 55. A comparison result is supplied to an OR gate 65 and the system controller 55. The OR gate 65 also receives cancel data Can from the cancel latch 58. An output from the OR gate 65 is supplied to an AND gate 66. The OR gate 65 is controlled in accordance with the logical state of the "Invalid" flag held in the memory area 61c. The output from the OR gate 65 is supplied as an enable signal to the EP-ROM write controller 59 and the EP-ROM read controller 60. The EP-ROM read controller 60 reads out data from the memory area 61a in the EP-ROM 61 in response to the instruction from the system controller 55. The readout data is supplied to the system bus 52 or the ALU 56. The ALU 56 is provided for performing the decryption based on "RSA" algorithm and decrypts the input data in response to the instruction d from the system controller 55, and the decrypted data is sent onto the system bus 52. The circuit arrangement of the POS terminal 41 will be described with reference to Fig. 4. Referring to Fig. 4, reference numeral 71 denotes a system bus. A sound controller 72, a working RAM 73, a system programming ROM 74, a data ROM 75 for storing test messages, a main controller 76, a key controller 77, a display driver/controller 78, a card reader driver/controller 79, an IC card interface 80, a comparator 81, an "RSA" encrypter 82, a latch 83 for latching the code "CA", a "DES" encrypter 84, a "DES" decrypter 85, and a communication controller 86 are connected to the system bus 71. The encrypter 82 is the "RSA" type for performing encryption based on the "RSA" algorithm. The encrypter 84 encrypts data based on "Data Encryption Standard". A loudspeaker 87 is connected to the sound controller 72 so as to generate an alarm sound as needed. The working RAM 73 has memory areas 73a, 73b, 73c and 73d which respectively store an "on-line flag", a "PAN", a "CHN" and an "EPD". The main controller 76 is connected to the IC card interface 80, the comparator 81, the communication controller 86 and the like and supplies control instructions to the respective circuits in accordance with the operating state of the system. The key controller 77 supplies a key sampling signal to the keyboard 43 to detect a key input signal. The display driver 78 performs display control on the display panel 44. The card reader driver/controller 79 controls a card reader mechanism 88. The card reader mechanism 88 has a card feed motor 88M to feed to a predetermined position the IC card 11 inserted from the card insertion port 42. The card reader mechanism 88 also causes the processed IC card 11 to return to the card insertion port 42. The IC card interface 80 controls data exchange between the POS terminal 41 and the IC card 11 in response to an instruction from the main controller 76. The interface 80 transmits data from the IC card 11 to the system bus 71 and the comparator 81. The interface 80 also transmits encrypted data from the encrypter 82 to the IC card 11. The encrypter 82 receives the data supplied from the data ROM 75 through the system bus 71 and encrypts the data in accordance with the public key code supplied from a public key code memory 89 consisting of a data ROM for the issuer. The public key code is a code in one-to-one correspondence with "PRK" stored in the IC card at the issuer 2 and is provided for the encryption based on the RSA-algorithm. While, the "PRK" is a code for the decryption based on the RSA-algorithm. The public key code and the "PRK" are key codes selected to have a one-to-one relation by predetermined one-way functions based on the RSA-algorithm. According to this encryption method based on the RSA-algorithm, data encrypted by the public key code can hardly be decrypted by the same public key code. It is only possible to decrypt by the "PRK" having the relation provided by the one-way functions. This encryption method based on the RSA-algorithm is described in detail in the "CRYPTOGRAPHY" by Carl H. Meyer and Stephen M. Matyas, published in 1982, by John Wiley & Sons. Inc. In a public key code memory 89 in the POS terminal 41, public key codes whose number corresponds to the number of issuers or the sorts of "PRK" may be stored. Assuming now that IC cards manufactured by a manufacturer 1 are distributed to twenty issuers 2, twenty "PRK" codes are determined at the issuer 2. Public key codes corresponding to the "PRK" codes are communicated to a manufacturer of the terminal. The terminal and the manufacturer set the twenty public key codes communicated from twenty issuers to the public key memory 89 of the terminal 41. The data ROM in the public key code memory 89 has an internal configuration as shown in Fig. 12. One of public key codes such as "public 1", "public 2", ... "public 20" can be determined by an issuer code included in the "PAN" code capable of reading from the IC card 11. In the public key code memory 89 are preset public key codes corresponding to the "PRK" in the IC card 11. The public key code memory 89 generates a storage code when it receives an instruction from the main controller 76. When a destructive signal is supplied to the memory 89, the storage content is automatically destroyed. The destructive signal is supplied from the main controller 76 to the memory 89 when the access of the memory 89 by, for example, the POS terminal 41 is invalid. The public key code corresponding to the respective issuers stored in the public key code memory 89 cannot be externally read out. The code "CA" latched by the latch 83 is supplied to the "DES" encrypter and decrypter 84 and 85. The "DES" encrypter 84 receives predetermined data through the system bus and performs encryption processing in response to an instruction from the main controller 76. The encrypted code is then supplied to the communication controller 86. When the communication controller 86 is on-line connected with a data base, i.e., the host computer, the controller 86 sends the encrypted data to the host computer. The communication controller 86 also sends out onto the system bus 71 data which is supplied from the host computer and which is decrypted by the "DES" decrypter 85. The operation of the circuit shown in Fig. 4 will be described with reference to flow charts. First, the operation for issuing the IC card 11 from the manufacturer 1 to the issuer 2 will be described. As shown in Fig. 1, the manufacturer 1 loads the IC card 11 in the IC card issuing machine 12. The manufacturer 1 enters a start instruction and a circuit test instruction at the keyboard 14. When the start instruction is supplied to the IC card 11 from the IC card issuing machine 12, the operation is started, as shown in Fig. 5. In step A1 shown in Fig. 5, a signal of logic "1" is written in the cancel latch 58 shown in Fig. 3. The cancel signal Can ("1") latched by the cancel latch 58 is supplied to the AND gate 66 through the OR gate 65. The output from the comparator 64 is cancelled in response to the cancel signal Can. The "Invalid" flag in the memory area 61c in the EP-ROM 61 is set at logic "1", so that an output signal from the OR circuit 65 goes to logic "1" and an enable signal is supplied to the EP-ROM write controller 59 and the EP-ROM read controller 60. In step A2 in Fig. 5, the system controller 55 checks whether or not the test command is entered. If YES in step A2, the flow advances to step A3. In step A3, the circuit test operation is started. More particularly, the test program 54a is read out from the programming ROM block 54, and the circuit test is performed. When the circuit test is completed, the test result is supplied to the IC card issuing machine 12 in step A4. The test result is displayed on the display panel 15 so as to signal the result to the operator. A control signal i2 is supplied from the system controller 55 to the EP-ROM write controller 59 in step A5. When the EP-ROM write controller 59 receives the control signal i2, the controller 59 selects the data bus DB2. On the other hand, when the test result is displayed on the display panel 15 and the operator does not notice any failure, the operator enters codes "CA", "IPIN", at the keyboard 14 in step A6. In this case, the EP-ROM write controller 59 selects the data bus DB2 as described above, and the data entered at the keyboard 14 is written in the memory area 61a. In this case, other storage contents in the memory area 61a are held at logic "0". When data writing is completed, the flow advances to step A7, and the system controller 55 supplies the control signal i1 from the system controller 55 to the EP-ROM write controller 59. As a result, the EP-ROM write controller 59 selects the data bus DB1. In this state, the operator enters the codes "PMK" and "IPIN" at the keyboard 14 in step A8. Since the EP-ROM write controller 59 has selected the data bus DB1, the input data is written in the memory area 61b in the EP-ROM 61. The code "PMK" entered at the keyboard 14 is supplied to the printer 16 and is printed on the paper sheet 17. Thereafter, in step A9, data of logic "0" is written in the cancel latch 58, thereby completing the issuing operation of the IC card 11 by the manufacturer 1. The manufacturer 1 separately seals the IC card 11 having the predetermined code and the paper sheet 17 printed with the code "PMK". The IC card 11 and the paper sheet 17 are then separately sent to the issuer 2. When the issuer 2 receives the IC card 11 and the paper sheet 17 with the code "PMK" from the manufacturer 1, the issuer 2 loads the IC card 11 in the IC card issuing machine 22, as shown in Fig. 1. The code "PMK" is then entered at the keyboard 24. When the IC card 11 having the arrangement described in detail with reference to Fig. 3 is loaded in the IC card issuing machine 22, the operation is performed in accordance with the flow chart shown in Fig. 6. In step B1, the control signal i2 is supplied from the system controller 55 to the EP-ROM write controller 59. The EP-ROM write controller 59 selects the data bus DB2. In step B2, the system controller 55 checks whether or not the data is entered at the keyboard 24. When the data is entered at the keyboard 24, the interface 51 supplies a data reception signal to the system controller 55. The system controller 55 checks whether or not the data is entered at the keyboard 24 in accordance with the presence/absence of the data reception signal. If YES in step B2, the system controller 55 supplies a latch instruction to the data latch 57. In step B3, the input data from the keyboard 24 is latched in the data latch 57. When the system controller 55 causes the data latch 57 to latch the key input data, the system controller 55 supplies the control signal h to the comparator 64 in step B4. The comparator 64 compares the data latched by the data latch 57 with the code "PMK" stored in the memory area 61a in the EP-ROM 61 in step B5. Since the "Select 2" flag in the memory area 61c in the EP-ROM 61 is set at logic "1", the second selector 63 selects the code "PMK" held in the memory area 61b. The selected code "PMK" is supplied to the comparator 64. For this reason, when the comparator 64 receives the operation instruction from the controller 55, the comparator 64 compares the code "PMK" selected by the second selector 63 with the key input data latched by the data latch 57. The comparison result of the comparator 64 is supplied to the system controller 55. When a coincidence signal is not generated from the comparator 64, the system controller 55 writes data of logic "1" in the cancel latch 58 in step B6 so as to generate the cancel signal Can. As a result, an output signal from the OR gate 65 is set at logic "1", and this output is supplied to the AND gate 66. In this case, the flag "Invalid" in the memory area 61c is set at logic "1", so that an output from the AND gate 66 is set at logic "1". As a result, an enable signal is supplied to the EP-ROM write controller 59 and the EP-ROM read controller 60. The system controller 55 supplies the control instruction to the EP-ROM write controller 59. In step B7, the count of the code "RTN" stored in the memory area 61a in the EP-ROM 61 is incremented by one. Subsequently, the system controller 55 causes the EP-ROM read controller 60 to transfer the code "RTN" from the memory area 61a to the judgment area 55a. In step B9, the cancel latch 58 is reset. In step B10, the system controller 55 checks whether or not the count of the code "RTN" in the judgment area 55a has reached 5. If NO in step B10, the flow returns to step B2, and the above operation is repeated. Even if the above operation is repeated, and the coincidence signal is not generated but the count of the code "RTN" has reached 5, the judgment result in step B10 becomes YES. The flow advances to step B11, and the flag "Invalid" in the memory area 61c is reset to logic "0". In step B12, the invalid signal is supplied to the IC card issuing machine 22 so as to signal to the operator that the IC card 11 has become invalid. The above operation is performed to confirm that the issuer 2 knows the proper code "PMK", i.e., to check the validity of the issuer 2. When the proper code "PMK" is entered at the keyboard 24, the comparator 64 generates the coincidence signal which is then supplied to the system controller 55 and to the AND gate 66 through the OR gate 65. As a result, the judgment result in step B5 becomes YES, and the flow advances to step B13. In step B13, the count of the code "RTN" stored in the memory area 61a in the EP-ROM 61 is reset to zero. In other words, when the coincidence output from the comparator 64 is supplied to the AND gate 66 through the OR gate 65, data of the flag "Invalid" ("1") in the memory area 61c is supplied to the EP-ROM write controller 59 and the EP-ROM read controller 60, thereby starting the EP-ROM write controller 59 so as to reset the count of the code "RTN" in the memory 61a at "0" in accordance with the control instruction from the system controller 55. This resetting operation of the code "RTN" is performed by address updating in step B7 wherein an address is incremented from that for the memory area with data to that for a memory area without data. In this state, the operator enters the codes "PAN", "CHN", "PRK" and "EPD" at the keyboard 24. The key input data is written by the EP-ROM write controller 59 in the memory area 61a in the EP-ROM 61 in step B14. In step B15, the codes "PAN", "CA", "CHN" and "EPD" are read out from the memory area 61a and are supplied to the IC card issuing machine 22. These codes are encrypted and are supplied to the host computer through the signal line. The encrypted codes are thus registered in the data base. As shown in step B16, the code "IPIN" is read out by the EP-ROM read controller 60 from the memory area 61a and is supplied to the IC card issuing machine 22. The code "IPIN" is printed on the paper sheet 27. Thereafter, the flag "Select 2" in the memory area 61c in the EP-ROM 61 is set at logic "0" in step B17, and the access of the code "PMK" in the memory area 61b is inhibited. The issuing operation of the IC card 11 at the issuer 2 is completed. The issuer 2 separately seals the IC card 11 having the predetermined data and the paper sheet 27 printed with the code "IPIN". The IC card 11 and the paper sheet 27 with the code "IPIN" are separately sent to the card holder 3. When the card holder 3 receives the IC card 11 and the paper sheet 27 with the code "IPIN", he goes to the issuer 2. The card holder 3 then writes the code "PIN" in this own IC card 11 by using the IC card issuing machine 32 installed on the issuer's premises. The card holder 3 inserts the IC card 11 from the card insertion port 33 in the IC card issuing machine 32, and enters the code "IPIN" printed on the paper sheet 27 at the keyboard 34. The IC card 11 loaded in the IC card issuing machine 32 performs the operation in accordance with the flow chart shown in Fig. 7. The IC card 11 having the arrangement described in detail with reference to Fig. 3 causes the system controller 55 to supply the control signal i2 to the EP-ROM write controller 59 so as to select the data bus DB2 in step C1. IN step C2. the system controller 55 then checks whether or not the data is entered at the keyboard 34. The system controller 55 checks the presence/absence of key input data in accordance with the presence/absence of the data reception signal from the interface 51. If YES in step C2, the system controller 55 supplies a latch instruction to the data latch 57. In step C3, the input data from the keyboard 34 is latched by the data latch 57. When the key input data is latched by the data latch 57, the system controller 55 supplies the control signal h to the comparator 64 in step C4. The comparator 64 compares the data latched by the data latch 57 with the code "IPIN" stored in the memory area 61b in the EP-ROM 61. More particularly, since the flag "Select 1" in the memory area 61c in the EP-ROM 61 is initially set at logic "1", the first selector 62 selects the code "IPIN" stored in the memory area 61b. The code "IPIN" is then supplied to the second selector 63. Although the second selector 63 selects the input data in response to the logic state of the flag "Select 2" in the memory area 61c, the flag "Select 2" is set by the issuer 2 at logic "0", so that the second selector 63 selects the code "IPIN" from the memory area 61b, and the code "IPIN" is supplied to the comparator 64. When the comparator 64 receives the operation instruction h from the system controller 55, the comparator 64 compares the code "IPIN" selected by the first and second selectors 62 and 63 with the key input data latched by the data latch 57. A comparison result from the comparator 64 is supplied to the system controller 55. When a coincidence signal is not generated from the comparator 64, the system controller 55 writes data of logic "1" in the cancel latch 58 in step C6, thereby generating the cancel signal Can. As a result, an output from the OR gate 65 is set at logic "1", and this signal of logic "1" is supplied to the AND gate 66. In this case, the flag "Invalid" in the memory area 61c is set at logic "1", so that the output from the AND gate 66 goes to logic "1", and an enable signal is supplied to the EP-ROM write controller 59 and the EP-ROM read controller 60. Subsequently, the system controller 55 supplies the control instruction to the EP-ROM write controller 59, and the count of the code "RTN" stored in the memory area 61a in the EP-ROM 61 is incremented by one in step C7. The system controller 55 causes the EP-ROM read controller 60 to transfer the code "RTN" from the memory area 61a to the judgment area 55a in step C8. Thereafter, in step C9, the content of the cancel latch 58 is reset. In step C10, the system controller 55 checks whether or not the count of the code "RTN" has reached 5. If NO in step C10, the flow returns to step C2, and the same operation as described above is repeated. If the above operation is repeated, and the coincidence signal is not generated from the comparator 64 but the count of the code "RTN" has reached 5, the judgment result in step C10 becomes YES, and the flow advances to step C11. In step C11, the flag "Invalid" in the memory area 61c is reset at logic "0". In step C12, the invalid signal is supplied to the IC card issuing machine 32 so as to signal to the card holder 3 that the IC card 11 has become invalid. The above operation is performed to confirm that the card holder 3 knows the proper code "IPIN", i.e., to check the validity of the card holder 3. When the card holder 3 enters the proper code "IPIN", the comparator 64 generates the coincidence signal so that the judgment result in step C5 becomes YES. In step C13, the count of the code "RTN" stored in the memory area 61a in the EP-ROM 61 is reset at zero. In step C14, the system controller 55 supplies the control signal i1 to the EP-ROM write controller 59 to select the data bus DB1. On the other hand, the card holder 3 enters any PIN code at the keyboard 34 after the code "IPIN" is entered. The input code "PIN" is written by the EP-ROM write controller 59 in the memory area 61b in the EP-ROM 61. Thereafter, the system controller 55 causes the EP-ROM write controller 59 to set the flag "Select 1" (in the memory area 61c in the EP-ROM 61) at logic "1". The issuing operation of the IC card 11 is completed, and the IC card 11 thus can be used. The identification operation at the POS terminal 41 will be described when the card holder 3 uses the IC card 11. When the card holder 3 uses the IC card 11, he inserts the IC card 11 from the card insertion port 42 in the POS terminal 41 of Fig. 2 and enters the code "PIN" registered in the IC card 11 at the keyboard 43. When the IC card 11 is loaded in the IC card issuing machine 32, the operation will be performed in accordance with the flow chart of Fig. 8. The IC card 11 having the arrangement described in detail with reference to Fig. 3 causes the system controller 55 to supply the control signal i2 to the EP-ROM write controller 59 so as to select the data bus DB2, in step D1. The system controller 55 then checks in step D2 whether or not data is entered from the keyboard 34. The system controller 55 checks the presence/absence of the data entered at the keyboard 34 in accordance with the presence/absence of a data reception signal from the interface 51. If YES in step D2, the system controller 55 supplies a latch instruction to the data latch 57, and the input data from the keyboard 34 is latched by the data latch 57 in step D3. When the key input data is latched by the data latch 57, the system controller 55 supplies the control signal h to the comparator 64 in step D3. When the key input data is latched by the data latch 57, the system controller 55 supplies the control signal h to the comparator 64 in step D4. In step D5, the comparator 64 compares the data latched by the data latch 57 with the code "PIN" stored in the memory area 61b in the EP-ROM 61. Since both the flags "Select 1" and "Select 2" in the memory area 61c in the EP-ROM 61 are set at logic "0", the code "PIN" stored in the memory area 61b is selected and supplied to the comparator 64. When the comparator 64 receives the control signal h from the system controller 55, the comparator 64 compares the code "PIN" selected by the first and second selectors 62 and 63 with the key input data latched by the data latch 57. A comparison result is supplied to the system controller 55. When a coincidence signal is not generated from the comparator 64, the system controller 55 writes data of logic "1" in the cancel latch 58 in step D6 so as to generate the cancel signal Can. As a result, an output from the OR gate 65 is set at logic "1", and is supplied to the AND gate 66. When the IC card 11 is normal, the flag "Invalid" in the memory area 61c is set at logic "1", so that an output from the AND gate 66 becomes logic "1" to supply an enable signal to the EP-ROM write controller 59 and the EP-ROM read controller 60. The system controller 55 supplies the control signal to the EP-ROM write controller 59. In step D7, the count of the code "RTN" stored in the memory area 61a in the EP-ROM 61 is incremented by one. Subsequently, the system controller 55 causes the EP-ROM read controller 60 to transfer the code "RTN" from the memory area 61a to the judgment area 55a. Thereafter, in step D9, the content of the cancel latch 58 is reset. Subsequently, the system controller 55 checks in step D10 whether or not the count of the code "RTN" has reached 5. If NO in step D10, the flow advances to step D12, wherein the system controller 55 supplies a Bad signal to the POS terminal 41. The display panel 44 then displays that the input "PIN" code is wrong. Even if the above operation is repeated and the coincidence signal is not generated from the comparator 64 but the count of the code "RTN" has reached 5, the judgment result in step D10 becomes YES. The system controller 55 then supplies the invalid signal to the POS terminal 41, and the flow returns to step D2. When the POS terminal 41 receives the Bad signal from the IC card 11 in step D12, the POS terminal 41 signals to the card holder 3 that the IC card 11 has become invalid to be described in detail later. The above operation is made to confirm that the card holder 3 knows the right code "IPIN", i.e., to check the validity of the card holder 3. When the card holder 3 enters the right code "PIN", the judgment result in step D5 becomes YES. The system controller 55 supplies an OK signal to the POS terminal 41 in step D13. In step D13, the system controller 55 waits for the encrypted data from the POS terminal 41. When the POS terminal 41 receives the OK signal from the IC card 11, the POS terminal 41 encrypts the test message to be described in detail later. The encrypted data is supplied to the IC card 11. When the IC card 11 receives the encrypted data from the POS terminal 41, the flow advances from step D14 to step D15, and the encrypted data is supplied to the ALU 56. The system controller 55 causes the EP-ROM read controller 60 to read out the code "PRK" from the memory area 61a in the EP-ROM 61, and the readout code and the operation instruction d are supplied to the ALU 56. The ALU 56 is started to decrypt the encrypted data from the POS terminal 41 in accordance with the code "PRK". The decrypted result is supplied to the POS terminal 41 in step D18. The operation at the side of the IC card 11 is completed. The POS terminal 41 having the arrangement described in detail with reference to Fig. 4 performs the operation in accordance with the flow chart in Fig. 9 when the IC card 11 is inserted in the card insertion port 42. When the IC card 11 is inserted in the card insertion port 42, the POS terminal 41 detects the IC card 11, and the main controller 76 supplies an operation instruction to the card reader driver/controller 79. In step E1, the IC card 11 is conveyed by the card reader mechanism 88 to a predetermined position. The main controller 76 waits until the code "PIN" is entered at step E2. When the code "PIN" is entered, the code is supplied to the IC card 11 through the IC card interface 80 in step E3. Thereafter, in step E4, the main controller 76 waits until a response signal is received in step D12 or step D13 in Fig. 8. when the response signal from the IC card 11 is supplied to the main controller 76, the controller 76 checks in step E5 whether or not the response signal is the OK signal. If NO in step E5, the flow returns to step E2, and the above operation is repeated. When the OK signal is supplied from the IC card 11 to the main controller 76, the main controller 76 reads out the test message from the data ROM 75 in step E6. The test message is supplied to the "RSA" encrypter 82. At the same time PAN is read from the IC card 11 and is determined the public key code corresponding to IC card 11 from the public key code memory 89 by the issuer code included in the PAN thus read out. In step E7, the main controller 76 supplies an operation instruction c to the "RSA" encrypter 82. The "RSA" encrypter 82 is started to encrypt the test message in accordance with the determined public key code from the public key code memory 89. The encrypted data is supplied to the IC card 11 in step E8. The IC card 11 detects the encrypted data in step D14 in Fig. 8, and the encrypted data is decrypted in step D18, and the decrypted data is supplied to the POS terminal 41. The POS terminal 41 keeps waiting in step E9 until the decrypted data is supplied from the IC card 11. When the decrypted data is received by the POS terminal 41, the flow advances to step E10. In step E10, the main controller 76 sends the decrypted data to the comparator 81. Subsequently, in step E11, the main controller 76 reads out the test message from the data ROM 75, and the readout test message is supplied to the comparator 81. The main controller 76 supplies the operation instruction d to the comparator 81 in step E12, so that the comparator 81 is started. The comparator 81 compares the decrypted data from the IC card and the test message stored in the data ROM 75. A comparison result is supplied to the main controller 76. The main controller 76 detects in step E13 whether or not a coincidence signal is generated from the comparator 81. When the comparator 81 does not generate the coincidence signal, the flow advances to step E14. In step E14, the invalid message from the IC card 11 is supplied to the display driver/controller 78 which causes the display panel 44 to display the invalid message. Subsequently, in step E15, the main controller 76 supplies the operation instruction to the sound controller 72 to produce an alarm at the loudspeaker 87. Thereafter, the main controller 76 supplies the operation instruction to the card reader driver/controller 79 in step E16, thereby dispensing the IC card 11 from the card insertion port 42 by means of the card reader mechanism 88. However, when the coincidence signal is generated from the comparator 81, the judgment result in step E13 becomes YES, and the flow advances to step E17. The main controller 76 checks in step E17 whether or not the on-line flag is set. If NO in step E17, the flow advances to step E18. The OK message is displayed on the display panel 44 to complete identification operation for the IC card 11. However, if YES in step E17, an on-line identification shown in the flow chart of Fig. 10 is performed. In step E21 in Fig. 10, the code "CA" stored in the memory area 61a in the EP-ROM 61 is supplied from the IC card 11 to the POS terminal 41. The code "CA" is written in the latch 83 in step E22. The codes "PAN", "CHN" and "EPD" stored in the memory area 61a in the EP-ROM 61 of the IC card 11 are read out therefrom in step E23, and are stored in the working RAM 73 in step E24. In step E25, the code "PAN" is read out from the working RAM 73 and is supplied to the host computer through the on-line transmission line under the control of the communication controller 86. The main controller 76 then reads out the codes "PAN", "CHN" and "EPD" from the working RAM 73 in step E26, and these codes are supplied to the "DES" encrypter 84. The "DES" encrypter 84 is started in response to the operation instruction e to encrypt the data from the working RAM 73 in accordance with the code "CA" held by the latch 83. The encrypted data are supplied to the host computer in step E28. When the host computer receives the encrypted data from the POS terminal 41 to be described later, the host computer decrypts the encrypted data. The host computer then sends back the OK message of the invalid message to the POS terminal 41 in accordance with the decrypted result. The POS terminal 41 is kept waiting in step E29 until the encrypted data is send back from the host computer, the encrypted data is supplied from the communication controller 86 to the "DES" decrypter 85 in step E30. Subsequently, the main controller 76 supplies an operation instruction f in step E31 to the "DES" decrypter 85 in step E31. The encrypted data is decrypted by the "DES" decrypter 85 in accordance with the code "CA" stored in the latch 83. The decrypted result is displayed on the display panel 44 in step E32. Thereafter, in step E33, the main controller 76 checks whether or not the decrypted data comprises the OK message. If YES in step E33, the operation is ended. However, if NO in step E33, the IC card 11 is dispensed from the card insertion port 42 in step E34. On the other hand, when data is transmitted from the POS terminal 41 to the host computer, the host computer performs the operation in accordance with the flow chart in Fig. 11. In step F1, the host computer receives the code "PAN" from the POS terminal 41. In step F2, the host computer performs search operation throughout a file. The host computer reads out the code "CA" corresponding to the code "PAN". Thereafter, in step F4, when the host computer receives the encrypted data from the POS terminal 41, the encrypted data is decrypted in accordance with the code "CA". In step F6, the codes "PAN", "CHN" and "EPD" in the decrypted data are compared with the codes "PAN", "CHN" and "EPD" in a file corresponding to the code "CA". The host computer checks in step F7 whether or not the coincidence is established. If YES in step F7, the flow advances to step F8, and the OK message is encrypted by the code "CA". However, if NO in step F7, the flow advances to step F9, and the invalid message is encrypted by the code "CA". When the operation in step F8 or F9 is completed, the encrypted data is supplied from the host computer to the POS terminal 41. The POS terminal 41 decrypts the encrypted data from the host computer. The decrypted content is displayed as a result representing of the validity of invalidation of the IC card 11. In this manner, all identification operations are ended. Throughout the above description it is stated that the printed papers with the "PMK" and "IPIN" codes thereon are sent separately to the issuer and card holder, respectively. Preferably, these codes are printed in sealed mailers of the type in which the contents are not known until the sealed mailers are opened. Such mailers are well known in the art. This prevents access to the "PMK" and "IPIN" codes by intermediaries in the issuance procedures, and increase security. At issuance of the IC card by the issuer, in addition to the "PAN" code, the issuer preferably enters other data such as account name, expiration date, use limitation, etc., or any combination of these data items, as desired. In the foregoing description, codes such as "PAN", "CA" and "IPIN" are input by manual keyboard operation. Alternatively, this information can be input automatically by a data processing system. The code "CA" can be randomly generated by a random data generator and automatically input into the IC card 11. At the issuer station 2, the code "PAN" can be pre-set in the issuer's data bank, and can be read out from the issuer's data bank, and automatically stored in the IC card 11. This would eliminate the necessity of the operator keying in the "PAN" at the keyboard 24 of the issuing machine 22. Also, at the time of issuance, the code "CA" can be automatically loaded into the issuer's data base after entry of the "PMK" code. In another modification, the "PMK" code can be written into a card, such as an IC card, which can be sent from the manufacturer to the issuer, and the card can be inserted into a card issuing machine, such as machine 22. At that point, the "PMK" code in the card can be automatically set into the machine 22 for comparison with the "PMK" code already stored in the IC card 11. This eliminates the necessity of manual insertion of the "PMK" code at the keyboard 24, and also increases security since an operator will not know the "PMK" code. Issuing a separate card with a "PMK" code stored therein is efficient since the "PMK" code is used for batches of IC cards 11. Since the "IPIN" code generated by the card holder is unique to an individual card, it is not efficient to use a separate card to store the "IPIN" code, and it is more efficient to generate the "IPIN" code on paper, such as in a sealed, secret type mailer. When the IC card 11 is used in a transaction, such as purchasing items at a merchant store, obtaining cash advances from a bank, etc., the transaction data transmitted to the issuer after the identification process is completed is transmitted in encrypted form by using the "CA" code as the key for the "DES" encryption. At this time, during sending of transaction data to the issuer, the "PAN" code is not encrypted in a preferred arrangement. The "PAN" code is received by the issuer, and the issuer's data bank retrieves the information corresponding to the "PAN" code, such as the "CA" code and any other pertinent information, as desired. After the "CA" code is retrieved from the issuer's data bank, it is used as a key for "DES" decryption of the transaction data. After decryption of the transmitted transaction data, the issuer sends a response message to the terminal issuing the transaction data which could be a positive or negative response, depending upon whether or not the information has been correctly received, whether or not the user's credit line is exceeded, or any other established criteria. The response from the issuer is also preferably encrypted using the "CA" code as the key for "DES" encryption. At the receiving terminal, the response signal is decrypted using the "CA" code from the user's card as the decryption key. Thus, the transaction is completed and the issuer uses the transaction data in the normal manner.

Claims: An IC-card having an IC circuit which comprises; first memory means (61a) for storing at least a plurality of personal data of a card holder; identification data memory means (61b) for storing identification data; interface means (51) for controlling input/output data with respect to the IC-card; and comparing means (64) for comparing external data supplied through said interface means with the identification data stored in said identification data memory means; characterized in that said identification data memory means (61b) includes; second memory means for storing production master key (PMK) data and initialization personal identification number (IPIN) data preset by a manufacturer; and third memory means for storing personal identification number (PIN) entered by a card holder; and said IC circuit further comprises; designating means for designating the PMK data in said second memory means (61b) at an issuing stage; changing means for changing said designating means to designate the IPIN data from the PMK data when said comparing means (64) detects a coincidence between the external data and the PMK data; and permitting means for permitting the card holder to enter the PIN data into said third memory means when said comparing means (64) detects a coincidence between the external data and the IPIN data. An IC card according to claim 1, characterized in that said first memory means (61a) stores different types of card authentication (CA) data in units of IC cards. An IC card according to claim 1, characterized in that said IC circuit includes counting means for counting the number of succeeding noncoincidences signals from said comparing means, and means for inhibiting data read/write operation of said first, second and third memory means (61a, 61b, 61c) and invalidating a corresponding IC card when a count of said counting means has reached a predetermined number. An IC card according to claim 1, characterized in that said IC card includes means (56) for decrypting externally supplied encrypted data. An IC card according to claim 4, characterized in that said first memory means (61 a) stores private key (PRK) data representing a key for decryption. An IC card according to claim 1, characterized in that said first, second and third memory means (61b, 61c) comprise EP-ROMS (Erasable Programmable Read Only Memories).

Inventors: KITCHENER ROBERT ANDREW, KITCHENER, ROBERT ANDREW
Applicants: CASIO COMPUTER CO LTD, CASIO COMPUTER COMPANY LIMITED
Application year: 1985
Main classification: G07F7
IPC codes: G07F7, B42D15, G06K19, G06Q40, G06K17, G06F15, G06F1