WO2000025261A1 - Control program processor for ic card - Google Patents

Control program processor for ic card Download PDF

Info

Publication number
WO2000025261A1
WO2000025261A1 PCT/JP1998/004836 JP9804836W WO0025261A1 WO 2000025261 A1 WO2000025261 A1 WO 2000025261A1 JP 9804836 W JP9804836 W JP 9804836W WO 0025261 A1 WO0025261 A1 WO 0025261A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
program
data
control program
area
Prior art date
Application number
PCT/JP1998/004836
Other languages
French (fr)
Japanese (ja)
Inventor
Hideki Takeyabu
Susumu Okuhara
Toyohiko Kagimasa
Masatoshi Haraguchi
Original Assignee
Hitachi, Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi, Ltd. filed Critical Hitachi, Ltd.
Priority to PCT/JP1998/004836 priority Critical patent/WO2000025261A1/en
Publication of WO2000025261A1 publication Critical patent/WO2000025261A1/en

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/10Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means together with a coded signal, e.g. in the form of personal identification information, like personal identification number [PIN] or biometric data
    • G07F7/1008Active credit-cards provided with means to personalise their use, e.g. with PIN-introduction/comparison system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/24Loading of the microprogram
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/357Cards having a plurality of specified features
    • G06Q20/3576Multiple memory zones on card
    • G06Q20/35765Access rights to memory zones
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/0806Details of the card
    • G07F7/0833Card having specific functional components
    • G07F7/084Additional components relating to data transfer and storing, e.g. error detection, self-diagnosis

Definitions

  • the present invention relates to a technology capable of handling a memory capacity larger than the memory capacity actually mounted on an IC card.
  • the data stored on the IC card or another IC card program is sent to an external device to compensate for the lack of memory.After the program ends, the sent data or IC card program is imported and returned to its original state.
  • the present invention relates to a control program processing device for a card.
  • nonvolatile semiconductor memory device disclosed in Japanese Patent Application Laid-Open No. H08-111807. This non-volatile semiconductor memory device is called from the non-volatile memory when the target data does not exist in the volatile memory when the volatile memory is accessed to retrieve data from the outside. To the external device.
  • the contents of the volatile memory area are stored in the non-volatile memory and then stored in the volatile memory. This allows data to be retrieved and stored beyond the capacity of the volatile memory.
  • An object of the present invention is to enable execution of a program for an IC card without being limited by the capacity of a volatile memory and a nonvolatile memory mounted on the IC card.
  • the purpose is to provide a function that also maintains security.
  • the present invention in order to achieve the above object, when the memory becomes insufficient during execution of the Ic card program, a part of the data of the IC card is sent to an external device to secure a free memory, and then the above program is executed Then, after the execution is completed, the transmitted data is taken back to the IC card and restored.
  • the data sent from the above-mentioned IC card is encrypted in the IC card before the data is sent out.
  • the decryption is performed after the decryption.
  • FIG. 1 is a configuration diagram of a hardware X of an IC card control program processing device.
  • FIG. 2 is a memory block diagram on an IC card.
  • Fig. 3 (a) is a time chart showing command reception and response when the storage means and reload means in the IC card are executed.
  • Fig. 3 (b) is a continuation of Fig. 3 (a).
  • Fig. 4 (a) shows the dynamic load program store dynamics Delete This is a time chart showing command reception and response when the program reload means is executed.
  • Fig. 4 (b) is a continuation of Fig. 4 (a).
  • FIG. 5 (a) is a flowchart of the main processing of the IC card control program processing device.
  • Fig. 5 (b) is a continuation of Fig. 5 (a).
  • FIG. 6 is a flowchart in the RAM area shortage processing of the IC card control program processing device.
  • FIG. 7 (a) is a flowchart of another IC card program call processing of the IC card control program processing device.
  • Fig. 7 (b) is a continuation of Fig. 7 (a).
  • FIG. 8 is a flowchart in the reloading process of the control program processing device for an IC card.
  • FIG. 1 is a schematic functional diagram of an Ic card to which the present invention is applied.
  • the reader / writer 100 communicates data with the IC card 103 via the line I 102.
  • the storage area 101 in the reader / writer 100 is an area for storing data transmitted from the IC card.
  • the control program 107 of the C card 103 exists in the ROM 104, decodes the data received from the reader / writer 100, and the IC card program 110 in the EEPROM 105 Execute In addition, the control program 107 also manages the capacity of the EEPROM 105 and RAM 106 of the IC card.
  • the IC card program 108 is EEPR OM 1 There may be more than one in 0 5.
  • the RAM 106 stores storage data 109 necessary for executing the IC card program 108.
  • the IC card program 108 adds, updates, or deletes data to the stored data 109, and reflects the execution result in the stored data 109.
  • the execution result of the IC card program 100'8 is transmitted to the reader / writer 100 via the line IZO 102.
  • step 8 is interrupted, and another IC card program not used by the IC card program 108 and a part of the stored data are transmitted to the reader / writer 100 via the line I / O 102.
  • an empty area is secured in the EEPROM 105 and the RAM 106, and the execution of the IC card program 108 is resumed.
  • control program 107 After the execution of the IC card program 108, the control program 107 reads the other IC card program and part of the stored data from the reader / writer 100 via the line IZO 102. Return to the original state.
  • the control program 107 encrypts the data to be transmitted because other IC card programs and some of the stored data transmitted by the control program 107 maintain security.
  • the control program 107 decrypts the fetched data and returns to the original state. As a result, the security of other IC card programs and data transmitted by the IC card 103 can be maintained.
  • control program 1 07 suspends the execution of the IC card program 108, requests other IC card program data required for the reader / writer 100 via the line I / O 102, and makes the After retrieving the Z data of another IC card program to the EEPROM 105 and RAM 106 of the IC card, restart the execution of the IC card program.
  • control program 100 ends by deleting other IC card programs and data imported from the reader / writer 100 during execution of the IC card program 108. To return to the original state.
  • FIG. 2 is a memory map of an IC card to which the present invention is applied.
  • the control program 107 is stored in the area R 0 M 104.
  • the EPROM 105 area stores EPROM management data 201, an IC card program A202, and an IC card program B203 used by the control program. There is an EPROM free area 204 as an empty area of the EPROM 105.
  • a usage area 206 and IC card program B usage area 207 are stored respectively.
  • a RAM free area 208 exists as a free area of RAM 106.
  • the EEPR0M management data 201 contains the start address of the IC card program A202 and the IC card program B203, the size of each program, the start address of the EEPROM free area 204, and the The size of the empty area and the usage status of each area are stored.
  • RAM management data 205 contains the start address of IC card program A use area 206 and IC card program B use area 207 and RAM free area 208, and the size of each area and its use. State is stored.
  • the control program 107 manages the memory of the EPROM 105 and the RAM 106 based on the information of the EPOM management data 201 and the RAM management data 205.
  • FIG. 3 (part 1) and FIG. 3 (part 2) are IC card operation time charts in the store / reload of the present invention.
  • the control program 107 After receiving the reset signal from the reader / writer 1003 (301), the control program 107 performs a reset process (302) and transmits an answer reset to the reader / writer 100 ( 3 0 3).
  • the reader / writer 100 sends a command to the IC card 103 after accepting the answer reset (304).
  • the control program 10 decodes the command and executes the IC card program A 202 (305).
  • the IC card program A202 starts processing in response to the instruction of the control program 107 (306).
  • the control program 107 checks the RAM use data 225 by checking the RAM management data 205 (308). At this time, since the IC card program B use area 207 stored in the RAM 106 is not necessary for the operation of the IC card program A 202, the IC card program B use area 2 In order to store 07 in an external device, the data in the IC card program B use area 207 is encrypted (309).
  • a store command is sent to the reader / writer 100 to perform storage (310, 311).
  • the reader / writer 100 sends permission for the store command to the IC card 103 (312).
  • control program After receiving the permission from the reader / writer 100, the control program transmits the encrypted data to the reader / writer 100 (33.3.14).
  • the reader / writer 100 stores the received encrypted data in the storage area 101 (315), and notifies the IC card of the store completion (316). After detecting the completion notification, the control program releases the IC card program B use area 207 and allocates it as the IC card program A use area (3 17). After the assignment is completed, the execution of the program A 202 for the IC force mode is resumed (318).
  • the IC card program A202 restarts the process (310), ends normally, and notifies the control program 101 of the end of execution (320).
  • the control program 107 transmits the execution result of the IC card program A202 and a reload request to the reader / writer 100 (321, 322).
  • the reader / writer 100 stores the data (3 15) stored in the storage area 101. ) Is sent to the IC card 103 (3 2 3).
  • the control program 107 decodes the received data (324) and stores it in the IC card program B use area 207 (325).
  • a reload completion notification is transmitted to the reader / writer 100 (322).
  • the reader / writer 100 After receiving the reload completion notification, the reader / writer 100 transmits a new command to the IC card (322).
  • the IC card program A202 can be operated without being interrupted due to lack of memory.
  • FIG. 4 (part 1) and FIG. 4 (part 2) are operation time charts of the IC card for the program opening Z program store and the dynamic loadno dynamic delete of the present invention.
  • the control program 107 After receiving the reset signal from the reader / writer 100 (401), the control program 107 performs the reset process (402), and transmits the reset signal to the reader / writer 100 ( 4 0 3). The reader / writer 100 sends a command to the IC card 103 after receiving the answer reset (404).
  • the control program 107 decodes the command and executes the IC card program A 202 (405). Upon receiving an instruction from the control program 10, the IC card program A 202 starts processing (406).
  • the control program 107 Since the IC card program A202 calls the IC card program C during execution, the control program 107 requests the control program 107 to call the IC card program C (407). The control program 10 searches whether the IC card program C exists in the EPROM 105 (408).
  • IC card program C exists in EEPROM 105 Therefore, a dynamic load request for the Ic card program c is transmitted to the reader / writer 100 (409, 410).
  • the reader / writer 100 sends the size of the IC card program C to the IC card 103 to the IC card 103 (411).
  • the control program 107 checks whether or not the IC card program C can be stored in the EEPROM, or refers to the EEPROM management data 201 to check (4112). If the IC card program C cannot be stored in the EEPROM 105, a program store request for the unused IC card program B203 existing in the EEPROM 105 is made (4 1 3 , 4 14).
  • the IC card 103 When the permission of the program store request is transmitted from the reader / writer 100 to the IC card 103 (415), the IC card 103 encrypts the IC card program B203. Then, the encrypted data is transmitted to the reader / writer 100 (417, 418).
  • the reader / writer 100 stores the encrypted data in the storage area 101 (419), and notifies the IC card 103 of the completion of the storage (420) o
  • the control program 107 checks again whether or not the IC card program C can be stored in the EPROM with reference to the EPROM management data 2'01 (4221). Confirm that the IC card program C can be stored in the EPROM 105 (422), and notify the reader / writer that dynamic loading is possible (422).
  • the reader / writer 100 transmits the data of the program C for the IC card to the IC card 103 (424).
  • the control program 107 loads the IC card program C data into the EEPROM 105 and decrypts the IC card program C data. Then (425), the loading of the IC card program C is completed (425). After loading is completed, start the execution of the IC card program C (4 2 7) 0
  • the execution of the IC card program C is completed, and the process is passed to the control program 10 end (428).
  • the end of the control program 10 instructs the restart of the IC card program A202 (429), and the execution of the IC card program A202 is restarted (430).
  • the IC card program A202 completes its execution and passes the process to the control program 107 (431).
  • control program 107 dynamically deletes the unnecessary Ic card program C (432), and the IC card program B203. Perform a program read (4 3 3).
  • the control program 107 transmits to the reader / writer 100 a result of the command from the reader / writer 100 and a request to reload the program B for the IC card (433). .
  • the reader / writer 100 transmits the stored data (419) to the IC card 103 (435).
  • the control program 107 decodes the received data (433), stores the IC card program B203 in the EPROM 105, and returns to the original state (433).
  • the reader / writer 100 transmits the next command to the IC card 103 when the reload is completed (433).
  • the IC card program C exists in the IC card. Even without this, the IC card program A can be executed without stopping the execution of the processing.
  • FIG. 5 (part 1) and FIG. 5 (part 2) are flowcharts in the main processing of the control program 107 implementing the present invention.
  • the IC card 103 After receiving the reset signal, the IC card 103 executes the reset processing when the control program 10 ends (501).
  • the received command is analyzed (504).
  • the control program 107 decodes the instructions in the IC card program and executes the IC card program (506) o
  • the RAM area shortage processing (509) is executed to eliminate the RAM area shortage.
  • step 506 After recovering from the abnormal end state, the process returns to step 506 to resume the processing of the IC card program whose execution has been suspended.
  • the IC card program can be executed without abnormal termination of the IC card program due to lack of memory or the inability to call another IC card program.
  • the response data of the IC card program is transmitted to the reader / writer 100 (5 19).
  • the data program stored from the IC card 103 to the reader / writer 100 can be surely reloaded and returned to the original state.
  • FIG. 6 is a chart in the RAM area shortage processing of the control program 107, which realizes a storage means for solving the RAM area shortage in the present invention.
  • the RAM area shortage processing is called from the main processing and executed when the RAM area shortage occurs during the main processing.
  • the other IC card program use area is stored in the reader / writer 100, so the other IC card program use area is encrypted (608), and the encrypted data is read by the reader / writer. Send to 1 0 0 (6 0 9)
  • the other IC card program use area in the RAM 106 area is set as an empty area (6 13), and the RAM area shortage processing ends. I do.
  • FIG. 7 (part 1) and FIG. 7 (part 2) show that even if another IC card program does not exist on the IC card when the other IC card program is called according to the present invention, Call the program Control program that realizes program loading means that enables
  • the other IC card program call processing is called from the main processing when the IC card program does not exist on the IC card when the IC card program executes another IC card program call during the main processing. And executed.
  • a program store is performed to resolve the shortage of the EEPROM 105 area.
  • a check is made to see if another IC input program exists in the area of EEPROM 150 (Step 7 13). At this time, if the area does not exist, the shortage of the area of the EEPROM 105 cannot be solved, so the error is set to be error (714). If so, check if the program is currently in use.
  • the program waits for a response from the reader / writer 1000 to the program store request (Step 7), and after receiving the response, checks whether the program store is acceptable (Step 7).
  • Step 7 If the response is unacceptable, an error occurs (Step 7). If the response is acceptable, the IC card program is encrypted to store the IC card program (Step 7).
  • the encrypted data is transmitted to the reader / writer 100 (721), and a response to the result of the transmission is waited for (722).
  • a program load request is transmitted to the reader / writer 100 to load the program (706).
  • a response to the program load request is received from the reader / writer 100. Wait (770), and after receiving the response,
  • the response is program data
  • the data is decrypted (710), and the decrypted IC card program is stored in EPROM 105 (711).
  • the program After storing, the program is called (7112), and the processing ends.
  • another IC card program can be called even if the program does not exist in the EEPROM 105 area of the IC card 103. .
  • FIG. 8 shows the reloading of the control program 10 which realizes the reloading means for restoring the stored data at the time of executing the RAM area shortage elimination processing or other IC input program call processing in the present invention. It is a flowchart in processing.
  • the reload process is called from the main process and executed when there is read data or a read program at the end of the main process.
  • the reload processing When the reload processing is executed, it is first checked whether data to be reloaded exists in the RAM 106 area (801). If it does not exist, check whether there is a reload program. If so, branch to 808, and if there is reload data, send a reload data request to reader / writer 100 (800) 2).
  • the system waits for a response from the reader / writer 1000 to the reload request (810), and after receiving the response, checks whether the response is a reload program (811). At this time, if it is not a reloading program, an error is detected and the processing is terminated (812).
  • the reload program is decrypted (813), the decrypted reload program is stored in the original area stored in the EEPROM 105 (814), and the IC card is read. Recover the application program.
  • the reload completion is transmitted last (815), so that the reader / writer 100 can transmit the next new command to the IC card 103.
  • an IC card program that operates on an IC card is not restricted by the capacity and amount of volatile memory and nonvolatile memory mounted on the IC card.
  • Program can be executed, greatly reducing the operation restrictions of IC card programs.

Abstract

A control program (106) manages an IC card program (107) stored in an EEPROM (105) and stored data (108) stored in a RAM (106), encodes them and transmits them to a reader/writer (100) if necessary, and secures free areas in the EEPROM (105) and the RAM (106). When the execution of the IC card program is ended, the transmitted data are decoded by the reader/writer (100).

Description

明細書  Specification
I cカード用制御プログラム処理装置  Control program processor for Ic card
技術分野 Technical field
本発明は、 I Cカードに実際に搭載されているメモリ容量よりも大き なメモリ容量を扱うことを可能とする技術に関わり、 特に I Cカード用 'プログラム実行中に I Cカード上のメモリが不足した場合、 I Cカード 上の記憶データまたは他の I Cカード用プログラムを外部装置に送出し てメモリ不足を補い、 プログラム終了後、 送出したデータまたは I C力 ード用プログラムを取り込んで元の状態に戻す、 I Cカード用制御プロ グラム処理装置に関する。  The present invention relates to a technology capable of handling a memory capacity larger than the memory capacity actually mounted on an IC card. The data stored on the IC card or another IC card program is sent to an external device to compensate for the lack of memory.After the program ends, the sent data or IC card program is imported and returned to its original state. The present invention relates to a control program processing device for a card.
背景技術 Background art
従来の技術として、 特開平 8 - 1 1 1 0 8 7号公報に開示されるの不 揮発性半導体記憶装置がある。 この不揮発性半導体記憶装置は、 揮発性 メモリに対して外部からデータを取り出すアクセスが行われたとき、 該 揮発性メモリ内に目的とするデータが存在しない場合は、 不揮発性メモ リから呼び出して目的とするデータを外部装置に応答する。  As a conventional technique, there is a nonvolatile semiconductor memory device disclosed in Japanese Patent Application Laid-Open No. H08-111807. This non-volatile semiconductor memory device is called from the non-volatile memory when the target data does not exist in the volatile memory when the volatile memory is accessed to retrieve data from the outside. To the external device.
また、 外部から揮発性メモリに対してデータを格納するアクセスが行 われたとき、 該揮発性メモリ領域の内容を不揮発性メモリに格納してか ら、 揮発性メモリに格納する。 このことによって揮発性メモリの容量以 上にデータの取り出しや格納を行う。  In addition, when an external data access to the volatile memory is performed, the contents of the volatile memory area are stored in the non-volatile memory and then stored in the volatile memory. This allows data to be retrieved and stored beyond the capacity of the volatile memory.
しかしながら上記従来技術では、 不揮発性メモリ容量以上のデータを 扱うことについて配慮されておらず、 不揮発性メモリ容量以上のデータ の格納 取り出しを行うのは不可能であった。 すなわち、 I Cカード用 プログラム動作中に揮発メモリ領域の不足が発生した場合、 揮発性メモ リのデータを退避する不揮発性メモリの容量が不足すれば、 それ以上に 揮発性メモリの空き領域を確保することは不可能であった。 However, in the above-mentioned conventional technology, no consideration is given to handling data larger than the capacity of the nonvolatile memory, and it is impossible to store and retrieve data larger than the capacity of the nonvolatile memory. In other words, if the volatile memory area becomes insufficient during the operation of the IC card program, the volatile memory If the capacity of the non-volatile memory to save the data of the memory is insufficient, it was impossible to secure more free space in the volatile memory.
本発明の目的は、 I Cカード用プログラムの実行において、 I Cカー ドに搭載される揮発性メモリ 不揮発性メモリの容量に制限されること なく実行可能とすることを目的としておリ、 さらに、 I Cカードのセキ ュリティ性も保つ機能を提供することを目的とする。  An object of the present invention is to enable execution of a program for an IC card without being limited by the capacity of a volatile memory and a nonvolatile memory mounted on the IC card. The purpose is to provide a function that also maintains security.
発明の開示 Disclosure of the invention
本発明は上記目的を達成するため、 I cカード用プログラム実行中に メモリ不足となった場合、 I Cカードのデータの一部を外部装置に送出 して空きメモリを確保した後、 上記プログラムを実行し、 実行終了後、 送出したデータを再度 I Cカードに取り込んで元に戻すようにしたもの である。  According to the present invention, in order to achieve the above object, when the memory becomes insufficient during execution of the Ic card program, a part of the data of the IC card is sent to an external device to secure a free memory, and then the above program is executed Then, after the execution is completed, the transmitted data is taken back to the IC card and restored.
また、 I Cカードのセキュリティ性を保っために、 上記 I Cカードか ら送出するデータは I Cカード内において暗号化を行ってからデータを 送出し、 送出したデータを I Cカードに取り込むときは I Cカード内で 復号化を行って元に戻すようにしたものである。  Also, in order to maintain the security of the IC card, the data sent from the above-mentioned IC card is encrypted in the IC card before the data is sent out. The decryption is performed after the decryption.
図面の簡単な説明 BRIEF DESCRIPTION OF THE FIGURES
第 1 図は、 I Cカード用制御プログラム処理装置のハードウ Xァ構成図 である。 FIG. 1 is a configuration diagram of a hardware X of an IC card control program processing device.
第 2図は、 I Cカード上のメモリブロック図である。 FIG. 2 is a memory block diagram on an IC card.
第 3図 ( a ) は、 I Cカードにおけるストァ手段とリロード手段を実行 した場合の、 コマンドの受信と応答を示すタイムチヤ一トである。 第 3図 ( b ) は、 第 3図 ( a ) の続きである。 Fig. 3 (a) is a time chart showing command reception and response when the storage means and reload means in the IC card are executed. Fig. 3 (b) is a continuation of Fig. 3 (a).
第 4図 ( a ) は、 ダイナミックロード プログラムストア ダイナミツ クデリート zプログラムリロード手段を実行した場合の、 コマンドの受 信と応答を示すタイムチヤ一トである。 Fig. 4 (a) shows the dynamic load program store dynamics Delete This is a time chart showing command reception and response when the program reload means is executed.
第 4図 ( b ) は、 第 4図 ( a ) の続きである。 Fig. 4 (b) is a continuation of Fig. 4 (a).
第 5図 ( a ) は、 I Cカード用制御プログラム処理装置のメイン処理に おけるフローチャートである。 FIG. 5 (a) is a flowchart of the main processing of the IC card control program processing device.
第 5図 ( b ) は、 第 5図 ( a ) の続きである。 Fig. 5 (b) is a continuation of Fig. 5 (a).
第 6図は、 I Cカード用制御プログラム処理装置の R AM領域不足処理 におけるフローチャートである。 FIG. 6 is a flowchart in the RAM area shortage processing of the IC card control program processing device.
第 7図 ( a ) は、 I Cカード用制御プログラム処理装置の他の I Cカー ド用プログラムコール処理におけるフローチヤ一卜である。 FIG. 7 (a) is a flowchart of another IC card program call processing of the IC card control program processing device.
第 7図 ( b ) は、 第 7図 ( a ) の続きである。 Fig. 7 (b) is a continuation of Fig. 7 (a).
第 8図は、 I Cカード用制御プログラム処理装置のリロード処理におけ るフローチヤ一卜でめる。 FIG. 8 is a flowchart in the reloading process of the control program processing device for an IC card.
発明を実施するための最良の形態 BEST MODE FOR CARRYING OUT THE INVENTION
以下、 本発明の実施例について図面で説明する。  Hereinafter, embodiments of the present invention will be described with reference to the drawings.
第 1 図は本発明を適用した I cカードの機能概略図である。 リ一ダラ イタ 1 0 0は線 I 0 1 0 2を通じて I Cカード 1 0 3に対してデータ の通信を行う。  FIG. 1 is a schematic functional diagram of an Ic card to which the present invention is applied. The reader / writer 100 communicates data with the IC card 103 via the line I 102.
リーダライタ 1 0 0内の記憶領域 1 0 1 は I Cカードから送信された データを記憶する領域である。  The storage area 101 in the reader / writer 100 is an area for storing data transmitted from the IC card.
卜 Cカード 1 0 3の制御プログラム 1 0 7は R OM 1 0 4に存在し、 リーダライ夕 1 0 0から受信したデータを解読して E E P R OM 1 0 5 に存在する I Cカード用プログラム 1 0 8を実行する。 また、 制御プロ グラム 1 0 7は I Cカードの E E P R OM 1 0 5、 R A M 1 0 6の容量 管理も行う。 ここで、 I Cカード用プログラム 1 0 8は E E P R OM 1 0 5内に複数存在しても構わない。 The control program 107 of the C card 103 exists in the ROM 104, decodes the data received from the reader / writer 100, and the IC card program 110 in the EEPROM 105 Execute In addition, the control program 107 also manages the capacity of the EEPROM 105 and RAM 106 of the IC card. Here, the IC card program 108 is EEPR OM 1 There may be more than one in 0 5.
R AM 1 0 6には I Cカード用プログラム 1 0 8の実行に必要な記憶 データ 1 0 9が格納されている。 I Cカード用プログラム 1 0 8は記憶 データ 1 0 9に対してデータの追加 Z更新 削除を行い、 実行結果を記 憶データ 1 0 9に反映する。 I Cカード用プログラム 1 0 8が終了して 制御プログラム 1 0 7に処理を渡したら、 I Cカード用プログラム 1 0 ' 8の実行結果が線 I ZO 1 0 2を通じてリーダライタ 1 0 0に送信する 制御プログラム 1 0 7は I Cカード用プログラム 1 0 8を実行中に、 I Cカードの E E P R OM 1 0 5、 R AM 1 0 6の容量が不足した場合 、 制御プログラム 1 0 7は I Cカード用プログラム 1 0 8の実行を中断 し、 I Cカード用プログラム 1 0 8が使用していない他の I Cカード用 プログラムや記憶データの一部を、 線 I /0 1 0 2を通じてリーダライ 夕 1 0 0に送出する。 これにより E E P R OM 1 0 5、 R AM 1 0 6に 空き領域を確保し、 I Cカード用プログラム 1 0 8の実行を再開する。  The RAM 106 stores storage data 109 necessary for executing the IC card program 108. The IC card program 108 adds, updates, or deletes data to the stored data 109, and reflects the execution result in the stored data 109. After the IC card program 108 is completed and the process is passed to the control program 107, the execution result of the IC card program 100'8 is transmitted to the reader / writer 100 via the line IZO 102. If the capacity of the EEPROM 105 and RAM 106 of the IC card is insufficient while the program 107 is executing the IC card program 108, the control program 107 becomes the IC card program 10 The execution of step 8 is interrupted, and another IC card program not used by the IC card program 108 and a part of the stored data are transmitted to the reader / writer 100 via the line I / O 102. As a result, an empty area is secured in the EEPROM 105 and the RAM 106, and the execution of the IC card program 108 is resumed.
I Cカード用プログラム 1 0 8の実行終了後、 制御プログラム 1 0 7 は送出した他の I Cカード用プログラムや記憶データの一部が線 I ZO 1 0 2を通じてリ一ダライタ 1 0 0から取り込むことにより元の状態に 戻す。  After the execution of the IC card program 108, the control program 107 reads the other IC card program and part of the stored data from the reader / writer 100 via the line IZO 102. Return to the original state.
このことにより、 I Cカード用プログラム 1 0 8は I Cカード 1 0 3 のメモリ不足によってプログラムの実行を中止されることがなくなる。 このときに制御プログラム 1 0 7が送出する他の I Cカード用プログ ラムや記憶データの一部はセキュリティ性を保っため、 制御プログラム 1 0 7は送出するデータに対して暗号化を行う。 また、 送出したデータ を取り込んで元の状態に戻すとき、 制御プログラム 1 0 7は取り込んだ データに対して復号化を行って元の状態に戻す。 このことにより、 I Cカード 1 0 3が送出した他の I Cカード用プロ グラムやデータのセキュリティ性を保つことが可能となる。 As a result, the execution of the IC card program 108 is not stopped due to the lack of memory of the IC card 103. At this time, the control program 107 encrypts the data to be transmitted because other IC card programs and some of the stored data transmitted by the control program 107 maintain security. When the transmitted data is fetched and returned to the original state, the control program 107 decrypts the fetched data and returns to the original state. As a result, the security of other IC card programs and data transmitted by the IC card 103 can be maintained.
また、 I Cカード用プログラム 1 0 8実行中に必要とする他の I C力 一ド用プログラム及び/またはデータが I Cカードの E E P R OM 1 0 5、 R A Μ 1 0 6に存在しない場合、 制御プログラム 1 0 7は I Cカー ド用プログラム 1 0 8の実行を一時中断し、 線 I ノ0 1 0 2を通じてリ '一ダライタ 1 0 0に必要とする他の I Cカード用プログラム データを 要求し、 必要とする他の I Cカード用プログラム Zデータを I Cカード の E E P R OM 1 0 5、 R A M 1 0 6に取り込んだ後、 I Cカード用プ ログラムの実行を再開する。  In addition, if other IC input programs and / or data required during execution of the IC card program 108 do not exist in the IC card EEPROM 105 and RA Μ 106, the control program 1 07 suspends the execution of the IC card program 108, requests other IC card program data required for the reader / writer 100 via the line I / O 102, and makes the After retrieving the Z data of another IC card program to the EEPROM 105 and RAM 106 of the IC card, restart the execution of the IC card program.
I Cカード用プログラム 1 0 8の実行が終了した後、 制御プログラム 1 0 了は I Cカード用プログラム 1 0 8実行中にリーダライタ 1 0 0か ら取り込んだ他の I Cカード用プログラムやデータを削除して元の状態 に戻す。  After the execution of the IC card program 108 is completed, the control program 100 ends by deleting other IC card programs and data imported from the reader / writer 100 during execution of the IC card program 108. To return to the original state.
このことにより I Cカード用プログラム 1 0 8を実行する前に、 I C カード用プログラム 1 0 8が必要とする他の I Cカード用プログラムや データを事前に I Cカード 1 0 3に取り込んでおく必要がなく、 I C力 ード 1 0 3の E E P R OM 1 0 5、 R A M 1 0 6が有効に使えることが 可能となる。  This eliminates the need to load other IC card programs and data required by the IC card program 108 into the IC card 103 before executing the IC card program 108. This makes it possible to effectively use the EEPROM 105 and the RAM 106 of the IC card 103.
第 2図は本発明を適用した I Cカードのメモリマップである。  FIG. 2 is a memory map of an IC card to which the present invention is applied.
R 0 M 1 0 4の領域には制御プログラム 1 0 7が格納される。  The control program 107 is stored in the area R 0 M 104.
E E P R OM 1 0 5の領域には制御プログラムが使用する E E P R OM 管理データ 2 0 1、 I Cカード用プログラム A 2 0 2、 I Cカード用プ ログラム B 2 0 3がそれぞれ格納される。 E E P R OM 1 0 5の空き領 域として E E P R OM空き領域 2 0 4が存在する。  The EPROM 105 area stores EPROM management data 201, an IC card program A202, and an IC card program B203 used by the control program. There is an EPROM free area 204 as an empty area of the EPROM 105.
R A M 1 0 6には R AM管理データ 2 0 5、 I Cカード用プログラム A使用領域 2 0 6、 I Cカード用プログラム B使用領域 2 0 7がそれぞ れ格納される。 R AM 1 0 6の空き領域として R AM空き領域 2 0 8が 存在する。 RAM management data 205, IC card program in RAM 106 A usage area 206 and IC card program B usage area 207 are stored respectively. A RAM free area 208 exists as a free area of RAM 106.
E E P R 0 M管理データ 2 0 1 には I Cカード用プログラム A 2 0 2 及び I Cカード用プログラム B 2 0 3の先頭ァドレス、 それぞれのプロ グラムの大きさ、 E E P R OM空き領域 2 0 4の先頭ァドレスおよび空 'き領域の大きさと、 それぞれの使用状態が格納されている。  The EEPR0M management data 201 contains the start address of the IC card program A202 and the IC card program B203, the size of each program, the start address of the EEPROM free area 204, and the The size of the empty area and the usage status of each area are stored.
R AM管理データ 2 0 5には I Cカード用プログラム A使用領域 2 0 6及び I Cカード用プログラム B使用領域 2 0 7及び R AM空き領域 2 0 8の先頭アドレス及び領域の大きさと、 それぞれの使用状態が格納さ れている。  RAM management data 205 contains the start address of IC card program A use area 206 and IC card program B use area 207 and RAM free area 208, and the size of each area and its use. State is stored.
制御プログラム 1 0 7は E E P R OM管理データ 2 0 1及び R AM管 理データ 2 0 5の情報を元にして E E P R OM 1 0 5、 R AM 1 0 6の メモリ管理を行う。  The control program 107 manages the memory of the EPROM 105 and the RAM 106 based on the information of the EPOM management data 201 and the RAM management data 205.
[実施の形態 1 ]  [Embodiment 1]
第 3図 (その 1 ) および第 3図 (その 2 ) は、 本発明のストア/リロ 一ドにおける I Cカード動作タイムチヤ一卜である。  FIG. 3 (part 1) and FIG. 3 (part 2) are IC card operation time charts in the store / reload of the present invention.
制御プログラム 1 0 7はリーダライタ 1 0 0からリセッ 卜信号受付け 後 ( 3 0 1 ) 、 リセッ 卜処理を行い ( 3 0 2 )·、 アンサーッウーリセッ 卜をリーダライタ 1 0 0に送信する ( 3 0 3 ) 。  After receiving the reset signal from the reader / writer 1003 (301), the control program 107 performs a reset process (302) and transmits an answer reset to the reader / writer 100 ( 3 0 3).
リーダライ夕 1 0 0はアンサーッウーリセッ 卜受付け後 I Cカード 1 0 3に対してコマンドを送信する ( 3 0 4 ) 。 制御プログラム 1 0 了は コマンドを解読し、 I Cカード用プログラム A 2 0 2の実行を行う ( 3 0 5 ) 。 I Cカード用プログラム A 2 0 2は制御プログラム 1 0 7の指 示を受けて処理を開始する ( 3 0 6 ) 。  The reader / writer 100 sends a command to the IC card 103 after accepting the answer reset (304). The control program 10 decodes the command and executes the IC card program A 202 (305). The IC card program A202 starts processing in response to the instruction of the control program 107 (306).
し力、し、 I Cカード用プログラム A 2 0 2実行中に R AM空き領域 2 0 8よりも大きな作業領域が必要となり、 R AM領域不足となって I C カード用プログラム A 2 0 2の処理が中断して制御プログラム 1 0 7に 戻る ( 3 0 7 ) 。 RAM area during execution of IC card program A 202 A work area larger than 08 is required, and the RAM area becomes insufficient, so that the processing of the IC card program A202 is interrupted and the program returns to the control program 107 (307).
制御プログラム 1 0 7は R AM管理データ 2 0 5をチヱックして R A Mの使用状態を調べる ( 3 0 8 ) 。 このとき、 R AM 1 0 6に記憶して いる I Cカード用プログラム B使用領域 2 0 7は I Cカード用プログラ '厶 A 2 0 2の動作に必要ないことから、 I Cカード用プログラム B使用 領域 2 0 7を外部装置にス卜ァするため、 I Cカード用プログラム B使 用領域 2 0 7のデータの暗号化を行う ( 3 0 9 ) 。  The control program 107 checks the RAM use data 225 by checking the RAM management data 205 (308). At this time, since the IC card program B use area 207 stored in the RAM 106 is not necessary for the operation of the IC card program A 202, the IC card program B use area 2 In order to store 07 in an external device, the data in the IC card program B use area 207 is encrypted (309).
データの暗号化終了後、 ストアを行うためリーダライタ 1 0 0に対し てストァ命令を送信する ( 3 1 0 , 3 1 1 ) 。 リーダライタ 1 0 0はス トァ命令に対する許可を I Cカード 1 0 3に送信する ( 3 1 2 ) 。  After the data encryption is completed, a store command is sent to the reader / writer 100 to perform storage (310, 311). The reader / writer 100 sends permission for the store command to the IC card 103 (312).
制御プログラムはリーダライタ 1 0 0から許可を受けた後、 暗号化さ れたデータをリーダライタ 1 0 0に送信する ( 3 1 3. 3 1 4 ) 。  After receiving the permission from the reader / writer 100, the control program transmits the encrypted data to the reader / writer 100 (33.3.14).
リーダライタ 1 0 0は受信した暗号化されたデータを記憶領域 1 0 1 に記憶し ( 3 1 5 ) 、 ストァ完了を I Cカードに通知する ( 3 1 6 ) 。 制御プログラムは完了通知を検出した後、 I Cカード用プログラム B 使用領域 2 0 7を開放して I Cカード用プログラム A使用領域として割 リ当てる ( 3 1 7 ) 。 割当て完了後、 I C力マド用プログラム A 2 0 2 の実行を再開する ( 3 1 8 ) 。  The reader / writer 100 stores the received encrypted data in the storage area 101 (315), and notifies the IC card of the store completion (316). After detecting the completion notification, the control program releases the IC card program B use area 207 and allocates it as the IC card program A use area (3 17). After the assignment is completed, the execution of the program A 202 for the IC force mode is resumed (318).
I Cカード用プログラム A 2 0 2は処理を再開して ( 3 1 9 ) 、 正常 に終了し、 制御プログラム 1 0 1に実行終了を通知する ( 3 2 0 ) 。 制御プログラム 1 0 7は I Cカード用プログラム A 2 0 2の実行結果 とリロード要求をリ一ダライタ 1 0 0に対して送信する ( 3 2 1, 3 2 2 ) 。  The IC card program A202 restarts the process (310), ends normally, and notifies the control program 101 of the end of execution (320). The control program 107 transmits the execution result of the IC card program A202 and a reload request to the reader / writer 100 (321, 322).
リーダライタ 1 0 0は記憶領域 1 0 1 に記憶していたデータ ( 3 1 5 ) を I Cカード 1 0 3に対して送信する ( 3 2 3 ) 。 制御プログラム 1 0 7は受信したデータを復号化して ( 3 2 4 ) 、 I Cカード用プログラ 厶 B使用領域 2 0 7に格納する ( 3 2 5 ) 。 The reader / writer 100 stores the data (3 15) stored in the storage area 101. ) Is sent to the IC card 103 (3 2 3). The control program 107 decodes the received data (324) and stores it in the IC card program B use area 207 (325).
リロード終了後、 リーダライタ 1 0 0に対してリロード完了通知を送 信する ( 3 2 6 ) 。 リーダライタ 1 0 0はリロード完了通知受付け後、 新たなコマンドを I Cカードに対して送信する ( 3 2 7 ) 。  After the reload is completed, a reload completion notification is transmitted to the reader / writer 100 (322). After receiving the reload completion notification, the reader / writer 100 transmits a new command to the IC card (322).
以上のことにより、 I Cカード用プログラム A 2 0 2はメモリ不足に よって実行を中止されることなく、 動作可能となる。  As described above, the IC card program A202 can be operated without being interrupted due to lack of memory.
[実施の形態 2 ]  [Embodiment 2]
第 4図 (その 1 ) および第 4図 (その 2 ) は、 本発明のプログラム口 一ド Zプログラムストァおよびダイナミックロードノダイナミックデリ ートについての I Cカード動作タイムチャートである。  FIG. 4 (part 1) and FIG. 4 (part 2) are operation time charts of the IC card for the program opening Z program store and the dynamic loadno dynamic delete of the present invention.
制御プログラム 1 0 7はリーダライタ 1 0 0からリセッ 卜信号受付け 後 ( 4 0 1 ) 、 リセッ ト処理を行い ( 4 0 2 ) 、 ァンサーッウーリセッ 卜をリーダライタ 1 0 0に送信する ( 4 0 3 ) 。 リーダライタ 1 0 0は アンサーッウーリセッ ト受付け後 I Cカード 1 0 3に対してコマンドを 送信する ( 4 0 4 ) 。  After receiving the reset signal from the reader / writer 100 (401), the control program 107 performs the reset process (402), and transmits the reset signal to the reader / writer 100 ( 4 0 3). The reader / writer 100 sends a command to the IC card 103 after receiving the answer reset (404).
制御プログラム 1 0 7はコマンドを解読し、 I Cカード用プログラム A 2 0 2の実行を行う ( 4 0 5 ) 。 制御プログラム 1 0 了より指示を受 けて、 I Cカード用プログラム A 2 0 2は処理を開始する ( 4 0 6 ) 。  The control program 107 decodes the command and executes the IC card program A 202 (405). Upon receiving an instruction from the control program 10, the IC card program A 202 starts processing (406).
I Cカード用プログラム A 2 0 2は実行中に I Cカード用プログラム Cの呼び出しを行うため、 制御プログラム 1 0 7に対して I Cカード用 プログラム Cの呼び出しを要求する ( 4 0 7 ) 。 制御プログラム 1 0 了 は I Cカード用プログラム Cが E E P R O M 1 0 5内に存在するか検索 する ( 4 0 8 ) 。  Since the IC card program A202 calls the IC card program C during execution, the control program 107 requests the control program 107 to call the IC card program C (407). The control program 10 searches whether the IC card program C exists in the EPROM 105 (408).
しカヽし、 E E P R O M 1 0 5内には I Cカード用プログラム Cが存在 しないため、 I cカード用プログラム cのダイナミックロード要求をリ 一ダライタ 1 0 0に対して送信する ( 4 0 9 , 4 1 0 ) 。 リーダライタ 1 0 0は I Cカード 1 0 3に対して I Cカード用プログラム Cの大きさ を I Cカード 1 0 3に対して送信する ( 4 1 1 ) 。 However, IC card program C exists in EEPROM 105 Therefore, a dynamic load request for the Ic card program c is transmitted to the reader / writer 100 (409, 410). The reader / writer 100 sends the size of the IC card program C to the IC card 103 to the IC card 103 (411).
制御プログラム 1 0 7は I Cカード用プログラム Cが E E P R OMに 格納できるか、 E E P R OM管理データ 2 0 1 を参照してチ ιックする ' ( 4 1 2 ) 。 E E P R OM 1 0 5に I Cカード用プログラム Cが格納で きない場合、 E E P R OM 1 0 5内に存在する、 使用されていない I C カード用プログラム B 2 0 3のプログラムストァ要求を行う ( 4 1 3, 4 1 4 ) 。  The control program 107 checks whether or not the IC card program C can be stored in the EEPROM, or refers to the EEPROM management data 201 to check (4112). If the IC card program C cannot be stored in the EEPROM 105, a program store request for the unused IC card program B203 existing in the EEPROM 105 is made (4 1 3 , 4 14).
リーダライ夕 1 0 0からプログラムス 卜ァ要求の許可が I Cカード 1 0 3に対して送信されると ( 4 1 5 ) 、 I Cカード 1 0 3は I Cカード 用プログラム B 2 0 3の暗号化を行い ( 4 1 6 ) 、 暗号化されたデータ をリーダライタ 1 0 0に対して送信する ( 4 1 7, 4 1 8 ) 。  When the permission of the program store request is transmitted from the reader / writer 100 to the IC card 103 (415), the IC card 103 encrypts the IC card program B203. Then, the encrypted data is transmitted to the reader / writer 100 (417, 418).
リーダライタ 1 0 0は暗号化されたデータを記憶領域 1 0 1 に記憶し ( 4 1 9 ) 、 記憶完了を I Cカード 1 0 3に対して通知する ( 4 2 0 ) o  The reader / writer 100 stores the encrypted data in the storage area 101 (419), and notifies the IC card 103 of the completion of the storage (420) o
制御プログラム 1 0 7は再度 I Cカード用プログラム Cが E E P R O Mに格納できるか、 E E P R OM管理データ 2' 0 1 を参照してチェ ック し ( 4 2 1 ) 。 E E P R OM 1 0 5に I Cカード用プログラム Cが格納 できることを確認して ( 4 2 2 ) 、 リ一ダライタにダイナミックロード 可能であることを通知する ( 4 2 3 ) 。  The control program 107 checks again whether or not the IC card program C can be stored in the EPROM with reference to the EPROM management data 2'01 (4221). Confirm that the IC card program C can be stored in the EPROM 105 (422), and notify the reader / writer that dynamic loading is possible (422).
リーダライタ 1 0 0は I Cカード用プログラム Cのデータを I Cカー ド 1 0 3に送信する ( 4 2 4 ) 。  The reader / writer 100 transmits the data of the program C for the IC card to the IC card 103 (424).
制御プログラム 1 0 7は I Cカード用プログラム Cのデータを E E P R OM 1 0 5にロードし、 I Cカード用プログラム Cのデータを復号化 して ( 4 2 5 ) 、 I Cカード用プログラム Cのロードを完了する ( 4 2 6 ) 。 ロード完了後、 I Cカード用プログラム Cの実行を開始する ( 4 2 7 ) 0 The control program 107 loads the IC card program C data into the EEPROM 105 and decrypts the IC card program C data. Then (425), the loading of the IC card program C is completed (425). After loading is completed, start the execution of the IC card program C (4 2 7) 0
I Cカード用プログラム Cは実行が終了し、 制御プログラム 1 0 了へ 処理を渡す ( 4 2 8 ) 。 制御プログラム 1 0 了は I Cカード用プログラ 厶 A 2 0 2の再開を指示し ( 4 2 9 ) 、 I Cカード用プログラム A 2 0 2の実行が再開される ( 4 3 0 ) 。 I Cカード用プログラム A 2 0 2は 実行を終了し、 制御プログラム 1 0 7へ処理を渡す ( 4 3 1 ) 。  The execution of the IC card program C is completed, and the process is passed to the control program 10 end (428). The end of the control program 10 instructs the restart of the IC card program A202 (429), and the execution of the IC card program A202 is restarted (430). The IC card program A202 completes its execution and passes the process to the control program 107 (431).
制御プログラム 1 0 7はリーダライ夕 1 0 0からのコマンドに対する 処理が終了したことにより、 不要な I cカード用プログラム Cをダイナ ミックデリートし ( 4 3 2 ) 、 I Cカード用プログラム B 2 0 3のプロ グラムリ□一ドを行う ( 4 3 3 ) 。  When the processing for the command from the reader / writer 100 has been completed, the control program 107 dynamically deletes the unnecessary Ic card program C (432), and the IC card program B203. Perform a program read (4 3 3).
制御プログラム 1 0 7はリーダライタ 1 0 0からのコマンドに対する 結果と I Cカード用プログラム Bのリロード要求をリーダライタ 1 0 0 に対して送信する ( 4 3 4 ) 。 .  The control program 107 transmits to the reader / writer 100 a result of the command from the reader / writer 100 and a request to reload the program B for the IC card (433). .
リーダライタ 1 0 0は記憶データ ( 4 1 9 ) を I Cカード 1 0 3に対 して送信する ( 4 3 5 ) 。  The reader / writer 100 transmits the stored data (419) to the IC card 103 (435).
制御プログラム 1 0 7は受信したデータの復号化を行い ( 4 3 6 ) 、 E E P R OM 1 0 5に I Cカード用プログラム B 2 0 3を格納して元の 状態に戻す ( 4 3 7 ) 。  The control program 107 decodes the received data (433), stores the IC card program B203 in the EPROM 105, and returns to the original state (433).
制御プログラム 1 0 了はプログラムリロードが完了したことをリーダ ライタ 1 0 0に送信する ( 4 3 8 ) 。  When the control program 100 is completed, the completion of the program reload is transmitted to the reader / writer 100 (433).
リ一ダライタ 1 0 0はリロードが完了したことによって次のコマンド を I Cカード 1 0 3に送信する ( 4 3 9 ) 。  The reader / writer 100 transmits the next command to the IC card 103 when the reload is completed (433).
以上、 上記処理の繰り返しとなる。  As described above, the above processing is repeated.
このことにより、 I Cカード用プログラム Cが I Cカード内に存在し なくても、 I Cカード用プログラム Aは処理の実行を中止することなく 、 実行することができる。 As a result, the IC card program C exists in the IC card. Even without this, the IC card program A can be executed without stopping the execution of the processing.
第 5図 (その 1 ) および第 5図 (その 2 ) は、 本発明を実現した制御 プログラム 1 0 7のメイン処理におけるフ□一チヤ一トである。  FIG. 5 (part 1) and FIG. 5 (part 2) are flowcharts in the main processing of the control program 107 implementing the present invention.
I Cカード 1 0 3はリセッ ト信号受付け後、 制御プログラム 1 0 了は リセッ ト処理を実行する ( 5 0 1 ) 。  After receiving the reset signal, the IC card 103 executes the reset processing when the control program 10 ends (501).
リセッ ト処理終了後、 アンサーッウーリセッ ト信号を送信する ( 5 0 2 ) o  After reset processing, send an answer reset signal (502) o
アンサーッウーリセッ ト信号送信後、 リーダライタ 1 0 0から送信さ れるコマン ドの受信待ちをする ( 5 0 3 ) 。  After transmitting the answer reset signal, it waits for the command transmitted from reader / writer 100 (503).
リーダライタ 1 0 0から送信されたコマンドを受信後、 受信したコマ ン ドの解析を行う ( 5 0 4 ) 。  After receiving the command transmitted from the reader / writer 100, the received command is analyzed (504).
受信したコマンドが I Cカード用プログラムに対するコマンドの場合 、 I Cカード用プログラムの実行を開始する ( 5 0 5 ) 。 このとき I C カード用プログラムは、 制御プログラム 1 0 7が I Cカード用プログラ ム内の命令を解読して I Cカード用プログラムの実行を行っていく ( 5 0 6 ) o  If the received command is a command for the IC card program, execution of the IC card program is started (505). At this time, in the IC card program, the control program 107 decodes the instructions in the IC card program and executes the IC card program (506) o
I Cカード用プログラムの実行が終了すると、 当該 I Cカード用プロ グラムが正常に終了したかチヱックする ( 5 0 7 ) 。 正常終了したので あれば (A) へ分岐し、 終了処理を行う。 異常終了した場合、 制御プロ グラム 1 0 7は異常終了の要因解析を行う。  When the execution of the IC card program ends, a check is made as to whether the IC card program has ended normally (507). If normal termination, branch to (A) and perform termination processing. In the case of abnormal termination, the control program 107 analyzes the cause of the abnormal termination.
このとき、 異常終了の要因が 「R AM領域不足」 の場合 ( 5 0 8 ) 、 R AM領域不足処理 ( 5 0 9 ) の処理を実行して R AM領域不足を解消 する。  At this time, if the cause of the abnormal termination is "RAM area shortage" (508), the RAM area shortage processing (509) is executed to eliminate the RAM area shortage.
また異常終了の要因が 「他の I Cカード用プログラム存在せず」 の場 合 ( 5 1 0 ) 、 他の I Cカード用プログラムロード処理 ( 5 1 1 ) を実 行して他の I Cカード用プログラムを実行できるようにする。 If the cause of the abnormal termination is "No other IC card program exists" (510), the other IC card program load processing (511) is executed. To execute other IC card programs.
異常終了状態から回復後、 5 0 6の処理に戻って実行を中断していた I Cカード用プログラムの処理を再開する。  After recovering from the abnormal end state, the process returns to step 506 to resume the processing of the IC card program whose execution has been suspended.
このことにより、 I Cカード用プログラムはメモリ不足や他の I C力 ード用プログラムの呼び出し不可の理由により、 I Cカード用プログラ 厶が異常終了することなく、 実行することが可能となる。  As a result, the IC card program can be executed without abnormal termination of the IC card program due to lack of memory or the inability to call another IC card program.
I Cカード用プログラム実行終了後、 (A) から始まる I Cカード用 プログラム終了処理行う。  After the execution of the program for the IC card, the program for the IC card starting from (A) is terminated.
I Cカード用プログラム実行中にダイナミックロードしたプログラム が存在するかチェックする ( 5 1 3 ) 。 このときダイナミック□ードし た他の I Cカード用プログラムが E E P R OM 1 0 5にロードされてい た場合、 当該 I Cカード用プログラムを削除 (ダイナミックデリー卜) する ( 5 1 4 ) 。  Check whether a dynamically loaded program exists during the execution of the IC card program (5 13). At this time, if another IC card program that has been dynamically loaded has been loaded into the EPROM 105, the relevant IC card program is deleted (dynamic delete) (5 14).
次に I Cカード用プログラム実行中に R AM 1 0 6領域内のデータス 卜ァを実行したかチヱックする ( 5 1 5 ) 。 このとき R AM 1 0 6領域 内のデータのストァが実行されていたならば、 I Cカード用プログラム 実行結果のレスポンスデータにデータリロード指示を付加する ( 5 1 6 Next, during execution of the program for the IC card, it is checked whether or not the data store in the RAM106 area was executed (515). At this time, if the storage of the data in the RAM106 area was executed, a data reload instruction is added to the response data of the execution result of the IC card program (5 16
) o ) o
これにより、 I Cカード用プログラム実行結果レスポンス送信時に、 リ一ダライタ 1 0 0は I Cカード 1 0 3にデータをリ口一ドする必要が あることを認識することができる。  This enables the reader / writer 100 to recognize that it is necessary to re-read data to the IC card 103 when transmitting an IC card program execution result response.
同様に、 I Cカード用プログラム実行中に E E P R OM 1 0 5領域内 の I Cカード用プログラムストァを実行したかチヱックする ( 5 1 7 ) 。 このとき E E P R OM 1 0 5領域内の I Cカード用プログラムのスト ァが実行されていたならば、 I Cカード用プログラム実行結果のレスポ ンスデータにプログラムリロード指示を付加する ( 5 1 8 ) 。 これにより、 I Cカード用プログラム実行結果レスポンス送信時に、 リーダライタ 1 0 0は に Cカード 1 0 3にストアした I Cカード用プロ グラムをリロードする必要があることを認識することができる。 Similarly, it is checked whether the IC card program store in the EEPROM 105 area was executed during the execution of the IC card program (5 17). At this time, if the IC card program store in the EEPROM 105 area has been executed, a program reload instruction is added to the response data of the IC card program execution result (5 18). This allows the reader / writer 100 to recognize that it is necessary to reload the IC card program stored in the C card 103 when the IC card program execution result response is transmitted.
以上のレスポンスデータを付加した後、 リーダライタ 1 0 0に対して I Cカード用プログラムのレスポンスデータを送信する ( 5 1 9 ) 。  After adding the above response data, the response data of the IC card program is transmitted to the reader / writer 100 (5 19).
レスポンス送信後、 リロードするデータまたはプログラムが存在する かチヱックし ( 5 2 0 ) 、 存在するならば、 リロード処理 ( 5 2 1 ) を 実行して、 リーダライタ 1 0 0から新たなコマンドを受信するため 5 0 3の処理へ戻る。  After sending the response, it checks whether the data or program to be reloaded exists (520), and if it exists, executes the reload process (520) to receive a new command from the reader / writer 100. Therefore, the processing returns to 503.
これにより、 I Cカード 1 0 3からリーダライタ 1 0 0に対してス ト ァしたデータノプログラムは確実にリロードして、 元の状態に戻すこと が可能となる。  As a result, the data program stored from the IC card 103 to the reader / writer 100 can be surely reloaded and returned to the original state.
第 6図は、 本発明における R AM領域不足を解消するためのストァ手 段を実現した、 制御プログラム 1 0 7の R AM領域不足処理におけるフ □一チャー トである。  FIG. 6 is a chart in the RAM area shortage processing of the control program 107, which realizes a storage means for solving the RAM area shortage in the present invention.
R AM領域不足処理は、 メィン処理実行中に R AM領域不足が発生す ると、 メイン処理から呼び出されて実行される。  The RAM area shortage processing is called from the main processing and executed when the RAM area shortage occurs during the main processing.
R AM領域不足処理実行開始時、 R AM 1 0 6の領域内に他の I C力 一ド用プログラム使用領域が存在するかチ Xツクする ( 6 0 1 ) 。 この とき、 R AM 1 0 6の領域内に他の I Cカード用プログラム使用領域が 存在しないとき、 R AM領域不足は解消できないためエラーとし、 エラ 一処理へ分岐する ( 6 0 2 ) 。  When the execution of the RAM area shortage processing starts, it is checked whether or not there is another program area for the IC command in the area of RAM106 (601). At this time, if there is no other IC card program use area in the RAM 106 area, an error occurs because the RAM area shortage cannot be resolved and the processing branches to error processing (602).
もし、 R AM 1 0 6の領域内に他の I Cカード用プログラム使用領域 が存在するならば、 当該領域は使用中か判断する ( 6 0 3 ) 。 使用中で あれば、 別の他の I Cカード用プログラム使用領域をチ:!:ックするため 6 0 1 へ戻る。 使用中でなければ当該領域をリーダライタ 1 0 0へス ト ァするため、 リーダライタ 1 0 0に対してデータス 卜ァ要求を送信する ( 6 0 4 ) o If another IC card program use area exists in the RAM 106 area, it is determined whether the area is in use (603). If it is in use, select another IC card program area:! : Return to 6 0 1 to check. If it is not in use, store the area to reader / writer 100 A data store request to reader / writer 100 to perform
リーダライタ 1 0 0から 6 0 4で送信した要求に対するレスポンスの 受信待ちを行い ( 6 0 5 ) 、 レスポンス受信後、 受信したレスポンスが ス トア要求を受付可能か判断する ( 6 0 6 ) 。 このとき、 受付可能でな ければデータをス トァすることができないことから、 R AM 1 0 6の領 '域不足を解消できないためエラーとし、 エラー処理へ分岐する ( 6 0 7 It waits for a response to the request transmitted by the reader / writers 100 to 604 (605), and after receiving the response, determines whether the received response can accept a store request (606). At this time, if the data cannot be received, the data cannot be stored. Therefore, it is not possible to solve the shortage of the area of the RAM 106, so that an error occurs, and the process branches to error processing (6007).
) o ) o
受付可能であれば他の I cカード用プログラム使用領域をリーダライ タ 1 0 0にストァするため、 他の I Cカード用プログラム使用領域を暗 号化し ( 6 0 8 ) 、 暗号化したデータをリーダライタ 1 0 0に送信する ( 6 0 9 )  If it can be accepted, the other IC card program use area is stored in the reader / writer 100, so the other IC card program use area is encrypted (608), and the encrypted data is read by the reader / writer. Send to 1 0 0 (6 0 9)
暗号化したデータの送信結果をリーダライタ 1 0 0から受信するため 、 レスポンス受信待ちを行う ( 6 1 0 ) 。 リーダライタ 1 0 0からのレ スポンス受信後、 受信したレスポンスがス トア完了か判断し ( 6 1 1 ) 、 レスポンスが失敗であればデータをス トァすることができないことか ら、 R AM 1 0 6の領域不足を解消できないためエラーとし、 エラー処 理へ分岐する ( 6 1 2 ) 。  In order to receive the transmission result of the encrypted data from the reader / writer 100, it waits for a response (610). After receiving the response from the reader / writer 100, it is determined whether the received response is complete (6.11). If the response fails, the data cannot be stored. Since the shortage of area 6 cannot be resolved, an error is determined, and the process branches to error processing (6 1 2).
リーダライタ 1 0 0からのレスポンスが成功であるならば、 R AM 1 0 6領域内の他の I Cカード用プログラム使用領域を空き領域に設定し ( 6 1 3 ) 、 R AM領域不足処理を終了する。  If the response from the reader / writer 100 is successful, the other IC card program use area in the RAM 106 area is set as an empty area (6 13), and the RAM area shortage processing ends. I do.
このことによリ、 I Cカード用プログラム実行時、 I Cカード 1 0 3 における R AM 1 0 6の領域不足を解消することができる。  This makes it possible to eliminate the shortage of the RAM 106 area in the IC card 103 when the IC card program is executed.
第 7図 (その 1 ) および第 7図 (その 2 ) は、 本発明における他の I Cカード用プログラム呼び出し実行時に他の I Cカード用プログラムが I Cカード上に存在しなくても、 当該 I Cカード用プログラムを呼び出 すことを可能にするプログラムロード手段を実現した、 制御プログラムFIG. 7 (part 1) and FIG. 7 (part 2) show that even if another IC card program does not exist on the IC card when the other IC card program is called according to the present invention, Call the program Control program that realizes program loading means that enables
1 0 7のプログラムコール処理におけるフローチヤ一トである。 This is a flowchart in the 107 program call process.
他の I Cカード用プログラムコール処理は、 メイ ン処理実行中におい て、 I Cカード用プログラムが他の I Cカード用プログラムコール実行 時に、 当該プログラムが I Cカード上に存在しないとき、 メイ ン処理か ら呼び出されて実行される。  The other IC card program call processing is called from the main processing when the IC card program does not exist on the IC card when the IC card program executes another IC card program call during the main processing. And executed.
他の I Cカード用プログラムコール処理が実行されると、 まずリーダ ライ夕 1 0 0に対して当該プログラムをロードするためのダイナミック ロード要求を送信する ( 7 0 1 ) 。  When another IC card program call process is executed, a dynamic load request for loading the program is transmitted to reader / writer 100 (701).
リーダライ夕 1 0 0からダイナミックロード要求に対するレスポンス の受信待ちを行う ( 7 0 2 ) 。  From the reader / writer 100, it waits for a response to the dynamic load request (702).
リーダライタ 1 0 0からレスポンス受信後、 当該レスポンスがダイナ ミックロードする I Cカード用プログラムの大きさかチェックする ( 7 0 3 ) 。 このとき、 レスポンスがプログラムの大きさ以外を表している ならば、 ダイナミックロード実行不可とみなし、 エラーとする ( 7 0 4 ) o  After receiving the response from the reader / writer 100, it is checked whether the response is the size of the dynamically loaded IC card program (703). At this time, if the response indicates something other than the size of the program, it is considered that dynamic load cannot be executed, and an error occurs (704) o
レスポンスがプログラムの大きさをあらわしているならば、 当該プロ グラムが I Cカード 1 0 3の E E P R OM 1 0 5領域内に格納できるか チェックする ( 7 0 5 ) 。 このとき、 ダイナミック□ードする I Cカー ド用プログラムが E E P R 0 M 1 0 5領域に格納できなければ ( A) へ 分岐する。  If the response indicates the size of the program, check whether the program can be stored in the EPROM 105 area of the IC card 103 (705). At this time, if the IC card program to be dynamically loaded cannot be stored in the EEPR0M105 area, branch to (A).
( A) では E E P R OM 1 0 5領域の領域不足を解消するため、 プロ グラムス トァを行う。 まず、 E E P R OM 1 0 5の領域内に他の I C力 一ド用プログラムが存在するかチ: Eックする ( 7 1 3 ) 。 このとき、 存 在しなければ E E P R OM 1 0 5の領域不足を解消できないため、 エラ 一とする ( 7 1 4 ) 。 存在するのであれば、 当該プログラムが現在使用中かチ Xックし (了In (A), a program store is performed to resolve the shortage of the EEPROM 105 area. First, a check is made to see if another IC input program exists in the area of EEPROM 150 (Step 7 13). At this time, if the area does not exist, the shortage of the area of the EEPROM 105 cannot be solved, so the error is set to be error (714). If so, check if the program is currently in use.
1 5 ) 、 使用中であれば別の I Cカード用プログラムを探すため 7 1 3 へ戻る。 15) If it is in use, return to 7 13 to search for another IC card program.
使用中でなければ、 当該プログラムをリーダライタ 1 0 0へストアす るため、 リーダライタ 1 0 0に対してプログラムストア要求を送信する ( 7 1 6 )  If not in use, a program store request is sent to reader / writer 100 to store the program in reader / writer 100 (716)
プログラムストァ要求に対するリーダライタ 1 0 0からのレスポンス 受信待ちを行い ( 7 1 7 ) 、 レスポンス受信後、 プログラムス卜ァが受 付可能かチ Xックする ( 7 1 8 ) 。  The program waits for a response from the reader / writer 1000 to the program store request (Step 7), and after receiving the response, checks whether the program store is acceptable (Step 7).
レスポンスが受付不可であればエラーとし ( 7 1 9 ) 、 受付可能であ れば当該 I Cカード用プログラムのストアを行うため、 I Cカード用プ ログラムの暗号化を行う ( 7 2 0 ) 。  If the response is unacceptable, an error occurs (Step 7). If the response is acceptable, the IC card program is encrypted to store the IC card program (Step 7).
暗号化したデータをリーダライタ 1 0 0に送信し ( 7 2 1 ) 、 送信に 対する結果のレスポンス受信待ちを行う ( 7 2 2 ) 。  The encrypted data is transmitted to the reader / writer 100 (721), and a response to the result of the transmission is waited for (722).
レスポンス受信後、 レスポンスがス トア完了かチェックし ( 7 2 3 ) After receiving the response, check if the response is complete (72)
、 ストァ完了でなければエラーとする ( 7 2 4 ) 。 If the store is not completed, an error occurs (724).
ストァ完了であれば、 ストァした他の I Cカード用プログラム領域を 空き領域に設定して ( 7 2 5 ) 、 ( B ) へ戻り、 再度ダイナミックロー ドするプログラムが E E P R OM 1 0 5へ格納できるかチ xックする。 ダイナミックロードする I Cカード用プログラムが E E P R OM 1 0 If the store is completed, set the other IC card program area that has been stored as an empty area (725), return to (B), and check if the program to be dynamically loaded again can be stored in the EEPROM 105. Click here. The program for the dynamically loaded IC card is EPROM10.
5領域に格納できるのであれば、 当該プログラムをロードするため、 リ 一ダライタ 1 0 0に対してプログラムロード要求を送信する ( 7 0 6 ) リーダライタ 1 0 0から、 プログラムロード要求に対するレスポンス の受信待ちを行い ( 7 0 7 ) 、 レスポンス受信後、 当該レスポンスが IIf the data can be stored in the 5 areas, a program load request is transmitted to the reader / writer 100 to load the program (706). A response to the program load request is received from the reader / writer 100. Wait (770), and after receiving the response,
Cカード用プログラムデータかチ: Lックする。 このとき、 レスポンスが プログラムデータでなければエラーとする (了 0 9 ) 。 Check the program data for C card. At this time, the response is If it is not program data, an error occurs (end 09).
レスポンスがプログラムデータであるならば、 当該データの複号化を 行い ( 7 1 0 ) 、 E E P R OM 1 0 5に復号化した I Cカード用プログ ラムを格納する ( 7 1 1 ) 。  If the response is program data, the data is decrypted (710), and the decrypted IC card program is stored in EPROM 105 (711).
格納後、 当該プログラムをコールし ( 7 1 2 ) 、 処理を終了する。 このことにより、 他の I Cカード用プログラムコール実行時、 当該プ ログラムが I Cカード 1 0 3の E E P R OM 1 0 5領域内に存在しなく ても、 他の I Cカード用プログラムをコールすることができる。  After storing, the program is called (7112), and the processing ends. As a result, when executing another IC card program call, another IC card program can be called even if the program does not exist in the EEPROM 105 area of the IC card 103. .
第 8図は、 本発明における R AM領域不足解消処理または他の I C力 一ド用プログラムコール処理実行時にストァされたデータを元に戻すた めのリロード手段を実現した制御プログラム 1 0 了のリロード処理にお けるフローチヤ一トである。  FIG. 8 shows the reloading of the control program 10 which realizes the reloading means for restoring the stored data at the time of executing the RAM area shortage elimination processing or other IC input program call processing in the present invention. It is a flowchart in processing.
リロード処理は、 メィン処理終了時においてリ口一ドデータまたはリ □-ドプログラムが存在するとき、 メイン処理から呼び出されて実行さ れる。  The reload process is called from the main process and executed when there is read data or a read program at the end of the main process.
リロード処理が実行されると、 まず R AM 1 0 6の領域にリロードす るデータが存在するかチェックする ( 8 0 1 ) 。 存在しなければリロー ドプログラムが存在するかチ: tックするため 8 0 8へ分岐し、 リロード データが存在するならばリーダライタ 1 0 0に対してリロードデータ要 求を送信する ( 8 0 2 ) 。  When the reload processing is executed, it is first checked whether data to be reloaded exists in the RAM 106 area (801). If it does not exist, check whether there is a reload program. If so, branch to 808, and if there is reload data, send a reload data request to reader / writer 100 (800) 2).
リ一ダライタ 1 0 0からリロードデータ要求に対するレスポンスの受 信待ちを行い ( 8 0 3 ) 、 レスポンス受信後、 レスポンスが R AM 1 0 6領域へ回復するリロードデータであるかチヱックする ( 8 0 4 ) 。 こ のとき、 リロードデータでなければエラーとし ( 8 0 5 ) 、 リロードす るデータであれば、 リロードしたデータを復号化する ( 8 0 6 ) 。  Waits for a response to the reload data request from the reader / writer 100 (803), and after receiving the response, checks whether the response is reload data to be restored to the RAM 106 area (804). ). At this time, if the data is not the reload data, an error is generated (805). If the data is the data to be reloaded, the reloaded data is decoded (806).
複号化したリロードデータを R AM 1 0 6に格納されていた元の領域 に格納し ( 8 0 7 ) 、 I Cカード用プログラム使用領域の回復を行う。 次に I Cカード用プログラムのリロードを行うため、 E E P R OM 1 0 5の領域にリロードする I Cカード用プログラムが存在するかチェッ クする ( 8 0 8 ) 。 Original area where the decrypted reload data was stored in RAM 106 (807) to recover the IC card program use area. Next, in order to reload the IC card program, it is checked whether an IC card program to be reloaded exists in the EEPROM 105 (808).
リロードする I Cカード用プログラムが存在しなければ、 8 1 5へ分 岐し処理を終了する。 リロードする I Cカード用プログラムが存在する ならば I Cカード用プログラムのリロード要求をリーダライタ 1 0 0に 対して送信する ( 8 0 9 ) 。  If there is no IC card program to be reloaded, branch to 8 15 to end the processing. If there is an IC card program to be reloaded, a reload request for the IC card program is transmitted to reader / writer 100 (809).
リロード要求に対するリーダライタ 1 0 0からのレスポンス受信待ち を行い ( 8 1 0 ) 、 レスポンス受信後、 当該レスポンスがリロードプロ グラムであるかチ: cックする ( 8 1 1 ) 。 このとき、 リロードプログラ 厶でなければエラーとし処理を終了する ( 8 1 2 ) 。  The system waits for a response from the reader / writer 1000 to the reload request (810), and after receiving the response, checks whether the response is a reload program (811). At this time, if it is not a reloading program, an error is detected and the processing is terminated (812).
レスポンスがリロードプログラムならば、 リロードプログラムの復号 化を行い ( 8 1 3 ) 、 復号化したリロードプログラムを E E P R OM 1 0 5に格納されていた元の領域に格納し ( 8 1 4 ) 、 I Cカード用プロ グラムの回復を行う。  If the response is a reload program, the reload program is decrypted (813), the decrypted reload program is stored in the original area stored in the EEPROM 105 (814), and the IC card is read. Recover the application program.
リロードデータおよびリロードプログラム終了時、 最後にリロード完 了を送信する ( 8 1 5 ) ことにより、 リーダライタ 1 0 0は次の新しい コマンドを I Cカード 1 0 3に対して送信することができる。  When the reload data and the reload program are completed, the reload completion is transmitted last (815), so that the reader / writer 100 can transmit the next new command to the IC card 103.
このことにより、 ストア手段およびプログラムス トア手段によってリ 一ダライタ 1 0 0に待避したデータを回復するリロード手段を実現する ことができる。  As a result, it is possible to realize a reload unit that recovers data saved in the reader / writer 100 by the store unit and the program store unit.
以上説明したように、 本発明によれば、 I Cカード上で動作する I C カード用プログラムは I Cカードに搭載される揮発性メモリおよび不揮 発性メモリの容,量制限を受けることなく、 I Cカード用プログラムを実 行することができ、 I Cカード用プログラムの動作制限を大幅に緩和す ることができる As described above, according to the present invention, an IC card program that operates on an IC card is not restricted by the capacity and amount of volatile memory and nonvolatile memory mounted on the IC card. Program can be executed, greatly reducing the operation restrictions of IC card programs. Can be

Claims

請求の範囲 The scope of the claims
1 . メモリと I Cカード用プログラムを実行する手段を備えた I Cカー ドを制御する I cカード用制御プログラム処理装置において、  1. In an IC card control program processing device for controlling an IC card provided with a memory and a means for executing an IC card program,
前記 I Cカードは前記 I Cカード用プログラムを実行している際にメモ リ領域が不足した場合 I Cカード用プログラムが使用しないデータを I Cカードと接続している外部装置に送出して空きメモリ領域を確保しメ モリ領域不足を補うス卜ァ手段と、 前記ス卜ァ手段によって前記外部装 置に送出したデータを前記外部装置から該 I Cカードに送出することに よって元の状態に回復するリロード手段を備えたことを特徴とする If the IC card runs out of memory area while executing the IC card program, secures a free memory area by sending data not used by the IC card program to an external device connected to the IC card Storage means for compensating for the shortage of the memory area, and reload means for restoring the original state by sending the data sent to the external device from the external device to the IC card by the storage means. Characterized by having
I Cカード用制御プログラム処理装置。  Control program processor for IC card.
2 . メモリと I Cカード用プログラムを実行する手段を備えた I Cカー ドを制御する I Cカード用制御プログラム処理装置において、 2. An IC card control program processing device for controlling an IC card provided with a memory and a means for executing an IC card program,
複数の I Cカード用プログラムが I Cカードに搭載されている場合 I C カード用プログラム実行中に使用しない I Cカード用プログラムを I C カードと接続している外部装置に送出して空きメモリ領域を確保しメモ リ領域不足を補うプログラムストァ手段と、 前記プログラムストァ手段 によって外部装置に送出された I Cカード用プログラムを外部装置から I Cカードに送出することによって元の状態に回復するプログラムリ口 一ド手段を備えたことを特徴とする I Cカード用制御プログラム処理装 置。 When multiple IC card programs are mounted on the IC card The IC card programs that are not used during the execution of the IC card program are sent to an external device connected to the IC card to secure a free memory area and save memory. Program storage means for compensating for the lack of area, and program storage means for restoring the original state by sending the IC card program sent to the external device by the program store means from the external device to the IC card. A control program processing device for an IC card, characterized in that:
3 . メモリと I Cカード用プログラムを実行する手段を備えた I Cカー ドを制御する I Cカード用制御プログラム処理装置において、 3. In an IC card control program processing device for controlling an IC card provided with a memory and a means for executing an IC card program,
I Cカード用プログラム実行中に別の新たな I Cカード用プログラムま たはデータが必要となったとき I Cカード用プログラムまたはデータを I cカードに追加するダイナミックロード手段と、 前記ダイナミック口 一ド手段によって追加された I Cカード用プログラムやデータが不必要 となった場合に削除するダイナミックデリー卜手段を備えたことを特徴 とする I Cカード用制御プログラム処理装置。 When another new IC card program or data is required during execution of the IC card program An IC comprising dynamic load means for adding to an IC card, and dynamic delete means for deleting an IC card program or data added by the dynamic opening means when it becomes unnecessary. Control program processing device for cards.
4 . 請求項 1 において、 前記ストァ手段は I Cカード内で送出データを 暗号化して送出する手段と備え、 前記リロード手段は暗号化されたデー タを復号化してロードする手段を備えたことを特徴とする I cカード用 制御プログラム処理装置。 4. The storage device according to claim 1, wherein the storage means includes means for encrypting and transmitting transmission data in an IC card, and the reload means includes means for decrypting and loading the encrypted data. Control program processing device for Ic card.
5 . 請求項 2において、 前記プログラムス 卜ァ手段は I Cカード内で送 出データを暗号化して送出する手段を備え、 前記プログラムリロード手 段は暗号化されたデータを復号化してロードする手段を備えたことを特 徴とする I Cカード用制御プログラム処理装置。 5. In claim 2, the program storage means includes means for encrypting and sending outgoing data in an IC card, and the program reloading means includes means for decrypting and loading the encrypted data. A control program processing device for IC cards characterized by having
PCT/JP1998/004836 1998-10-26 1998-10-26 Control program processor for ic card WO2000025261A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP1998/004836 WO2000025261A1 (en) 1998-10-26 1998-10-26 Control program processor for ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP1998/004836 WO2000025261A1 (en) 1998-10-26 1998-10-26 Control program processor for ic card

