[go: up one dir, main page]

JP7487837B1 - ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM - Google Patents

ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM Download PDF

Info

Publication number
JP7487837B1
JP7487837B1 JP2023195269A JP2023195269A JP7487837B1 JP 7487837 B1 JP7487837 B1 JP 7487837B1 JP 2023195269 A JP2023195269 A JP 2023195269A JP 2023195269 A JP2023195269 A JP 2023195269A JP 7487837 B1 JP7487837 B1 JP 7487837B1
Authority
JP
Japan
Prior art keywords
key
file
key data
specified
command
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
JP2023195269A
Other languages
Japanese (ja)
Other versions
JP2025082050A (en
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 JP2023195269A priority Critical patent/JP7487837B1/en
Application granted granted Critical
Publication of JP7487837B1 publication Critical patent/JP7487837B1/en
Publication of JP2025082050A publication Critical patent/JP2025082050A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

Figure 0007487837000001

【課題】鍵データを生成するためのコマンドに鍵ファイルが指定されていない場合であっても、生成された鍵データを適切な鍵ファイルに格納することが可能な電子情報記憶媒体、ICチップ、ICカード、鍵データ格納方法、及びプログラムを提供する。
【解決手段】ICチップ1は、受信された非対称鍵ペア生成コマンドにIEFが指定されているか否かを判定し、IEFが指定されていないと判定した場合、NVM13に記憶されている複数のIEFのうちから、特定の用途を示す情報が対応付けられたIEFを特定し、非対称鍵ペア生成コマンドに応じて特定の用途に使用される鍵ペアを生成し、生成された鍵ペアを、特定されたIEFに格納する。
【選択図】図4

Figure 0007487837000001

To provide an electronic information storage medium, an IC chip, an IC card, a key data storage method, and a program that are capable of storing generated key data in an appropriate key file even when a key file is not specified in a command for generating key data.
[Solution] The IC chip 1 determines whether an IEF is specified in the received asymmetric key pair generation command, and if it determines that an IEF is not specified, it identifies an IEF to which information indicating a specific use is associated from among multiple IEFs stored in the NVM 13, generates a key pair to be used for the specific use in accordance with the asymmetric key pair generation command, and stores the generated key pair in the identified IEF.
[Selected figure] Figure 4

Description

本発明は、外部装置からのコマンドに応じて鍵データを生成し格納することが可能なIC(Integrated Circuit)チップ等の技術分野に関する。 The present invention relates to the technical field of IC (Integrated Circuit) chips that can generate and store key data in response to commands from an external device.

従来、例えば特許文献1に開示されるように、複数の工程処理を経て市場に提供されるICチップを備えるICカードを発行するICチップ発行システムが知られている。特許文献1には、ICカードが、固有のカードIDに対応する値と、外部から入力される秘密情報とに基づきハッシュ値と算出し、算出したハッシュ値を補間式に代入して求められる補間式の解に基づき秘密鍵を生成することが開示されている。一方、特許文献2には、登録装置からの鍵ペア生成コマンドを受信したデバイスが、公開鍵と秘密鍵の鍵ペア(鍵データの一例)を生成し、生成した鍵ペアをパーティション鍵領域に書き込む技術が開示されている。このような鍵ペアを生成するためのコマンドとして、国際標準規格であるISO/IEC 7816-8には、非対称鍵ペア生成(GENERATE ASYMMETRIC KEY PAIR)コマンドが規定されている。 Conventionally, as disclosed in, for example, Patent Document 1, an IC chip issuing system is known that issues IC cards equipped with IC chips that are provided to the market through a plurality of process processes. Patent Document 1 discloses that an IC card calculates a hash value based on a value corresponding to a unique card ID and secret information input from the outside, and generates a private key based on a solution of an interpolation formula obtained by substituting the calculated hash value into the interpolation formula. Meanwhile, Patent Document 2 discloses a technology in which a device that receives a key pair generation command from a registration device generates a key pair (an example of key data) of a public key and a private key, and writes the generated key pair to a partition key area. As a command for generating such a key pair, the international standard ISO/IEC 7816-8 specifies an asymmetric key pair generation (GENERATE ASYMMETRIC KEY PAIR) command.

特許第6228761号報Patent No. 6228761 特開2002-281009号公報JP 2002-281009 A

ところで、ICチップの発行工程において、ICチップ内に鍵ペアを書き込むために、ISO/IEC 7816-8に規定された非対称鍵ペア生成コマンドが利用されることがある。この場合、通常、非対称鍵ペア生成コマンドを送信する外部装置側で、非対称鍵ペア生成コマンド内のパラメータP2にICチップ内で生成される鍵ペアを格納するための鍵ファイルを指定していた。これにより、ICチップは、非対称鍵ペア生成コマンドに応じて生成した鍵ペアを、該コマンドで指定された鍵ファイルに格納した後、生成された鍵ペアのうち公開鍵を含むレスポンスを外部装置へ送信するようになっている。しかし、鍵ペアの生成処理は、生成した乱数が素数かどうかを判定する必要があるため、ICチップが鍵ペアを生成するまでに時間がかかる。さらに、ICチップ内に予め複数の鍵ファイルが記憶されている場合、外部装置とICチップとの間で鍵ファイルの数だけ非対称鍵ペア生成コマンド及びレスポンスのやり取りが発生するため、時間がかかるという問題があった。 In the process of issuing an IC chip, an asymmetric key pair generation command defined in ISO/IEC 7816-8 may be used to write a key pair in the IC chip. In this case, the external device that transmits the asymmetric key pair generation command usually specifies a key file for storing the key pair generated in the IC chip in the parameter P2 in the asymmetric key pair generation command. As a result, the IC chip stores the key pair generated in response to the asymmetric key pair generation command in the key file specified by the command, and then transmits a response including the public key of the generated key pair to the external device. However, since the key pair generation process requires determining whether the generated random number is a prime number, it takes time for the IC chip to generate a key pair. Furthermore, if multiple key files are stored in the IC chip in advance, there is a problem that it takes time because the asymmetric key pair generation command and response are exchanged between the external device and the IC chip for the number of key files.

また、ISO/IEC 7816-8によれば、非対称鍵ペア生成コマンドのパラメータP2を“00(h)”とすることで鍵ファイルを指定しないようすることも可能になっている。しかし、ICチップ内に予め複数の鍵ファイルが記憶されている場合、非対称鍵ペア生成コマンドで鍵ファイルが指定されていないと、生成された鍵ペアを格納すべき鍵ファイルが不明となるため、ICチップ側で適切な対応を図る必要があった。 Also, according to ISO/IEC 7816-8, it is possible not to specify a key file by setting parameter P2 of the asymmetric key pair generation command to "00(h)". However, if multiple key files are pre-stored in the IC chip, and a key file is not specified in the asymmetric key pair generation command, the key file in which the generated key pair should be stored becomes unknown, so it was necessary to take appropriate measures on the IC chip side.

そこで、本発明は、このような点などに鑑みてなされたものであり、鍵データを生成するためのコマンドに鍵ファイルが指定されていない場合であっても、生成された鍵データを適切な鍵ファイルに格納することが可能な電子情報記憶媒体、ICチップ、ICカード、鍵データ格納方法、及びプログラムを提供することを課題の一例とする。 The present invention has been made in consideration of these points and has as its object to provide an electronic information storage medium, an IC chip, an IC card, a key data storage method, and a program that are capable of storing generated key data in an appropriate key file even when a key file is not specified in a command for generating key data.

上記課題を解決するために、請求項1に記載の発明は、鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体であって、外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、を備えることを特徴とする。 In order to solve the above problem, the invention described in claim 1 is an electronic information storage medium having a memory that stores multiple key files for storing key data, and is characterized by comprising: a receiving means for receiving a command for generating key data to be used for a specific purpose among multiple purposes from an external device; a determining means for determining whether a key file is specified in the command received by the receiving means; a specifying means for specifying a key file to which information indicating the specific purpose is associated from among the multiple key files stored in the memory when the determining means determines that the key file is not specified; a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means; and a storing means for storing the key data generated by the generating means in the key file specified by the specifying means.

請求項2に記載の発明は、請求項1に記載の電子情報記憶媒体において、前記メモリには、複数の前記鍵ファイルと、当該鍵ファイルのそれぞれに格納される鍵データの用途との対応関係を示す情報を格納するセキュリティ環境ファイルが記憶されており、前記特定手段は、前記セキュリティ環境ファイルを参照して、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定することを特徴とする。 The invention described in claim 2 is characterized in that, in the electronic information storage medium described in claim 1, the memory stores a security environment file that stores information indicating the correspondence between the multiple key files and the uses of the key data stored in each of the key files, and the identification means refers to the security environment file to identify the key file associated with the information indicating the specific use.

請求項3に記載の発明は、請求項1または2に記載の電子情報記憶媒体において、前記特定手段は、前記特定の用途を示す情報が対応付けられた鍵ファイルを複数特定し、前記生成手段は、前記特定手段により特定された鍵ファイルごとに、前記特定の用途に使用される鍵データを生成し、前記格納手段は、前記生成手段により生成された各鍵データを、前記特定手段により特定された鍵ファイルであって当該各鍵データのそれぞれに対応する鍵ファイルに格納することを特徴とする。 The invention described in claim 3 is characterized in that, in the electronic information storage medium described in claim 1 or 2, the identification means identifies a plurality of key files to which information indicating the specific use is associated, the generation means generates key data to be used for the specific use for each key file identified by the identification means, and the storage means stores each key data generated by the generation means in a key file identified by the identification means that corresponds to each of the key data.

請求項4に記載の発明は、請求項1または2に記載の電子情報記憶媒体において、前記特定手段は、選択中のアプリケーションの専用ファイルの配下にある複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定することを特徴とする。 The invention described in claim 4 is characterized in that, in the electronic information storage medium described in claim 1 or 2, the identification means identifies a key file associated with information indicating the specific use from among the multiple key files under the dedicated file of the selected application.

請求項5に記載の発明は、請求項1または2に記載の電子情報記憶媒体において、前記鍵データは、秘密鍵と公開鍵との鍵ペアであることを特徴とする。 The invention described in claim 5 is characterized in that in the electronic information storage medium described in claim 1 or 2, the key data is a key pair of a private key and a public key.

請求項6に記載の発明は、鍵データを格納するための鍵ファイルを複数記憶するメモリを有するICチップであって、外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、を備えることを特徴とする。 The invention described in claim 6 is an IC chip having a memory that stores multiple key files for storing key data, characterized in that it comprises: a receiving means for receiving a command from an external device to generate key data to be used for a specific purpose among multiple purposes; a determining means for determining whether a key file is specified in the command received by the receiving means; a specifying means for specifying a key file to which information indicating the specific purpose is associated from among the multiple key files stored in the memory when the determining means determines that the key file is not specified; a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means; and a storing means for storing the key data generated by the generating means in the key file specified by the specifying means.

請求項7に記載の発明は、鍵データを格納するための鍵ファイルを複数記憶するメモリを有するICカードであって、外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、を備えることを特徴とする。 The invention described in claim 7 is an IC card having a memory that stores multiple key files for storing key data, and is characterized in that it comprises: a receiving means for receiving a command from an external device to generate key data to be used for a specific purpose among multiple purposes; a determining means for determining whether a key file is specified in the command received by the receiving means; a specifying means for specifying a key file to which information indicating the specific purpose is associated from among the multiple key files stored in the memory when the determining means determines that the key file is not specified; a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means; and a storing means for storing the key data generated by the generating means in the key file specified by the specifying means.

請求項8に記載の発明は、鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体により実行される鍵データ格納方法であって、外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信するステップと、前記受信されたコマンドに鍵ファイルが指定されているか否かを判定するステップと、前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定するステップと、前記受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成するステップと、前記生成された鍵データを、前記特定された鍵ファイルに格納するステップと、を含むことを特徴とする。 The invention described in claim 8 is a key data storage method executed by an electronic information storage medium having a memory that stores multiple key files for storing key data, and is characterized in that it includes the steps of receiving a command from an external device to generate key data to be used for a specific purpose among multiple purposes, determining whether a key file is specified in the received command, and if it is determined that the key file is not specified, identifying a key file to which information indicating the specific purpose is associated from among the multiple key files stored in the memory, generating key data to be used for the specific purpose in response to the received command, and storing the generated key data in the identified key file.

請求項9に記載の発明は、鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体に含まれるコンピュータを、外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段として機能させることを特徴とする。 The invention described in claim 9 is characterized in that a computer included in an electronic information storage medium having a memory that stores multiple key files for storing key data is made to function as a receiving means for receiving a command from an external device to generate key data to be used for a specific purpose among multiple purposes, a determining means for determining whether a key file is specified in the command received by the receiving means, a specifying means for specifying a key file to which information indicating the specific purpose is associated from among the multiple key files stored in the memory when the determining means determines that the key file is not specified, a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means, and a storing means for storing the key data generated by the generating means in the key file specified by the specifying means.

本発明によれば、鍵データを生成するためのコマンドに鍵ファイルが指定されていない場合であっても、生成された鍵データを適切な鍵ファイルに格納することができる。 According to the present invention, even if a key file is not specified in the command for generating key data, the generated key data can be stored in an appropriate key file.

ICチップ1のハードウェア構成例を示す図である。FIG. 2 is a diagram illustrating an example of a hardware configuration of an IC chip 1. NVM13において記憶された各ファイルの構成例を示す図である。2 is a diagram showing an example of the configuration of each file stored in the NVM 13. FIG. 非対称鍵ペア生成コマンドフォーマット例を示す図である。FIG. 13 is a diagram illustrating an example of an asymmetric key pair generation command format. ICチップ1におけるCPU15の鍵ペア生成及び格納処理の一例を示すフローチャートである。11 is a flowchart showing an example of a key pair generation and storage process of a CPU 15 in an IC chip 1.

以下、図面を参照して本発明の実施形態について詳細に説明する。 The following describes in detail an embodiment of the present invention 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 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 a secure element having tamper resistance, and is an example of an electronic information storage medium of the present invention. 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との通信が行われる。ICチップ1と外部装置2との通信において、ISO/IEC 7816-3等に規定されるコマンドAPDU(Application Protocol Data Unit)及びレスポンスAPDUのやり取りが行われる。なお、本実施形態では、外部装置2として、ICチップ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/O circuit 11, a RAM (Random Access Memory) 12, a NVM (Nonvolatile Memory) 13, a ROM (Read Only Memory) 14, a CPU (Central Processing Unit) 15 (an example of a computer), and a coprocessor 16 that performs cryptographic operations. The I/O circuit 11 serves as an interface with an external device 2. Note that communication between the IC chip 1 and the external device 2 may be non-contact communication or contact communication. In the case of non-contact communication, the IC chip 1 and the external device 2 communicate with each other via an antenna (not shown) mounted on an IC card or a mobile device, for example. In the communication between the IC chip 1 and the external device 2, command APDUs (Application Protocol Data Units) and response APDUs defined in ISO/IEC 7816-3 and the like are exchanged. Note that in this embodiment, the external device 2 is an issuing terminal in a factory before the shipment of the IC chip 1.

NVM13には、例えばフラッシュメモリが適用される。なお、NVM13は、「Electrically Erasable Programmable Read-Only Memory」であってもよい。NVM13またはROM14には、ICチップ1にインストールされたOS(Operating System)、及びアプリケーション(本発明のプログラムを含む)等が記憶される。アプリケーションの例として、取引対象の決済のために利用される取引用アプリケーションや、設備等を動作させるために利用される認証用アプリケーションなどが挙げられる。アプリケーションには、RSA(Rivest-Shamir-Adleman cryptosystem)やECDSA(Elliptic Curve Digital Signature Algorithm)などの暗号アルゴリズムを規定するプログラムが含まれる。なお、ICチップ1には、複数のアプリケーションがインストールされてもよい。 For example, a flash memory is applied to the NVM 13. The NVM 13 may be an "Electrically Erasable Programmable Read-Only Memory". The NVM 13 or the ROM 14 stores the OS (Operating System) and applications (including the program of the present invention) installed in the IC chip 1. Examples of applications include a trading application used for settling the subject of a transaction, and an authentication application used to operate equipment, etc. Applications include programs that define encryption algorithms such as the Rivest-Shamir-Adleman cryptosystem (RSA) and the Elliptic Curve Digital Signature Algorithm (ECDSA). Multiple applications may be installed in the IC chip 1.

ICチップ1にアプリケーションがインストールされると、NVM13には、MF(Master File)、DF(Dedicated File)、及びEF(Elementary File)などから構成される階層構造(ISO/IEC 7816-3等に規定)を有する複数のファイルが記憶(創成)される。それぞれのファイルには、固有のファイルID(識別子)が付与されている。EFは、WEF(Working Elementary File)、及びIEF(Internal Elementary File)等に区分される。WEFには、アプリケーションにより使用されるデータ(例えば、取引データ等)が格納される。IEF(鍵ファイルの一例)には、アプリケーションにより使用されるPIN(暗証番号)や鍵データ等が格納される。鍵データは、例えば、公開鍵暗号方式による暗号演算で用いられる鍵ペア(つまり、秘密鍵と公開鍵)、または当該秘密鍵である。なお、EFの記憶時(つまり、アプリケーションのインストール時)には、デフォルト値(例えばFFFF(h))が格納されており、その後、外部装置2からの発行コマンドAPDUに応じてEFに実データ(つまり、アプリケーションにより使用される鍵データ等)が格納される。発行コマンドAPDUの例として、WRITE RECORDコマンド、STORE DATAコマンド、GENERATE ASYMMETRIC KEY PAIR コマンドなどが挙げられる。 When an application is installed in the IC chip 1, a number of files having a hierarchical structure (specified in ISO/IEC 7816-3, etc.) consisting of MF (Master File), DF (Dedicated File), EF (Elementary File), etc. are stored (created) in the NVM 13. Each file is assigned a unique file ID (identifier). The EF is divided into WEF (Working Elementary File) and IEF (Internal Elementary File), etc. Data used by the application (e.g., transaction data, etc.) is stored in the WEF. The IEF (an example of a key file) stores a PIN (personal identification number) and key data used by the application. The key data is, for example, a key pair (i.e., a private key and a public key) used in an encryption operation by a public key cryptosystem, or the private key. When the EF is stored (i.e., when the application is installed), a default value (e.g., FFFF(h)) is stored, and then actual data (i.e., key data used by the application, etc.) is stored in the EF in response to an issued command APDU from the external device 2. Examples of issued command APDUs include the WRITE RECORD command, the STORE DATA command, and the GENERATE ASYMMETRIC KEY PAIR command.

図2は、NVM13において記憶された各ファイルの構成例を示す図である。図2の例では、MFの配下にDFa及びDFbが位置している。DFaはアプリケーションAの専用ファイル(アプリケーションDF)であり、DFbはアプリケーションBの専用ファイル(アプリケーションDF)である。DFaの配下には、IEFa1~a3等が位置している。IEFa1には、PINが格納されるとともに、PINの用途(照合用)を示す情報が対応付けられる。IEFa2には、秘密鍵を含む鍵ペアが格納されるとともに、当該秘密鍵の用途(署名生成用:特定の用途の一例)を示す情報が対応付けられる。IEFa3には、公開鍵が格納されるとともに、当該公開鍵の用途(署名検証用)を示す情報が対応付けられる。なお、上記用途を示す情報は、それぞれのIEFに格納されてもよい。 Figure 2 is a diagram showing an example of the configuration of each file stored in NVM13. In the example of Figure 2, DFa and DFb are located under MF. DFa is a dedicated file (application DF) for application A, and DFb is a dedicated file (application DF) for application B. IEFa1 to a3, etc. are located under DFa. IEFa1 stores a PIN and is associated with information indicating the use of the PIN (for verification). IEFa2 stores a key pair including a private key and is associated with information indicating the use of the private key (for signature generation: an example of a specific use). IEFa3 stores a public key and is associated with information indicating the use of the public key (for signature verification). The information indicating the above uses may be stored in each IEF.

一方、DFbの配下には、IEFb1~b3、及びSEF(Security Environment File)b4等が位置している。IEFb1には、PINが格納されるとともに、PINの用途(照合用)を示す情報が対応付けられる。IEFb2には、秘密鍵を含む鍵ペアが格納されるとともに、当該秘密鍵の用途(署名生成用:特定の用途の一例)を示す情報が対応付けられる。IEFb3には、秘密鍵と公開鍵との鍵ペアが格納されるとともに、当該鍵ペアの用途(認証用:特定の用途の一例)を示す情報が対応付けられる。SEFb4には、ISO/IEC 7816-9等に規定されるセキュリティ環境が格納される。SEFb4は、例えば外部装置2からの所定のコマンドAPDU(例えば、MANAGE SECURITY ENVIRONMENTコマンド)により任意に記憶されるファイルである。セキュリティ環境には、IEFb1~b3と、IEFb1~b3のそれぞれに格納される鍵データ等の用途との対応関係を示す対応関係情報Iが含まれる。図2に示す対応関係情報Iにおいて、IEFのファイルIDと用途(用途区分)とが対応付けられている。なお、図2の例では、SEFは、DFbの配下にのみ創成されているが、DFaの配下に創成されてもよい。 On the other hand, IEFb1 to b3 and SEF (Security Environment File) b4 are located under DFb. IEFb1 stores a PIN and is associated with information indicating the purpose of the PIN (for verification). IEFb2 stores a key pair including a private key and is associated with information indicating the purpose of the private key (for signature generation: an example of a specific purpose). IEFb3 stores a key pair of a private key and a public key and is associated with information indicating the purpose of the key pair (for authentication: an example of a specific purpose). SEFb4 stores a security environment defined in ISO/IEC 7816-9, etc. SEFb4 is a file that is arbitrarily stored by, for example, a predetermined command APDU (for example, a MANAGE SECURITY ENVIRONMENT command) from the external device 2. The security environment includes correspondence information I indicating the correspondence between IEFb1 to b3 and the purpose of the key data, etc. stored in each of IEFb1 to b3. In the correspondence relationship information I shown in FIG. 2, the file ID of the IEF is associated with the purpose (purpose category). In the example of FIG. 2, the SEF is created only under DFb, but it may be created under DFa.

CPU15(コンピュータの一例)は、NVM13に記憶されたOS及びアプリケーションを実行することで、本発明における受信手段、判定手段、特定手段、生成手段、及び格納手段等として機能する。より具体的には、CPU15は、外部装置2から、非対称鍵ペア生成(GENERATE ASYMMETRIC KEY PAIR)コマンドを、I/O回路11を介して受信する。非対称鍵ペア生成コマンドは、特定の用途に使用される鍵データを生成するためのコマンドAPDUの一例である。図3は、非対称鍵ペア生成コマンドフォーマット例を示す図である。図3に示すように、非対称鍵ペア生成コマンドは、CLA、INS、P1及びP2からなるヘッダ部と、Lc、Data及びLeからなるボディ部とにより構成される。ここで、パラメータP1は、非対称鍵生成を示す。パラメータP2は、“00(h)”(対象ファイルに関する情報なし)であるので、IEFが指定されていない。Dataには、鍵ペアの生成に用いられるCRT(Control Reference Template)が格納される。鍵ペアが複数用途のために生成される場合、Dataには複数のCRT(つまり、複数用途のそれぞれに対応するCRT)が含まれる。なお、CRTには、例えば、暗号アルゴリズムを示す暗号機構参照、暗号内容参照、及び用途限定情報などが含まれる。 The CPU 15 (an example of a computer) executes the OS and applications stored in the NVM 13 to function as a receiving means, a determining means, a specifying means, a generating means, a storing means, and the like in the present invention. More specifically, the CPU 15 receives an asymmetric key pair generation (GENERATE ASYMMETRIC KEY PAIR) command from the external device 2 via the I/O circuit 11. The asymmetric key pair generation command is an example of a command APDU for generating key data to be used for a specific purpose. FIG. 3 is a diagram showing an example of an asymmetric key pair generation command format. As shown in FIG. 3, the asymmetric key pair generation command is composed of a header portion consisting of CLA, INS, P1, and P2, and a body portion consisting of Lc, Data, and Le. Here, the parameter P1 indicates asymmetric key generation. The parameter P2 is "00(h)" (no information on the target file), so no IEF is specified. Data stores a CRT (Control Reference Template) used to generate a key pair. If a key pair is generated for multiple uses, Data contains multiple CRTs (i.e., CRTs corresponding to each of the multiple uses). Note that the CRTs contain, for example, a cryptographic mechanism reference indicating the cryptographic algorithm, a cryptographic content reference, and usage restriction information.

CPU15は、受信された非対称鍵ペア生成コマンドにIEFが指定されているか否かを判定し、IEFが指定されていないと判定した場合、NVM13に記憶されている複数のIEFのうちから、特定の用途(例えば、署名生成用、認証用)を示す情報が対応付けられたIEFを1または複数特定する。例えば、CPU15は、選択中のアプリケーションのDFの配下にある複数のIEFのうちから、特定の用途を示す情報が対応付けられたIEFを検索することによりIEFを特定(例えば、ファイルIDで特定)する。ここで、選択中のアプリケーションのDF(つまり、カレントDF)とは、デフォルトで選択されたアプリケーションのDF、またはSELECTコマンドにより選択されたアプリケーションのDFである。選択中のアプリケーションのDFの配下に、図2に示すようにSEFb4がある場合、当該SEFb4に格納されるセキュリティ環境に含まれる格納される対応関係情報Iを参照して、上記特定の用途を示す情報が対応付けられたIEFを特定する。このように、選択中のアプリケーションのDFの配下にSEFがある場合、当該SEFがない場合に比べて、より短時間でIEFを特定することができる。なお、図2に示すDFbの場合、IEFb2とIEFb3が特定されることになる。 The CPU 15 determines whether an IEF is specified in the received asymmetric key pair generation command, and if it determines that an IEF is not specified, it identifies one or more IEFs to which information indicating a specific use (e.g., for signature generation, for authentication) is associated from among the multiple IEFs stored in the NVM 13. For example, the CPU 15 identifies an IEF (e.g., by file ID) by searching for an IEF to which information indicating a specific use is associated from among the multiple IEFs under the DF of the selected application. Here, the DF of the selected application (i.e., the current DF) is the DF of the application selected by default, or the DF of the application selected by the SELECT command. If the DF of the selected application has an SEF b4 as shown in FIG. 2, the correspondence information I stored in the security environment stored in the SEF b4 is referenced to identify the IEF to which the information indicating the specific use is associated. In this way, if there is an SEF under the DF of the selected application, the IEF can be identified in a shorter time than if there is no SEF. In the case of DFb shown in Figure 2, IEFb2 and IEFb3 are identified.

CPU15は、上記受信された非対称鍵ペア生成コマンドに応じて、CRT等を用いて上記特定の用途に使用される鍵ペアを生成する。上記特定の用途を示す情報が対応付けられたIEFが複数特定された場合、CPU15は、上記特定されたIEFごとに、上記特定の用途に使用される鍵ペアを生成する。なお、鍵ペアの生成方法については公知の種々の方法を適用することができる。そして、CPU15は、生成された鍵ペアを、上記特定されたIEFに格納する。複数用途毎ごとに鍵ペアが生成された場合、CPU15は、各鍵ペアを、上記特定されたIEF(つまり、各鍵ペアのそれぞれに対応するIEF)に格納する。そして、CPU15は、生成された鍵ペアにおける公開鍵、及び正常終了を示すステータスワードSW1,SW2を含むレスポンスAPDUを、I/O回路11を介して外部装置2へ送信する。複数用途毎ごとに鍵ペアが生成された場合、レスポンスAPDUには、各鍵ペアにおける公開鍵(つまり、複数の公開鍵)が含まれる。つまり、複数の鍵ペアが生成及び格納される場合であっても、非対称鍵ペア生成コマンド及びレスポンスのやり取りを1回で済ませることができる。 The CPU 15 generates a key pair to be used for the specific purpose using a CRT or the like in response to the received asymmetric key pair generation command. When a plurality of IEFs are identified to which information indicating the specific purpose is associated, the CPU 15 generates a key pair to be used for the specific purpose for each of the identified IEFs. Various known methods can be applied to the method of generating a key pair. The CPU 15 then stores the generated key pair in the identified IEF. When a key pair is generated for each of the multiple purposes, the CPU 15 stores each key pair in the identified IEF (i.e., the IEF corresponding to each of the key pairs). The CPU 15 then transmits a response APDU including the public key of the generated key pair and status words SW1 and SW2 indicating normal termination to the external device 2 via the I/O circuit 11. When a key pair is generated for each of the multiple purposes, the response APDU includes the public key of each key pair (i.e., multiple public keys). In other words, even when multiple key pairs are generated and stored, the asymmetric key pair generation command and the response can be exchanged only once.

[2.ICチップ1の動作]
次に、図4を参照して、本実施形態に係るICチップ1の鍵ペア生成及び格納動作について説明する。図4は、ICチップ1におけるCPU15の鍵ペア生成及び格納処理の一例を示すフローチャートである。図4に示す処理は、例えばICチップ1の製造工場における発行工程において、ICチップ1が外部装置2(例えば、発行端末)から非対称鍵ペア生成コマンドが受信された場合に開始される。なお、鍵ペア生成及び格納処理の前提として、1または複数のアプリケーションがインストールされることでデフォルト値を有するIEFがNVM13に記憶され、且つ、非対称鍵ペア生成コマンド受信前に1つのアプリケーションが選択された状態(選択中)にあるものとする。
2. Operation of IC chip 1
Next, the key pair generation and storage operation of the IC chip 1 according to this embodiment will be described with reference to Fig. 4. Fig. 4 is a flowchart showing an example of the key pair generation and storage process of the CPU 15 in the IC chip 1. The process shown in Fig. 4 is started when the IC chip 1 receives an asymmetric key pair generation command from an external device 2 (e.g., an issuing terminal) during an issuing process in a manufacturing factory of the IC chip 1, for example. Note that, as a prerequisite for the key pair generation and storage process, it is assumed that an IEF having default values is stored in the NVM 13 by installing one or more applications, and one application is in a selected state (selected) before receiving the asymmetric key pair generation command.

図4に示す処理が開始されると、ICチップ1(CPU15)は、受信された非対称鍵ペア生成コマンド内のパラメータP2を参照して、IEFが指定されているか否かを判定する(ステップS1)。IEFが指定されていると判定された場合(ステップS1:YES)、非対称鍵ペア生成コマンドに応じた通常処理が実行され(ステップS2)、図4に示す処理が終了する。かかる通常処理は公知であるため、詳しい説明を省略する。一方、IEFが指定されていないと判定された場合(ステップS1:NO)、処理はステップS3へ進む。 When the process shown in FIG. 4 is started, the IC chip 1 (CPU 15) refers to the parameter P2 in the received asymmetric key pair generation command to determine whether or not IEF is specified (step S1). If it is determined that IEF is specified (step S1: YES), normal processing according to the asymmetric key pair generation command is executed (step S2), and the process shown in FIG. 4 ends. Since this normal processing is well known, a detailed explanation is omitted. On the other hand, if it is determined that IEF is not specified (step S1: NO), the process proceeds to step S3.

ステップS3では、ICチップ1は、選択中のアプリケーションのDFの配下にSEFがあるか否かを判定する。選択中のアプリケーションのDFの配下にSEFがないと判定した場合(ステップS3:NO)、処理はステップS4へ進む。ステップS4では、ICチップ1は、選択中のアプリケーションのDFの配下にある全てのIEFを1つずつ参照して上記特定の用途を示す情報が対応付けられたIEFを検索することでIEFを1または複数特定する。一方、選択中のアプリケーションのDFの配下にSEFがあると判定した場合(ステップS3:YES)、処理はステップS5へ進む。ステップS5では、ICチップ1は、選択中のアプリケーションのDFの配下にあるSEFを参照して、上記特定の用途を示す情報が対応付けられたIEFを1または複数特定する。 In step S3, the IC chip 1 determines whether or not there is an SEF under the DF of the selected application. If it is determined that there is no SEF under the DF of the selected application (step S3: NO), the process proceeds to step S4. In step S4, the IC chip 1 refers to all IEFs under the DF of the selected application one by one, and searches for an IEF associated with the information indicating the specific use, thereby identifying one or more IEFs. On the other hand, if it is determined that there is an SEF under the DF of the selected application (step S3: YES), the process proceeds to step S5. In step S5, the IC chip 1 refers to the SEFs under the DF of the selected application, and identifies one or more IEFs associated with the information indicating the specific use.

次いで、ICチップ1は、上記受信された非対称鍵ペア生成コマンドに応じて、CRT等を用いて上記特定の用途に使用される鍵ペアを生成する(ステップS6)。次いで、ICチップ1は、ステップS6で生成された鍵ペアを、ステップS4またはS5で特定されたIEFに格納する(ステップS7)。次いで、ICチップ1は、未だ生成されていない鍵ペアがあるか否かを判定する(ステップS8)。未だ生成されていない鍵ペアがあると判定された場合(ステップS8:YES)、処理はステップS6に戻り、未だ生成されていない鍵ペアが生成される。一方、未だ生成されていない鍵ペアがないと判定された場合(ステップS8:NO)、処理はステップS9へ進む。ステップS9では、ICチップ1は、ステップS7で格納された鍵ペアにおける公開鍵、及び正常終了を示すステータスワードSW1,SW2を含むレスポンスAPDUを外部装置2へ送信し、図4に示す処理を終了する。 Next, the IC chip 1 generates a key pair to be used for the specific purpose using a CRT or the like in response to the received asymmetric key pair generation command (step S6). Next, the IC chip 1 stores the key pair generated in step S6 in the IEF specified in step S4 or S5 (step S7). Next, the IC chip 1 determines whether or not there is a key pair that has not yet been generated (step S8). If it is determined that there is a key pair that has not yet been generated (step S8: YES), the process returns to step S6, and a key pair that has not yet been generated is generated. On the other hand, if it is determined that there is no key pair that has not yet been generated (step S8: NO), the process proceeds to step S9. In step S9, the IC chip 1 transmits a response APDU including the public key in the key pair stored in step S7 and status words SW1 and SW2 indicating normal termination to the external device 2, and terminates the process shown in FIG. 4.

以上説明したように、上記実施形態によれば、ICチップ1は、受信された非対称鍵ペア生成コマンドにIEFが指定されているか否かを判定し、IEFが指定されていないと判定した場合、NVM13に記憶されている複数のIEFのうちから、特定の用途を示す情報が対応付けられたIEFを特定し、非対称鍵ペア生成コマンドに応じて特定の用途に使用される鍵ペアを生成し、生成された鍵ペアを、特定されたIEFに格納するように構成したので、非対称鍵ペア生成コマンドにIEFが指定されていない場合であっても、生成された鍵ペアを適切なIEFに格納することができる。さらに、上記実施形態によれば、カレントDFの配下にある、鍵生成が必要な複数のIEFに対して、一括して鍵生成を実行することができるので、非対称鍵ペア生成コマンド及びレスポンスのやり取りを1回で済ませることができ、鍵生成の効率化を図ることができる。 As described above, according to the above embodiment, the IC chip 1 determines whether an IEF is specified in the received asymmetric key pair generation command, and if it determines that an IEF is not specified, it identifies an IEF associated with information indicating a specific use from among the multiple IEFs stored in the NVM 13, generates a key pair to be used for a specific use in response to the asymmetric key pair generation command, and stores the generated key pair in the identified IEF. Therefore, even if an IEF is not specified in the asymmetric key pair generation command, the generated key pair can be stored in an appropriate IEF. Furthermore, according to the above embodiment, key generation can be performed collectively for multiple IEFs that require key generation under the current DF, so that the asymmetric key pair generation command and response can be exchanged only once, and key generation can be made more efficient.

なお、上記実施形態においては、鍵データとして鍵ペアを例にとり、当該鍵データを生成するためのコマンドとして非対称鍵ペア生成コマンドを例にとって説明したが、本発明はICチップ1と外部装置2との間で共有する共通鍵、及び共通鍵を生成するコマンドに対しても適用可能であり、この場合、特定の用途は例えば認証用とすればよい。 In the above embodiment, a key pair is used as an example of key data, and an asymmetric key pair generation command is used as an example of a command for generating the key data. However, the present invention can also be applied to a common key shared between the IC chip 1 and the external device 2, and a command for generating the common key. In this case, the specific use may be, for example, authentication.

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 (9)

鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体であって、
外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、
前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、
前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、
前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、
前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、
を備えることを特徴とする電子情報記憶媒体。
An electronic information storage medium having a memory for storing a plurality of key files for storing key data,
a receiving means for receiving, from an external device, a command for generating key data to be used for a specific purpose among a plurality of purposes;
a determination means for determining whether or not a key file is specified in the command received by the receiving means;
a specifying means for specifying, when the determining means determines that the key file is not specified, a key file associated with information indicating the specific use from among a plurality of the key files stored in the memory;
a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means;
a storage means for storing the key data generated by the generation means in a key file specified by the specification means;
An electronic information storage medium comprising:
前記メモリには、複数の前記鍵ファイルと、当該鍵ファイルのそれぞれに格納される鍵データの用途との対応関係を示す情報を格納するセキュリティ環境ファイルが記憶されており、
前記特定手段は、前記セキュリティ環境ファイルを参照して、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定することを特徴とする請求項1に記載の電子情報記憶媒体。
the memory stores a security environment file that stores information indicating a correspondence between a plurality of the key files and uses of key data stored in each of the key files;
2. The electronic information storage medium according to claim 1, wherein said specifying means specifies a key file associated with the information indicating the specific use by referring to the security environment file.
前記特定手段は、前記特定の用途を示す情報が対応付けられた鍵ファイルを複数特定し、
前記生成手段は、前記特定手段により特定された鍵ファイルごとに、前記特定の用途に使用される鍵データを生成し、
前記格納手段は、前記生成手段により生成された各鍵データを、前記特定手段により特定された鍵ファイルであって当該各鍵データのそれぞれに対応する鍵ファイルに格納することを特徴とする請求項1または2に記載の電子情報記憶媒体。
The identification means identifies a plurality of key files associated with information indicating the specific use,
the generating means generates key data to be used for the specific purpose for each key file identified by the identifying means;
3. The electronic information storage medium according to claim 1, wherein the storage means stores each key data generated by the generation means in a key file identified by the identification means and corresponding to each of the key data.
前記特定手段は、選択中のアプリケーションの専用ファイルの配下にある複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定することを特徴とする請求項1または2に記載の電子情報記憶媒体。 The electronic information storage medium according to claim 1 or 2, characterized in that the identification means identifies a key file associated with information indicating the specific use from among the multiple key files under the dedicated file of the selected application. 前記鍵データは、秘密鍵と公開鍵との鍵ペアであることを特徴とする請求項1または2に記載の電子情報記憶媒体。 The electronic information storage medium according to claim 1 or 2, characterized in that the key data is a key pair consisting of a private key and a public key. 鍵データを格納するための鍵ファイルを複数記憶するメモリを有するICチップであって、
外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、
前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、
前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、
前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、
前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、
を備えることを特徴とするICチップ。
An IC chip having a memory for storing a plurality of key files for storing key data,
a receiving means for receiving, from an external device, a command for generating key data to be used for a specific purpose among a plurality of purposes;
a determination means for determining whether or not a key file is specified in the command received by the receiving means;
a specifying means for specifying, when the determining means determines that the key file is not specified, a key file associated with information indicating the specific use from among a plurality of the key files stored in the memory;
a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means;
a storage means for storing the key data generated by the generation means in a key file specified by the specification means;
An IC chip comprising:
鍵データを格納するための鍵ファイルを複数記憶するメモリを有するICカードであって、
外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、
前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、
前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、
前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、
前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段と、
を備えることを特徴とするICカード。
An IC card having a memory for storing a plurality of key files for storing key data,
a receiving means for receiving, from an external device, a command for generating key data to be used for a specific purpose among a plurality of purposes;
a determination means for determining whether or not a key file is specified in the command received by the receiving means;
a specifying means for specifying, when the determining means determines that the key file is not specified, a key file associated with information indicating the specific use from among a plurality of the key files stored in the memory;
a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means;
a storage means for storing the key data generated by the generation means in a key file specified by the specification means;
An IC card comprising:
鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体により実行される鍵データ格納方法であって、
外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信するステップと、
前記受信されたコマンドに鍵ファイルが指定されているか否かを判定するステップと、
前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定するステップと、
前記受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成するステップと、
前記生成された鍵データを、前記特定された鍵ファイルに格納するステップと、
を含むことを特徴とする鍵データ格納方法。
1. A key data storage method executed by an electronic information storage medium having a memory that stores a plurality of key files for storing key data, comprising:
receiving a command from an external device to generate key data to be used for a specific purpose among a plurality of purposes;
determining whether a key file is specified in the received command;
when it is determined that the key file is not specified, identifying a key file associated with information indicating the specific use from among a plurality of key files stored in the memory;
generating key data for the particular application in response to the received command;
storing the generated key data in the identified key file;
13. A method for storing key data, comprising:
鍵データを格納するための鍵ファイルを複数記憶するメモリを有する電子情報記憶媒体に含まれるコンピュータを、
外部装置から、複数の用途のうち特定の用途に使用される鍵データを生成するためのコマンドを受信する受信手段と、
前記受信手段により受信されたコマンドに鍵ファイルが指定されているか否かを判定する判定手段と、
前記判定手段により前記鍵ファイルが指定されていないと判定された場合、前記メモリに記憶されている複数の前記鍵ファイルのうちから、前記特定の用途を示す情報が対応付けられた鍵ファイルを特定する特定手段と、
前記受信手段により受信されたコマンドに応じて、前記特定の用途に使用される鍵データを生成する生成手段と、
前記生成手段により生成された鍵データを、前記特定手段により特定された鍵ファイルに格納する格納手段として機能させることを特徴とするプログラム。
A computer included in an electronic information storage medium having a memory for storing a plurality of key files for storing key data,
a receiving means for receiving, from an external device, a command for generating key data to be used for a specific purpose among a plurality of purposes;
a determination means for determining whether or not a key file is specified in the command received by the receiving means;
a specifying means for specifying, when the determining means determines that the key file is not specified, a key file associated with information indicating the specific use from among a plurality of the key files stored in the memory;
a generating means for generating key data to be used for the specific purpose in response to the command received by the receiving means;
a program that functions as a storage unit that stores the key data generated by the generation unit in a key file specified by the specification unit.
JP2023195269A 2023-11-16 2023-11-16 ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM Active JP7487837B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023195269A JP7487837B1 (en) 2023-11-16 2023-11-16 ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023195269A JP7487837B1 (en) 2023-11-16 2023-11-16 ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP7487837B1 true JP7487837B1 (en) 2024-05-21
JP2025082050A JP2025082050A (en) 2025-05-28

Family

ID=91082689

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023195269A Active JP7487837B1 (en) 2023-11-16 2023-11-16 ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7487837B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008219787A (en) 2007-03-07 2008-09-18 Toshiba Corp Key management system, key management program, and IC card
JP2012530993A (en) 2009-06-24 2012-12-06 ゲマルト ソシエテ アノニム Equipment with time-limited auto-start application
CN110996322A (en) 2019-11-28 2020-04-10 楚天龙股份有限公司 A method for realizing terminal secondary authentication
JP2021100227A (en) 2019-12-24 2021-07-01 大日本印刷株式会社 IoT KEY MANAGEMENT SYSTEM, SECURE DEVICE, IoT DEVICE, DEVICE MANAGEMENT APPARATUS, AND METHOD FOR CREATING PUBLIC KEY CERTIFICATE OF SECURE ELEMENT

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008219787A (en) 2007-03-07 2008-09-18 Toshiba Corp Key management system, key management program, and IC card
JP2012530993A (en) 2009-06-24 2012-12-06 ゲマルト ソシエテ アノニム Equipment with time-limited auto-start application
CN110996322A (en) 2019-11-28 2020-04-10 楚天龙股份有限公司 A method for realizing terminal secondary authentication
JP2021100227A (en) 2019-12-24 2021-07-01 大日本印刷株式会社 IoT KEY MANAGEMENT SYSTEM, SECURE DEVICE, IoT DEVICE, DEVICE MANAGEMENT APPARATUS, AND METHOD FOR CREATING PUBLIC KEY CERTIFICATE OF SECURE ELEMENT

Also Published As

Publication number Publication date
JP2025082050A (en) 2025-05-28

Similar Documents

Publication Publication Date Title
US8297520B1 (en) Secure application directory
CN107820238B (en) SIM card, blockchain application security module, client and security operation method thereof
JP4834748B2 (en) Information storage medium, medium authentication device, medium authentication system, and IC card
WO2009064634A2 (en) System and method for updating read-only memory in smart card memory modules
US20090184799A1 (en) Information storage medium and information storage medium processing apparatus
JP7487837B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM
JP6800732B2 (en) Processing system and terminal
JP7400868B2 (en) Electronic information storage medium, online transaction approval request method, and program
JP7444197B2 (en) Electronic information storage medium, cryptographic operation method selection method, and program
US11151338B2 (en) Securing a transaction by means of a smart card and smart card
JP2004259176A (en) IC card
JP7452750B1 (en) Electronic information storage medium, IC chip, IC card, public key verification method, and program
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
JP7468757B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RESPONSE TRANSMISSION METHOD, AND PROGRAM
JP2005258968A (en) Validity verification method of data written in IC card and program for IC card
JP4899499B2 (en) IC card issuing method, IC card issuing system, and IC card
JP7452577B2 (en) Electronic information storage medium, profile change method, and program
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JPH09179949A (en) Portable information recording medium and its reader / writer device
JPH03224047A (en) Portable electronic device
JP7533142B2 (en) Electronic information storage medium, initialization sequence execution method, and program
JP4638135B2 (en) Information storage medium
JP2025089789A (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, PUBLIC KEY STORAGE METHOD, AND PROGRAM
US10984408B2 (en) Method for controlling dependency rules of objects updated in a microcircuit, and corresponding device
JP2025042528A (en) Electronic information storage medium, IC chip, IC card, method for setting expiration date of key data, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240105

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20240105

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240422

R150 Certificate of patent or registration of utility model

Ref document number: 7487837

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150