JP7582547B1 - ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, DIVIDED DATA PROCESSING METHOD, AND PROGRAM - Google Patents
ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, DIVIDED DATA PROCESSING METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JP7582547B1 JP7582547B1 JP2024112471A JP2024112471A JP7582547B1 JP 7582547 B1 JP7582547 B1 JP 7582547B1 JP 2024112471 A JP2024112471 A JP 2024112471A JP 2024112471 A JP2024112471 A JP 2024112471A JP 7582547 B1 JP7582547 B1 JP 7582547B1
- Authority
- JP
- Japan
- Prior art keywords
- data
- divided data
- counter
- value
- external device
- 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.)
- Active
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
【課題】チェイニング中に外部装置からデータ更新の通知を複数回に亘って受けたときに、より効率良く対応することが可能な電子情報記憶媒体、ICチップ、ICカード、分割データ処理方法、及びプログラムを提供する。
【解決手段】ICチップ1は、チェイニングにより最初の分割データが受信されてから最後の分割データが受信されるまでの間に外部装置2からデータ更新が通知された場合、カウンタの値をインクリメントし、当該カウンタの値と閾値とを比較し、その比較結果に応じて、メモリに記憶済の分割データを消去して最初の分割データから受信を再開する第1の処理と、当該メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択された処理を実行する。
【選択図】図6
An electronic information storage medium, an IC chip, an IC card, a divided data processing method, and a program are provided that are capable of dealing more efficiently when a data update notification is received multiple times from an external device during chaining.
[Solution] When an IC chip 1 receives a data update from an external device 2 between the time when the first divided data is received by chaining and the time when the last divided data is received, the IC chip 1 increments a counter value, compares the counter value with a threshold value, and depending on the comparison result, selects either a first process of erasing the divided data stored in memory and resuming reception from the first divided data, or a second process of resuming reception from the intermediate divided data following the stored divided data without erasing the divided data stored in memory, and executes the selected process.
[Selected figure] Figure 6
Description
本発明は、外部装置からチェイニングにより送信されるデータを処理することが可能なIC(Integrated Circuit)カード等の技術分野に関する。 The present invention relates to the technical field of IC (Integrated Circuit) cards that can process data transmitted from an external device by chaining.
従来、ICカードと外部装置との間で一度に送信可能なデータの長さより長い送信データを送信する際に、その送信データを複数のブロック(つまり、分割データ)に分割して送信するチェイニングというデータ伝送プロトコルが知られている。ISO/IEC 7816-3やISO/IEC 14443の国際標準規格で定められているブロックフォーマットによるデータ伝送プロトコルでは、送信ブロックに対するICカード側の応答が必要とされているため、通信時間を必要以上に要し、ICカードと外部装置との取り引き自体にも時間を要してしまうという課題がある。特許文献1には、非接触ICカードとリーダライタ間のデータ伝送を制御するデータ伝送プロトコル制御方法において、送信側から受信側に対して分割された複数のブロックを連続して送信する際、最初に送信するブロックに連続して送信するブロック数を含めることで、通信時間を短縮化することができる技術が開示されている。 A data transmission protocol called chaining is known in the past, in which when transmitting data longer than the length of data that can be transmitted at one time between an IC card and an external device, the transmission data is divided into multiple blocks (i.e., divided data) and transmitted. In data transmission protocols using block formats defined in the international standards ISO/IEC 7816-3 and ISO/IEC 14443, a response from the IC card to the transmitted block is required, which causes problems in that communication time is required more than necessary and the transaction itself between the IC card and the external device also takes time. Patent Document 1 discloses a technology that can shorten communication time in a data transmission protocol control method for controlling data transmission between a contactless IC card and a reader/writer, in which when multiple divided blocks are transmitted consecutively from the transmitting side to the receiving side, the number of blocks to be transmitted consecutively is included in the first block to be transmitted.
ところで、国際標準規格で定められているチェイニングのデータ伝送プロトコルでは、チェイニングによって送信される送信データの一部がチェイニング中に更新された場合に関するプロトコルについては特に定められていない。外部装置がチェイニング中のデータ更新をICカードに通知しない場合、ICカードは更新前の分割データを大量に受信してしまい、通信時間を必要以上に要してしまったり、不要な分割データがICカード内のメモリに書き込まれてしまうことでメモリの容量を圧迫したり、複数回の不要な書き込みによるICチップの耐久性の低下の原因にもなる。したがって、チェイニング中に送信データの一部が更新された場合、外部装置がデータ更新をICカードに通知することが望ましいが、外部装置からデータ更新の通知を受けたICカードにおいて、受信済の分割データの取り扱いが問題となる。さらに、チェイニング中に外部装置から送信される送信データが頻繁に更新される場合がある。換言すると、送信データに含まれる分割データが複数に亘って更新される場合がある。この場合、チェイニング中にICカードが外部装置からデータ更新の通知を複数回に亘って受けたときの対応がさらに問題となる。 However, the data transmission protocol for chaining defined by the international standard does not specifically define a protocol for when part of the transmission data transmitted by chaining is updated during chaining. If the external device does not notify the IC card of data updates during chaining, the IC card will receive a large amount of divided data before the update, which will require more communication time than necessary, or unnecessary divided data will be written to the memory in the IC card, which will put pressure on the memory capacity, and the durability of the IC chip will decrease due to multiple unnecessary writings. Therefore, when part of the transmission data is updated during chaining, it is desirable for the external device to notify the IC card of the data update, but the IC card that has received the data update notification from the external device will have a problem with how to handle the received divided data. Furthermore, the transmission data transmitted from the external device may be frequently updated during chaining. In other words, the divided data included in the transmission data may be updated multiple times. In this case, the response when the IC card receives multiple notifications of data updates from the external device during chaining becomes even more problematic.
そこで、本発明は、上記問題等に鑑みてなされたものであり、チェイニング中に外部装置からデータ更新の通知を複数回に亘って受けたときに、より効率良く対応することが可能な電子情報記憶媒体、ICチップ、ICカード、分割データ処理方法、及びプログラムを提供することを課題の一例とする。 The present invention has been made in consideration of the above problems, and one example of the objective of the present invention is to provide an electronic information storage medium, an IC chip, an IC card, a divided data processing method, and a program that can respond more efficiently when multiple notifications of data updates are received from an external device during chaining.
上記課題を解決するために、請求項1に記載の発明は、外部装置から送信データが分割された分割データを含む所定のコマンドを順次受信して前記分割データをメモリに順次記憶することが可能な電子情報記憶媒体であって、前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、前記カウンタの値と予め設定された閾値とを比較する比較手段と、前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、を備えることを特徴とする。 In order to solve the above problem, the invention described in claim 1 is an electronic information storage medium capable of sequentially receiving from an external device a predetermined command including split data obtained by splitting transmission data, and sequentially storing the split data in a memory, the electronic information storage medium comprising: a counter for counting the number of times a data update is notified from the external device; an incrementing means for incrementing the value of the counter when a data update is notified from the external device between the reception of the first split data of the transmission data and the reception of the last split data; a comparison means for comparing the value of the counter with a preset threshold; and a processing means for selecting, depending on the result of the comparison between the value of the counter and the threshold, one of a first process for erasing the split data stored in the memory and resuming reception from the first split data, and a second process for resuming reception from the intermediate split data following the stored split data without erasing the split data stored in the memory, and executing the selected process.
請求項2に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記比較結果が、前記カウンタの値が前記閾値に達したことを示す場合、前記処理手段は、前記第1の処理を選択し、当該第1の処理を実行する一方、前記比較結果が、前記カウンタの値が前記閾値に達していないことを示す場合、前記処理手段は、前記第2の処理を選択し、当該第2の処理を実行することを特徴とする。 The invention described in claim 2 is characterized in that, in the electronic information storage medium described in claim 1, when the comparison result indicates that the counter value has reached the threshold value, the processing means selects the first process and executes the first process, while when the comparison result indicates that the counter value has not reached the threshold value, the processing means selects the second process and executes the second process.
請求項3に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記比較結果が、前記カウンタの値が前記閾値を超えたことを示す場合、前記処理手段は、前記第1の処理を選択し、当該第1の処理を実行する一方、前記比較結果が、前記カウンタの値が前記閾値に超えていないことを示す場合、前記処理手段は、前記第2の処理を選択し、当該第2の処理を実行することを特徴とする。 The invention described in claim 3 is characterized in that, in the electronic information storage medium described in claim 1, when the comparison result indicates that the counter value exceeds the threshold, the processing means selects the first process and executes the first process, while when the comparison result indicates that the counter value does not exceed the threshold, the processing means selects the second process and executes the second process.
請求項4に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記所定のコマンドの種別を特定する特定手段を更に備え、前記処理手段は、前記カウンタの値と前記閾値との比較結果、及び前記所定のコマンドの種別に応じて、前記第1の処理と、前記第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行することを特徴とする。 The invention described in claim 4 is characterized in that, in the electronic information storage medium described in claim 1, it further comprises a specifying means for specifying the type of the specified command when a data update is notified from the external device between the reception of the first divided data of the transmission data and the reception of the last divided data, and the processing means selects either the first process or the second process according to the result of comparing the value of the counter with the threshold value and the type of the specified command, and executes the selected process.
請求項5に記載の発明は、請求項4に記載の電子情報記憶媒体において、前記所定のコマンドの種別がセキュアデータを取り扱うコマンドの種別でなく、且つ前記比較結果が、前記カウンタの値が前記閾値に達したことを示す場合、前記処理手段は、前記第1の処理を選択し、当該第1の処理を実行する一方、前記比較結果が、前記所定のコマンドの種別がセキュアデータを取り扱うコマンドの種別でなく、且つ前記カウンタの値が前記閾値に達していないことを示す場合、前記処理手段は、前記第2の処理を選択し、当該第2の処理を実行することを特徴とする。 The invention described in claim 5 is characterized in that, in the electronic information storage medium described in claim 4, if the type of the specified command is not a type of command that handles secure data and the comparison result indicates that the value of the counter has reached the threshold, the processing means selects the first process and executes the first process, while if the comparison result indicates that the type of the specified command is not a type of command that handles secure data and the value of the counter has not reached the threshold, the processing means selects the second process and executes the second process.
請求項6に記載の発明は、請求項4に記載の電子情報記憶媒体において、前記所定のコマンドの種別がセキュアデータを取り扱うコマンドの種別でなく、且つ前記比較結果が、前記カウンタの値が前記閾値を超えたことを示す場合、前記処理手段は、前記第1の処理を選択し、当該第1の処理を実行する一方、前記比較結果が、前記所定のコマンドの種別がセキュアデータを取り扱うコマンドの種別でなく、且つ前記カウンタの値が前記閾値を超えていないことを示す場合、前記処理手段は、前記第2の処理を選択し、当該第2の処理を実行することを特徴とする。 The invention described in claim 6 is characterized in that, in the electronic information storage medium described in claim 4, if the type of the specified command is not a type of command that handles secure data and the comparison result indicates that the value of the counter exceeds the threshold, the processing means selects the first process and executes the first process, while if the comparison result indicates that the type of the specified command is not a type of command that handles secure data and the value of the counter does not exceed the threshold, the processing means selects the second process and executes the second process.
請求項7に記載の発明は、外部装置から送信データが分割された分割データを含む所定のコマンドを順次受信して前記分割データをメモリに順次記憶することが可能なICチップであって、前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、前記カウンタの値と予め設定された閾値とを比較する比較手段と、前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、を備えることを特徴とする。 The invention described in claim 7 is an IC chip capable of sequentially receiving from an external device a predetermined command including split data obtained by splitting transmission data, and sequentially storing the split data in a memory, the IC chip comprising: a counter for counting the number of times a data update is notified from the external device; an incrementing means for incrementing the value of the counter when a data update is notified from the external device between the reception of the first split data of the transmission data and the reception of the last split data; a comparison means for comparing the value of the counter with a preset threshold; and a processing means for selecting, depending on the result of the comparison between the value of the counter and the threshold, one of a first process for erasing the split data stored in the memory and resuming reception from the first split data, and a second process for resuming reception from the intermediate split data following the stored split data without erasing the split data stored in the memory, and executing the selected process.
請求項8に記載の発明は、外部装置から送信データが分割された分割データを含む所定のコマンドを順次受信して前記分割データをメモリに順次記憶することが可能なICカードあって、前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、前記カウンタの値と予め設定された閾値とを比較する比較手段と、前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、を備えることを特徴とする。 The invention described in claim 8 is an IC card capable of sequentially receiving from an external device a predetermined command including split data obtained by splitting transmission data, and sequentially storing the split data in a memory, the IC card comprising: a counter for counting the number of times a data update is notified from the external device; increment means for incrementing the value of the counter when a data update is notified from the external device between the reception of the first split data of the transmission data and the reception of the last split data; comparison means for comparing the value of the counter with a preset threshold; and processing means for selecting, depending on the result of the comparison between the value of the counter and the threshold, one of a first process for erasing the split data stored in the memory and resuming reception from the first split data, and a second process for resuming reception from the intermediate split data following the stored split data without erasing the split data stored in the memory, and executing the selected process.
請求項9に記載の発明は、外部装置から送信データが分割された分割データを含む所定のコマンドを順次受信して前記分割データをメモリに順次記憶することが可能な電子情報記憶媒体であり、前記外部装置からデータ更新が通知された回数をカウントするためのカウンタを備える電子情報記憶媒体により実行される分割データ処理方法であって、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするステップと、前記カウンタの値と予め設定された閾値とを比較するステップと、前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行するステップと、を含むことを特徴とする。 The invention described in claim 9 is an electronic information storage medium capable of sequentially receiving from an external device a predetermined command including split data obtained by splitting transmission data, and sequentially storing the split data in a memory, and a split data processing method executed by the electronic information storage medium having a counter for counting the number of times a data update is notified from the external device, characterized in that it includes the steps of: incrementing the value of the counter when a data update is notified from the external device between the reception of the first split data of the transmission data and the reception of the last split data; comparing the value of the counter with a preset threshold; and selecting, depending on the result of the comparison between the value of the counter and the threshold, one of a first process of erasing the split data stored in the memory and resuming reception from the first split data, and a second process of resuming reception from the intermediate split data following the stored split data without erasing the split data stored in the memory, and executing the selected process.
請求項10に記載の発明は、外部装置から送信データが分割された分割データを含む所定のコマンドを順次受信して前記分割データをメモリに順次記憶することが可能なコンピュータであり、前記外部装置からデータ更新が通知された回数をカウントするためのカウンタを備えるコンピュータに、前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするステップと、前記カウンタの値と予め設定された閾値とを比較するステップと、前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行するステップと、を実行させることを特徴とする。 The invention described in claim 10 is a computer capable of sequentially receiving, from an external device, a predetermined command including split data into which transmission data is split, and sequentially storing the split data in a memory, the computer having a counter for counting the number of times data update is notified from the external device, and is characterized in that, when a data update is notified from the external device between the reception of the first split data of the transmission data and the reception of the last split data, the computer is made to execute the steps of incrementing the value of the counter, comparing the value of the counter with a preset threshold, and selecting, depending on the result of the comparison between the value of the counter and the threshold, one of a first process of erasing the split data stored in the memory and resuming reception from the first split data, and a second process of resuming reception from the intermediate split data following the stored split data without erasing the split data stored in the memory, and executing the selected process.
本発明によれば、チェイニング中に外部装置からデータ更新の通知を複数回に亘って受けたときに、より効率良く対応することができる。 The present invention makes it possible to more efficiently respond when multiple data update notifications are received from an external device during chaining.
以下、図面を参照して本発明の実施形態について詳細に説明する。 The following describes in detail an embodiment of the present invention with reference to the drawings.
[1.ICチップ1の構成及び機能]
先ず、図1を参照して、本実施形態に係るICチップ1の構成及び機能について説明する。ICチップ1は、外部装置2から送信データがチェイニングにより分割された分割データを含む所定のコマンドを順次受信して当該分割データをメモリに順次記憶することが可能な電子情報記憶媒体の一例である。ICチップ1は、例えば、クレジットカード、キャッシュカード、またはマイナンバーカードなどのICカード、または、スマートフォンなどのモバイルデバイスに搭載される。スマートフォンなどのモバイルデバイスの場合、ICチップ1は、モバイルデバイスに着脱可能な小型ICカードに搭載されてもよいし、eUICC(Embedded Universal Integrated Circuit Card)としてモバイルデバイスから容易に取り外しや取り換えができないように組み込み基板上に搭載されてもよい。
[1. Configuration and Function of IC Chip 1]
First, the configuration and functions of an IC chip 1 according to this embodiment will be described with reference to Fig. 1. The IC chip 1 is an example of an electronic information storage medium capable of sequentially receiving predetermined commands including divided data obtained by dividing transmission data by chaining from an external device 2 and sequentially storing the divided data in a memory. The IC chip 1 is mounted on, for example, an IC card such as a credit card, a cash card, or a My Number card, or a mobile device such as a smartphone. In the case of a mobile device such as a smartphone, the IC chip 1 may be mounted on a small IC card that is detachable from the mobile device, or may be mounted on an embedded board as an eUICC (Embedded Universal Integrated Circuit Card) so that it cannot be easily removed or replaced from the mobile device.
図1は、ICチップ1のハードウェア構成例を示す図である。ICチップ1は、図1に示すように、I/O回路11、RAM(Random Access Memory)12、NVM(Nonvolatile Memory)13、ROM(Read Only Memory)14、CPU(Central Processing Unit)15(コンピュータの一例)、及び暗号演算を行うコプロセッサ16等を備える。I/O回路11は、外部装置2との間のインターフェースを担う。なお、ICチップ1と外部装置2との間の通信は、接触通信であってもよいし、非接触通信であってもよい。非接触通信の場合、例えばICカードまたはモバイルデバイスに搭載されたアンテナ(図示せず)を介してICチップ1と外部装置2との通信が行われる。なお、外部装置2の例として、リーダライタを備える取引装置などが挙げられる。RAM12とNVM13の少なくとも一方は、上記分割データが記憶されるメモリの一例である。RAM12における所定の所定領域は、後述するデータ更新が通知された回数をカウントするためのカウンタとして用いられる。このようなカウンタは、NVM13における所定領域に設けられてもよい。NVM13には、例えばフラッシュメモリが適用される。なお、NVM13は、「Electrically Erasable Programmable Read-Only Memory」であってもよい。NVM13またはROM14には、OS(Operating System)、及び1または複数のアプリケーション(本発明のプログラムを含む)等が記憶される。
1 is a diagram showing an example of the hardware configuration of an IC chip 1. As shown in FIG. 1, the IC chip 1 includes an I/
ICチップ1は、I/O回路11を介して、外部装置2との間で、例えば、半二重ブロック伝送プロトコルに従って通信を行う。例えば、ISO/IEC 7816-3では、半二重ブロック伝送プロトコルとして、T=1プロトコル(調歩式半二重ブロック伝送プロトコル)が規定されている。半二重ブロック伝送プロトコルに従う通信では、I(Information)-block(情報ブロック)、R(Receive Ready)-block(受信準備完了ブロック)、及びS(Supervisory)-block(管理ブロック)が用いられる。I-blockは、アプリケーションによりアプリケーション層で使用されるデータを伝達するために用いられる。アプリケーション層で使用されるデータには、上述した送信データが該当する。
The IC chip 1 communicates with the external device 2 via the I/
ここで、送信データは、複数の分割データに分割され、それぞれの分割データは所定のコマンドAPDU(Application Protocol Data Unit)に含まれて送信される。コマンドAPDUは、CLA(命令クラス)、INS(命令コード)、P1及びP2(命令パラメータ)から構成されるヘッダ部と、上記分割データを含むボディ部により構成される。例えば送信データが、1度に(つまり、1つのコマンドAPDUで)送信可能な最大長を超える場合、チェイニングにより複数のコマンドAPDUで外部装置2から分割データが順次送信されることになる。図2は、送信データの構成例を示す図である。図2の例では、送信データtdは、5つ以上の分割データdd1~ddn(nは5以上の自然数)から構成されている。また、図2の例では、分割データdd1~ddnのそれぞれのデータ長(バイト数)は互いに同一であり、1度に送信可能な最大長になっている。先頭の分割データdd1から順次、ICチップ1へ送信される。 Here, the transmission data is divided into multiple pieces of divided data, and each piece of divided data is included in a specific command APDU (Application Protocol Data Unit) and transmitted. The command APDU is composed of a header section consisting of CLA (instruction class), INS (instruction code), P1 and P2 (instruction parameters), and a body section containing the above-mentioned divided data. For example, if the transmission data exceeds the maximum length that can be transmitted at one time (i.e., in one command APDU), the divided data will be transmitted sequentially from the external device 2 in multiple command APDUs by chaining. Figure 2 is a diagram showing an example of the configuration of transmission data. In the example of Figure 2, the transmission data td is composed of five or more pieces of divided data dd1 to ddn (n is a natural number of 5 or more). Also, in the example of Figure 2, the data length (number of bytes) of each piece of divided data dd1 to ddn is the same as each other, and is the maximum length that can be transmitted at one time. The data is transmitted to the IC chip 1 sequentially, starting with the first piece of divided data dd1.
なお、コマンドAPDUにおけるCLAのbit5が“0”に設定される場合、当該コマンドAPDUは、チェイニングの最後(またはチェイニング無)を示す。一方、コマンドAPDUにおけるCLAのbit5が“1”に設定される場合、当該コマンドAPDUは、チェイニング途中であることを示す。また、I-blockは、外部装置2がチェイニング中のデータ更新をICチップ1に通知するためにも用いられる。ここで、データ更新とは、送信データのうちICチップ1へ未だ送信されていない分割データの更新を意味する。送信データに含まれる分割データが複数に亘って更新される場合、チェイニング中にデータ更新が連続的または離間的に複数回に亘って外部装置2からICチップ1に通知される。なお、図2に示す分割データdd1~ddnのうち、例えば、分割データdd1及び分割データdd3が送信前に更新(例えば、分割データ中の特定の1または複数のbitが変更)される。また、チェイニング中に何れかの分割データの更新が発生する場合も考えられる。 When bit 5 of the CLA in the command APDU is set to "0", the command APDU indicates the end of chaining (or no chaining). On the other hand, when bit 5 of the CLA in the command APDU is set to "1", the command APDU indicates that the chaining is in progress. The I-block is also used by the external device 2 to notify the IC chip 1 of data updates during chaining. Here, data updates refer to updates of divided data that have not yet been transmitted to the IC chip 1 from among the transmission data. When the divided data included in the transmission data are updated multiple times, the external device 2 notifies the IC chip 1 of the data updates continuously or at intervals multiple times during chaining. Of the divided data dd1 to ddn shown in FIG. 2, for example, the divided data dd1 and the divided data dd3 are updated before transmission (for example, a specific bit or multiple bits in the divided data are changed). It is also possible that any of the divided data is updated during chaining.
R-blockは、肯定応答(ack)や各種エラー(redundancy code error またはcharacter parity errorまたはother error)を伝達するために用いられる。S-blockは、外部装置2とICチップ1との間で制御情報を交換するために用いられる。図3は、ICチップ1と外部装置2との間の接触通信において送受信されるblockのデータフォーマットを示す図である。図3に示すように、1つのblockは、先頭フィールド(Prologue field)、情報フィールド(Information field)、及び最終フィールド(Epilogue field)から構成される。最終フィールドには、誤り検出符号(LRCまたはCRC)が格納される。I-blockの情報フィールド(INF)には、コマンドAPDUが格納される。或いは、I-blockの情報フィールド(INF)には、チェイニング中のデータ更新を示すステータスワードSW(例えば、2byte)がTLV形式で格納される。かかるTLVにおけるT(タグ)はV(バリュー)がステータスワードSWであることを識別する。これにより、外部装置2がチェイニング中のデータ更新をICチップ1に通知することができる。なお、R-blockは、情報フィールドを持たない。 The R-block is used to transmit an acknowledgment (ack) or various errors (redundancy code error, character parity error, or other error). The S-block is used to exchange control information between the external device 2 and the IC chip 1. FIG. 3 is a diagram showing the data format of blocks transmitted and received in contact communication between the IC chip 1 and the external device 2. As shown in FIG. 3, one block is composed of a prologue field, an information field, and an epilogue field. An error detection code (LRC or CRC) is stored in the epilogue field. A command APDU is stored in the information field (INF) of the I-block. Alternatively, a status word SW (e.g., 2 bytes) indicating a data update during chaining is stored in the information field (INF) of the I-block in TLV format. The T (tag) in such a TLV identifies that the V (value) is the status word SW. This allows the external device 2 to notify the IC chip 1 of a data update during chaining. The R-block does not have an information field.
各blockの先頭フィールドは、NAD(Node address byte)、PCB(Protocol control byte)、及びLEN(Length byte)から構成される。NADは、blockの送信元及び宛先を示す。PCBは、先頭の2ビット(bit8~bit7)によりblockがI-block、R-block、またはS-blockであるかを示し、残りの6ビット(bit6~bit1)により詳細な情報を示す。また、I-blockのPCBにおける所定のビットでチェイニングの最後またチェイニング途中であること示すこともできる。図4は、R-blockのPCBにおけるbit6~bit1の内容を示す図である。図4において、N(R)は、そのR-blockの次に送られてくることが想定されるI-blockのシーケンス番号を示す。図4に示すように、R-blockは、PCBのbit6~bit1により、肯定応答(ack)、ブロックのエラー(redundancy code error / character parity error)、または、その他のエラー(other error)が示される。 The first field of each block consists of NAD (Node address byte), PCB (Protocol control byte), and LEN (Length byte). NAD indicates the source and destination of the block. The first two bits (bits 8 to 7) of the PCB indicate whether the block is an I-block, R-block, or S-block, and the remaining six bits (bits 6 to 1) indicate more detailed information. In addition, a specific bit in the PCB of an I-block can indicate whether it is the end of a chain or in the middle of a chain. Figure 4 shows the contents of bits 6 to 1 in the PCB of an R-block. In Figure 4, N(R) indicates the sequence number of the I-block that is expected to be sent after the R-block. As shown in Figure 4, bits 6 to 1 of the PCB indicate whether the R-block is an acknowledgment (ack), a block error (redundancy code error / character parity error), or other error.
なお、図示しないが、ICチップ1と外部装置2との間の非接触通信において送受信されるblockにおいても、ISO/IEC 14443に規定されるように、先頭フィールド、情報フィールド、及び最終フィールドから構成され、当該先頭フィールドは、PCB、CID(Card identifier)、及びNADから構成される。この場合も、PCBは、接触通信で送受信されるblockと同様、先頭の2ビット(bit8~bit7)によりblockがI-block、R-block、またはS-blockであるかを示し、残りの6ビット(bit6~bit1)により詳細な情報を示す。 Although not shown, blocks transmitted and received in non-contact communication between the IC chip 1 and external device 2 also consist of a first field, an information field, and a last field as specified in ISO/IEC 14443, and the first field consists of a PCB, a CID (Card Identifier), and an NAD. In this case, like blocks transmitted and received in contact communication, the PCB indicates whether the block is an I-block, R-block, or S-block using the first two bits (bits 8 to 7), and indicates more detailed information using the remaining six bits (bits 6 to 1).
CPU15(コンピュータの一例)は、NVM13に記憶されたOS及びアプリケーション(本発明のプログラムを含む)を実行することで、本発明におけるインクリメント手段、比較手段、特定手段、及び処理手段等として機能する。具体的には、CPU15は、外部装置2からI-blockにより送信される送信データ(つまり、複数の分割データ)のうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に外部装置2からI-blockによりデータ更新が通知された場合、RAM12等におけるカウンタの値をインクリメント(例えば、1加算)する。つまり、データ更新を示すI-blockが受信される毎にカウンタの値は増加する。CPU15は、当該カウンタの値と予め設定された閾値(更新回数の上限値)とを比較する。ここで、閾値は2以上に設定される。
The CPU 15 (an example of a computer) functions as the increment means, comparison means, identification means, processing means, and the like of the present invention by executing the OS and applications (including the program of the present invention) stored in the
そして、CPU15は、カウンタの値と閾値(例えば、2)との比較結果に応じて、メモリ(RAM12またはNVM13)に記憶済の分割データを消去して最初の分割データから受信を再開する第1の処理と、当該メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択された処理を実行する。例えば、CPU15は、上記比較結果がカウンタの値が閾値に達したことを示す場合、上記第1の処理を選択し、当該第1の処理を実行する一方、当該比較結果がカウンタの値が閾値に達していないことを示す場合、上記第2の処理を選択し、当該第2の処理を実行する。或いは、CPU15は、上記比較結果がカウンタの値が閾値を超えたことを示す場合、上記第1の処理を選択し、当該第1の処理を実行する一方、上記比較結果がカウンタの値が閾値に超えていないことを示す場合、上記第2の処理を選択し、当該第2の処理を実行してもよい。
Then, depending on the result of the comparison between the counter value and a threshold value (e.g., 2), the
ここで、上記第1の処理において、CPU15は、最初の分割データから再送信させるためのR-blockを外部装置2へ送信するとよい。この場合、CPU15は、R-blockのPCBにおけるbit6~bit1のうち下位4ビット(bit4~bit1)に「最初の分割データから再送信」を意味する値を設定(例えば、0011を設定)するとよい。なお、R-block(例えば、other error)によりチェイニングが中止されてもよい。一方、上記第2の処理において、CPU15は、メモリに記憶済の分割データを消去せずに(つまり、そのまま使えるため)、当該記憶済の分割データに続く途中の分割データから送信させるためのR-block(例えば、other error)を外部装置2へ送信するとよい。この場合、CPU15は、R-blockのPCBにおけるbit5(N(R))で指定したシーケンス番号のI-blockを外部装置2に再送させることができる。
Here, in the first process, the
また、CPU15は、外部装置2からI-blockにより送信される送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に外部装置2からI-blockによりデータ更新が通知された場合、直前のI-blockにより送信されたコマンドAPDUの種別を特定(例えば、INSを参照して特定)してもよい。この場合、CPU15は、カウンタの値と閾値との比較結果、及びコマンドAPDUの種別に応じて、メモリに記憶済の分割データを消去して最初の分割データから受信を再開する第1の処理と、当該メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データ(つまり、更新後の分割データ)から受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択された処理を実行する。ここで、コマンドAPDUの種別は、セキュアデータ(例えば、鍵データ)を取り扱うコマンドであるか否かにより予め定められているとよい。例えば、セキュアデータを取り扱うVERIFYコマンド及びPUT KEYコマンドの種別は“A”とする一方、セキュアデータを取り扱わないWRITE BINARYコマンド及びWRITE RECORDコマンドの種別は“B”とするように予め定められる。
In addition, when the
例えば、コマンド種別が“A”である(つまり、コマンド種別がセキュアデータを取り扱うコマンドの種別である)場合、カウンタの値と閾値との比較結果に関わらず、メモリに記憶済の分割データが全て消去されて最初の分割データから受信が再開される。例えば、CPU15は、最初の分割データから再送信させるためのR-blockを外部装置2へ送信するとよい。この場合、上記と同様、R-blockのPCBにおけるbit6~bit1のうち下位4ビットに「最初の分割データから再送信」を意味する値が設定されるとよい。なお、R-block(例えば、other error)によりチェイニングが中止されてもよい。これにより、コマンドAPDUの種別に応じてチェイニングが中止される。
For example, if the command type is "A" (i.e., the command type is a type of command that handles secure data), regardless of the result of comparing the counter value with the threshold, all divided data stored in memory are erased and reception is resumed from the first divided data. For example, the
一方、コマンド種別が“B”である(つまり、コマンド種別がセキュアデータを取り扱うコマンドの種別でない)場合で、且つ上記比較結果がカウンタの値が閾値に達していないことを示す場合(または、上記比較結果がカウンタの値が閾値を超えていないことを示す場合)、メモリに記憶済の分割データを消去せずに、当該記憶済の分割データに続く途中の分割データから受信が再開される。一方、コマンド種別が“B”である場合で、且つ上記比較結果がカウンタの値が閾値に達したことを示す場合(または、上記比較結果がカウンタの値が閾値を超えたことを示す場合)、メモリに記憶済の分割データを消去して最初の分割データから受信が再開すされる。 On the other hand, if the command type is "B" (i.e., the command type is not a type of command that handles secure data) and the comparison result indicates that the counter value has not reached the threshold value (or if the comparison result indicates that the counter value has not exceeded the threshold value), the divided data stored in memory is not erased, and reception is resumed from the intermediate divided data following the stored divided data. On the other hand, if the command type is "B" and the comparison result indicates that the counter value has reached the threshold value (or if the comparison result indicates that the counter value has exceeded the threshold value), the divided data stored in memory is erased, and reception is resumed from the first divided data.
なお、例えばセキュリティを確保できる環境下(例えば、ICチップ1の製造工場)において、チェイニングが実施される場合、コマンド種別が“A”である(つまり、コマンド種別がセキュアデータを取り扱うコマンドの種別である)場合であっても、上記比較結果がカウンタの値が閾値に達していないことを示す場合(または、上記比較結果がカウンタの値が閾値を超えていないことを示す場合)、メモリに記憶済の分割データを消去せずに、当該記憶済の分割データに続く途中の分割データから受信が再開されるように構成してもよい。この場合、外部装置2から送信される送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に外部装置2からデータ更新が通知されたとしても、上述したように送信されたコマンドAPDUの種別(つまり、セキュアデータを取り扱うコマンドであるか否か)が特定されなくてもよい。 Note that, for example, when chaining is performed in an environment where security can be ensured (for example, a manufacturing factory for IC chip 1), even if the command type is "A" (i.e., the command type is a type of command that handles secure data), if the comparison result indicates that the counter value has not reached the threshold value (or if the comparison result indicates that the counter value has not exceeded the threshold value), the divided data stored in the memory may not be erased, and reception may be resumed from the intermediate divided data following the stored divided data. In this case, even if a data update is notified from the external device 2 during the period from when the first divided data of the transmission data transmitted from the external device 2 is received to when the last divided data is received, the type of the transmitted command APDU (i.e., whether or not it is a command that handles secure data) may not be identified as described above.
[2.ICチップ1の動作]
次に、図5及び図6を参照して、ICチップ1の動作について説明する。図5は、チェイニング中にデータ更新が複数回発生した場合における外部装置2とICチップ1との間のやり取りの一例を示すシーケンス図である。図6は、ICチップ1のCPU15により実行される分割データ処理の一例を示すフローチャートである。
2. Operation of IC chip 1
Next, the operation of the IC chip 1 will be described with reference to Fig. 5 and Fig. 6. Fig. 5 is a sequence diagram showing an example of communication between the external device 2 and the IC chip 1 when data updates occur multiple times during chaining. Fig. 6 is a flow chart showing an example of divided data processing executed by the
外部装置2とICチップ1の間で初期化シーケンスが行われた後、図5において、外部装置2は、チェイニングにより最初(1番目)のI-blockをICチップ1へ送信する(ステップS1)。かかるI-blockには、送信データが分割された分割データ(1番目の分割データ)を有するコマンドAPDUが含まれる。なお、初期化シーケンスにおいて、カウンタが初期化(つまり、カウンタの値が0にリセット)される。ICチップ1は、外部装置2からの最初のI-blockを受信すると、当該I-blockに含まれるコマンドAPDUから分割データ(1番目の分割データ)を取得してRAM12(またはNVM13)に書き込み(記憶し)(ステップS2)、R-block(ack)を外部装置2へ送信する(ステップS3)。 After an initialization sequence is performed between the external device 2 and the IC chip 1, in FIG. 5, the external device 2 transmits the first (first) I-block to the IC chip 1 by chaining (step S1). This I-block includes a command APDU having divided data (first divided data) obtained by dividing the transmission data. Note that in the initialization sequence, the counter is initialized (i.e., the counter value is reset to 0). When the IC chip 1 receives the first I-block from the external device 2, it obtains the divided data (first divided data) from the command APDU included in the I-block and writes (stores) it in the RAM 12 (or NVM 13) (step S2), and transmits an R-block (ack) to the external device 2 (step S3).
次いで、外部装置2は、ICチップ1からのR-block(ack)を受信すると、2番目のI-blockをICチップ1へ送信する(ステップS4)。ICチップ1は、外部装置2からの2番目のI-blockを受信すると、当該I-blockに含まれるコマンドAPDUから分割データ(2番目の分割データ)を取得してRAM12(またはNVM13)に書き込み(記憶し)(ステップS5)、R-block(ack)を外部装置2へ送信する(ステップS6)。なお、ステップS5では、ステップS2で記憶された分割データ(1番目の分割データ)の直後に記憶される。 Next, when the external device 2 receives the R-block (ack) from the IC chip 1, it transmits the second I-block to the IC chip 1 (step S4). When the IC chip 1 receives the second I-block from the external device 2, it obtains the divided data (the second divided data) from the command APDU included in the I-block, writes (stores) it in the RAM 12 (or NVM 13) (step S5), and transmits the R-block (ack) to the external device 2 (step S6). Note that in step S5, the divided data is stored immediately after the divided data (the first divided data) stored in step S2.
ステップS1で外部装置2から最初の分割データが受信されてから、最後の分割データが受信されるまでの間に、外部装置2においてデータ更新(つまり、未だ送信されていない分割データの更新)が発生(1回目)した場合、外部装置2は、当該データ更新を示すステータスワードSWを含むI-block(以下、「データ更新通知用I-block」という)をICチップ1へ送信する(ステップS7)。ICチップ1が外部装置2からのデータ更新通知用I-blockを受信すると、図6に示す処理が開始される。 If a data update (i.e., an update of a divided data that has not yet been transmitted) occurs (for the first time) in the external device 2 between the reception of the first divided data from the external device 2 in step S1 and the reception of the last divided data, the external device 2 transmits an I-block (hereinafter referred to as a "data update notification I-block") including a status word SW indicating the data update to the IC chip 1 (step S7). When the IC chip 1 receives the data update notification I-block from the external device 2, the process shown in FIG. 6 is started.
図6に示す処理が開始されると、ICチップ1は、I-blockにより直前に受信されたコマンドAPDUの種別を特定する(ステップS101)。次いで、ICチップ1は、ステップS101で特定された種別が、セキュアデータを取り扱うコマンドの種別であるか否かを判定する(ステップS102)。セキュアデータを取り扱うコマンドの種別であると判定された場合(ステップS102:YES)、処理はステップS106へ進む。一方、セキュアデータを取り扱うコマンドの種別でないと判定された場合(ステップS102:NO)、処理はステップS103へ進む。 When the process shown in FIG. 6 starts, the IC chip 1 identifies the type of the command APDU most recently received by the I-block (step S101). Next, the IC chip 1 determines whether the type identified in step S101 is the type of a command that handles secure data (step S102). If it is determined that the type is the type of a command that handles secure data (step S102: YES), the process proceeds to step S106. On the other hand, if it is determined that the type is not the type of a command that handles secure data (step S102: NO), the process proceeds to step S103.
ステップS103では、ICチップ1は、カウンタの値をインクリメント(例えば、1加算)する。次いで、ICチップ1は、カウンタの値と閾値(例えば、2)とを比較し、カウンタの値が閾値に達したか(つまり、ステップS103における比較結果がカウンタの値が閾値に達したことを示すか)否かを判定する(ステップS104)。なお、カウンタの値が閾値を超えたか否かが判定されてもよい。カウンタの値が閾値に達していないと判定された場合(ステップS104:NO)、処理はステップS105へ進む。一方、カウンタの値が閾値に達したと判定された場合(ステップS104:YES)、処理はステップS106へ進む。 In step S103, the IC chip 1 increments the counter value (e.g., adds 1). Next, the IC chip 1 compares the counter value with a threshold value (e.g., 2) and determines whether the counter value has reached the threshold value (i.e., whether the comparison result in step S103 indicates that the counter value has reached the threshold value) (step S104). It may also be determined whether the counter value has exceeded the threshold value. If it is determined that the counter value has not reached the threshold value (step S104: NO), the process proceeds to step S105. On the other hand, if it is determined that the counter value has reached the threshold value (step S104: YES), the process proceeds to step S106.
ステップS105では、ICチップ1は、上述した第2の処理を選択し、記憶(書き込み)済の分割データに続く途中の分割データから送信させるためのR-block(例えば、other error)を外部装置2へ送信する(図5に示すステップS8)。例えば、ICチップ1は、シーケンス番号“0”のI-blockを受信した直後に、データ更新発生によりデータ更新通知用I-blockを受信した場合、次のシーケンス番号“1”のI-blockから送信させるためのR-block(PCBにおけるbit5で指定)を外部装置2へ送信する。 In step S105, the IC chip 1 selects the second process described above and transmits to the external device 2 an R-block (e.g., other error) to be transmitted from the intermediate divided data following the divided data that has already been stored (written) (step S8 shown in FIG. 5). For example, if the IC chip 1 receives an I-block for notifying data update due to the occurrence of a data update immediately after receiving an I-block with sequence number "0", it transmits to the external device 2 an R-block (specified by bit 5 in the PCB) to be transmitted from the next I-block with sequence number "1".
次いで、外部装置2は、ICチップ1からのR-block(例えば、other error)を受信すると、更新された送信データを構成する複数の分割データのうち、既に送信された分割データに続く途中の分割データ(更新後の分割データ)から送信を再開する。例えば、図5に示すように、m(mは3以上の自然数)番目のI-blockが外部装置2からICチップ1へ送信される(ステップS9)。ICチップ1は、外部装置2からのm番目のI-blockを受信すると、当該I-blockに含まれるコマンドAPDUから分割データを取得してRAM12(またはNVM13)に書き込み(記憶し)(ステップS10)、R-block(ack)を外部装置2へ送信する(ステップS11)。すなわち、分割データの送信再開後、ICチップ1は外部装置2からI-blockにより送信されたコマンドAPDUを順次受信し当該コマンドAPDUから分割データを取得してRAM12(またはNVM13)に順次書き込むことになる。 Next, when the external device 2 receives an R-block (e.g., other error) from the IC chip 1, it resumes transmission from the intermediate divided data (updated divided data) following the divided data already transmitted among the multiple divided data constituting the updated transmission data. For example, as shown in FIG. 5, the mth (m is a natural number of 3 or more) I-block is transmitted from the external device 2 to the IC chip 1 (step S9). When the IC chip 1 receives the mth I-block from the external device 2, it obtains the divided data from the command APDU included in the I-block, writes (stores) it in the RAM 12 (or NVM 13) (step S10), and transmits an R-block (ack) to the external device 2 (step S11). That is, after resuming transmission of the divided data, the IC chip 1 sequentially receives the command APDU transmitted by the I-block from the external device 2, obtains the divided data from the command APDU, and sequentially writes it to the RAM 12 (or NVM 13).
分割データの送信再開後、最後の分割データが受信されるまでの間に、送信されるべき別の分割データにおいてデータ更新が発生(2回目)した場合、外部装置2は、当該データ更新を示すステータスワードSWを含むデータ更新通知用I-blockをICチップ1へ送信する(ステップS12)。ICチップ1が外部装置2からのデータ更新通知用I-blockを受信すると、図6に示す処理が開始され、上記と同様に処理が行われる。そして、ステップS106では、ICチップ1は、上述した第1の処理を選択し、最初の分割データから再送信させるためのR-blockを外部装置2へ送信する。これにより、外部装置2は、ICチップ1からのR-blockを受信すると、更新された送信データを構成する複数の分割データのうち最初の分割データを含むI-blockから送信を再開する。つまり、更新後の分割データでチェイニングが最初からやり直される。或いは、外部装置2は、ICチップ1からのR-blockを受信すると、チェイニングを一旦中止し、送信データの内容が確定してから、更新後の分割データでチェイニングが最初からやり直される。 After the division data transmission is resumed, if a data update occurs (for the second time) in another division data to be transmitted before the last division data is received, the external device 2 transmits an I-block for data update notification, including a status word SW indicating the data update, to the IC chip 1 (step S12). When the IC chip 1 receives the I-block for data update notification from the external device 2, the process shown in FIG. 6 is started, and the process is performed in the same manner as described above. Then, in step S106, the IC chip 1 selects the first process described above and transmits an R-block to the external device 2 for retransmission from the first division data. As a result, when the external device 2 receives the R-block from the IC chip 1, it resumes transmission from the I-block including the first division data among the multiple division data constituting the updated transmission data. In other words, the chaining is restarted from the beginning with the updated division data. Alternatively, when the external device 2 receives the R-block from the IC chip 1, the chaining is temporarily stopped, and after the contents of the transmission data are confirmed, the chaining is restarted from the beginning with the updated division data.
そして、チェイニングの最後のコマンドAPDUを含むI-blockが受信されると、ICチップ1は、記憶済の全分割データにより構成される送信データを用いてコマンドAPDUに応じた処理(例えば、送信データを用いた照合処理、または送信データの書き込み処理)を実行する。なお、例えばセキュリティを確保できる環境下において、図5及び図6が行われる場合、図6に示すステップS101及びS102の処理はスキップされ、ステップS103~S106の処理が実行されるとよい。 When the I-block containing the last command APDU of the chain is received, the IC chip 1 executes processing according to the command APDU using the transmission data consisting of all the stored divided data (for example, a comparison process using the transmission data, or a write process of the transmission data). Note that, for example, when Figures 5 and 6 are performed in an environment where security can be ensured, the processes of steps S101 and S102 shown in Figure 6 may be skipped, and the processes of steps S103 to S106 may be executed.
以上説明したように、上記実施形態によれば、ICチップ1は、チェイニングにより最初の分割データが受信されてから最後の分割データが受信されるまでの間に外部装置2からデータ更新が通知された場合、カウンタの値をインクリメントし、当該カウンタの値と閾値とを比較し、その比較結果に応じて、メモリに記憶済の分割データを消去して最初の分割データから受信を再開する第1の処理と、当該メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択された処理を実行するように構成したので、チェイニング中にICチップ1が外部装置2からデータ更新の通知を複数回に亘って受けたときに、より効率良く対応することができる。例えば、チェイニング中に何回も(例えば、頻繁に)データ更新が発生した場合、チェイニングを一旦中止し、送信データの内容が確定してから新しくチェイニングをし直して、ICチップ1が送信データを一気に受信することで、不要なデータの書き込みを防止し、ICチップ1の耐久性の低下を図ることができる。 As described above, according to the above embodiment, when the IC chip 1 receives a data update notification from the external device 2 between the reception of the first divided data and the reception of the last divided data by chaining, the IC chip 1 increments the counter value, compares the counter value with a threshold value, and selects one of the following processes according to the comparison result: a first process of erasing the divided data stored in the memory and restarting reception from the first divided data, and a second process of restarting reception from the intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executes the selected process. Therefore, when the IC chip 1 receives a data update notification from the external device 2 multiple times during chaining, it can respond more efficiently. For example, if data updates occur multiple times (e.g., frequently) during chaining, the chaining is temporarily stopped, and after the contents of the transmission data are confirmed, a new chaining is performed, and the IC chip 1 receives the transmission data all at once, thereby preventing unnecessary data from being written and reducing the durability of the IC chip 1.
1 ICチップ
2 外部装置
11 I/O回路
12 RAM
13 NVM
14 ROM
15 CPU
16 コプロセッサ
1 IC chip 2 External device 11 I/
13 NVM
14 ROM
15 CPU
16 Coprocessor
Claims (10)
前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、
前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、
前記カウンタの値と予め設定された閾値とを比較する比較手段と、
前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、
を備えることを特徴とする電子情報記憶媒体。 An electronic information storage medium capable of sequentially receiving predetermined commands including divided data obtained by dividing transmission data from an external device and sequentially storing the divided data in a memory,
a counter for counting the number of times that the external device notifies the user of a data update;
an incrementing means for incrementing a value of the counter when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
a comparison means for comparing the value of the counter with a preset threshold value;
a processing means for selecting, according to a comparison result between the value of the counter and the threshold value, either one of a first process of erasing the divided data stored in the memory and restarting reception from the first divided data, or a second process of restarting reception from an intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executing the selected process;
An electronic information storage medium comprising:
前記処理手段は、前記カウンタの値と前記閾値との比較結果、及び前記所定のコマンドの種別に応じて、前記第1の処理と、前記第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行することを特徴とする請求項1に記載の電子情報記憶媒体。 a specifying unit that specifies a type of the predetermined command when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
The electronic information storage medium according to claim 1, characterized in that the processing means selects either the first process or the second process depending on the result of comparing the counter value with the threshold value and the type of the specified command, and executes the selected process.
前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、
前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、
前記カウンタの値と予め設定された閾値とを比較する比較手段と、
前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、
を備えることを特徴とするICチップ。 An IC chip capable of sequentially receiving predetermined commands including divided data obtained by dividing transmission data from an external device and sequentially storing the divided data in a memory,
a counter for counting the number of times that the external device notifies the user of a data update;
an incrementing means for incrementing a value of the counter when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
a comparison means for comparing the value of the counter with a preset threshold value;
a processing means for selecting, according to a comparison result between the value of the counter and the threshold value, either one of a first process of erasing the divided data stored in the memory and resuming reception from the first divided data, or a second process of resuming reception from an intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executing the selected process;
An IC chip comprising:
前記外部装置からデータ更新が通知された回数をカウントするためのカウンタと、
前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするインクリメント手段と、
前記カウンタの値と予め設定された閾値とを比較する比較手段と、
前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行する処理手段と、
を備えることを特徴とするICカード。 An IC card capable of sequentially receiving predetermined commands including divided data obtained by dividing transmission data from an external device and sequentially storing the divided data in a memory,
a counter for counting the number of times that the external device notifies the user of a data update;
an incrementing means for incrementing a value of the counter when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
a comparison means for comparing the value of the counter with a preset threshold value;
a processing means for selecting, according to a comparison result between the value of the counter and the threshold value, either one of a first process of erasing the divided data stored in the memory and resuming reception from the first divided data, or a second process of resuming reception from an intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executing the selected process;
An IC card comprising:
前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするステップと、
前記カウンタの値と予め設定された閾値とを比較するステップと、
前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行するステップと、
を含むことを特徴とする分割データ処理方法。 A divided data processing method executed by an electronic information storage medium capable of sequentially receiving, from an external device, predetermined commands including divided data obtained by dividing transmission data, and sequentially storing the divided data in a memory, the electronic information storage medium including a counter for counting the number of times data update has been notified from the external device, comprising:
incrementing a value of the counter when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
comparing the value of the counter with a preset threshold;
a step of selecting, depending on a result of comparing the value of the counter with the threshold value, one of a first process of erasing the divided data stored in the memory and resuming reception from the first divided data, and a second process of resuming reception from an intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executing the selected process;
13. A method for processing divided data, comprising:
前記送信データのうち最初の分割データが受信されてから最後の分割データが受信されるまでの間に前記外部装置からデータ更新が通知された場合、前記カウンタの値をインクリメントするステップと、
前記カウンタの値と予め設定された閾値とを比較するステップと、
前記カウンタの値と前記閾値との比較結果に応じて、前記メモリに記憶済の分割データを消去して前記最初の分割データから受信を再開する第1の処理と、前記メモリに記憶済の分割データを消去せずに当該記憶済の分割データに続く途中の分割データから受信を再開する第2の処理とのうち何れか一方の処理を選択し、当該選択した処理を実行するステップと、
を実行させることを特徴とするプログラム。 A computer capable of sequentially receiving, from an external device, predetermined commands including divided data obtained by dividing transmission data, and sequentially storing the divided data in a memory, the computer including a counter for counting the number of times data update is notified from the external device,
incrementing a value of the counter when a data update is notified from the external device during a period from when a first divided data of the transmission data is received to when a last divided data of the transmission data is received;
comparing the value of the counter with a preset threshold;
a step of selecting, depending on a result of comparing the value of the counter with the threshold value, one of a first process of erasing the divided data stored in the memory and resuming reception from the first divided data, and a second process of resuming reception from an intermediate divided data following the stored divided data without erasing the divided data stored in the memory, and executing the selected process;
A program characterized by executing the above.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023146975 | 2023-09-11 | ||
JP2023146975 | 2023-09-11 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7582547B1 true JP7582547B1 (en) | 2024-11-13 |
JP2025040397A JP2025040397A (en) | 2025-03-24 |
Family
ID=93429182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2024112471A Active JP7582547B1 (en) | 2023-09-11 | 2024-07-12 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, DIVIDED DATA PROCESSING METHOD, AND PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7582547B1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011065471A (en) | 2009-09-17 | 2011-03-31 | Toshiba Corp | Portable electronic device, ic card, processing system of portable electronic device, and control method of portable electronic device |
JP5106456B2 (en) | 2009-03-23 | 2012-12-26 | 株式会社東芝 | Data transmission protocol control method, apparatus, IC card and reader / writer |
JP2018152842A (en) | 2017-03-13 | 2018-09-27 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Information processing method, information processing system, and program |
JP2021114157A (en) | 2020-01-20 | 2021-08-05 | 大日本印刷株式会社 | Electronic information storage medium, authentication code generation method, authentication code verification method, and program |
JP2023070411A (en) | 2021-11-09 | 2023-05-19 | 株式会社オートネットワーク技術研究所 | Management device, management system, management method and computer program |
JP7468754B1 (en) | 2023-06-01 | 2024-04-16 | 大日本印刷株式会社 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM |
-
2024
- 2024-07-12 JP JP2024112471A patent/JP7582547B1/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5106456B2 (en) | 2009-03-23 | 2012-12-26 | 株式会社東芝 | Data transmission protocol control method, apparatus, IC card and reader / writer |
JP2011065471A (en) | 2009-09-17 | 2011-03-31 | Toshiba Corp | Portable electronic device, ic card, processing system of portable electronic device, and control method of portable electronic device |
JP2018152842A (en) | 2017-03-13 | 2018-09-27 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Information processing method, information processing system, and program |
JP2021114157A (en) | 2020-01-20 | 2021-08-05 | 大日本印刷株式会社 | Electronic information storage medium, authentication code generation method, authentication code verification method, and program |
JP2023070411A (en) | 2021-11-09 | 2023-05-19 | 株式会社オートネットワーク技術研究所 | Management device, management system, management method and computer program |
JP7468754B1 (en) | 2023-06-01 | 2024-04-16 | 大日本印刷株式会社 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM |
Also Published As
Publication number | Publication date |
---|---|
JP2025040397A (en) | 2025-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1619579A2 (en) | Mobile electronic equipment | |
US20070225038A1 (en) | Mobile electronic device and IC card | |
EP2797026B1 (en) | Portable electronic device | |
KR910001972B1 (en) | Processing System for Portable Electronic Devices | |
JP7468754B1 (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM | |
JP7582547B1 (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, DIVIDED DATA PROCESSING METHOD, AND PROGRAM | |
JP4776462B2 (en) | Portable electronic device and method for controlling portable electronic device | |
JP5085254B2 (en) | Portable electronic device, IC card, and command processing method in portable electronic device | |
KR100399603B1 (en) | Smart card and method for writing/erasing and operating an os program the same | |
JP2008310596A (en) | Portable electronic equipment and control method for potable electronic equipment | |
US10461971B2 (en) | IC card, portable electronic device, program, processing apparatus, and processing system | |
US6607138B2 (en) | Communication method of IC card reader/writer | |
JP5633125B2 (en) | Information processing method, information processing apparatus, and program | |
JP2006172271A (en) | Multi-application ic card, and program for ic card | |
JP7468757B1 (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RESPONSE TRANSMISSION METHOD, AND PROGRAM | |
JP5092370B2 (en) | Portable information recording medium and program thereof | |
JP7439847B2 (en) | Electronic information storage medium, key data setting method, and program | |
JP7218621B2 (en) | Electronic information storage medium, communication device, communication system, communication method, communication program, command execution method, command execution program, response determination method and response determination program | |
JP7420179B1 (en) | Electronic information storage medium, IC card, issuance processing method, and program | |
JP4784138B2 (en) | IC card and IC card program | |
JP7397402B2 (en) | Electronic information storage medium, data transmission method, and program | |
JP2006293706A (en) | Multi-application ic card with application updating function | |
JP6281302B2 (en) | Information processing apparatus, IC card, and data processing method | |
EP2299414B1 (en) | Portable electronic apparatus, control method for portable electronic apparatus, and IC card | |
JP2013191117A (en) | Ic chip, atr response processing program, and atr response method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240712 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20240712 |
|
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: 20241001 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20241014 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7582547 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |