JP7468754B1 - ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM - Google Patents
ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JP7468754B1 JP7468754B1 JP2023091208A JP2023091208A JP7468754B1 JP 7468754 B1 JP7468754 B1 JP 7468754B1 JP 2023091208 A JP2023091208 A JP 2023091208A JP 2023091208 A JP2023091208 A JP 2023091208A JP 7468754 B1 JP7468754 B1 JP 7468754B1
- Authority
- JP
- Japan
- Prior art keywords
- received
- blocks
- block
- transmission data
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 5
- PWPJGUXAGUPAHP-UHFFFAOYSA-N lufenuron Chemical compound C1=C(Cl)C(OC(F)(F)C(C(F)(F)F)F)=CC(Cl)=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F PWPJGUXAGUPAHP-UHFFFAOYSA-N 0.000 title 1
- 230000005540 biological transmission Effects 0.000 claims abstract description 107
- 230000004044 response Effects 0.000 claims abstract description 34
- 238000000034 method Methods 0.000 claims description 13
- 238000004891 communication Methods 0.000 abstract description 26
- 238000010586 diagram Methods 0.000 description 12
- 241000030538 Thecla Species 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 101100497196 Arabidopsis thaliana CPN60B1 gene Proteins 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
Images
Landscapes
- Communication Control (AREA)
Abstract
【課題】チェイニングが完了するまでにかかる通信時間を低減することが可能な電子情報記憶媒体、ICチップ、ICカード、受信ブロック処理方法、及びプログラムを提供する。【解決手段】ICチップ1は、複数のI-blockのうち最初のI-blockが受信されたときに、当該最初のI-blockから送信データのLEN(全長)を取得しておき、I-blockが受信される度に当該取得されたLEN(全長)に基づいて、送信データを送信するための全てのI-blockが受信されたか否かを判定し、全てのI-blockが受信されていないと判定された場合には外部装置2へのレスポンスの送信を待機する一方、全てのI-blockが受信されたと判定された場合に全てのI-blockが受信されたことを外部装置2へ応答する。【選択図】図5[Problem] To provide an electronic information storage medium, an IC chip, an IC card, a received block processing method, and a program capable of reducing the communication time required until chaining is completed. [Solution] When the first I-block of multiple I-blocks is received, an IC chip 1 acquires the LEN (total length) of the transmission data from the first I-block, and each time an I-block is received, determines whether all I-blocks for transmitting the transmission data have been received based on the acquired LEN (total length), and if it is determined that all I-blocks have not been received, it waits to send a response to an external device 2, while if it is determined that all I-blocks have been received, it responds to the external device 2 that all I-blocks have been received. [Selected Figure] Figure 5
Description
本発明は、外部装置との間でデータを送受信することが可能なIC(Integrated Circuit)カード等の技術分野に関する。 The present invention relates to the technical field of IC (Integrated Circuit) cards that can transmit and receive data between external devices.
従来、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 data to be transmitted is divided into multiple blocks when transmitting data longer than the length of data that can be transmitted at one time between an IC card and an external device. 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 longer than necessary and the transaction itself between the IC card and the external device also takes time.
しかしながら、従来の技術では、最初に送信するブロックに連続して送信するブロック数が含まれているものの、当該ブロック数からは送信すべきデータの全長が不明であるため、一度のチェイニングでどれくらいの長さのデータが送られてくるのかはICカード側ではわからず、ICカードが大量のデータを受信してしまう可能性があり、これも通信時間を必要以上に要する原因になる。 However, with conventional technology, although the first block sent contains the number of blocks to be sent in succession, the total length of the data to be sent is unknown from this number of blocks. As a result, the IC card does not know how much data will be sent in one chaining, and there is a possibility that the IC card will receive a large amount of data, which also causes communication times to be longer than necessary.
そこで、本発明は、このような点などに鑑みてなされたものであり、チェイニングが完了するまでにかかる通信時間を低減することが可能な電子情報記憶媒体、ICチップ、ICカード、受信ブロック処理方法、及びプログラムを提供することを課題の一例とする。 The present invention has been made in consideration of these points and has as one example an objective to provide an electronic information storage medium, an IC chip, an IC card, a reception block processing method, and a program that can reduce the communication time required until chaining is completed.
上記課題を解決するために、請求項1に記載の発明は、外部装置から送信データが複数に分割されて送信されるブロックを順次受信可能な電子情報記憶媒体であって、複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、を備えることを特徴とする。
In order to solve the above problem, the invention described in
請求項2に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記受信された途中のブロックでエラーが検知された場合、前記第1応答手段は、前記エラーの発生を前記外部装置へ応答することを特徴とする。
The invention described in claim 2 is characterized in that, in the electronic information storage medium described in
請求項3に記載の発明は、外部装置から送信データが複数に分割されて送信されるブロックを順次受信可能なICチップであって、複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、を備えることを特徴とする。
The invention described in
請求項4に記載の発明は、外部装置から送信データが複数に分割されて送信されるブロックを順次受信可能なICカードであって、複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、を備えることを特徴とする。 The invention described in claim 4 is an IC card capable of sequentially receiving blocks in which transmission data is divided into multiple pieces and transmitted from an external device, comprising: an acquisition means for acquiring a total length of the transmission data included in the first block of the multiple blocks; a first determination means for determining whether all of the blocks for transmitting the transmission data have been received based on the acquired total length each time a block is received; a first response means for waiting to send a response to the external device when it is determined that all of the blocks have not been received, and for responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received; a second determination means for determining whether to refuse receipt of the transmission data based on the acquired total length when the first block is received; and a second response means for responding to the external device with a refusal to receive the transmission data when it is determined that receipt of the transmission data is to be refused .
請求項5に記載の発明は、外部装置から送信データが複数に分割されて送信されるブロックを順次受信可能な電子情報記憶媒体により実行される受信ブロック処理方法であって、複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得するステップと、前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定するステップと、前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答するステップと、前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定するステップと、前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答するステップと、を含むことを特徴とする。 The invention described in claim 5 is a received block processing method executed by an electronic information storage medium capable of sequentially receiving blocks in which transmission data is divided into multiple pieces and transmitted from an external device, comprising the steps of: acquiring the total length of the transmission data contained in the first block of the multiple blocks; determining, each time a block is received, whether or not all of the blocks for transmitting the transmission data have been received based on the acquired total length; waiting to send a response to the external device if it is determined that all of the blocks have not been received, while responding to the external device that all of the blocks have been received if it is determined that all of the blocks have been received; determining, when the first block is received, based on the acquired total length, whether or not to refuse receipt of the transmission data; and, if it is determined that receipt of the transmission data is to be refused, responding to the external device with a refusal to receive the transmission data.
請求項6に記載の発明は、外部装置から送信データが複数に分割されて送信されるブロックを順次受信可能なコンピュータに、複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得するステップと、前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定するステップと、前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答するステップと、前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定するステップと、前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答するステップと、を実行させることを特徴とする。 The invention described in claim 6 is characterized in that a computer capable of sequentially receiving blocks in which transmission data is divided into multiple pieces and transmitted from an external device executes the following steps: acquiring the total length of the transmission data contained in the first block of the multiple blocks; determining, each time a block is received, whether or not all of the blocks for transmitting the transmission data have been received based on the acquired total length; waiting to send a response to the external device if it is determined that all of the blocks have not been received, while responding to the external device that all of the blocks have been received if it is determined that all of the blocks have been received; determining, when the first block is received, based on the acquired total length, whether or not to refuse receipt of the transmission data; and, if it is determined that receipt of the transmission data is to be refused, responding to the external device of refusal to receive the transmission data .
本発明によれば、チェイニングが完了するまでにかかる通信時間を低減することができる。 The present invention can reduce the communication time required to complete 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から送信データがチェイニングにより複数に分割されて送信されるブロック(以下、「block」という)を順次受信可能な電子情報記憶媒体の一例である。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
図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の例として、リーダライタを備える取引装置などが挙げられる。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チップ1は、I/O回路11を介して、外部装置2との間で、例えば、半二重ブロック伝送プロトコルに従って通信を行う。例えば、ISO/IEC 7816-3では、半二重ブロック伝送プロトコルとして、T=1プロトコル(調歩式半二重ブロック伝送プロトコル)が規定されている。半二重ブロック伝送プロトコルに従う通信では、I(Information)-block(情報ブロック)、R(Receive Ready)-block(受信準備完了ブロック)、及びS(Supervisory)-block(管理ブロック)が用いられる。I-blockは、アプリケーションによりアプリケーション層で使用されるデータを伝達するために用いられる。アプリケーション層で使用されるデータは、上述した送信データが該当する。
The
ここで、送信データの例として、コマンドAPDU(Application Protocol Data Unit)が挙げられる。コマンドAPDUは、CLA(命令クラス)、INS(命令コード)、P1及びP2(命令パラメータ)から構成されるヘッダ部と、例えばNVM13に書き込まれるべきデータ(例えば、コプロセッサ16により利用される鍵データなど)を含むボディ部により構成される。例えばNVM13に書き込まれるべきデータが、1度に(つまり、1つのコマンドAPDUで)送信可能な最大長を超える場合、チェイニングにより複数のコマンドAPDUで外部装置2から順次送信されることになる。なお、コマンドAPDUにおけるCLAのbit5が“0”に設定される場合、当該コマンドAPDUは、チェイニングの最後(またはチェイニング無)を示す。一方、コマンドAPDUにおけるCLAのbit5が“1”に設定される場合、当該コマンドAPDUは、チェイニング途中であることを示す。
An example of the transmission data is a command APDU (Application Protocol Data Unit). 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 including data to be written to NVM 13 (e.g., key data used by the coprocessor 16). For example, if the data to be written to
R-blockは、肯定応答(ack)や各種エラー(error)を伝達するために用いられる。S-blockは、外部装置2とICチップ1との間で制御情報を交換するために用いられる。図2は、ICチップ1と外部装置2との間の接触通信において送受信されるblockのデータフォーマットを示す図である。図2に示すように、1つのblockは、先頭フィールド(Prologue field)、情報フィールド(Information field)、及び最終フィールド(Epilogue field)から構成される。最終フィールドには、誤り検出符号(LRCまたはCRC)が格納される。I-blockの情報フィールド(INF)には、コマンドAPDUが格納される。R-blockは、情報フィールドを持たない。各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における所定のビットでチェイニングの最後またチェイニング途中であること示すこともできる。
R-blocks are used to transmit acknowledgments (ack) and various errors. S-blocks are used to exchange control information between the external device 2 and the
図3は、R-blockのPCBにおけるbit6~bit1の内容を示す図である。図3において、N(R)は、そのR-blockの次に送られてくることが想定されるI-blockのシーケンス番号を示す。図3に示すように、R-blockは、PCBのbit6~bit1により、肯定応答(ack)、ブロックのエラー(redundancy code error / character parity error)、または、その他のエラー(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)により詳細な情報を示す。なお、非接触通信において送受信されるblockの先頭フィールドにLENが含まれてもよいし、或いは、当該先頭フィールドのさらに前にLENだけのフィールドが設けられてもよい。
Figure 3 shows the contents of bits 6 to 1 in the PCB of an R-block. In Figure 3, N(R) indicates the sequence number of the I-block expected to be sent after the R-block. As shown in Figure 3, 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. Although not shown, a block sent and received in non-contact communication between the
CPU15(コンピュータの一例)は、NVM13に記憶されたOS及びアプリケーション(本発明のプログラムを含む)を実行することで、本発明における取得手段、第1判定手段、第2判定手段、及び応答手段等として機能する。CPU15は、外部装置2から送信データがチェイニングにより複数に分割されて送信される各I-blockをI/O回路11を介して順次受信する。ここで、複数のI-blockのうち最初のI-blockには、送信データのLEN(全長)が含まれる。送信データのLEN(全長)とは、チェイニングによりICチップ1に送信されるべき全てのI-blockを結合したときの長さであってもよいし、全てのI-blockのそれぞれに含まれるコマンドAPDUを結合したときの長さであってもよい。CPU15は、複数のI-blockのうち最初のI-blockが受信されたときに、当該最初のI-blockから送信データのLEN(全長)を取得する。
The CPU 15 (an example of a computer) executes the OS and applications (including the program of the present invention) stored in the
図4は、接触通信の最初のI-blockにおいて、送信データのLEN(全長)が含まれる箇所の例を示す図である。図4(A)の例では、最初のI-blockの情報フィールド中のコマンドAPDUのヘッダ部におけるP1(LEN1)とP2(LEN2)とを結合した値で送信データのLEN(全長)が表される(非接触通信でも同様)。図4(B)の例では、最初のI-block中の情報フィールド中のコマンドAPDUのボティ部におけるDataの先頭にTLVを含め、当該TLVのValue部の値で送信データのLEN(全長)が表される(非接触通信でも同様)。図4(C)の例では、最初のI-block中の先頭フィールド中のLENの一部の値(例えば、先頭の数bit)で送信データのLEN(全長)が表される(非接触通信でも同様)。図4とは別の例として、最初のI-blockの情報フィールド中のコマンドAPDUの前に送信データのLEN(全長)を含めてもよい(非接触通信でも同様)。なお、非接触通信において、最初のI-blockの先頭フィールドのさらに前にLENのフィールドが設けられる場合、当該LENの値で送信データのLEN(全長)が表されてもよい。 Figure 4 is a diagram showing an example of a portion where the LEN (total length) of the transmission data is included in the first I-block of contact communication. In the example of Figure 4 (A), the LEN (total length) of the transmission data is represented by the value obtained by combining P1 (LEN1) and P2 (LEN2) in the header part of the command APDU in the information field of the first I-block (similar to non-contact communication). In the example of Figure 4 (B), a TLV is included at the beginning of the Data in the body part of the command APDU in the information field of the first I-block, and the LEN (total length) of the transmission data is represented by the value of the Value part of the TLV (similar to non-contact communication). In the example of Figure 4 (C), the LEN (total length) of the transmission data is represented by a part of the value of LEN (for example, the first few bits) in the first field of the first I-block (similar to non-contact communication). As an example different from Figure 4, the LEN (total length) of the transmission data may be included before the command APDU in the information field of the first I-block (similar to non-contact communication). In non-contact communication, if a LEN field is provided before the first field of the first I-block, the LEN value may represent the LEN (total length) of the transmission data.
CPU15は、外部装置2からI-blockが受信される度に、上記取得されたLEN(全長)に基づいて、上記送信データを送信するための全てのI-block(換言すると、全てのコマンドAPDU)が受信されたか否かを判定する。そして、CPU15は、全てのI-blockが受信されていないと判定された場合には外部装置2へのレスポンスの送信を待機する一方、全てのI-blockが受信されたと判定された場合に全てのI-blockが受信されたことをR-block(ack)により外部装置2へ応答する。これにより、チェイニングが完了するまでにかかる通信時間(チェイニングにかかる通信時間)を低減することができる。
Each time an I-block is received from the external device 2, the
また、CPU15は、最初のI-blockが受信された際に取得されたLEN(全長)に基づいて、送信データの受信を拒否するか否かを判定し、当該送信データの受信を拒否すると判定した場合に、当該送信データの受信拒否をR-block(other error)により外部装置2へ応答するとよい。例えば、送信データのLEN(全長)が予め設定された閾値を超える場合に、送信データの受信を拒否すると判定される。かかる閾値は、NVM13の空き容量に基づいて設定されるとよい。これにより、ICチップ1が大量の送信データを受信してしまうことを事前に防ぐことができ、これによっても通信時間を低減することができる。また、CPU15は、受信された途中のI-blockでエラーを検知した場合、当該エラーの発生をR-block(redundancy code error またはcharacter parity error)により外部装置2へ応答するとよい。
The
[2.ICチップ1の動作]
次に、図5及び図6を参照して、ICチップ1の動作について説明する。図5(A)は、チェイニングが正常に完了する例を示すシーケンス図である。図5(B)は、送信データの受信拒否が応答される例を示すシーケンス図である。図5(C)は、チェイニングの途中でエラーの発生が応答される例を示すシーケンス図である。図6は、ICチップ1のCPU15により実行される受信ブロック処理の一例を示すフローチャートである。なお、図6に示す処理は、外部装置2からI-blockを受信した場合に開始される。
2. Operation of
Next, the operation of the
図5(A)において、外部装置2から、送信データのLEN(全長)が含まれる最初(1番目)のI-blockがICチップ1へ送信(1)される。CPU15は、外部装置2からI-blockを受信すると(ステップS1)、当該受信されたI-blockが最初のI-blockであるか否かを判定する(ステップS2)。なお、受信されたI-blockはRAM12の所定領域に記憶される。受信されたI-blockが最初のI-blockであると判定された場合(ステップS2:YES)、処理はステップS3へ進む。一方、受信されたI-blockが最初のI-blockでないと判定された場合(ステップS2:NO)、処理はステップS6へ進む。
In FIG. 5 (A), the external device 2 transmits (1) the first I-block including the LEN (total length) of the transmission data to the
ステップS3では、CPU15は、最初のI-blockから送信データのLEN(全長)を取得し、RAM12の別の領域に記憶する。次いで、CPU15は、ステップS3で取得されたLEN(全長)と閾値とを比較することで、送信データの受信を拒否するか否かを判定する(ステップS4)。送信データの受信を拒否しないと判定された場合(ステップS4:NO)、処理はステップS6へ進む。一方、送信データの受信を拒否すると判定された場合(ステップS4:YES)、図5(B)に示すように、送信データの受信拒否を示すR-block(other error)が外部装置2へ送信(2)され(ステップS5)、処理が終了する。
In step S3, the
ステップS6では、CPU15は、受信されたI-blockでエラーを検知したか否かを判定する。I-blockでエラーを検知していないと判定された場合(ステップS6:NO)、処理はステップS8へ進む。一方、I-blockでエラー(例えば、CRCエラー)を検知したと判定された場合(ステップS6:YES)、図5(C)に示すように、エラー(例えば、CRCエラー)の発生を示すR-block(redundancy code error)が外部装置2へ送信(2)され(ステップS7)、処理が終了する。
In step S6, the
ステップS8では、CPU15は、受信されたI-blockが最後のI-blockであるか否かを判定する。受信されたI-blockが最後のI-blockでないと判定された場合(ステップS8:NO)、外部装置2へのレスポンスの送信を待機し(つまり、レスポンスを送信しない)、ステップS1に戻る。そして、外部装置2から、次のI-blockがICチップ1へ送信(2)されることで、CPU15は、外部装置2から当該I-blockを受信すると、上記と同様、処理をステップS2に進める。なお、2番目以降のI-blockには送信データのLEN(全長)は含まれていない。
In step S8, the
一方、受信されたI-blockが最後のI-block(図5(A)の例では、N番目のI-block)であると判定された場合(ステップS8:YES)、全てのI-blockが受信されたことを示すR-block(ack)が外部装置2へ送信(3)され(ステップS9)、例えば、コマンドAPDUに応じたコマンド処理へ進む。上述した国際標準規格で定められているデータ伝送方法では、データ送信側からI-blockが受信される毎にレスポンスが送信されるようになっているが、本実施形態に係るICチップ1では、最初のI-blockで取得されたLEN(全長)分の送信データが送信されてくるまでレスポンスを送信せずに待機し、最後のI-blockを受信したときに初めてレスポンス(R-block(ack))を送信する。
On the other hand, if it is determined that the received I-block is the last I-block (the Nth I-block in the example of FIG. 5A) (step S8: YES), an R-block (ack) indicating that all I-blocks have been received is sent to the external device 2 (step S9), and the process proceeds to command processing according to the command APDU, for example. In the data transmission method defined by the above-mentioned international standard, a response is sent every time an I-block is received from the data sending side, but the
以上説明したように、上記実施形態によれば、ICチップ1は、複数のI-blockのうち最初のI-blockが受信されたときに、当該最初のI-blockから送信データのLEN(全長)を取得しておき、I-blockが受信される度に当該取得されたLEN(全長)に基づいて、送信データを送信するための全てのI-blockが受信されたか否かを判定し、全てのI-blockが受信されていないと判定された場合には外部装置2へのレスポンスの送信を待機する一方、全てのI-blockが受信されたと判定された場合に全てのI-blockが受信されたことを外部装置2へ応答するように構成したので、チェイニングが完了するまでにかかる通信時間を低減することができる。
As described above, according to the above embodiment, when the first I-block of multiple I-blocks is received, the
1 ICチップ
11 I/O回路
12 RAM(
13 NVM
14 ROM
15 CPU
16 コプロセッサ
1 IC chip 11 I/
13 NVM
14 ROM
15 CPU
16 Coprocessor
Claims (6)
複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、
前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、
前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、
前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、
前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、
を備えることを特徴とする電子情報記憶媒体。 An electronic information storage medium capable of sequentially receiving blocks of transmission data that are divided into a plurality of blocks and transmitted from an external device, comprising:
an acquisition means for acquiring a total length of the transmission data included in a first block of the plurality of blocks;
a first determination means for determining, each time the block is received, whether or not all the blocks for transmitting the transmission data have been received based on the acquired total length;
a first response means for waiting for transmission of a response to the external device when it is determined that all of the blocks have not been received, and for responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received;
a second determination means for determining whether or not to reject reception of the transmission data based on the acquired total length when the first block is received;
a second response means for responding to the external device of a refusal to receive the transmission data when it is determined that the reception of the transmission data is to be refused;
An electronic information storage medium comprising:
複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、
前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、
前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、
前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、
前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、
を備えることを特徴とするICチップ。 An IC chip capable of sequentially receiving blocks of transmission data that are divided into a plurality of blocks and transmitted from an external device,
an acquisition means for acquiring a total length of the transmission data included in a first block of the plurality of blocks;
a first determination means for determining, each time the block is received, whether or not all the blocks for transmitting the transmission data have been received based on the acquired total length;
a first response means for waiting for transmission of a response to the external device when it is determined that all of the blocks have not been received, and for responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received;
a second determination means for determining whether or not to reject reception of the transmission data based on the acquired total length when the first block is received;
a second response means for responding to the external device of a refusal to receive the transmission data when it is determined that the reception of the transmission data is to be refused;
An IC chip comprising:
複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得する取得手段と、
前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定する第1判定手段と、
前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答する第1応答手段と、
前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定する第2判定手段と、
前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答する第2応答手段と、
を備えることを特徴とするICカード。 An IC card capable of sequentially receiving blocks of transmission data that are divided into a plurality of blocks and transmitted from an external device,
an acquisition means for acquiring a total length of the transmission data included in a first block of the plurality of blocks;
a first determination means for determining, each time the block is received, whether or not all the blocks for transmitting the transmission data have been received based on the acquired total length;
a first response means for waiting for transmission of a response to the external device when it is determined that all of the blocks have not been received, and for responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received;
a second determination means for determining whether or not to reject reception of the transmission data based on the acquired total length when the first block is received;
a second response means for responding to the external device of a refusal to receive the transmission data when it is determined that the reception of the transmission data is to be refused;
An IC card comprising:
複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得するステップと、
前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定するステップと、
前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答するステップと、
前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定するステップと、
前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答するステップと、
を含むことを特徴とする受信ブロック処理方法。 1. A received block processing method executed by an electronic information storage medium capable of sequentially receiving blocks of transmission data that are divided into a plurality of blocks and transmitted from an external device, comprising:
obtaining a total length of the transmission data included in a first block of the plurality of blocks;
determining, each time the block is received, whether or not all the blocks for transmitting the transmission data have been received based on the acquired total length;
a step of waiting for transmission of a response to the external device when it is determined that all of the blocks have not been received, and responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received;
determining whether to reject reception of the transmission data based on the acquired total length when the first block is received;
a step of responding to the external device of refusal to receive the transmission data when it is determined that the reception of the transmission data is to be refused;
23. A method for processing a received block, comprising:
複数の前記ブロックのうち最初のブロックに含まれる、前記送信データの全長を取得するステップと、
前記ブロックが受信される度に、前記取得された全長に基づいて、前記送信データを送信するための全ての前記ブロックが受信されたか否かを判定するステップと、
前記全ての前記ブロックが受信されていないと判定された場合には前記外部装置へのレスポンスの送信を待機する一方、前記全ての前記ブロックが受信されたと判定された場合に前記全ての前記ブロックが受信されたことを前記外部装置へ応答するステップと、
前記最初のブロックが受信された際に前記取得された全長に基づいて、前記送信データの受信を拒否するか否かを判定するステップと、
前記送信データの受信を拒否すると判定された場合に、前記送信データの受信拒否を前記外部装置へ応答するステップと、
を実行させることを特徴とするプログラム。 A computer capable of sequentially receiving blocks of data that are divided and transmitted from an external device,
obtaining a total length of the transmission data included in a first block of the plurality of blocks;
determining, each time the block is received, whether or not all the blocks for transmitting the transmission data have been received based on the acquired total length;
a step of waiting for transmission of a response to the external device when it is determined that all of the blocks have not been received, and responding to the external device that all of the blocks have been received when it is determined that all of the blocks have been received;
determining whether to reject reception of the transmission data based on the acquired total length when the first block is received;
a step of responding to the external device of refusal to receive the transmission data when it is determined that the reception of the transmission data is to be refused;
A program characterized by executing the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023091208A JP7468754B1 (en) | 2023-06-01 | 2023-06-01 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023091208A JP7468754B1 (en) | 2023-06-01 | 2023-06-01 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM |
Publications (1)
Publication Number | Publication Date |
---|---|
JP7468754B1 true JP7468754B1 (en) | 2024-04-16 |
Family
ID=90667742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2023091208A Active JP7468754B1 (en) | 2023-06-01 | 2023-06-01 | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7468754B1 (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004040662A (en) | 2002-07-05 | 2004-02-05 | Victor Co Of Japan Ltd | Digital image signal recording apparatus |
WO2004036440A1 (en) | 2002-10-16 | 2004-04-29 | Matsushita Electric Industrial Co., Ltd. | Ic card, data transfer device, data transfer method, and data transfer method program |
JP2007115385A (en) | 2005-09-20 | 2007-05-10 | Sony Corp | Hologram reproducing device, and method therefor |
JP2007219845A (en) | 2006-02-16 | 2007-08-30 | Ntt Docomo Inc | Moving machine, and reader/writer writing system and method |
JP2008310596A (en) | 2007-06-14 | 2008-12-25 | Toshiba Corp | Portable electronic equipment and control method for potable electronic equipment |
JP2009527044A (en) | 2006-02-17 | 2009-07-23 | ケーティーフリーテル・カンパニー・リミテッド | IC card, terminal equipped with IC card, and initialization method thereof |
JP2014182645A (en) | 2013-03-19 | 2014-09-29 | Toshiba Corp | Ic card, portable electronic device and ic card processor |
CN111209991A (en) | 2019-12-31 | 2020-05-29 | 徐波 | Annular code and design method thereof |
-
2023
- 2023-06-01 JP JP2023091208A patent/JP7468754B1/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004040662A (en) | 2002-07-05 | 2004-02-05 | Victor Co Of Japan Ltd | Digital image signal recording apparatus |
WO2004036440A1 (en) | 2002-10-16 | 2004-04-29 | Matsushita Electric Industrial Co., Ltd. | Ic card, data transfer device, data transfer method, and data transfer method program |
JP2007115385A (en) | 2005-09-20 | 2007-05-10 | Sony Corp | Hologram reproducing device, and method therefor |
JP2007219845A (en) | 2006-02-16 | 2007-08-30 | Ntt Docomo Inc | Moving machine, and reader/writer writing system and method |
JP2009527044A (en) | 2006-02-17 | 2009-07-23 | ケーティーフリーテル・カンパニー・リミテッド | IC card, terminal equipped with IC card, and initialization method thereof |
JP2008310596A (en) | 2007-06-14 | 2008-12-25 | Toshiba Corp | Portable electronic equipment and control method for potable electronic equipment |
JP2014182645A (en) | 2013-03-19 | 2014-09-29 | Toshiba Corp | Ic card, portable electronic device and ic card processor |
CN111209991A (en) | 2019-12-31 | 2020-05-29 | 徐波 | Annular code and design method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8931705B2 (en) | IC card, mobile electronic device and data processing method in IC card | |
JP3028815B2 (en) | Transmission method of portable electronic device and portable electronic device | |
US20140289465A1 (en) | Smart card, portable electronic device and smart card processing device | |
JP2007257542A (en) | Composite portable electronic device and composite ic card | |
KR910001972B1 (en) | Processing system for portable electronic apparatus | |
JP2018152130A (en) | Communication device and communication system | |
EP1563445B1 (en) | Contactless ic card | |
US10931331B2 (en) | Communication device and method | |
JP7468754B1 (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM | |
JP5085254B2 (en) | Portable electronic device, IC card, and command processing method in portable electronic device | |
EP2717193B1 (en) | IC card, portable electronic device, and reader/ writer | |
JP2003044801A (en) | Portable information processor provided with a plurality of information transmitting means | |
JP2007087120A (en) | Ic card mounted with multiple os (operating system) and issue consignment method | |
US6607138B2 (en) | Communication method of IC card reader/writer | |
US10461971B2 (en) | IC card, portable electronic device, program, processing apparatus, and processing system | |
JP7397402B2 (en) | Electronic information storage medium, data transmission method, and program | |
JP7468757B1 (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RESPONSE TRANSMISSION 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 | |
US6714999B2 (en) | Portable electronic apparatus and communication method for protocol selection processing of a portable electronic apparatus | |
JP5106456B2 (en) | Data transmission protocol control method, apparatus, IC card and reader / writer | |
WO2021124846A1 (en) | Ic card and control program for ic card | |
JP2008276572A (en) | Non-contact ic card | |
JPH0772891B2 (en) | Data transmission method | |
JP2006172271A (en) | Multi-application ic card, and program for ic card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230927 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20230927 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231226 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240221 |
|
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: 20240305 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240318 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7468754 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |