JP7438432B1 - Electronic information storage medium, IC chip, IC card, record writing method, and program - Google Patents

Electronic information storage medium, IC chip, IC card, record writing method, and program Download PDF

Info

Publication number
JP7438432B1
JP7438432B1 JP2023091210A JP2023091210A JP7438432B1 JP 7438432 B1 JP7438432 B1 JP 7438432B1 JP 2023091210 A JP2023091210 A JP 2023091210A JP 2023091210 A JP2023091210 A JP 2023091210A JP 7438432 B1 JP7438432 B1 JP 7438432B1
Authority
JP
Japan
Prior art keywords
record
records
identifier
management table
storage area
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
Application number
JP2023091210A
Other languages
Japanese (ja)
Inventor
直也 梶原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2023091210A priority Critical patent/JP7438432B1/en
Application granted granted Critical
Publication of JP7438432B1 publication Critical patent/JP7438432B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】発行者がレコード番号を意識せずに自由な順序でレコードを発行可能な電子情報記憶媒体、ICチップ、ICカード、レコード書き込み方法、及びプログラムを提供する。【解決手段】ICチップ1は、レコードのレコード番号を管理するための管理テーブルを保持し、外部装置2からレコード及び当該レコードのレコード番号を含む発行コマンドを受信すると、複数のRecordクラスのうち、レコードが書き込まれていないRecordクラスに発行コマンドに含まれるレコードを書き込み、且つ、当該レコードのレコード番号を当該Recordクラスに対応付けられる管理テーブルの要素に登録する。【選択図】図4The present invention provides an electronic information storage medium, an IC chip, an IC card, a record writing method, and a program that allow an issuer to issue records in any order without being aware of record numbers. SOLUTION: An IC chip 1 maintains a management table for managing record numbers of records, and upon receiving an issue command including a record and the record number of the record from an external device 2, selects one of a plurality of Record classes. Writes the record included in the issue command to the Record class to which no record has been written, and registers the record number of the record in the element of the management table associated with the Record class. [Selection diagram] Figure 4

Description

本発明は、外部装置から複数のレコードを書き込み可能なIC(Integrated Circuit)チップ等の技術分野に関する。 The present invention relates to a technical field such as an IC (Integrated Circuit) chip capable of writing a plurality of records from an external device.

従来、例えば特許文献1に開示されるように、ICチップにより使用されるべきファイルに格納される複数のレコードを該ICチップに書き込むためのレコード発行工程において、ICチップの発行者(製造者)の発行装置から複数の書き込みコマンドをICチップに順次送信するようになっている。 Conventionally, as disclosed in Patent Document 1, for example, in a record issuing process for writing a plurality of records stored in a file to be used by an IC chip to the IC chip, an issuer (manufacturer) of the IC chip A plurality of write commands are sequentially transmitted from the issuing device to the IC chip.

特許第6556489号公報Patent No. 6556489

しかしながら、従来のICチップではレコード発行工程において、それぞれのレコードのレコード番号と該レコードの発行順(書き込み順)を一致させなければならない場合があった。例えば、JICSAP仕様で定義されるAppend Recordコマンドは、パラメータで指定したファイルに対してレコードを追記するコマンドであるが、追記されたレコードのレコード番号は発行順に割り当てられる。そのため、ICチップの発行者は最終的なレコードの構成を意識して書き込みコマンドの実行順を設計する必要があり、手間がかかっていた。 However, in the conventional IC chip, in the record issuing process, there are cases where it is necessary to match the record number of each record and the order in which the records are issued (writing order). For example, the Append Record command defined in the JICSAP specifications is a command that appends a record to a file specified by a parameter, but the record numbers of the appended records are assigned in the order of publication. Therefore, the IC chip issuer needs to design the execution order of the write commands with the final record configuration in mind, which takes time and effort.

そこで、本発明は、このような点などに鑑みてなされたものであり、発行者がレコード番号を意識せずに自由な順序でレコードを発行可能な電子情報記憶媒体、ICチップ、ICカード、レコード書き込み方法、及びプログラムを提供することを課題の一例とする。 Therefore, the present invention has been made in view of the above points, and provides an electronic information storage medium, an IC chip, an IC card, and an IC chip that allows an issuer to issue records in any order without being aware of the record number. An example of the problem is to provide a record writing method and program.

上記課題を解決するために、請求項1に記載の発明は、レコードを書き込むための複数のレコード記憶領域を有するメモリを備える電子情報記憶媒体であって、前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、を備えることを特徴とする。 In order to solve the above problem, the invention according to claim 1 provides an electronic information storage medium comprising a memory having a plurality of record storage areas for writing records, the electronic information storage medium having a memory for managing identifiers of the records. holding means for holding a table; receiving means for receiving a command including a record and an identifier of the record from an external device; The present invention is characterized by comprising processing means for writing the included record and registering the identifier of the record in an element of a management table associated with the record storage area.

請求項2に記載の発明は、請求項1に記載の電子情報記憶媒体において、1つの前記レコード記憶領域には、複数のレコードを論理的に格納するファイルにおける何れか1つの前記レコードが書き込まれ、前記コマンドは、前記レコード、当該レコードの識別子、及び当該レコードを論理的に格納するファイルの識別子を含み、前記処理手段は、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子及び当該レコードを論理的に格納するファイルの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録することを特徴とする。 The invention according to claim 2 is the electronic information storage medium according to claim 1, in which one record in a file that logically stores a plurality of records is written in one record storage area. , the command includes the record, an identifier of the record, and an identifier of a file that logically stores the record, and the processing means writes the record included in the command to a record storage area where the record is not written. , and registers the identifier of the record and the identifier of the file that logically stores the record in the element of the management table associated with the record storage area.

請求項3に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記受信手段は、複数の前記コマンドを順次受信し、それぞれの前記コマンドに含まれる前記レコードの内容は互いに異なることを特徴とする。 According to a third aspect of the invention, in the electronic information storage medium according to the first aspect, the receiving means sequentially receives a plurality of the commands, and the contents of the records included in each of the commands are different from each other. It is characterized by

請求項4に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記処理手段は、前記レコード記憶領域の配列に基づいて、前記レコードが書き込まれていないレコード記憶領域を検索することを特徴とする。 According to a fourth aspect of the invention, in the electronic information storage medium according to the first aspect, the processing means searches for a record storage area in which the record is not written based on the arrangement of the record storage area. It is characterized by

請求項5に記載の発明は、レコードを書き込むための複数のレコード記憶領域を有するメモリを備えるICチップであって、前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、を備えることを特徴とする。 The invention according to claim 5 provides an IC chip comprising a memory having a plurality of record storage areas for writing records, the IC chip comprising: a holding means for holding a management table for managing identifiers of the records; and an external device. receiving means for receiving a command including a record and an identifier of the record from a record storage area, and writing a record included in the command into a record storage area in which the record is not written among the plurality of record storage areas; and processing means for registering an identifier of the record storage area in an element of a management table associated with the record storage area.

請求項6に記載の発明は、レコードを書き込むための複数のレコード記憶領域を有するメモリを備えるICカードであって、前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、を備えることを特徴とする。 The invention according to claim 6 provides an IC card comprising a memory having a plurality of record storage areas for writing records, the IC card comprising: a holding means for holding a management table for managing identifiers of the records; and an external device. receiving means for receiving a command including a record and an identifier of the record from a record storage area, and writing a record included in the command into a record storage area in which the record is not written among the plurality of record storage areas; and processing means for registering an identifier of the record storage area in an element of a management table associated with the record storage area.

請求項7に記載の発明は、レコードを書き込むための複数のレコード記憶領域を有するメモリを備える電子情報記憶媒体により実行されるレコード書き込み方法であって、前記レコードの識別子を管理するための管理テーブルを保持するステップと、外部装置からレコード及び当該レコードの識別子を含むコマンドを受信するステップと、前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録するステップと、を含むことを特徴とする。 The invention according to claim 7 is a record writing method executed by an electronic information storage medium including a memory having a plurality of record storage areas for writing records, the method comprising: a management table for managing identifiers of the records; a step of receiving a command including a record and an identifier of the record from an external device; and a step of retaining a record included in the command in a record storage area to which the record is not written among the plurality of record storage areas. and registering the identifier of the record in an element of a management table associated with the record storage area.

請求項8に記載の発明は、レコードを書き込むための複数のレコード記憶領域を備える電子情報記憶媒体に含まれるコンピュータに、前記レコードの識別子を管理するための管理テーブルを保持するステップと、外部装置からレコード及び当該レコードの識別子を含むコマンドを受信するステップと、前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録するステップと、を実行させることを特徴とする。 The invention according to claim 8 includes the steps of: retaining a management table for managing identifiers of the records in a computer included in an electronic information storage medium having a plurality of record storage areas for writing records; and an external device. a step of receiving a command including a record and an identifier of the record from a record storage area, and writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas; The present invention is characterized by performing the step of registering an identifier in an element of a management table associated with the record storage area.

本発明によれば、発行者がレコード番号を意識せずに自由な順序でレコードを発行することができる。 According to the present invention, a publisher can issue records in any order without being aware of record numbers.

ICチップ1のハードウェア構成例を示す図である。1 is a diagram showing an example of a hardware configuration of an IC chip 1. FIG. レコード本体におけるRecordクラスの配列の一例を示す概念図である。FIG. 2 is a conceptual diagram showing an example of an arrangement of Record classes in a record body. Recordクラスと管理テーブルの要素との対応関係の一例を示す概念図である。FIG. 7 is a conceptual diagram showing an example of the correspondence between the Record class and the elements of the management table. ICチップ1のCPU15により実行される発行処理の一例を示すフローチャートである。5 is a flowchart showing an example of an issuance process executed by the CPU 15 of the IC chip 1. FIG. 図4に示す発行処理において新たなレコードが書き込まれる際のRecordクラスと管理テーブルの要素との対応関係の一例を示す概念図である。5 is a conceptual diagram showing an example of the correspondence between the Record class and the elements of the management table when a new record is written in the issuing process shown in FIG. 4. FIG.

以下、図面を参照して本発明の実施形態について詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[1.ICチップ1の構成及び機能]
先ず、図1を参照して、本実施形態に係るICチップ1の構成及び機能について説明する。ICチップ1は、本発明の電子情報記憶媒体の一例である。ICチップ1は、例えば、クレジットカード、キャッシュカード、またはマイナンバーカードなどのICカード、または、スマートフォンなどのモバイルデバイスに搭載される。スマートフォンなどのモバイルデバイスの場合、ICチップ1は、モバイルデバイスに着脱可能な小型ICカードに搭載されてもよいし、eUICC(Embedded Universal Integrated Circuit Card)としてモバイルデバイスから容易に取り外しや取り換えができないように組み込み基板上に搭載されてもよい。
[1. Configuration and functions of IC chip 1]
First, with reference to FIG. 1, the configuration and functions of an IC chip 1 according to the present embodiment will be described. The IC chip 1 is an example of the electronic information storage medium of the present invention. The IC chip 1 is installed in, 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 removable from the mobile device, or may be installed as an eUICC (Embedded Universal Integrated Circuit Card) so that it cannot be easily removed or replaced from the mobile device. It may also be mounted on a built-in board.

図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の例として、工場における発行装置(発行端末)が挙げられる。 FIG. 1 is a diagram showing an example of the hardware configuration of the IC chip 1. As shown in FIG. As shown in FIG. 1, the IC chip 1 includes an I/O circuit 11, a RAM (Random Access Memory) 12, an NVM (Nonvolatile Memory) 13, a ROM (Read Only Memory) 14, and a CPU (Central Processing Unit) 15 (computer). (for example), and a coprocessor 16 that performs cryptographic operations and the like. The I/O circuit 11 serves as an interface with the external device 2. Note that the communication between the IC chip 1 and the external device 2 may be non-contact communication or contact communication. In the case of contactless communication, communication between the IC chip 1 and the external device 2 is performed, for example, via an antenna (not shown) mounted on an IC card or a mobile device. Note that an example of the external device 2 is an issuing device (issuing terminal) in a factory.

NVM13には、例えばフラッシュメモリが適用される。なお、NVM13は、「Electrically Erasable Programmable Read-Only Memory」であってもよい。NVM13またはROM14には、OS(Operating System)、及び1または複数のアプリケーション(本発明のプログラムを含む)等が記憶される。NVM13には、レコードを書き込む(保存する)ためのレコード本体を有する。ここで、レコードとは、アプリケーションにより使用されるファイル(例えば、EF(Elementary File))に論理的に格納される(換言すると、論理的に纏められる)データである。レコードの例として、アプリケーションの動作を決定するような設定データ、暗号演算や復号演算に必要な鍵データ、及び証明書データなどが挙げられる。1つのファイルには、複数のレコードが格納可能である。1つのアプリケーションにより複数のファイルが使用される場合もある。各ファイルには、ファイルの識別子であるSFI(Short File Identifier)が付与される。各レコードには、レコードの識別子であるレコード番号(つまり、ファイルにおける論理的な番号)が付与される。SFIとレコード番号を指定することでレコードを一意に特定することができる。 For example, a flash memory is applied to the NVM 13. Note that the NVM 13 may be an "Electrically Erasable Programmable Read-Only Memory." The NVM 13 or the ROM 14 stores an OS (Operating System), one or more applications (including the program of the present invention), and the like. The NVM 13 has a record body for writing (storing) records. Here, a record is data that is logically stored (in other words, logically organized) in a file (eg, EF (Elementary File)) used by an application. Examples of records include configuration data that determines the operation of an application, key data necessary for encryption and decryption operations, and certificate data. Multiple records can be stored in one file. Multiple files may be used by one application. Each file is assigned an SFI (Short File Identifier), which is a file identifier. Each record is given a record number (that is, a logical number in the file) that is a record identifier. A record can be uniquely identified by specifying the SFI and record number.

レコード本体は、例えば、複数のRecordクラス(レコード記憶領域の一例)の配列で実装される。各Recordクラスは、それぞれ、1つのレコードの中身を保存するためのクラス(データと処理を纏めたもの)である。例えば、新しいレコードが発行されるたびに、新しく発行されたレコードがRecordクラスのインスタンスとして作成され、上記配列の空き要素(つまり、Recordクラス)に追加される。図2は、レコード本体におけるRecordクラスの配列の一例を示す概念図である。図2の例では、Recordクラスは、Record[0]~[3]として表されている。例えば、Record[0]には保存されたレコード(0000・・・)は、SFI“1”及びレコード番号“1”により特定される。既存の実装では、Append Recordコマンドのようなレコードの発行コマンドが受信された場合に、図2に示すように、レコード本体の配列に対して要素が順次追加され、追加された要素に書き込まれたレコードのレコード番号は書き込まれた順に自動的に割り当てられるようになっている。例えば、レコードが書き込まれた順に1→2→3と順次レコード番号が割り当てられる。そのため、ICチップの発行者は、最終的なレコードの構成を意識して発行コマンドの実行順を設計する必要があった。 The record body is implemented, for example, as an array of multiple Record classes (an example of a record storage area). Each Record class is a class (a collection of data and processing) for saving the contents of one record. For example, each time a new record is published, the newly published record is created as an instance of the Record class and added to a free element (i.e., Record class) in the above array. FIG. 2 is a conceptual diagram showing an example of the arrangement of the Record class in the record body. In the example of FIG. 2, the Record class is represented as Record[0] to [3]. For example, a record (0000...) stored in Record[0] is specified by SFI "1" and record number "1". In the existing implementation, when a record issuing command such as the Append Record command is received, elements are sequentially added to the record body array and written to the added elements, as shown in Figure 2. Record numbers for records are automatically assigned in the order they are written. For example, record numbers are assigned sequentially as 1 → 2 → 3 in the order in which records are written. Therefore, the IC chip issuer had to design the execution order of the issuing commands with the final record configuration in mind.

一方、本実施形態に係るNVM13には、レコード本体とは別の記憶領域に、Recordクラスに保存されるレコードのレコード番号を管理するための管理テーブルが記憶される。つまり、本実施形態において、ICチップは、レコードの中身を実際に保存するレコード本体とは別に当該レコードのレコード番号を管理する管理テーブルをデータ構造として持つ。各Recordクラスには、管理テーブルの要素が対応付けられる。管理テーブルの要素は、例えば、Recordクラスの配列と同様、整数型の配列で実装される。図3は、Recordクラスと管理テーブルの要素との対応関係の一例を示す概念図である。図3の例では、管理テーブルの要素は、Table[0]~[3]として表されている。また、図3の例では、管理テーブルの各要素には、SFIとレコード番号を結合した値が登録されている。例えば、図3において、Record[0]に保存されたレコードのSFIは“2”、レコード番号は“1”であり、Record[2]に保存されたレコードのSFIは“2”、レコード番号は“3”である。このような管理テーブルにより、ICチップの発行者がレコード番号を意識せずに自由な順序でレコードを発行可能となる。 On the other hand, in the NVM 13 according to this embodiment, a management table for managing record numbers of records stored in the Record class is stored in a storage area separate from the record body. That is, in this embodiment, the IC chip has a management table as a data structure that manages the record number of the record, separate from the record body that actually stores the contents of the record. Each Record class is associated with elements of the management table. The elements of the management table are implemented as integer type arrays, for example, similar to the array of the Record class. FIG. 3 is a conceptual diagram showing an example of the correspondence between the Record class and the elements of the management table. In the example of FIG. 3, the elements of the management table are represented as Table[0] to [3]. Furthermore, in the example of FIG. 3, a value that combines the SFI and the record number is registered in each element of the management table. For example, in Figure 3, the SFI of the record saved in Record[0] is "2" and the record number is "1", and the SFI of the record saved in Record[2] is "2" and the record number is It is “3”. Such a management table allows an IC chip issuer to issue records in any order without being aware of record numbers.

CPU15(コンピュータの一例)は、NVM13に記憶されたOS及びアプリケーション(本発明のプログラムを含む)を実行することで、本発明における保持手段、受信手段、及び処理手段等として機能する。CPU15は、NVM13を用いて上述した管理テーブルを保持する。また、CPU15は、レコード発行工程において、外部装置2からI/O回路11を介してAppend Recordコマンド等の発行コマンドを受信する。ここで、発行コマンドは、例えばISO/IEC 7816に規定されたコマンドAPDU(Application Protocol Data Unit)により構成される。コマンドAPDUは、CLA、INS、P1及びP2からなるヘッダ部と、発行データとしてレコードがセットされるボディ部とにより構成される。CLAはコマンドクラス(命令クラス)を示し、INSはコマンドコード(命令コード)を示す。INSによりコマンドの種別が特定される。P1及びP2にはコマンドパラメータ(命令パラメータ)を示す。また、データ部には、レコードのレコード番号、及び当該レコードを論理的に格納するファイルのSFIが含まれる。なお、レコード番号及びSFIはP1またはP2に含まれてもよい。そして、CPU15は、受信された発行コマンドに応じて、レコードが書き込まれていないRecordクラスに、発行コマンドに含まれるレコードを書き込み、且つ、当該レコードのレコード番号及び当該レコードを論理的に格納するファイルのSFIを当該Recordクラスに対応付けられる管理テーブルの要素に登録(記録)する。 The CPU 15 (an example of a computer) functions as a holding means, a receiving means, a processing means, etc. in the present invention by executing the OS and applications (including the program of the present invention) stored in the NVM 13. The CPU 15 uses the NVM 13 to maintain the management table described above. Further, in the record issuing process, the CPU 15 receives an issuing command such as an Append Record command from the external device 2 via the I/O circuit 11. Here, the issued command is configured by a command APDU (Application Protocol Data Unit) defined in ISO/IEC 7816, for example. The command APDU is composed of a header section consisting of CLA, INS, P1, and P2, and a body section in which a record is set as issue data. CLA indicates a command class (instruction class), and INS indicates a command code (instruction code). The type of command is specified by the INS. P1 and P2 indicate command parameters. The data portion also includes the record number of the record and the SFI of the file that logically stores the record. Note that the record number and SFI may be included in P1 or P2. Then, in accordance with the received issue command, the CPU 15 writes the record included in the issue command to the Record class in which no record has been written, and writes the record number of the record and the file that logically stores the record. Register (record) the SFI in the management table element associated with the relevant Record class.

[2.ICチップ1の動作]
次に、図4及び図5を参照して、本実施形態に係るICチップ1の動作について説明する。図4は、ICチップ1のCPU15により実行される発行処理の一例を示すフローチャートである。図5は、図4に示す発行処理において新たなレコードが書き込まれる際のRecordクラスと管理テーブルの要素との対応関係の一例を示す概念図である。
[2. Operation of IC chip 1]
Next, the operation of the IC chip 1 according to this embodiment will be described with reference to FIGS. 4 and 5. FIG. 4 is a flowchart showing an example of the issuing process executed by the CPU 15 of the IC chip 1. FIG. 5 is a conceptual diagram showing an example of the correspondence between the Record class and the elements of the management table when a new record is written in the issuing process shown in FIG.

例えばICチップ1の製造工場におけるレコード発行工程において、ICチップ1が外部装置2である発行装置から発行コマンドを受信すると、図4に示す処理が開始される。なお、図4に示す発行処理は、アプリケーションの動作に必要な全てのレコードの書き込みが完了するまで繰り返し実行される。すなわち、ICチップ1は、複数の発行コマンドを順次受信する。それぞれの発行コマンドに含まれる発行データ(レコード)の内容は基本的に互いに異なる。 For example, in a record issuing process at a manufacturing factory of the IC chip 1, when the IC chip 1 receives an issue command from the issuing device, which is the external device 2, the process shown in FIG. 4 is started. Note that the issuing process shown in FIG. 4 is repeatedly executed until writing of all records necessary for the operation of the application is completed. That is, the IC chip 1 sequentially receives a plurality of issuing commands. The contents of issue data (records) included in each issue command are basically different from each other.

図4に示す処理が開始されると、CPU15は、発行コマンドからレコード、当該レコードのレコード番号、及びレコードを格納するファイルのSFIを取得する(ステップS1)。次いで、CPU15は、レコード本体の配列において空き要素を先頭から探索し(ステップS2)、発見された空き要素であるRecordクラスに対して、ステップS1で取得されたレコードを書き込む処理を実行する(ステップS3)。例えば、図5に示すように、Record[0]からRecord[3]までが書き込み済みであればRecord[4]にステップS1で取得された新しいレコードが書き込まれる。 When the process shown in FIG. 4 is started, the CPU 15 acquires a record, the record number of the record, and the SFI of the file storing the record from the issue command (step S1). Next, the CPU 15 searches for an empty element in the array of the record body from the beginning (step S2), and executes a process of writing the record obtained in step S1 to the Record class that is the found empty element (step S2). S3). For example, as shown in FIG. 5, if Record[0] to Record[3] have been written, the new record obtained in step S1 is written to Record[4].

次いで、CPU15は、ステップS3の書き込み処理において書き込みエラーが発生したか否かを判定する(ステップS4)。書き込みエラーが発生したと判定された場合(ステップS4:YES)、エラーを示すレスポンスが発行装置へ返信される(ステップS5)。一方、書き込みエラーが発生していないと判定された場合(ステップS4:NO)、CPU15は、ステップS1で取得されたSFIとレコード番号とを結合した値を、レコードが書き込まれたRecordクラスに対応付けられた管理テーブルの要素に登録する(ステップS6)。例えば、図5に示すように、ステップS1で取得されたSFI“1”とレコード番号“2”が結合された値“0102”がTable[4]に登録(記録)される。次いで、CPU15は、正常終了を示すレスポンスを発行装置へ返信する(ステップS7)。 Next, the CPU 15 determines whether a write error has occurred in the write process of step S3 (step S4). If it is determined that a write error has occurred (step S4: YES), a response indicating the error is returned to the issuing device (step S5). On the other hand, if it is determined that no write error has occurred (step S4: NO), the CPU 15 assigns the value obtained by combining the SFI and record number acquired in step S1 to the Record class in which the record was written. It is registered as an element of the attached management table (step S6). For example, as shown in FIG. 5, the value "0102" obtained by combining the SFI "1" acquired in step S1 and the record number "2" is registered (recorded) in Table[4]. Next, the CPU 15 returns a response indicating normal termination to the issuing device (step S7).

以上説明したように、上記実施形態によれば、ICチップ1は、レコードのレコード番号を管理するための管理テーブルを保持し、外部装置2からレコード及び当該レコードのレコード番号を含む発行コマンドを受信すると、複数のRecordクラスのうち、レコードが書き込まれていないRecordクラスに発行コマンドに含まれるレコードを書き込み、且つ、当該レコードのレコード番号を当該Recordクラスに対応付けられる管理テーブルの要素に登録するように構成したので、発行者がレコード番号を意識せずに自由な順序でレコードを発行することができる。 As explained above, according to the above embodiment, the IC chip 1 holds a management table for managing record numbers of records, and receives an issue command including a record and the record number of the record from the external device 2. Then, among the multiple Record classes, the record included in the issue command is written to the Record class to which no record has been written, and the record number of the record is registered in the element of the management table that is associated with the record class. Since the system is configured as follows, the issuer can issue records in any order without being aware of record numbers.

例えば、クレジット決済用アプリケーションを提供するブランドにより各レコードの書き込み順が指定される場合があり、従来のICチップでは、レコードが書き込まれた順に順次レコード番号が割り当てられるようになっていたため、ICチップの発行者は、発行コマンド群における各発行コマンドの実行順(つまり、送信順)を設計する(例えば、並び換える)必要があった。しかし、本実施形態に係るICチップ1によれば、上述したように管理テーブルの要素をRecordクラスに対応付けられるようにしてレコード番号を管理するように構成したので、レコード発行工程において各発行コマンドの実行順を従来のように設計する手間を削減することができる。 For example, brands that provide credit card payment applications may specify the order in which each record is written, and with conventional IC chips, record numbers are assigned sequentially in the order in which records are written. The issuer needed to design (for example, rearrange) the execution order (that is, the transmission order) of each issued command in the issued command group. However, according to the IC chip 1 according to the present embodiment, since the record number is managed by associating the elements of the management table with the Record class as described above, each issue command It is possible to reduce the effort required to design the execution order as in the past.

