JP2006350738A - Ic card and program thereof - Google Patents

Ic card and program thereof Download PDF

Info

Publication number
JP2006350738A
JP2006350738A JP2005176882A JP2005176882A JP2006350738A JP 2006350738 A JP2006350738 A JP 2006350738A JP 2005176882 A JP2005176882 A JP 2005176882A JP 2005176882 A JP2005176882 A JP 2005176882A JP 2006350738 A JP2006350738 A JP 2006350738A
Authority
JP
Japan
Prior art keywords
code
card
execution code
additional
additional execution
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2005176882A
Other languages
Japanese (ja)
Other versions
JP4784165B2 (en
Inventor
Masanari Yamada
真生 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2005176882A priority Critical patent/JP4784165B2/en
Publication of JP2006350738A publication Critical patent/JP2006350738A/en
Application granted granted Critical
Publication of JP4784165B2 publication Critical patent/JP4784165B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an IC card and program thereof that can verify integrity of additional execution code even if in use. <P>SOLUTION: The IC card 10 includes a ROM 14 for storing an execution code c1, an EEPROM 15 for storing the additional execution code c2, a CPU 12 for executing the execution code C1 and the additional execution code c2, and the like. The EEPROM 15 stores a check code c3, which is externally calculated in advance, by using at least part of the additional execution code c2. The CPU 12, when receiving executable instructions of the additional execution code c2, calculates a check code c4 by the system same as the external, and compares the calculated check code c4 with the check code c3 stored in the EEPROM 15. When the result of comparison is matched with, the additional execution code c2 is executed. When not matched with, the additional execution code c2 is not executed. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、不揮発性メモリに追加の実行コードをロードして使用するICカード及びICカードプログラムに関するものである。   The present invention relates to an IC card and an IC card program that are used by loading an additional execution code into a nonvolatile memory.

従来、この種のICカード(スマートカード)は、内部に搭載されているEEPROMやフラッシュメモリなどの書き換え可能なメモリに、追加の実行コードをロードして使用することがある。
この場合、正しい実行コードがロードされたこと(実行コードの完全性)を確認するために、チェックコードを使用していた(例えば、特許文献1)。チェックコードは、実行コードの一部又は全部を所定の関数で処理して出力したコードである。
Conventionally, this type of IC card (smart card) is sometimes used by loading an additional execution code into a rewritable memory such as an EEPROM or a flash memory mounted therein.
In this case, a check code is used to confirm that a correct execution code is loaded (completeness of the execution code) (for example, Patent Document 1). The check code is a code that is output by processing a part or all of the execution code with a predetermined function.

図5及び図6は、従来の実行コードの完全性を検証する方法を示す図である。
実行コードの完全性を検証する方法は2つあり、1つ目の方法は、図5に示すように、外部で算出したチェックコードc3をICカード20内にロードし、外部と同様の方式で算出したチェックコードc4をICカードの内部で検証する方法である。
2つ目の方法は、図6に示すように、ICカード20が内部で算出したチェックコードc4を外部に送信し、外部でロードの成功/失敗を検証する方法である。
5 and 6 are diagrams illustrating a conventional method for verifying the integrity of an executable code.
There are two methods for verifying the integrity of the execution code. As shown in FIG. 5, the first method is to load the check code c3 calculated externally into the IC card 20 and use the same method as externally. In this method, the calculated check code c4 is verified inside the IC card.
As shown in FIG. 6, the second method is a method of transmitting the check code c4 calculated internally by the IC card 20 to the outside and verifying the success / failure of the load externally.

しかし、いずれの方法で検証した場合であっても、ロードされた追加の実行コードc2は、使用中の意図しない衝撃や熱などによって破損する可能性があり、一旦、ICカードを出荷した後には、追加の実行コードc2の完全性が検証できない状況にあった。
特開2004−348373号公報
However, even if it is verified by any method, the loaded additional execution code c2 may be damaged by unintended impact or heat during use, and once the IC card is shipped, The integrity of the additional executable code c2 cannot be verified.
JP 2004-348373 A

本発明の課題は、使用中であっても追加の実行コードの完全性を検証することができるICカード及びICカードプログラムを提供することである。   An object of the present invention is to provide an IC card and an IC card program capable of verifying the integrity of an additional execution code even during use.

前記課題を解決するために、請求項1の発明は、実行コードを記憶するメモリと、追加の実行コードを記憶する書き換え可能なメモリと、前記実行コード及び前記追加の実行コードを実行するCPUと、を備えるICカードであって、前記書き換え可能なメモリは、前記追加の実行コードの少なくとも一部を用いてあらかじめ外部で算出されたチェックコードを記憶しており、前記CPUは、所定の条件を満たした場合に、外部と同様の方式でチェックコードを算出し、その算出したチェックコードと前記書き換え可能なメモリに記憶されているチェックコードとを比較し、比較結果が一致している場合には、前記追加の実行コードを実行し、一致していない場合には、前記追加の実行コードを実行しないこと、を特徴とするICカードである。
請求項2の発明は、請求項1に記載のICカードにおいて、前記所定の条件は、前記追加の実行コードの実行命令を受信した場合であること、を特徴とするICカードである。
請求項3の発明は、請求項1又は請求項2に記載のICカードにおいて、前記チェックコードは、前記実行コードの少なくとも一部を含めて算出されること、を特徴とするICカードである。
請求項4の発明は、請求項1から請求項3までのいずれか1項に記載のICカードにおいて、前記書き換え可能なメモリは、固有情報を記憶しており、前記チェックコードは、前記固有情報の少なくとも一部を含めて算出されること、を特徴とするICカードである。
請求項5の発明は、請求項1から請求項4までのいずれか1項に記載のICカードにおいて、前記CPUが前記追加の実行コードを実行しない場合に、その旨を外部に通知する通知手段を備えること、を特徴とするICカードである。
請求項6の発明は、実行コードを記憶するメモリと、追加の実行コード、及び、前記追加の実行コードの少なくとも一部を用いてあらかじめ外部で算出されたチェックコードを記憶する書き換え可能なメモリと、前記実行コード及び前記追加の実行コードを実行するCPUと、を備えるICカードのCPUに実行させるICカードプログラムであって、所定の条件を満たすか否かを判断する条件判断手順と、前記条件判断手段が所定の条件を満たすと判断した場合に、外部と同様の方式でチェックコードを算出する算出手順と、前記算出手順で算出したチェックコードと前記書き換え可能なメモリに記憶されているチェックコードとを比較する比較手順と、前記比較手順の比較結果が一致している場合に、前記追加の実行コードを実行し、一致していない場合に、前記追加の実行コードを実行しない実行可否手順と、を備えるICカードプログラムである。
請求項7の発明は、請求項6に記載のICカードプログラムにおいて、前記実行可否手順が前記追加の実行コードを実行しない場合に、その旨を外部に通知する通知手順を備えること、を特徴とするICカードプログラムである。
In order to solve the above-mentioned problem, the invention of claim 1 includes a memory for storing an execution code, a rewritable memory for storing an additional execution code, a CPU for executing the execution code and the additional execution code, The rewritable memory stores a check code calculated in advance using at least a part of the additional execution code, and the CPU satisfies a predetermined condition. If the check code is satisfied, the check code is calculated in the same manner as the outside, and the calculated check code is compared with the check code stored in the rewritable memory. The additional execution code is executed, and if it does not match, the additional execution code is not executed. .
According to a second aspect of the present invention, in the IC card according to the first aspect, the predetermined condition is a case where an execution instruction of the additional execution code is received.
The invention of claim 3 is the IC card according to claim 1 or 2, wherein the check code is calculated including at least a part of the execution code.
According to a fourth aspect of the present invention, in the IC card according to any one of the first to third aspects, the rewritable memory stores unique information, and the check code includes the unique information. It is an IC card characterized by being calculated including at least a part of the card.
According to a fifth aspect of the present invention, in the IC card according to any one of the first to fourth aspects, when the CPU does not execute the additional execution code, a notification means for notifying the outside to that effect It is an IC card characterized by comprising.
The invention of claim 6 includes a memory for storing an execution code, an additional execution code, and a rewritable memory for storing a check code calculated externally in advance using at least a part of the additional execution code; A CPU for executing the execution code and the additional execution code, and an IC card program to be executed by a CPU of an IC card, the condition determination procedure for determining whether or not a predetermined condition is satisfied, and the condition A calculation procedure for calculating a check code in the same manner as the outside when the determination means determines that a predetermined condition is satisfied, a check code calculated by the calculation procedure, and a check code stored in the rewritable memory When the comparison result of the comparison procedure matches the comparison result of the comparison procedure, the additional execution code is executed and In If not, an IC card program and an execution determination procedure without performing the additional executable code.
The invention of claim 7 is characterized in that, in the IC card program according to claim 6, when the execution availability procedure does not execute the additional execution code, a notification procedure for notifying the outside is provided. IC card program.

本発明によれば、書き換え可能なメモリに、あらかじめ外部で算出したチェックコードを記憶しておくことによって、使用中であっても追加の実行コードの完全性を検証することができる。
また、追加の実行コードの実行命令を受信した場合に、チェックコードを比較するので、追加の実行コードを実行する度に、追加の実行コードの完全性を検証することができ、その完全性を維持することができる。
According to the present invention, it is possible to verify the integrity of an additional execution code even when it is in use by storing a check code calculated externally in advance in a rewritable memory.
In addition, since the check code is compared when the execution instruction of the additional execution code is received, the integrity of the additional execution code can be verified each time the additional execution code is executed. Can be maintained.

さらに、実行コードと追加の実行コードとを組み合わせてチェックコードを算出するので、完全性をより高めることができる。
さらにまた、固有情報を含めてチェックコードを算出するので、完全性をより高めつつ、セキュリティレベルも向上させることができる。
Furthermore, since the check code is calculated by combining the execution code and the additional execution code, the completeness can be further improved.
Furthermore, since the check code is calculated including the unique information, the security level can be improved while further improving the integrity.

一方、追加の実行コードを実行しない旨を外部に通知する通知手段を備えるので、不具合があっても、その原因を特定しやすい。   On the other hand, since a notification means for notifying that the additional execution code is not executed is provided, it is easy to identify the cause even if there is a problem.

本発明は、使用中であっても追加の実行コードの完全性を検証することができるICカード及びICカードプログラムを提供するという目的を、EEPROMに追加の実行コードとともにチェックコードを記憶することにより実現する。   The present invention aims to provide an IC card and an IC card program capable of verifying the integrity of an additional execution code even when it is in use, by storing a check code together with the additional execution code in an EEPROM. Realize.

以下、図面等を参照して、本発明の実施例について、さらに詳しく説明する。
図1は、本発明によるICカードの実施例1を示すブロック図である。
実施例1のICカード10は、通信部11と、CPU12と、RAM13と、ROM14と、EEPROM15などとを備える。
Hereinafter, embodiments of the present invention will be described in more detail with reference to the drawings.
FIG. 1 is a block diagram showing an embodiment 1 of an IC card according to the present invention.
The IC card 10 according to the first embodiment includes a communication unit 11, a CPU 12, a RAM 13, a ROM 14, an EEPROM 15, and the like.

通信部11は、巻き線コイルなどのアンテナと、変調回路及び復調回路などのインターフェースとなるI/Oインターフェースなどとを備え、非接触式で外部装置20と通信を行い、CPU12及び外部装置20間の通信を媒介する部分である。   The communication unit 11 includes an antenna such as a wound coil and an I / O interface serving as an interface such as a modulation circuit and a demodulation circuit, and communicates with the external device 20 in a non-contact manner. It is a part that mediates communication.

CPU12は、ICカード10を統括制御する中央処理装置であって、四則演算や論理演算など算術的な処理を行なう演算装置を備え、通信部11を介して外部装置20から受信するコマンドに応じて、ROM14及びEEPROM15に記憶されている実行コード(プログラム)や追加の実行コードを実行する部分である。   The CPU 12 is a central processing unit that performs overall control of the IC card 10 and includes an arithmetic unit that performs arithmetic processing such as four arithmetic operations and logical operations, and according to a command received from the external device 20 via the communication unit 11. The execution code (program) and the additional execution code stored in the ROM 14 and the EEPROM 15 are executed.

RAM13は、揮発性メモリであり、CPU12が処理を行う作業領域や、外部装置20とデータをやり取りするための送受信用のバッファなどとして使用される。
ROM14は、不揮発性の読み出し専用のメモリであり、実行コードや、チェックコードを算出するための関数、各種パラメータなどが記憶されている。
The RAM 13 is a volatile memory, and is used as a work area where the CPU 12 performs processing, a transmission / reception buffer for exchanging data with the external device 20, and the like.
The ROM 14 is a nonvolatile read-only memory, and stores an execution code, a function for calculating a check code, various parameters, and the like.

EEPROM15は、随時書き換え可能な不揮発性のメモリであり、追加の実行コードやチェックコードなどが記憶されている。
チェックコードは、追加の実行コードを用いてあらかじめ外部で算出された2〜4バイト程度のコードである。チェックコードの算出方法は、例えば、追加の実行コードのデータを先頭から加算していく方法や、追加の実行コードのデータをハッシュ値に変換する方法などがある。
The EEPROM 15 is a non-volatile memory that can be rewritten at any time, and stores additional execution codes, check codes, and the like.
The check code is a code of about 2 to 4 bytes calculated externally in advance using an additional execution code. The check code calculation method includes, for example, a method of adding the additional execution code data from the top, a method of converting the additional execution code data into a hash value, and the like.

一方、外部装置20は、ICカード10と非接触式で通信する装置であり、ICカード10に対して電源やクロックなどを供給し、コマンドを送信する。   On the other hand, the external device 20 is a device that communicates with the IC card 10 in a non-contact manner, and supplies power and a clock to the IC card 10 to transmit commands.

次に、図2及び図3を参照しながら、ICカード10の動作を説明する。
図2は、本発明によるICカードの各メモリなどを示す構成図であり、図3は、本発明によるICカードの動作を示すフローチャートである。
図2(A)に示すように、初期状態のICカード10のROM14には、実行コードc1が記憶されている。
まず、書き込み装置を用いて追加の実行コードc2をICカード10のEEPROM15にロードする。その際に、チェックコードc3も同様にロードする。
Next, the operation of the IC card 10 will be described with reference to FIGS.
FIG. 2 is a configuration diagram showing each memory of the IC card according to the present invention, and FIG. 3 is a flowchart showing the operation of the IC card according to the present invention.
As shown in FIG. 2A, the execution code c1 is stored in the ROM 14 of the IC card 10 in the initial state.
First, the additional execution code c2 is loaded into the EEPROM 15 of the IC card 10 using the writing device. At that time, the check code c3 is loaded in the same manner.

追加の実行コードc2をロードする際には、追加の実行コードc2が破損していないかを確認するために、CPU12がチェックコードc4を算出し、その算出したチェックコードc4とロードされたチェックコードc3とが一致した場合のみ、追加の実行コードc2のロードを許可する(図2(B)参照)。   When loading the additional execution code c2, the CPU 12 calculates a check code c4 to confirm whether the additional execution code c2 is damaged, and the calculated check code c4 and the loaded check code Only when c3 matches, loading of the additional execution code c2 is permitted (see FIG. 2B).

そして、この状態でICカード10は出荷され、生活者に使用される。
図3のステップ110(以下、「ステップ」を「S」という。)において、ICカード10は、コマンド受信待ち状態である。
外部装置20からコマンドを受信すると(S120)、その受信したコマンドの解釈を行う(S130)。
ICカード10は、追加の実行コードc2を実行させるコマンドか否かを判断し(S140:条件判断手順)、追加の実行コードc2を実行させない場合は、実行コードc1を実行し(S150)、コマンド受信待ち(S110)に戻る。
In this state, the IC card 10 is shipped and used by consumers.
In step 110 of FIG. 3 (hereinafter, “step” is referred to as “S”), the IC card 10 is in a command reception waiting state.
When a command is received from the external device 20 (S120), the received command is interpreted (S130).
The IC card 10 determines whether or not the command is for executing the additional execution code c2 (S140: condition determination procedure). If the additional execution code c2 is not to be executed, the IC card 10 executes the execution code c1 (S150). Return to waiting for reception (S110).

追加の実行コードc2を実行させる場合(所定の条件を満たした場合:追加の実行コードの実行命令を受信した場合)は、CPU12が外部と同様の方式でチェックコードc4を算出し(S160:算出手順)、その算出したチェックコードc4とEEPROM15に記憶されているチェックコードc3とを比較し(S170:比較手順)、比較結果が一致している場合には、追加の実行コードc2を実行し(S180:実行可否手順)、コマンド受信待ち(S110)に戻る。   When executing the additional execution code c2 (when a predetermined condition is satisfied: when an execution instruction of the additional execution code is received), the CPU 12 calculates the check code c4 in the same manner as the outside (S160: calculation) (Procedure), the calculated check code c4 is compared with the check code c3 stored in the EEPROM 15 (S170: comparison procedure), and if the comparison results match, the additional execution code c2 is executed ( S180: Execution propriety procedure) and return to command reception waiting (S110).

一方、ICカード10のEEPROM15に追加の実行コードc2をロードした状態(図2(C)参照)では問題が無かったが、使用中に、追加の実行コードc2が破損してしまった場合は(図2(D)参照)、格納されているチェックコードc3と算出したチェックコードc4とが一致しない。
そこで、この場合は、追加の実行コードc2を実行せずに、なにも動作しない無応答の状態となる(S190:実行可否手順)。ここで、無応答の状態とは、プログラム上で無限ループに飛ばすようにしたり、新たなフラグを立てて電源を切断しても永久に使用できなくしたりすることである。
On the other hand, there is no problem in the state where the additional execution code c2 is loaded into the EEPROM 15 of the IC card 10 (see FIG. 2C), but when the additional execution code c2 is damaged during use ( 2), the stored check code c3 and the calculated check code c4 do not match.
Therefore, in this case, the additional execution code c2 is not executed, and no response is made (S190: Execution procedure). Here, the non-response state means that the program is skipped to an infinite loop or cannot be used permanently even if the power is turned off by setting a new flag.

このように、実施例1のICカード10によれば、EEPROM15に、外部で算出したチェックコードc3を記憶しておくことによって、使用中であっても、追加の実行コードc2の完全性を検証することができ、正しくない追加の実行コードc2を実行しないようにすることができる。
また、追加の実行コードc2の実行命令を受信した場合に、チェックコードを比較するので、追加の実行コードc2を実行する度に、追加の実行コードc2の完全性を検証することができ、その完全性を維持することができる。
Thus, according to the IC card 10 of the first embodiment, the integrity of the additional execution code c2 is verified even when it is in use by storing the check code c3 calculated externally in the EEPROM 15. It is possible to prevent execution of additional executable code c2 that is not correct.
Further, since the check code is compared when the execution instruction of the additional execution code c2 is received, the completeness of the additional execution code c2 can be verified every time the additional execution code c2 is executed. Integrity can be maintained.

図4は、本発明によるICカードの実施例2を示すブロック図である。
なお、前述した実施例1と同様な機能を果たす部分には、同一の符号又は末尾に統一した符号を付して、重複する説明や図面を適宜省略する。
実施例2のICカード10Aは、実施例1のものと比較して、チェックコードの算出方法が異なる。
実施例1では、追加の実行コードc2からチェックコードを算出していたが、実施例2では、実行コードc1と追加の実行コードc2とを組み合わせて、チェックコードを算出している。
FIG. 4 is a block diagram showing a second embodiment of the IC card according to the present invention.
In addition, the part which fulfill | performs the same function as Example 1 mentioned above attaches | subjects the same code | symbol or the code | symbol unified at the end, and abbreviate | omits duplication description and drawing suitably.
The IC card 10A of the second embodiment is different from the first embodiment in the check code calculation method.
In the first embodiment, the check code is calculated from the additional execution code c2. However, in the second embodiment, the check code is calculated by combining the execution code c1 and the additional execution code c2.

チェックコードの算出方法としては、例えば、(1)実行コードc1と追加の実行コードc2とを並べたデータからハッシュ値を算出してもよいし、(2)実行コードc1のデータからハッシュ値を算出し、追加の実行コードc2のデータからハッシュ値を算出し、それらを加算した値を用いてもよいし、(3)実行コードc1のデータの一部又は全部と、追加の実行コードc2のデータの一部又は全部とを所定の関数で処理することによって算出してもよい。   As a check code calculation method, for example, (1) a hash value may be calculated from data in which the execution code c1 and the additional execution code c2 are arranged, or (2) a hash value is calculated from the data of the execution code c1. The hash value is calculated from the data of the additional execution code c2, and a value obtained by adding them may be used. (3) Part or all of the data of the execution code c1 and the additional execution code c2 You may calculate by processing a part or all of data with a predetermined function.

そして、ICカード10A内で算出されたチェックコードと、追加の実行コードc2の後端に付加されたチェックコードc3とを比較し、比較結果が一致していた場合には、追加の実行コードc2を実行する。   Then, the check code calculated in the IC card 10A and the check code c3 added to the rear end of the additional execution code c2 are compared, and if the comparison results match, the additional execution code c2 Execute.

このように、実施例2のICカード10Aによれば、実行コードc1と追加の実行コードc2とを組み合わせてチェックコードを算出しているので、「追加の実行コードが破壊されていないこと」かつ「正式な実行コードが搭載されたICカードに追加の実行コードが追加されたこと」が判断できるため、完全性のみならず信頼性も向上させることができる。   As described above, according to the IC card 10A of the second embodiment, the check code is calculated by combining the execution code c1 and the additional execution code c2, so that “the additional execution code is not destroyed” and Since it can be determined that “an additional execution code has been added to an IC card on which a formal execution code is mounted”, not only completeness but also reliability can be improved.

(変形例)
以上説明した実施例に限定されることなく、種々の変形や変更が可能であって、それらも本発明の均等の範囲内である。
(1)例えば、EEPROM15が固有情報(カード固有の番号、会員番号など)を記憶している場合には、その固有情報の少なくとも一部を含めて、チェックコードを算出するようにしてもよい。このようにすれば、追加の実行コードc2の完全性をより高めつつ、セキュリティレベルも向上させることができる。
(2)CPU12が追加の実行コードc2を実行しない場合には、無応答の状態になる例で説明したが、無応答の状態になる前に、「追加の実行コードに異常があること」を外部に通知するようにしてもよい(通知手段、通知手順)。このようにすれば、不具合があっても、その原因を特定しやすく、追加の実行コードc2の破壊状況を簡単に把握することができる。
(Modification)
The present invention is not limited to the embodiments described above, and various modifications and changes are possible, and these are also within the equivalent scope of the present invention.
(1) For example, when the EEPROM 15 stores unique information (card unique number, membership number, etc.), the check code may be calculated including at least a part of the unique information. In this way, it is possible to improve the security level while further improving the integrity of the additional executable code c2.
(2) The case where the CPU 12 does not execute the additional execution code c2 has been described as an example of a non-response state. However, before the non-response state, the “additional execution code is abnormal” You may make it notify outside (notification means, notification procedure). In this way, even if there is a problem, it is easy to identify the cause, and it is possible to easily grasp the destruction status of the additional executable code c2.

(3)追加の実行コードc2の実行命令を受信した場合に、チェックコードをチェックする例で説明したが、例えば、起動時や、5回に1回だけチェックするようにして、ICカード側の処理を軽減させてもよい。
(4)EEPROM15は、フラッシュメモリなどの他の不揮発性メモリであってもよい。
(5)ICカードに限定されることなく、演算機能を持ち、追加の実行コードを外部からロードして動作させる可般記憶媒体に有効である。
(3) The example in which the check code is checked when the execution instruction of the additional execution code c2 is received has been described. However, for example, the check on the IC card side is performed at the start-up or only once every five times. Processing may be reduced.
(4) The EEPROM 15 may be another nonvolatile memory such as a flash memory.
(5) The present invention is not limited to an IC card, and is effective for a general storage medium having an arithmetic function and loading an additional execution code from outside.

(6)実行コードは、読み出し専用のメモリ(ROM14)に記憶する例で説明したが、フラッシュメモリやFeRAM(FRAM:ラムトロン・インターナショナル・コーポレーションの登録商標)などの書き換え可能なメモリに初期プログラムを記憶させてもよい。
(7)通信部11は、非接触式で通信を行う例で説明したが、接触端子などを用いて接触式で通信を行ってもよい。
(6) Although the execution code is described in the example of storing in the read-only memory (ROM 14), the initial program is stored in a rewritable memory such as flash memory or FeRAM (FRAM: a registered trademark of Ramtron International Corporation). You may let them.
(7) The communication unit 11 has been described as an example of performing communication in a non-contact manner, but communication may be performed in a contact manner using a contact terminal or the like.

本発明によるICカードの実施例1を示すブロック図である。It is a block diagram which shows Example 1 of the IC card by this invention. 本発明によるICカードの各メモリなどを示す構成図である。It is a block diagram which shows each memory of the IC card by this invention. 本発明によるICカードの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the IC card by this invention. 本発明によるICカードの実施例2を示すブロック図である。It is a block diagram which shows Example 2 of the IC card by this invention. 従来の実行コードの完全性を検証する方法を示す図である。It is a figure which shows the method of verifying the integrity of the conventional executable code. 従来の実行コードの完全性を検証する方法を示す図である。It is a figure which shows the method of verifying the integrity of the conventional executable code.

符号の説明Explanation of symbols

10、10A ICカード
11 通信部
12 CPU
12a 演算装置
13 RAM
14 ROM
15 EEPROM
c1 実行コード
c2 追加の実行コード
c3 チェックコード
c4 チェックコード

10, 10A IC card 11 Communication unit 12 CPU
12a arithmetic unit 13 RAM
14 ROM
15 EEPROM
c1 execution code c2 additional execution code c3 check code c4 check code

Claims (7)

実行コードを記憶するメモリと、
追加の実行コードを記憶する書き換え可能なメモリと、
前記実行コード及び前記追加の実行コードを実行するCPUと、
を備えるICカードであって、
前記書き換え可能なメモリは、前記追加の実行コードの少なくとも一部を用いてあらかじめ外部で算出されたチェックコードを記憶しており、
前記CPUは、所定の条件を満たした場合に、外部と同様の方式でチェックコードを算出し、その算出したチェックコードと前記書き換え可能なメモリに記憶されているチェックコードとを比較し、比較結果が一致している場合には、前記追加の実行コードを実行し、一致していない場合には、前記追加の実行コードを実行しないこと、
を特徴とするICカード。
Memory for storing executable code;
A rewritable memory for storing additional executable code;
A CPU for executing the execution code and the additional execution code;
An IC card comprising:
The rewritable memory stores a check code calculated externally in advance using at least a part of the additional execution code,
When the CPU satisfies a predetermined condition, the CPU calculates a check code in the same manner as the outside, compares the calculated check code with a check code stored in the rewritable memory, and compares the result. If not, execute the additional executable code; otherwise, do not execute the additional executable code;
IC card characterized by
請求項1に記載のICカードにおいて、
前記所定の条件は、前記追加の実行コードの実行命令を受信した場合であること、
を特徴とするICカード。
In the IC card according to claim 1,
The predetermined condition is a case where an execution instruction of the additional execution code is received;
IC card characterized by
請求項1又は請求項2に記載のICカードにおいて、
前記チェックコードは、前記実行コードの少なくとも一部を含めて算出されること、
を特徴とするICカード。
In the IC card according to claim 1 or 2,
The check code is calculated including at least a part of the execution code;
IC card characterized by
請求項1から請求項3までのいずれか1項に記載のICカードにおいて、
前記書き換え可能なメモリは、固有情報を記憶しており、
前記チェックコードは、前記固有情報の少なくとも一部を含めて算出されること、
を特徴とするICカード。
In the IC card according to any one of claims 1 to 3,
The rewritable memory stores unique information,
The check code is calculated including at least a part of the unique information;
IC card characterized by
請求項1から請求項4までのいずれか1項に記載のICカードにおいて、
前記CPUが前記追加の実行コードを実行しない場合に、その旨を外部に通知する通知手段を備えること、
を特徴とするICカード。
In the IC card according to any one of claims 1 to 4,
A notification means for notifying the outside when the CPU does not execute the additional execution code;
IC card characterized by
実行コードを記憶するメモリと、
追加の実行コード、及び、前記追加の実行コードの少なくとも一部を用いてあらかじめ外部で算出されたチェックコードを記憶する書き換え可能なメモリと、
前記実行コード及び前記追加の実行コードを実行するCPUと、
を備えるICカードのCPUに実行させるICカードプログラムであって、
所定の条件を満たすか否かを判断する条件判断手順と、
前記条件判断手段が所定の条件を満たすと判断した場合に、外部と同様の方式でチェックコードを算出する算出手順と、
前記算出手順で算出したチェックコードと前記書き換え可能なメモリに記憶されているチェックコードとを比較する比較手順と、
前記比較手順の比較結果が一致している場合に、前記追加の実行コードを実行し、一致していない場合に、前記追加の実行コードを実行しない実行可否手順と、
を備えるICカードプログラム。
Memory for storing executable code;
A rewritable memory for storing an additional execution code, and a check code calculated externally in advance using at least a part of the additional execution code;
A CPU for executing the execution code and the additional execution code;
An IC card program to be executed by a CPU of an IC card comprising:
A condition determination procedure for determining whether or not a predetermined condition is satisfied;
A calculation procedure for calculating a check code in the same manner as the outside when the condition determination means determines that a predetermined condition is satisfied;
A comparison procedure for comparing the check code calculated in the calculation procedure with the check code stored in the rewritable memory;
When the comparison result of the comparison procedure matches, the additional execution code is executed, and when the comparison result does not match, the execution permission procedure that does not execute the additional execution code;
IC card program comprising
請求項6に記載のICカードプログラムにおいて、
前記実行可否手順が前記追加の実行コードを実行しない場合に、その旨を外部に通知する通知手順を備えること、
を特徴とするICカードプログラム。
In the IC card program according to claim 6,
A provision of a notification procedure for notifying the outside when the executable procedure does not execute the additional executable code;
IC card program characterized by this.
JP2005176882A 2005-06-16 2005-06-16 IC card and IC card program Active JP4784165B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005176882A JP4784165B2 (en) 2005-06-16 2005-06-16 IC card and IC card program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005176882A JP4784165B2 (en) 2005-06-16 2005-06-16 IC card and IC card program

Publications (2)

Publication Number Publication Date
JP2006350738A true JP2006350738A (en) 2006-12-28
JP4784165B2 JP4784165B2 (en) 2011-10-05

Family

ID=37646500

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005176882A Active JP4784165B2 (en) 2005-06-16 2005-06-16 IC card and IC card program

Country Status (1)

Country Link
JP (1) JP4784165B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013246672A (en) * 2012-05-28 2013-12-09 Toppan Printing Co Ltd Portable recording medium and terminal
JP2014225790A (en) * 2013-05-16 2014-12-04 パナソニック株式会社 Visible light communication apparatus
JP7459899B2 (en) 2022-08-01 2024-04-02 大日本印刷株式会社 Electronic information storage medium, verification method, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03147086A (en) * 1989-11-01 1991-06-24 Hitachi Maxell Ltd Ic card
JPH09269979A (en) * 1996-04-03 1997-10-14 Dainippon Printing Co Ltd Ic card and method for starting the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03147086A (en) * 1989-11-01 1991-06-24 Hitachi Maxell Ltd Ic card
JPH09269979A (en) * 1996-04-03 1997-10-14 Dainippon Printing Co Ltd Ic card and method for starting the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013246672A (en) * 2012-05-28 2013-12-09 Toppan Printing Co Ltd Portable recording medium and terminal
JP2014225790A (en) * 2013-05-16 2014-12-04 パナソニック株式会社 Visible light communication apparatus
JP7459899B2 (en) 2022-08-01 2024-04-02 大日本印刷株式会社 Electronic information storage medium, verification method, and program

Also Published As

Publication number Publication date
JP4784165B2 (en) 2011-10-05

Similar Documents

Publication Publication Date Title
US8683457B1 (en) Updating firmware of an electronic device by storing a version identifier in a separate header
JP5740646B2 (en) How to download software
JP5843674B2 (en) IC card, portable electronic device, and control method of IC card
GB2408359A (en) Controlling upgrade of firmware
JP2007257542A (en) Composite portable electronic device and composite ic card
JP2009048415A (en) Portable electronic device and control method of portable electronic device
JP2007287022A (en) Information storage method for electronic control device
JP4784165B2 (en) IC card and IC card program
JP2008009650A (en) Program execution control circuit, computer system, and ic card
WO2013042682A1 (en) Ic card, portable electronic device, and ic card control method
JP4675980B2 (en) Fraud prevention method
JP2009187438A (en) Method for detecting attack on ic card, ic card, and program for ic card
JP2012212415A (en) Wireless base station device
CN106484477B (en) The software download and starting method of safety
CN110750792A (en) Safe starting method based on DSP FLASH
JP6639433B2 (en) Control device
US10242183B2 (en) Method of executing a program by a processor and electronic entity comprising such a processor
JP2007310590A (en) Radio tag system, radio tag data writing method, radio tag reader/writer device and radio tag
JP2007188138A (en) Microcomputer and its security control method
JP2007257544A (en) Portable electronic device and ic card
JP5957577B2 (en) IC card, portable electronic device, and IC card control method
US20230401340A1 (en) Application-specific integrated circuit (asic) with one-time programmable (otp) bits
JP4641157B2 (en) Multi-application IC card and application program
JP6039036B2 (en) IC card, portable electronic device, and control method of IC card
JP4549731B2 (en) Multi-application IC card with command code that is commonly used by applications

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20061120

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110308

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110426

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110614

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110627

R150 Certificate of patent or registration of utility model

Ref document number: 4784165

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140722

Year of fee payment: 3