Publications (1)

Publication Number Publication Date
WO2000025261A1 true WO2000025261A1 (en) 2000-05-04

Family

ID=14209273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1998/004836 WO2000025261A1 (en) 1998-10-26 1998-10-26 Control program processor for ic card

Country Status (1)

Country Link
WO (1) WO2000025261A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002345037A (en) * 2001-05-17 2002-11-29 Sony Corp Portable communication apparatus, communication system and communication method therefor
JP2007156702A (en) * 2005-12-02 2007-06-21 Renesas Technology Corp Operating system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5998395A (en) * 1982-11-29 1984-06-06 Dainippon Printing Co Ltd Ic card
JPS6321197A (en) * 1986-07-15 1988-01-28 シャープ株式会社 Ic card
JPS6478324A (en) * 1987-09-19 1989-03-23 Victor Company Of Japan Storage device
JPH01185785A (en) * 1988-01-21 1989-07-25 Nec Corp Method for managing writing into ic card
JPH02112082A (en) * 1988-10-21 1990-04-24 Matsushita Electric Ind Co Ltd Microprocessor and ic card to use same
JPH0383131A (en) * 1989-08-28 1991-04-09 Hitachi Ltd Program control method for carrying terminal
JPH04191934A (en) * 1990-11-26 1992-07-10 Hitachi Ltd Method and device for managing functional program
JPH05258123A (en) * 1992-03-12 1993-10-08 Fujitsu Ltd Terminal system with ic card
JPH08129628A (en) * 1994-11-02 1996-05-21 Dainippon Printing Co Ltd Information recording medium with incorporated cpu

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5998395A (en) * 1982-11-29 1984-06-06 Dainippon Printing Co Ltd Ic card
JPS6321197A (en) * 1986-07-15 1988-01-28 シャープ株式会社 Ic card
JPS6478324A (en) * 1987-09-19 1989-03-23 Victor Company Of Japan Storage device
JPH01185785A (en) * 1988-01-21 1989-07-25 Nec Corp Method for managing writing into ic card
JPH02112082A (en) * 1988-10-21 1990-04-24 Matsushita Electric Ind Co Ltd Microprocessor and ic card to use same
JPH0383131A (en) * 1989-08-28 1991-04-09 Hitachi Ltd Program control method for carrying terminal
JPH04191934A (en) * 1990-11-26 1992-07-10 Hitachi Ltd Method and device for managing functional program
JPH05258123A (en) * 1992-03-12 1993-10-08 Fujitsu Ltd Terminal system with ic card
JPH08129628A (en) * 1994-11-02 1996-05-21 Dainippon Printing Co Ltd Information recording medium with incorporated cpu

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIGUN CHEN ET AL.: "Understanding JavaCard 2.0 (in Japanese)", JAVA WORLD, vol. 2, no. 7, July 1998 (1998-07-01), (TOKYO), pages 154 - 161 (PART I), XP002927029 *
SHOYA NAGAO: "What does Java Bring to Electronic Commerce?", COMPUTOPIA, vol. 32, no. 371, August 1997 (1997-08-01), (TOKYO), pages 32 - 35 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002345037A (en) * 2001-05-17 2002-11-29 Sony Corp Portable communication apparatus, communication system and communication method therefor
JP2007156702A (en) * 2005-12-02 2007-06-21 Renesas Technology Corp Operating system

Similar Documents

Publication Publication Date Title
US8184810B2 (en) Secure device and relay terminal
RU2226711C2 (en) Computer system and method for optimal control of computer program storage and transmission in computer network
US8078788B2 (en) Media card command pass through methods
US7689836B2 (en) Encryption device
US7069373B2 (en) USB endpoint controller flexible memory management
US7716522B2 (en) Information processing system and method for executing process during communication error
US20070136606A1 (en) Storage system with built-in encryption function
JP2008191873A (en) Information processor and information processing system
AU774140B2 (en) Chip card comprising means for managing a virtual memory, associated communication method and protocol
KR20080033276A (en) Secure storage management system and method
US5852735A (en) Method and apparatus for exchanging a program over a network computer system that permits reactivation of the original program if an error occurs
US6668326B1 (en) Context saving system
US5953416A (en) Data processing apparatus
CN111339034B (en) Ciphertext storage plaintext access system, ciphertext storage method and plaintext access method
WO1999018538A1 (en) Portable ic card terminal
US6641045B1 (en) Portable electronic device with self-diagnostic function
WO2000025261A1 (en) Control program processor for ic card
US6112985A (en) License-card-controlled chip card system
US11768943B2 (en) Secure element and method for starting an application by a low-level operating system
US8468493B2 (en) Information processing apparatus, information processing method, and program
JP2007004704A (en) Ic card system for deleting application
US20010007114A1 (en) Control apparatus and control method
CN115202892B (en) Memory expansion system and memory expansion method of cryptographic coprocessor
JP7334566B2 (en) Electronic information storage medium and program
US20220129568A1 (en) Secure element and method

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
ENP Entry into the national phase

Ref country code: JP

Ref document number: 2000 578775

Kind code of ref document: A

Format of ref document f/p: F

122 Ep: pct application non-entry in european phase