1 ICチップ
11 I/O回路
12 RAM(
13 NVM
14 ROM
15 CPU
16 コプロセッサ
1 IC chip 11 I/O circuit 12 RAM (
13 NVM
14 ROM
15 CPU
16 Coprocessor

Claims (8)

レコードを書き込むための複数のレコード記憶領域を有するメモリを備える電子情報記憶媒体であって、
前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、
外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、
前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、
を備えることを特徴とする電子情報記憶媒体。
An electronic information storage medium comprising a memory having a plurality of record storage areas for writing records,
holding means for holding a management table for managing identifiers of the records;
Receiving means for receiving a command including a record and an identifier of the record from an external device;
Writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas, and registering the identifier of the record in an element of a management table that is associated with the record storage area. a processing means for
An electronic information storage medium comprising:
1つの前記レコード記憶領域には、複数のレコードを論理的に格納するファイルにおける何れか1つの前記レコードが書き込まれ、
前記コマンドは、前記レコード、当該レコードの識別子、及び当該レコードを論理的に格納するファイルの識別子を含み、
前記処理手段は、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子及び当該レコードを論理的に格納するファイルの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録することを特徴とする請求項1に記載の電子情報記憶媒体。
Any one of the records in a file that logically stores a plurality of records is written in one of the record storage areas,
The command includes the record, an identifier of the record, and an identifier of a file that logically stores the record,
The processing means writes the record included in the command to a record storage area in which the record is not written, and corresponds the identifier of the record and the identifier of the file that logically stores the record to the record storage area. 2. The electronic information storage medium according to claim 1, wherein the electronic information storage medium is registered as an element of an attached management table.
前記受信手段は、複数の前記コマンドを順次受信し、
それぞれの前記コマンドに含まれる前記レコードの内容は互いに異なることを特徴とする請求項1に記載の電子情報記憶媒体。
The receiving means sequentially receives the plurality of commands,
The electronic information storage medium according to claim 1, wherein the contents of the records included in each of the commands are different from each other.
前記処理手段は、前記レコード記憶領域の配列に基づいて、前記レコードが書き込まれていないレコード記憶領域を検索することを特徴とする請求項1に記載の電子情報記憶媒体。 2. The electronic information storage medium according to claim 1, wherein the processing means searches for a record storage area in which the record is not written based on the arrangement of the record storage area. レコードを書き込むための複数のレコード記憶領域を有するメモリを備えるICチップであって、
前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、
外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、
前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、
を備えることを特徴とするICチップ。
An IC chip comprising a memory having a plurality of record storage areas for writing records,
holding means for holding a management table for managing identifiers of the records;
Receiving means for receiving a command including a record and an identifier of the record from an external device;
Writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas, and registering the identifier of the record in an element of a management table that is associated with the record storage area. a processing means for
An IC chip characterized by comprising:
レコードを書き込むための複数のレコード記憶領域を有するメモリを備えるICカードであって、
前記レコードの識別子を管理するための管理テーブルを保持する保持手段と、
外部装置からレコード及び当該レコードの識別子を含むコマンドを受信する受信手段と、
前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録する処理手段と、
を備えることを特徴とするICカード。
An IC card comprising a memory having a plurality of record storage areas for writing records,
holding means for holding a management table for managing identifiers of the records;
Receiving means for receiving a command including a record and an identifier of the record from an external device;
Writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas, and registering the identifier of the record in an element of a management table that is associated with the record storage area. a processing means for
An IC card characterized by comprising:
レコードを書き込むための複数のレコード記憶領域を有するメモリを備える電子情報記憶媒体により実行されるレコード書き込み方法であって、
前記レコードの識別子を管理するための管理テーブルを保持するステップと、
外部装置からレコード及び当該レコードの識別子を含むコマンドを受信するステップと、
前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録するステップと、
を含むことを特徴とするレコード書き込み方法。
A record writing method performed by an electronic information storage medium comprising a memory having a plurality of record storage areas for writing records, the method comprising:
maintaining a management table for managing identifiers of the records;
receiving a command including a record and an identifier of the record from an external device;
Writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas, and registering the identifier of the record in an element of a management table that is associated with the record storage area. the step of
A record writing method characterized by comprising:
レコードを書き込むための複数のレコード記憶領域を備える電子情報記憶媒体に含まれるコンピュータに、
前記レコードの識別子を管理するための管理テーブルを保持するステップと、
外部装置からレコード及び当該レコードの識別子を含むコマンドを受信するステップと、
前記複数のレコード記憶領域のうち、前記レコードが書き込まれていないレコード記憶領域に前記コマンドに含まれるレコードを書き込み、且つ、当該レコードの識別子を当該レコード記憶領域に対応付けられる管理テーブルの要素に登録するステップと、
を実行させることを特徴とするプログラム。
A computer included in an electronic information storage medium having a plurality of record storage areas for writing records;
maintaining a management table for managing identifiers of the records;
receiving a command including a record and an identifier of the record from an external device;
Writing the record included in the command to a record storage area in which the record is not written among the plurality of record storage areas, and registering the identifier of the record in an element of a management table that is associated with the record storage area. the step of
A program characterized by executing.
JP2023091210A 2023-06-01 2023-06-01 Electronic information storage medium, IC chip, IC card, record writing method, and program Active JP7438432B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023091210A JP7438432B1 (en) 2023-06-01 2023-06-01 Electronic information storage medium, IC chip, IC card, record writing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023091210A JP7438432B1 (en) 2023-06-01 2023-06-01 Electronic information storage medium, IC chip, IC card, record writing method, and program

Publications (1)

Publication Number Publication Date
JP7438432B1 true JP7438432B1 (en) 2024-02-26

Family

ID=90011386

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023091210A Active JP7438432B1 (en) 2023-06-01 2023-06-01 Electronic information storage medium, IC chip, IC card, record writing method, and program

Country Status (1)

Country Link
JP (1) JP7438432B1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006040264A (en) 2004-06-21 2006-02-09 Toshiba Corp Control method of memory card, and control method of nonvolatile semiconductor memory
JP2008123473A (en) 2006-10-20 2008-05-29 Toshiba Corp Memory device and its control method
JP2010182270A (en) 2009-02-09 2010-08-19 Toshiba Corp Mobile electronic apparatus and data management method in mobile electronic apparatus
JP2015060302A (en) 2013-09-17 2015-03-30 大日本印刷株式会社 Universal ic card and security attribute verification method
JP2015222485A (en) 2014-05-22 2015-12-10 凸版印刷株式会社 Data writing method, storage medium device and data writing system
JP2017107318A (en) 2015-12-08 2017-06-15 株式会社東芝 Memory system, and information processing device and processing method
US20180157712A1 (en) 2015-05-06 2018-06-07 Örjan Vestgöte Technology AB Method, system and computer program product for performing numeric searches
JP2019049876A (en) 2017-09-11 2019-03-28 大日本印刷株式会社 Electronic information storage medium, ic card, table management method with electronic information storage medium, and table management program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006040264A (en) 2004-06-21 2006-02-09 Toshiba Corp Control method of memory card, and control method of nonvolatile semiconductor memory
JP2008123473A (en) 2006-10-20 2008-05-29 Toshiba Corp Memory device and its control method
JP2010182270A (en) 2009-02-09 2010-08-19 Toshiba Corp Mobile electronic apparatus and data management method in mobile electronic apparatus
JP2015060302A (en) 2013-09-17 2015-03-30 大日本印刷株式会社 Universal ic card and security attribute verification method
JP2015222485A (en) 2014-05-22 2015-12-10 凸版印刷株式会社 Data writing method, storage medium device and data writing system
US20180157712A1 (en) 2015-05-06 2018-06-07 Örjan Vestgöte Technology AB Method, system and computer program product for performing numeric searches
JP2017107318A (en) 2015-12-08 2017-06-15 株式会社東芝 Memory system, and information processing device and processing method
JP2019049876A (en) 2017-09-11 2019-03-28 大日本印刷株式会社 Electronic information storage medium, ic card, table management method with electronic information storage medium, and table management program

Similar Documents

Publication Publication Date Title
JP5329884B2 (en) Portable electronic device and data processing method in portable electronic device
US9183400B2 (en) IC card and IC card control method
US9772937B2 (en) Data processing method, memory controller and memory storage apparatus
JPH06302180A (en) Data access system for electronic device
US8417902B2 (en) One-time-programmable memory emulation
JP3110035B2 (en) Portable electronic devices
JP5895565B2 (en) IC card and program
CN103218300B (en) Data processing method, Memory Controller and memorizer memory devices
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP5301018B2 (en) Portable electronic device
JP2020013212A (en) Portable electronic device, IC card, and issuing device
JP7005934B2 (en) Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program
JP7468757B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RESPONSE TRANSMISSION METHOD, AND PROGRAM
JP2010211516A (en) Portable electronic device and access control method in the same
JP7468765B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, ALL-IN-ONE DATA UPDATE METHOD, AND PROGRAM
EP1384197B1 (en) Method of manufacturing smart cards
JP2004192447A (en) Ic card and data management method for ic card
JP2006293706A (en) Multi-application ic card with application updating function
JP6769150B2 (en) Electronic information storage media, information processing methods, and information processing programs
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
JP7322923B2 (en) Secure element, transaction control method and device
JP2008500601A (en) Semiconductor memory card
JP2012133656A (en) Portable electronic apparatus and ic card
JP5932588B2 (en) IC card, portable electronic device, and IC card processing device
JP3234011B2 (en) 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

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: 20231219

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20231227

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240213

R150 Certificate of patent or registration of utility model

Ref document number: 7438432

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150