JP6950164B2 - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP6950164B2
JP6950164B2 JP2016205138A JP2016205138A JP6950164B2 JP 6950164 B2 JP6950164 B2 JP 6950164B2 JP 2016205138 A JP2016205138 A JP 2016205138A JP 2016205138 A JP2016205138 A JP 2016205138A JP 6950164 B2 JP6950164 B2 JP 6950164B2
Authority
JP
Japan
Prior art keywords
key
function
command
information
program
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
JP2016205138A
Other languages
Japanese (ja)
Other versions
JP2018067795A (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 JP2016205138A priority Critical patent/JP6950164B2/en
Publication of JP2018067795A publication Critical patent/JP2018067795A/en
Application granted granted Critical
Publication of JP6950164B2 publication Critical patent/JP6950164B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理装置に関し、特に、外部装置との間に暗号通信路を開設して暗号通信を行う機能や、暗号鍵を利用したその他の処理を行う機能を備えた情報処理装置に関する。 The present invention relates to an information processing device, and more particularly to an information processing device having a function of establishing an encrypted communication path with an external device to perform encrypted communication and a function of performing other processing using an encryption key.

情報処理装置が外部装置との間で情報のやりとりを行う場合、通信の安全性を確保するために、両者間にセキュアな暗号通信路を開設し、この暗号通信路を介して暗号通信を行うことが欠かせない。特に、スマートフォンやICカードなどの携帯型の情報処理装置では、紛失によって悪意をもった者の手に渡る可能性があるため、十分なセキュリティ対策を講じておく必要がある。 When an information processing device exchanges information with an external device, a secure encrypted communication path is established between the two to ensure the security of communication, and encrypted communication is performed via this encrypted communication path. Is indispensable. In particular, portable information processing devices such as smartphones and IC cards may fall into the hands of malicious persons due to loss, so it is necessary to take sufficient security measures.

最近は、スマートフォンをはじめとする携帯型端末装置が普及しており、これらの端末装置には、通常、SIMカードやUIMカードと呼ばれているICカードが装着されている。そしてこのICカードと端末装置、あるいは、このICカードと外部のサーバ装置との間で、所定の通信路を介して情報のやりとりが行われる。このとき、当該情報が機密性を有するものである場合には、セキュアな通信路を開設して暗号化された情報のやりとりを行う必要がある。 Recently, portable terminal devices such as smartphones have become widespread, and these terminal devices are usually equipped with IC cards called SIM cards and UIM cards. Then, information is exchanged between the IC card and the terminal device, or between the IC card and the external server device via a predetermined communication path. At this time, if the information is confidential, it is necessary to open a secure communication path and exchange encrypted information.

このような事情から、ICカードと外部装置との間にセキュアな通信路を開設して暗号通信を行う様々な方法が提案されている。たとえば、下記の特許文献1には、所定の変換アルゴリズムに基づくデータ変換処理機能を有するプロキシ装置を介した通信を行うことにより、機密情報の漏洩を防止する技術が開示されている。また、特許文献2には、インターネットを介してICカードとサーバ装置との間で情報のやりとりを行う際に、公開鍵暗号方式を利用した暗号化通信を行う技術が開示されており、特許文献3には、そのような暗号化通信の最中に、セキュリティに関わる異常発生が検知された場合に、速やかにシステム復旧処理を行う技術が開示されている。 Under these circumstances, various methods have been proposed for performing encrypted communication by establishing a secure communication path between the IC card and an external device. For example, Patent Document 1 below discloses a technique for preventing leakage of confidential information by performing communication via a proxy device having a data conversion processing function based on a predetermined conversion algorithm. Further, Patent Document 2 discloses a technique for performing encrypted communication using a public key cryptosystem when exchanging information between an IC card and a server device via the Internet. No. 3 discloses a technique for promptly performing a system recovery process when an abnormality related to security is detected during such encrypted communication.

一方、特許文献4には、サーバ装置側に、ICカードと1対1に対応するICカード対応領域を設け、このICカード対応領域と利用者端末装置との間にセキュアな通信路を設定してサーバ装置とICカードとを一体化する技術が開示されている。 On the other hand, in Patent Document 4, an IC card compatible area having a one-to-one correspondence with an IC card is provided on the server device side, and a secure communication path is set between the IC card compatible area and the user terminal device. A technique for integrating a server device and an IC card is disclosed.

特開2002−055961号公報JP-A-2002-055961 特開2002−217895号公報Japanese Unexamined Patent Publication No. 2002-217895 特開2006−190222号公報Japanese Unexamined Patent Publication No. 2006-190222 特開2010−073188号公報Japanese Unexamined Patent Publication No. 2010-073188

情報処理装置と外部装置との間にセキュアな暗号通信路を開設するためには、両方の装置に、共通の暗号化プロトコルに基づいた暗号通信処理機能をもたせる必要がある。すなわち、送信側では所定の暗号鍵および所定の暗号化プロトコルを用いて、送信対象となる情報を暗号化して送り出し、受信側では、受信した暗号化情報を、送信側と同じ暗号鍵および暗号化プロトコルを用いて復号することになる。このため、情報処理装置および外部装置には、予め、特定の暗号鍵および暗号化プロトコルを用いた暗号通信処理機能が組み込まれることになる。 In order to establish a secure cryptographic communication path between the information processing device and the external device, both devices need to have a cryptographic communication processing function based on a common cryptographic protocol. That is, the transmitting side encrypts and sends out the information to be transmitted by using a predetermined encryption key and a predetermined encryption protocol, and the receiving side uses the same encryption key and encryption as the transmitting side to transmit the received encrypted information. It will be decrypted using the protocol. Therefore, the information processing device and the external device are preliminarily incorporated with a cryptographic communication processing function using a specific encryption key and encryption protocol.

しかしながら、近年、情報処理装置の通信相手は多様化してきており、1つのICカードが、種々の状況に応じて、複数の相手と通信するケースも少なくない。たとえば、スマートフォンに装着されたICカード(SIMカードやUIMカード)の場合、外部装置としてのスマートフォンには複数のアプリケーションプログラムが組み込まれているため、これら複数のアプリケーションプログラムとの間で情報のやりとりを行う必要が生じる。この場合、ハードウェア上は、ICカードとスマートフォンとの間の二者通信ということになるが、ソフトウェア上は、ICカード側のプログラムとスマートフォン側の個々のアプリケーションプログラムとの間の個別の通信が行われることになる。 However, in recent years, the communication partners of information processing devices have been diversified, and there are many cases where one IC card communicates with a plurality of partners depending on various situations. For example, in the case of an IC card (SIM card or UIM card) mounted on a smartphone, since multiple application programs are embedded in the smartphone as an external device, information can be exchanged between these multiple application programs. Need to do. In this case, in terms of hardware, it means two-way communication between the IC card and the smartphone, but in terms of software, there is individual communication between the program on the IC card side and the individual application programs on the smartphone side. It will be done.

また、最近は、より安全性の高い暗号化プロトコルが推奨されるようになってきており、実際に利用されている暗号化プロトコルの種類も多岐にわたっている。したがって、実用上は、1つのICカードに、予め、複数通りの暗号化プロトコルに基づく暗号通信機能をもたせておき、当該ICカードと通信を行う外部装置の都合に応じて(たとえば、スマートフォン内のアプリケーションプログラムの都合に応じて)、その都度、任意の暗号化プロトコルを選択して暗号通信を行うことができるようにするのが好ましい。そのためには、ICカード内に予め複数通りの暗号鍵を格納しておき、特定の暗号化プロトコルが選択されたときに、当該プロトコルに必要な暗号鍵を適宜読み出して利用する運用が必要になる。 Recently, more secure cryptographic protocols have been recommended, and there are a wide variety of cryptographic protocols actually used. Therefore, in practice, one IC card is provided with a cryptographic communication function based on a plurality of cryptographic protocols in advance, and depending on the convenience of an external device that communicates with the IC card (for example, in a smartphone). It is preferable to be able to perform encrypted communication by selecting an arbitrary encryption protocol each time (depending on the convenience of the application program). For that purpose, it is necessary to store a plurality of types of encryption keys in the IC card in advance, and when a specific encryption protocol is selected, it is necessary to appropriately read and use the encryption key required for the protocol. ..

しかも、暗号鍵は、暗号通信路の開設に利用されるだけでなく、データの改竄をチェックする検証処理、トークンを用いた検証処理、暗号化されたプログラムの復号処理など、様々な処理にも利用される。したがって、実際には、暗号鍵を利用する様々な処理機能を有するアプリケーションプログラムが組み込まれたICカードでは、これらの各処理機能のそれぞれに用いる多数の暗号鍵を格納しておく必要がある。そのため、一般的なICカードには、複数の暗号鍵を収容可能な鍵テーブルが設けられており、この鍵テーブルの個々の格納場所に必要な暗号鍵を格納する運用が採られている。 Moreover, the encryption key is not only used for opening an encrypted communication channel, but also for various processes such as verification processing for checking data tampering, verification processing using tokens, and decryption processing for encrypted programs. It will be used. Therefore, in reality, an IC card in which an application program having various processing functions using an encryption key is incorporated needs to store a large number of encryption keys used for each of these processing functions. Therefore, a general IC card is provided with a key table capable of accommodating a plurality of encryption keys, and an operation of storing necessary encryption keys in individual storage locations of the key table is adopted.

ただ、スマートフォンやICカードなどの携帯型の小型情報処理装置では、内蔵するメモリの記憶容量に制限があるため、複数の暗号鍵を収容する際にも、できるだけ無駄を省き、必要最小限の暗号鍵のみが格納された状態を保つことが重要である。別言すれば、そもそも利用されることのない無駄な暗号鍵が格納されていたり、アプリケーションプログラムの機能変更により、もはや不要になった暗号鍵がそのまま格納され続けたりする事態はできるだけ避けるのが好ましい。また、不要な暗号鍵が格納されていると、万一、外部に漏洩した場合に、セキュリティ上の問題がそれだけ増すことになる。すなわち、その情報処理装置にとっては不要な暗号鍵であったとしても、外部に漏洩した場合、外部装置を含めたシステム全体のセキュリティを脅かす要因になる。 However, in portable small information processing devices such as smartphones and IC cards, the storage capacity of the built-in memory is limited, so even when accommodating multiple encryption keys, waste is reduced as much as possible and the minimum required encryption is used. It is important to keep only the key stored. In other words, it is preferable to avoid the situation where useless encryption keys that are not used in the first place are stored, or the encryption keys that are no longer needed are stored as they are due to the function change of the application program. .. In addition, if an unnecessary encryption key is stored, security problems will increase if it is leaked to the outside. That is, even if the encryption key is unnecessary for the information processing device, if it is leaked to the outside, it becomes a factor that threatens the security of the entire system including the external device.

そこで本発明は、暗号鍵を利用する様々な処理機能を有する情報処理装置において、必要最小限の暗号鍵のみが格納された状態を維持し、暗号鍵の格納場所の記憶容量を節約するとともに、セキュリティ上の問題を低減させることを目的とする。 Therefore, the present invention maintains a state in which only the minimum necessary encryption key is stored in an information processing device having various processing functions using the encryption key, saves the storage capacity of the storage location of the encryption key, and at the same time, The purpose is to reduce security issues.

(1) 本発明の第1の態様は、暗号鍵を利用した様々な処理機能を有する情報処理装置において、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
情報格納部に格納されているプログラムを実行するプログラム実行部と、
を設け、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、プログラムロード処理によってロードされたパッケージを情報格納部に展開して、アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を情報格納部に格納する鍵書込処理と、
を実行する機能をもたせ、
インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
鍵書込処理を実行する際には、その前に、当該鍵書込処理によって格納される暗号鍵を利用する処理機能が実行可能な機能であるか否かを判定し、実行可能な機能であった場合には、鍵書込処理を実行し、実行可能な機能でなかった場合には、鍵書込処理を拒絶するようにしたものである。
(1) The first aspect of the present invention is in an information processing apparatus having various processing functions using an encryption key.
An information storage unit that stores the program and the data used by the program,
A program execution unit that executes the program stored in the information storage unit, and
Provided
A program load process that loads an application program package that has multiple processing functions that use an encryption key and stores it in the information storage unit according to the load command given by the external device.
According to the installation command given from the external device, the package loaded by the program load process is expanded to the information storage unit, and the application program is installed.
A key writing process that stores the encryption key used by the installed application program in the information storage unit according to the key writing command given by the external device.
Have the function to execute
When executing the installation process, the specified function specified by the function specification information included in the installation command can be executed among the multiple processing functions that use the encryption key for the installed application program. West,
Before executing the key writing process, it is determined whether or not the processing function using the encryption key stored by the key writing process is an executable function, and the executable function is used. If there is, the key writing process is executed, and if it is not an executable function, the key writing process is rejected.

(2) 本発明の第2の態様は、上述した第1の態様に係る情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を特定する情報を含む実行可能リストを作成し、これを情報格納部に格納し、鍵書込処理を実行する前に、実行可能リストを参照することにより、判定対象となる処理機能が実行可能な機能であるか否かを判断するようにしたものである。
(2) A second aspect of the present invention is the information processing apparatus according to the first aspect described above.
When executing the installation process for a specific application program, an executable list containing information that identifies the functions that the application program can execute is created, stored in the information storage unit, and the key writing process is executed. By referring to the executable list, it is determined whether or not the processing function to be determined is an executable function.

(3) 本発明の第3の態様は、上述した第1または第2の態様に係る情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムのために、情報格納部の論理的な鍵空間上に暗号鍵を格納するための鍵テーブルを構築し、
鍵書込処理を実行する際に、論理空間上に構築された鍵テーブルの所定箇所に対応するメモリ上の実空間上に、暗号鍵のデータを書き込むようにしたものである。
(3) A third aspect of the present invention is the information processing device according to the first or second aspect described above.
When executing the installation process for a specific application program, a key table for storing the encryption key is constructed in the logical key space of the information storage unit for the application program.
When the key writing process is executed, the encryption key data is written in the real space on the memory corresponding to the predetermined location of the key table constructed in the logical space.

(4) 本発明の第4の態様は、上述した第3の態様に係る情報処理装置において、
暗号鍵を利用する特定の処理機能と暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報を情報格納部に格納しておき、
鍵書込コマンドが与えられたときに、上記対応情報を参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所に対応づけられている特定の処理機能を判定対象と認識し、当該判定対象が実行可能な機能であった場合には、鍵書込コマンドを実行し、実行可能な機能でなかった場合には、鍵書込コマンドを拒絶するようにしたものである。
(4) A fourth aspect of the present invention is the information processing device according to the third aspect described above.
Correspondence information that associates a specific processing function that uses the encryption key with the storage location on the key table for storing the encryption key is stored in the information storage unit.
When the key write command is given, by referring to the above correspondence information, it is associated with the storage location specified by the write location specification information included in the given key write command. A specific processing function is recognized as a judgment target, and if the judgment target is an executable function, a key write command is executed, and if it is not an executable function, a key write command is executed. I tried to reject it.

(5) 本発明の第5の態様は、上述した第4の態様に係る情報処理装置において、
鍵テーブルが、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなり、
鍵書込コマンドが与えられたときに、当該鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号に基づいて、暗号鍵の格納場所を特定するようにしたものである。
(5) A fifth aspect of the present invention is the information processing device according to the fourth aspect described above.
The key table consists of a collection of two-dimensional matrix-like cells that can identify one cell by the combination of the key version number and the key ID.
When a key write command is given, the storage location of the encryption key is specified based on the key version number included in the key write command as the write location designation information.

(6) 本発明の第6の態様は、上述した第1の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、機能テーブルを参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルに含まれているか否かを判定し、含まれていた場合には、鍵書込コマンドを実行し、含まれていなかった場合には、鍵書込コマンドを拒絶するようにしたものである。
(6) A sixth aspect of the present invention is the information processing apparatus according to the first aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, the functions that can be executed by the application program and the storage location of the encryption key used for the function correspond to each other. Create a function table to be attached, store it in the information storage unit,
By referring to the function table when the key write command is given, the storage location specified by the write location specification information included in the given key write command is included in the function table. If it is included, the key write command is executed, and if it is not included, the key write command is rejected.

(7) 本発明の第7の態様は、上述した第1の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を列挙した機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、当該鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルに列挙されている実行可能な機能に対して格納場所一覧テーブルにおいて対応づけられている格納場所であるか否かを判定し、肯定的な判定結果が得られた場合には、鍵書込コマンドを実行し、否定的な判定結果が得られた場合には、鍵書込コマンドを拒絶するようにしたものである。
(7) A seventh aspect of the present invention is the information processing device according to the first aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
When executing the installation process for a specific application program, create a function table that lists the functions that can be executed by the application program, store this in the information storage unit, and store it.
When a key write command is given, the storage location specified by the write location specification information included in the key write command is stored for the executable functions listed in the function table. It is judged whether or not it is the storage location associated with the place list table, and if a positive judgment result is obtained, the key writing command is executed and a negative judgment result is obtained. In some cases, the key write command is rejected.

(8) 本発明の第8の態様は、上述した第1の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、機能テーブルを参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルに含まれているか否かを判定し、含まれていた場合には、鍵書込コマンドを実行し、含まれていなかった場合には、鍵書込コマンドを拒絶するようにしたものである。
(8) An eighth aspect of the present invention is the information processing apparatus according to the first aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, a function table that lists the storage locations of the encryption keys used for the functions that can be executed by the application program is created. Store this in the information storage unit,
By referring to the function table when the key write command is given, the storage location specified by the write location specification information included in the given key write command is included in the function table. If it is included, the key write command is executed, and if it is not included, the key write command is rejected.

(9) 本発明の第9の態様は、暗号鍵を利用した様々な処理機能を有する情報処理装置において、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
情報格納部に格納されているプログラムを実行するプログラム実行部と、
を設け、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、プログラムロード処理によってロードされたパッケージを情報格納部に展開して、アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を情報格納部に格納する鍵書込処理と、
外部装置から与えられる実行可能機能変更処理コマンドに応じて、既にインストール済みのアプリケーションプログラムが実行可能な処理機能を変更する実行可能機能変更処理と、
を実行する機能をもたせ、
インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
実行可能機能変更処理を実行したときに、当該変更処理によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を、情報格納部から削除する鍵削除処理を併せて実行するようにしたものである。
(9) A ninth aspect of the present invention is an information processing apparatus having various processing functions using an encryption key.
An information storage unit that stores the program and the data used by the program,
A program execution unit that executes the program stored in the information storage unit, and
Provided
A program load process that loads an application program package that has multiple processing functions that use an encryption key and stores it in the information storage unit according to the load command given by the external device.
According to the installation command given from the external device, the package loaded by the program load process is expanded to the information storage unit, and the application program is installed.
A key writing process that stores the encryption key used by the installed application program in the information storage unit according to the key writing command given by the external device.
Executable function change processing that changes the processing functions that can be executed by the already installed application program according to the executable function change processing command given from the external device, and
Have the function to execute
When executing the installation process, the specified function specified by the function specification information included in the installation command can be executed among the multiple processing functions that use the encryption key for the installed application program. West,
When the executable function change process is executed, if there is a process function that has been changed from executable to non-executable by the change process, the encryption key used for the process function that has been changed to non-executable is provided. The key deletion process to be deleted from the storage unit is also executed.

(10) 本発明の第10の態様は、上述した第9の態様に係る情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を特定する情報を含む実行可能リストを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、実行可能リストに対する書き換えを行い、実行可能リストから削除されることになった処理機能に利用される暗号鍵を、情報格納部から削除する鍵削除処理を実行するようにしたものである。
(10) A tenth aspect of the present invention is the information processing apparatus according to the ninth aspect described above.
When executing the installation process for a specific application program, an executable list containing information that identifies the functions that the application program can execute is created, and this is stored in the information storage unit.
When executing the executable function change process, the executable list is rewritten and the encryption key used for the processing function that is to be deleted from the executable list is deleted from the information storage unit. Is to be executed.

(11) 本発明の第11の態様は、上述した第9または第10の態様に係る情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムのために、情報格納部の論理的な鍵空間上に暗号鍵を格納するための鍵テーブルを構築し、
鍵書込処理を実行する際に、論理空間上に構築された鍵テーブルの所定箇所に対応するメモリ上の実空間上に暗号鍵のデータを書き込み、
鍵削除処理を実行する際に、実空間上に書き込まれていた暗号鍵のデータを削除し、メモリ上の実空間を開放する処理を行うようにしたものである。
(11) The eleventh aspect of the present invention is the information processing apparatus according to the ninth or tenth aspect described above.
When executing the installation process for a specific application program, a key table for storing the encryption key is constructed in the logical key space of the information storage unit for the application program.
When executing the key writing process, the encryption key data is written in the real space on the memory corresponding to the predetermined location of the key table constructed in the logical space.
When the key deletion process is executed, the encryption key data written in the real space is deleted and the real space in the memory is released.

(12) 本発明の第12の態様は、上述した第11の態様に係る情報処理装置において、
暗号鍵を利用する特定の処理機能と暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報を情報格納部に格納しておき、
実行可能機能変更処理を実行する際には、上記対応情報を参照して、実行可能から実行不能に変更された処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにしたものである。
(12) A twelfth aspect of the present invention is the information processing device according to the eleventh aspect described above.
Correspondence information that associates a specific processing function that uses the encryption key with the storage location on the key table for storing the encryption key is stored in the information storage unit.
When executing the executable function change process, refer to the above correspondence information to identify the storage location associated with the process function changed from executable to non-executable, and store it in the specified storage location. The key deletion process that deletes the encrypted key that has been used is executed.

(13) 本発明の第13の態様は、上述した第12の態様に係る情報処理装置において、
鍵テーブルが、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなり、
キーバージョン番号に基づいて、書込対象もしくは削除対象となる暗号鍵の格納場所を特定するようにしたものである。
(13) A thirteenth aspect of the present invention is the information processing apparatus according to the twelfth aspect described above.
The key table consists of a collection of two-dimensional matrix-like cells that can identify one cell by the combination of the key version number and the key ID.
Based on the key version number, the storage location of the encryption key to be written or deleted is specified.

(14) 本発明の第14の態様は、上述した第9の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、機能テーブルに対する書き換えを行い、機能テーブルから削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにしたものである。
(14) A fourteenth aspect of the present invention is the information processing apparatus according to the ninth aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, the functions that can be executed by the application program and the storage location of the encryption key used for the function correspond to each other. Create a function table to be attached, store it in the information storage unit,
When executing the executable function change process, the function table is rewritten, the storage location associated with the processing function to be deleted from the function table is specified, and the storage location is stored in the specified storage location. The key deletion process that deletes the encrypted key that has been used is executed.

(15) 本発明の第15の態様は、上述した第9の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を列挙した機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、機能テーブルに対する書き換えを行い、格納場所一覧テーブルを参照することにより、機能テーブルから削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにしたものである。
(15) A fifteenth aspect of the present invention is the information processing apparatus according to the ninth aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
When executing the installation process for a specific application program, create a function table that lists the functions that can be executed by the application program, store this in the information storage unit, and store it.
When executing the executable function change process, the function table is rewritten and the storage location associated with the processing function to be deleted from the function table is determined by referring to the storage location list table. The key deletion process is executed to specify and delete the encryption key stored in the specified storage location.

(16) 本発明の第16の態様は、上述した第9の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、格納場所一覧テーブルを参照することにより機能テーブルに対する書き換えを行い、機能テーブルから削除されることになった格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにしたものである。
(16) A sixth aspect of the present invention is the information processing apparatus according to the ninth aspect described above.
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, a function table that lists the storage locations of the encryption keys used for the functions that can be executed by the application program is created. Store this in the information storage unit,
When executing the executable function change process, the function table is rewritten by referring to the storage location list table, the storage location to be deleted from the function table is specified, and the specified storage location is used. The key deletion process for deleting the stored encryption key is executed.

(17) 本発明の第17の態様は、上述した第1〜第16の態様に係る情報処理装置において、
外部装置との間に所定の暗号化プロトコルを用いて暗号通信路を開設する処理機能を有するアプリケーションプログラムをインストールする機能をもたせ、鍵書込処理において、暗号通信路の開設に利用する暗号鍵の書き込みを行うようにしたものである。
(17) A seventeenth aspect of the present invention is the information processing apparatus according to the first to sixteenth aspects described above.
A function to install an application program that has a processing function to open an encrypted communication path using a predetermined encryption protocol with an external device, and in the key writing process, the encryption key used to open the encrypted communication path It is intended to be written.

(18) 本発明の第18の態様は、上述した第1〜第16の態様に係る情報処理装置において、
情報格納部には、アプリケーションプログラムとして、少なくとも1つの管理プログラムを格納するようにし、
当該管理プログラムには、新たなアプリケーションプログラムを自己の管理下におくために、当該新たなアプリケーションプログラムについてのプログラムロード処理と、インストール処理と、鍵書込処理と、を実行する機能をもたせるようにしたものである。
(18) An eighteenth aspect of the present invention is the information processing apparatus according to the first to sixteenth aspects described above.
At least one management program is stored in the information storage unit as an application program.
The management program should have a function to execute program load processing, installation processing, and key writing processing for the new application program in order to keep the new application program under its own control. It was done.

(19) 本発明の第19の態様は、上述した第18の態様に係る情報処理装置において、
新たなアプリケーションプログラムについてのプログラムロード処理およびインストール処理が完了した後に、外部装置から鍵書込コマンドが与えられたとき、当該鍵書込コマンドに応じた鍵書込処理を当該新たなアプリケーションプログラムが実行するようにしたものである。
(19) A nineteenth aspect of the present invention is the information processing apparatus according to the eighteenth aspect described above.
When a key write command is given from an external device after the program load process and installation process for the new application program are completed, the new application program executes the key write process according to the key write command. It is something that I tried to do.

(20) 本発明の第20の態様は、上述した第18または第19の態様に係る情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随する特権パラメータ「privilege」を機能指定情報と解釈して、指定機能のみが実行可能となるようなインストール処理を実行するようにしたものである。
(20) A twentieth aspect of the present invention is the information processing apparatus according to the eighteenth or nineteenth aspect described above.
The management program interprets the privilege parameter "privilege" attached to the installation command specified in the GlobalPlatform (registered trademark) specification as function specification information, and executes the installation process so that only the specified function can be executed. It is the one that was made.

(21) 本発明の第21の態様は、上述した第18または第19の態様に係る情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随するSCP種別パラメータを機能指定情報と解釈して、指定されたSCP種別で示される暗号化プロトコルに応じた暗号通信路開設処理が実行可能となるようなインストール処理を実行するようにしたものである。
(21) The 21st aspect of the present invention is the information processing apparatus according to the 18th or 19th aspect described above.
The management program interprets the SCP type parameter attached to the installation command specified in the Global Platform (registered trademark) specification as function specification information, and opens an encrypted communication path according to the encryption protocol indicated by the specified SCP type. The installation process is executed so that the process can be executed.

(22) 本発明の第22の態様は、上述した第1〜第21の態様に係る情報処理装置としてコンピュータを機能させるプログラムを単独で提供できるようにしたものである。 (22) A 22nd aspect of the present invention makes it possible to independently provide a program for operating a computer as an information processing device according to the 1st to 21st aspects described above.

本発明の第1の実施形態によれば、新たな暗号鍵の書込みを行う前に、書込対象となる暗号鍵を利用する処理機能が実行可能な機能であるか否かが判定され、実行可能な機能であった場合にのみ実際の書込みが行われる。このため、そもそも利用されることのない無駄な暗号鍵が書き込まれる事態を避けることができる。したがって、暗号鍵を利用する様々な処理機能を有する情報処理装置において、必要最小限の暗号鍵のみが格納された状態を維持し、暗号鍵の格納場所の記憶容量を節約するとともに、セキュリティ上の問題を低減させることが可能になる。 According to the first embodiment of the present invention, before writing a new encryption key, it is determined whether or not the processing function using the encryption key to be written is an executable function, and the operation is executed. The actual writing is done only if it is a possible function. Therefore, it is possible to avoid a situation in which a useless encryption key that is not used in the first place is written. Therefore, in an information processing device having various processing functions using an encryption key, the state in which only the minimum necessary encryption key is stored is maintained, the storage capacity of the encryption key storage location is saved, and security is improved. It is possible to reduce the problem.

また、本発明の第2の実施形態によれば、これまでは実行可能な機能であったが、機能変更処理により実行不能に変更された処理機能が存在した場合に、当該実行不能に変更された処理機能に利用される暗号鍵を削除する鍵削除処理が実行される。このため、もはや不要になった暗号鍵がそのまま格納され続ける事態を避けることができる。したがって、暗号鍵を利用する様々な処理機能を有する情報処理装置において、必要最小限の暗号鍵のみが格納された状態を維持し、暗号鍵の格納場所の記憶容量を節約するとともに、セキュリティ上の問題を低減させることが可能になる。 Further, according to the second embodiment of the present invention, it has been a function that can be executed until now, but when there is a processing function that has been changed to be infeasible by the function change process, it is changed to the non-executable function. The key deletion process that deletes the encryption key used for the processing function is executed. Therefore, it is possible to avoid a situation in which the encryption key that is no longer needed is continuously stored as it is. Therefore, in an information processing device having various processing functions using an encryption key, the state in which only the minimum necessary encryption key is stored is maintained, the storage capacity of the encryption key storage location is saved, and security is improved. It is possible to reduce the problem.

一般的なスマートフォン10,SIMカード11,外部サーバ20の間の情報通信の態様を示すブロック図である。It is a block diagram which shows the mode of information communication between a general smartphone 10, a SIM card 11, and an external server 20. 図1に示すSIMカード11(情報処理装置)と、スマートフォン10または外部サーバ20(外部装置)と、の間で暗号通信を行うためのプログラム構成の一例を示すブロック図である。FIG. 5 is a block diagram showing an example of a program configuration for performing encrypted communication between the SIM card 11 (information processing device) shown in FIG. 1 and the smartphone 10 or the external server 20 (external device). 図2に示す鍵テーブルの具体例を示す図である。It is a figure which shows the specific example of the key table shown in FIG. 図3に示す鍵テーブルに格納されている暗号鍵Keyの一般的なデータ構造および当該暗号鍵を用いた暗号通信路開設コマンドのデータ構造の概要を示す図である。It is a figure which shows the outline of the general data structure of the encryption key Key stored in the key table shown in FIG. 3, and the data structure of the encryption communication path opening command using the encryption key. 図2に示すSIMカード11(情報処理装置)と、スマートフォン10(外部装置)と、の間でやりとりされる種々のコマンドおよびこれに対する応答の具体例を示すダイアグラムである。6 is a diagram showing specific examples of various commands exchanged between the SIM card 11 (information processing device) and the smartphone 10 (external device) shown in FIG. 2 and responses to the commands. 一般的な暗号通信路開設コマンドCMDのデータ構造およびそのバリエーションを示す図である。It is a figure which shows the data structure of the general encrypted communication channel opening command CMD and its variation. 各暗号化プロトコルに用いられるコマンド文字列情報と暗号アルゴリズムの種別情報との対応関係を示す表である。It is a table which shows the correspondence relationship between the command character string information used for each cryptographic protocol, and the type information of a cryptographic algorithm. SIMカード11(情報処理装置)内に構築されるアプリケーションプログラムの階層構造(図(a) )と管理プログラムSDの機能(図(b) )を示す図である。It is a figure which shows the hierarchical structure (FIG. (a)) of the application program built in SIM card 11 (information processing apparatus), and the function (FIG. (b)) of management program SD. 工場出荷時の情報処理装置(SIMカード11)と外部装置(スマートフォン10または外部サーバ20)との間の情報通信の態様の一例を示すブロック図である。It is a block diagram which shows an example of the mode of information communication between an information processing apparatus (SIM card 11) and an external apparatus (smartphone 10 or an external server 20) at the time of shipment from a factory. 利用開始時の情報処理装置(SIMカード11)と外部装置(スマートフォン10または外部サーバ20)との間の情報通信の態様の一例を示すブロック図である。It is a block diagram which shows an example of the mode of information communication between an information processing apparatus (SIM card 11) and an external apparatus (smartphone 10 or an external server 20) at the start of use. GlobalPlatform (登録商標)の仕様に準拠したICカードに与える具体的なコマンドの書式例を示す図である。It is a figure which shows the format example of the specific command given to the IC card which conforms to the specification of GlobalPlatform (registered trademark). 本発明に係る情報処理装置(SIMカード11)の基本構成と、外部装置(スマートフォン10または外部サーバ20)との間の情報通信の態様を示すブロック図である。It is a block diagram which shows the mode of information communication between the basic configuration of the information processing apparatus (SIM card 11) which concerns on this invention, and an external apparatus (smartphone 10 or an external server 20). 図11(c) に示すアプリケーションプログラムのインストールコマンドに付随するパラメータの内容を示す図である。It is a figure which shows the content of the parameter attached to the installation command of the application program shown in FIG. 11 (c). 図13に示す特権パラメータ(privilege)の具体的な内容を示す表である。It is a table which shows the specific contents of the privilege parameter (privilege) shown in FIG. 本発明に係る情報処理装置に利用される格納場所一覧テーブルの具体例を示す図である。It is a figure which shows the specific example of the storage place list table used for the information processing apparatus which concerns on this invention. 本発明に係る情報処理装置で用いられる機能テーブルの一例を示す図である。It is a figure which shows an example of the function table used in the information processing apparatus which concerns on this invention. 本発明に係る情報処理装置のデータ格納部に格納されるISD用データおよびSSD1用データの構成例を示す図である。It is a figure which shows the structural example of the ISD data and SSD1 data stored in the data storage part of the information processing apparatus which concerns on this invention. 本発明に係る情報処理装置で用いられる機能テーブルの変形例を示す図である。It is a figure which shows the modification of the function table used in the information processing apparatus which concerns on this invention. 本発明の第1の実施形態の処理手順を示す流れ図である。It is a flow chart which shows the processing procedure of 1st Embodiment of this invention. 本発明の第2の実施形態の処理手順を示す流れ図である。It is a flow chart which shows the processing procedure of the 2nd Embodiment of this invention.

以下、本発明を図示する実施形態に基づいて説明する。 Hereinafter, the present invention will be described based on the illustrated embodiment.

<<< §1. ICカードに対する従来の一般的な通信形態 >>>
本発明は、外部装置との間で暗号通信を行う機能を有する情報処理装置への利用に適した発明であり、特に、ICカードからなる情報処理装置への利用に適した技術に関する。そこで、ここでは、まず、ICカードに対する従来の一般的な通信形態を簡単に説明しておく。
<<< §1. Conventional general communication mode for IC cards >>>
The present invention is an invention suitable for use in an information processing device having a function of performing encrypted communication with an external device, and particularly relates to a technique suitable for use in an information processing device made of an IC card. Therefore, here, first, a conventional general communication form for an IC card will be briefly described.

図1は、一般的なスマートフォン10,SIMカード11,外部サーバ20の間の情報通信の態様を示すブロック図である。通常、スマートフォン10は、内部にSIMカード11を装着した状態で利用され、必要に応じて、外部サーバ20と所定の通信路(インターネットや電話回線)を介して交信することになる。ここで、SIMカード11(UIMカードとも呼ばれる)は、Java Card(商標)やGlobalPlatform (登録商標)など、事実上の標準となっている国際的な仕様に準拠したICカードであり、外部装置との交信は、当該外部装置から与えられるコマンドと、これに対する応答(レスポンス)という形式で行われる。 FIG. 1 is a block diagram showing an mode of information communication between a general smartphone 10, a SIM card 11, and an external server 20. Normally, the smartphone 10 is used with the SIM card 11 mounted inside, and if necessary, communicates with the external server 20 via a predetermined communication path (Internet or telephone line). Here, the SIM card 11 (also called a UIM card) is an IC card that conforms to international specifications that have become a de facto standard, such as Java Card (trademark) and Global Platform (registered trademark), and is used as an external device. Communication is performed in the form of a command given from the external device and a response to the command.

SIMカード11に着目すると、スマートフォン10も外部サーバ20も、いずれも外部装置ということになり、これら外部装置との間の交信は、所定の通信路を介して行われる。図1には、スマートフォン10と外部サーバ20との間の通信路しか示されていないが、実際には、SIMカード11とスマートフォン10との間やSIMカード11と外部サーバ20との間にも通信路が形成される。そして、SIMカード11に対して、これらの通信路を介してコマンドおよびレスポンスのやりとりが行われることになる。 Focusing on the SIM card 11, both the smartphone 10 and the external server 20 are external devices, and communication with these external devices is performed via a predetermined communication path. Although FIG. 1 shows only the communication path between the smartphone 10 and the external server 20, in reality, it is also between the SIM card 11 and the smartphone 10 and between the SIM card 11 and the external server 20. A communication path is formed. Then, commands and responses are exchanged with the SIM card 11 via these communication paths.

図2は、図1に示すSIMカード11と、スマートフォン10もしくは外部サーバ20と、の間で暗号通信を行うためのプログラム構成の一例を示すブロック図であり、情報処理装置100と外部装置200との間に通信路を開設して相互に交信を行う例が示されている。上述したとおり、本発明は、ICカードに適用するのに特に適した技術であるので、ここでは、情報処理装置100がスマートフォン10に装着されたSIMカード11であり、外部装置200が当該スマートフォン10(もしくは、外部サーバ20でもよい)である場合について、以下の説明を行うことにする。 FIG. 2 is a block diagram showing an example of a program configuration for performing encrypted communication between the SIM card 11 shown in FIG. 1 and the smartphone 10 or the external server 20, and the information processing device 100 and the external device 200 An example is shown in which a communication path is opened between the two to communicate with each other. As described above, since the present invention is a technique particularly suitable for application to an IC card, here, the information processing device 100 is a SIM card 11 mounted on the smartphone 10, and the external device 200 is the smartphone 10. (Alternatively, the external server 20 may be used), the following description will be given.

SIMカード11をはじめとするICカードには、通常、複数のアプリケーションプログラムが組み込まれる。図2の情報処理装置100(SIMカード11)には、2組の一般アプリケーションプログラムAP1,AP2が組み込まれた状態が示されている。また、ICカードには、通常、少なくとも1組の管理プログラムSD(Security Domain プログラム)が組み込まれている。この管理プログラムSDは、分類上はアプリケーションプログラムの一種であるが、OSプログラムと協働して、ICカード全体の動作や、管理下にある他のアプリケーションプログラムを管理する役割を果たす。そこで、本願では、情報処理装置100(SIMカード11)に組み込まれるアプリケーションプログラムのうち、Security Domain プログラムを「管理プログラム」と呼び、それ以外のアプリケーションプログラムを「一般アプリケーションプログラム(略称:一般アプリ)」と呼ぶことにする。 An IC card such as the SIM card 11 usually incorporates a plurality of application programs. The information processing device 100 (SIM card 11) of FIG. 2 shows a state in which two sets of general application programs AP1 and AP2 are incorporated. In addition, at least one set of management program SD (Security Domain program) is usually incorporated in the IC card. This management program SD is a kind of application program in terms of classification, but plays a role of managing the operation of the entire IC card and other application programs under control in cooperation with the OS program. Therefore, in the present application, among the application programs incorporated in the information processing device 100 (SIM card 11), the Security Domain program is referred to as a "management program", and the other application programs are referred to as "general application programs (abbreviation: general applications)". I will call it.

後に詳述するように、管理プログラムSDには、管理下となるアプリケーションプログラムについてのロード機能、インストール機能、削除機能、発行データの書込機能(たとえば、暗号鍵の書込機能)、暗号通信路開設機能などの諸機能が備わっている。図2に示す管理プログラムSDには、暗号通信路開設ルーチンR1および鍵テーブルT1が組み込まれているが、これは暗号通信路開設機能を実現するための要素である。ICカードからなる情報処理装置100の場合、通常、「SCP:Secure Channel Protocol」と呼ばれる所定の暗号化プロトコルに基づいて、外部装置200との間にセキュアな暗号通信路を開設して暗号通信が行われる。このような機能を実現するため、管理プログラムSD内には、暗号通信路開設ルーチンR1と鍵テーブルT1とが組み込まれている。 As will be described in detail later, the management program SD includes a load function, an installation function, a deletion function, an issue data writing function (for example, an encryption key writing function), and an encrypted communication path for the application program under management. It has various functions such as an opening function. The management program SD shown in FIG. 2 incorporates a cryptographic channel opening routine R1 and a key table T1, which are elements for realizing a cryptographic channel opening function. In the case of the information processing device 100 composed of an IC card, a secure cryptographic communication path is usually established with the external device 200 based on a predetermined cryptographic protocol called "SCP: Secure Channel Protocol" to perform cryptographic communication. Will be done. In order to realize such a function, the encrypted communication channel opening routine R1 and the key table T1 are incorporated in the management program SD.

一方、外部装置200側にも、これに応じた暗号通信を行う機能をもったアプリケーションプログラムAP3が用意されており、暗号通信路開設ルーチンR2と鍵テーブルT2とが組み込まれている。たとえば、外部装置200がスマートフォン10の場合、アプリケーションプログラムAP3は、このスマートフォン10にインストールされたアプリケーションプログラムの1つである。 On the other hand, on the external device 200 side, an application program AP3 having a function of performing encrypted communication corresponding to the application program AP3 is prepared, and the encrypted communication channel opening routine R2 and the key table T2 are incorporated. For example, when the external device 200 is a smartphone 10, the application program AP3 is one of the application programs installed on the smartphone 10.

情報処理装置100側の暗号通信路開設ルーチンR1と、外部装置200側の暗号通信路開設ルーチンR2は、両装置間にセキュアな暗号通信路を開設し、同一の暗号化プロトコルに基づいた暗号通信を行うためのルーチンであり、鍵テーブルT1と鍵テーブルT2には、同一の暗号鍵が収容されている。したがって、図示の例の場合、管理プログラムSDとアプリケーションプログラムAP3とによって、情報処理装置100と外部装置200との間に、同一の暗号鍵を用いた同一の暗号化プロトコルに基づく暗号通信を行うための暗号通信路が開設されることになる。 The cryptographic communication path opening routine R1 on the information processing device 100 side and the cryptographic communication path opening routine R2 on the external device 200 side open a secure cryptographic communication path between the two devices and perform cryptographic communication based on the same encryption protocol. The same encryption key is stored in the key table T1 and the key table T2. Therefore, in the case of the illustrated example, the management program SD and the application program AP3 perform encrypted communication between the information processing device 100 and the external device 200 based on the same encryption protocol using the same encryption key. Cryptographic communication path will be opened.

ICカードに対する暗号通信に利用される暗号化プロトコルとしては、SCP01,SCP02などのプロトコルが古くから利用されてきている。ただ、これらのプロトコルで用いられている「Triple-DES」という暗号アルゴリズムには危殆化の問題が指摘されており、近年は、AES(Advanced Encryption Standard)なる規格に基づく暗号アルゴリズムを利用したSCP03なるプロトコルも、GlobalPlatform (登録商標)に準拠した仕様として普及し始めている。また、3GPP/ETSIなどの標準化団体を中心に策定されたSCP80,SCP81などのプロトコルの利用も普及してきている。 Protocols such as SCP01 and CP02 have been used for a long time as encryption protocols used for encrypted communication with IC cards. However, the problem of compromise has been pointed out in the cryptographic algorithm "Triple-DES" used in these protocols, and in recent years, it has become SCP03 using a cryptographic algorithm based on the AES (Advanced Encryption Standard) standard. The protocol is also beginning to spread as a specification compliant with Global Platform (registered trademark). In addition, the use of protocols such as SCP80 and SCP81, which were established mainly by standardization bodies such as 3GPP / ETSI, has become widespread.

また、ICカードに組み込まれる管理プログラムSD用の鍵テーブルTとしては、図3に例示するような鍵空間を用いる仕様が一般化している。図示の鍵テーブルTは、縦方向にキーバージョン番号(key version number)、横方向にキーID(key ID)を定義した二次元マトリックスによって構成されており、キーバージョン番号については、0x01〜0x7Fの範囲内のアドレス空間が割り当てられ、キーIDについては、0x00〜0x7Fの範囲内のアドレス空間が割り当てられている(アドレス先頭の0xは、以下の数値が16進数であることを示す)。 Further, as the key table T for the management program SD incorporated in the IC card, the specification using the key space as illustrated in FIG. 3 is generalized. The illustrated key table T is composed of a two-dimensional matrix in which a key version number is defined in the vertical direction and a key ID is defined in the horizontal direction. The key version numbers are 0x01 to 0x7F. An address space within the range is assigned, and an address space within the range of 0x00 to 0x7F is assigned for the key ID (0x at the beginning of the address indicates that the following numerical values are hexadecimal numbers).

個々の暗号鍵は、この鍵テーブルTのいずれかのセルに格納されることになり、キーバージョン番号とキーIDとの組み合わせにより特定される。たとえば、キーバージョン番号「0x01」とキーID「0x01」との組み合わせにより、暗号鍵KeyAが特定されることになる。図には、個々の暗号鍵の格納例として、KeyA〜KeyRが特定のセルに格納された状態が示されている。もちろん、暗号鍵はすべてのセルに格納する必要はなく、必要な暗号鍵が所定のセルに格納されていれば足りる。 Each encryption key will be stored in any cell of the key table T, and is specified by a combination of a key version number and a key ID. For example, the encryption key KeyA is specified by the combination of the key version number "0x01" and the key ID "0x01". The figure shows a state in which KeyA to KeyR are stored in a specific cell as an example of storing individual encryption keys. Of course, the encryption key does not have to be stored in every cell, it is sufficient if the necessary encryption key is stored in a predetermined cell.

ある1つの暗号化プロトコルでは、ある1つのキーバージョン番号が指定され、当該キーバージョン番号をもったセルに格納されている1つもしくは複数の暗号鍵を利用した暗号化処理もしくは復号処理が実行される。図示の例の場合、キーバージョン番号「0x01」,「0x20」,「0x21」,「0x22」,「0x7E」,「0x7F」の各行に何らかの暗号鍵が格納されている状態が示されている。また、図示の例の場合、いずれのキーバージョン番号についても、キーID「0x01」,「0x02」,「0x03」の3箇所のセルにそれぞれ暗号鍵が格納されている。 In a certain cryptographic protocol, a certain key version number is specified, and an encryption process or a decryption process using one or more encryption keys stored in a cell having the key version number is executed. NS. In the case of the illustrated example, a state in which some encryption key is stored in each line of the key version numbers "0x01", "0x20", "0x21", "0x22", "0x7E", and "0x7F" is shown. Further, in the case of the illustrated example, the encryption key is stored in each of the three cells of the key IDs "0x01", "0x02", and "0x03" for each key version number.

これは、いずれのキーバージョン番号も、3つの異なる暗号鍵を用いる暗号化プロトコル(たとえば、上述したSCP01,SCP02,SCP03など)に対応したものになっているためである。たとえば、キーバージョン番号「0x20」が指定された場合、キーID「0x01」,「0x02」,「0x03」の各セルに格納されている3つの暗号鍵KeyD,KeyE,KeyFが暗号化処理もしくは復号処理に利用されることになる。別言すれば、特定の暗号化プロトコルに基づく暗号化処理もしくは復号処理には、同一のキーバージョン番号をもつ1つもしくは複数の暗号鍵が利用されることになる。もちろん、合計5個の暗号鍵を必要とする暗号化プロトコルのためには、同一のキーバージョン番号をもつ5個のセルにそれぞれ暗号鍵を用意することになる。 This is because each key version number corresponds to an encryption protocol using three different encryption keys (for example, SCP01, SCP02, SCP03, etc. described above). For example, when the key version number "0x20" is specified, the three encryption keys KeyD, KeyE, and KeyF stored in the cells of the key IDs "0x01", "0x02", and "0x03" are encrypted or decrypted. It will be used for processing. In other words, one or more encryption keys having the same key version number are used for the encryption process or the decryption process based on a specific encryption protocol. Of course, for an encryption protocol that requires a total of five encryption keys, the encryption keys will be prepared in each of the five cells having the same key version number.

一方、図4(a) は、図3に示す鍵テーブルTの個々のセルに格納されている暗号鍵KeyA〜KeyRの一般的なデータ構造を示す図である。図示された暗号鍵Keyのデータ構造は、上述したICカードについての国際的な標準仕様として定められた暗号鍵Keyの標準フォーマットを示すものであり、先頭から順に、種別情報(key type)A,鍵長(key length)L,鍵値データ(key value)Vを並べたものになっている。ここで、種別情報(key type)Aは、「AES」,「DES」,「RSA」など、当該暗号鍵Keyを用いることを想定している暗号化プロトコルが採用する暗号アルゴリズムの種別を含む情報であり、鍵長(key length)Lは、後続する鍵値データ(key value)Vのデータ長(byte)を示す情報であり、最後の鍵値データ(key value)Vは、暗号化演算に用いられる鍵値データそのものである。 On the other hand, FIG. 4A is a diagram showing general data structures of the encryption keys KeyA to KeyR stored in the individual cells of the key table T shown in FIG. The illustrated data structure of the encryption key Key indicates the standard format of the encryption key Key defined as the international standard specification for the IC card described above, and the type information (key type) A, in order from the beginning, The key length L and the key value data V are arranged side by side. Here, the type information (key type) A is information including the type of the encryption algorithm adopted by the encryption protocol that is supposed to use the encryption key Key, such as "AES", "DES", and "RSA". The key length L is information indicating the data length (byte) of the subsequent key value data (key value) V, and the final key value data (key value) V is used for the encryption operation. It is the key value data itself used.

また、図4(b) は、暗号通信路開設コマンドCMDのデータ構造の概要を示す図である。実際のコマンドは、ISOなどの規格(たとえば、ISO7816-4)に準拠した、より複雑なデータ構造を有するものになるが、便宜上、図4(b) には、説明に必要な情報のみを抽出した概念的なデータ構造を示すことにする。図示の例は、上述した暗号化プロトコルSCP01,SCP02,SCP03を採用する場合に用いられている暗号通信路の開設コマンドを示しており、暗号通信路の開設を指示する文字列「INITIALIZE UPDATE」なるコマンド文字列情報(実際には、コマンド「INITIALIZE UPDATE」を意味するインストラクションバイト情報であるが、以下、便宜上、「INITIALIZE UPDATE」なる文字列として説明する)と、特定の暗号鍵の格納場所を示す格納場所指定情報(実際には、特定のキーバージョン番号)と、所定の乱数とによって構成されている。 Further, FIG. 4B is a diagram showing an outline of the data structure of the encrypted communication channel opening command CMD. The actual command will have a more complex data structure that complies with standards such as ISO (eg ISO7816-4), but for convenience, Figure 4 (b) extracts only the information necessary for explanation. I will show the conceptual data structure. The illustrated example shows a command for opening an encrypted communication path used when the above-mentioned encryption protocols CP01, CP02, and CP03 are adopted, and is a character string "INITIALIZE UPDATE" instructing the establishment of the encrypted communication path. Indicates the command character string information (actually, instruction byte information meaning the command "INITIALIZE UPDATE", but for convenience, it will be described as a character string "INITIALIZE UPDATE" below) and the storage location of a specific encryption key. It is composed of storage location specification information (actually, a specific key version number) and a predetermined random number.

たとえば、図3に示す鍵テーブルTに格納されている3つの暗号鍵KeyD,KeyE,KeyFを用いた暗号通信路を開設する場合には、文字列「INITIALIZE UPDATE」に「0x20」なるキーバージョン番号を後続させ、更にその後ろに所定の乱数を後続させた暗号通信路開設コマンドCMDがICカードに与えられる。この暗号通信路開設コマンドCMDの最後に付加される乱数は、外部装置がICカードを正規の交信相手であることを認証するために利用される。別言すれば、暗号通信路開設コマンドCMDは、ICカードに対して、暗号通信路の開設処理を実行する指示コマンドとしての役割とともに、所定の乱数に応じた認証コードを返信するよう求める認証コマンドとしての役割も果たす。 For example, when opening an encrypted communication channel using three encryption keys KeyD, KeyE, and KeyF stored in the key table T shown in FIG. 3, a key version number of "0x20" is added to the character string "INITIALIZE UPDATE". Is followed by a predetermined random number, and a cryptographic channel opening command CMD is given to the IC card. The random number added at the end of this encrypted communication channel opening command CMD is used for the external device to authenticate that the IC card is a legitimate communication partner. In other words, the encrypted communication path opening command CMD is an authentication command that requests the IC card to return an authentication code corresponding to a predetermined random number as well as a role as an instruction command for executing the encrypted communication path opening process. Also plays a role as.

図5は、図2に示すSIMカード11(情報処理装置100)に組み込まれた管理プログラムSDと、スマートフォン10(外部装置200)に組み込まれたアプリケーションプログラムAP3と、の間でやりとりされる種々のコマンドおよびこれに対する応答の具体例を示すダイアグラムである。ステップS1〜S6に示すとおり、いずれもスマートフォン10側からSIMカード11側に所定のコマンドを送信し、当該コマンドに対する応答(レスポンス)をSIMカード11側からスマートフォン10側へと返信する、という形態で、両者間の情報のやりとりが行われる。この例の場合、ステップS1〜S4までの情報のやりとりは、暗号化されていない通常の通信路を介して行われるが、ステップS5,S6の情報のやりとりは、管理プログラムSDによって開設された暗号通信路を介して行われる。 FIG. 5 shows various types of exchanges between the management program SD incorporated in the SIM card 11 (information processing device 100) shown in FIG. 2 and the application program AP3 incorporated in the smartphone 10 (external device 200). It is a diagram which shows a concrete example of a command and a response to this. As shown in steps S1 to S6, in each case, a predetermined command is transmitted from the smartphone 10 side to the SIM card 11 side, and a response to the command is returned from the SIM card 11 side to the smartphone 10 side. , Information is exchanged between the two. In the case of this example, the information exchange in steps S1 to S4 is performed via a normal unencrypted communication path, but the information exchange in steps S5 and S6 is performed by the encryption established by the management program SD. It is done via a communication path.

まず、ステップS1は、スマートフォン10側からSIMカード11側に「SELECTコマンド」を送信するプロセスである。この「SELECTコマンド」は、「アプリケーション選択コマンド」と呼ぶべきコマンドであり、特定のチャネル番号を指定して、SIMカード11側の特定のアプリケーションプログラム(この場合は、管理プログラムSD)を選択するコマンドである。SIMカード11側では、当該チャネル番号と当該管理プログラムSDとが対応づけられ、以後、同じチャネル番号をもつコマンドが与えられると、当該管理プログラムSDによって処理されることになる。「SELECTコマンド」が正常に受理されると、SIMカード11側からスマートフォン10側に応答が返される。 First, step S1 is a process of transmitting a "SELECT command" from the smartphone 10 side to the SIM card 11 side. This "SELECT command" is a command that should be called an "application selection command", and is a command that specifies a specific channel number and selects a specific application program (in this case, the management program SD) on the SIM card 11 side. Is. On the SIM card 11 side, the channel number is associated with the management program SD, and thereafter, when a command having the same channel number is given, the management program SD processes the channel number. When the "SELECT command" is normally accepted, a response is returned from the SIM card 11 side to the smartphone 10 side.

続く、ステップS2は、「GET DATAコマンド」を送信するプロセスである。なお、ステップS2以降のコマンドには、ステップS1と同じチャネル番号が付与されており、SIMカード11側では、管理プログラムSDによって処理される。この「GET DATAコマンド」は、管理プログラムSDの「データの読出機能」に基づいて、所定のデータをSIMカード11側からスマートフォン10側に読み出すためのコマンドであり、読出対象となるデータを特定する情報が付加されている。管理プログラムSDは、当該コマンドに応じて、SIMカード11内のメモリから指定されたデータを読出し、これを当該コマンドに対する応答としてスマートフォン10側へと返信する。 Subsequent step S2 is a process of transmitting a "GET DATA command". The commands after step S2 are assigned the same channel numbers as those in step S1, and are processed by the management program SD on the SIM card 11 side. This "GET DATA command" is a command for reading predetermined data from the SIM card 11 side to the smartphone 10 side based on the "data reading function" of the management program SD, and specifies the data to be read. Information is added. The management program SD reads the designated data from the memory in the SIM card 11 in response to the command, and returns this to the smartphone 10 side as a response to the command.

GlobalPlatform (登録商標)の仕様では、SDプログラムが「データの読出機能」を実行する場合は、暗号通信路を介した情報のやりとりが必須にはなっていない。図5のステップS2のプロセスは、暗号通信路の開設前に暗号通信路を介すことなく情報の読み出しが可能なデータの読出処理が行われた例を示すものである。 According to the specifications of GlobalPlatform (registered trademark), when an SD program executes a "data reading function", it is not essential to exchange information via an encrypted communication path. The process of step S2 in FIG. 5 shows an example in which data reading processing capable of reading information is performed before opening the encrypted communication path without going through the encrypted communication path.

続く、ステップS3,S4は、暗号通信路の開設準備を行うプロセスである。まず、ステップS3では、「INITIALIZE UPDATEコマンド」の送信が行われる。このコマンドは、図4(b) に示すデータ構造をもつ「暗号通信路開設コマンド」であり、前述したとおり、「INITIALIZE UPDATE」なるコマンド文字列情報に、キーバージョン番号および乱数を付加した形態をもつ。このコマンドは、スマートフォン10(外部装置200)が、SIMカード11(情報処理装置100)を正規の交信相手として認証するための認証コマンドとしての役割も果たす。 Subsequent steps S3 and S4 are processes for preparing to open an encrypted communication path. First, in step S3, the "INITIALIZE UPDATE command" is transmitted. This command is an "encrypted communication path opening command" having the data structure shown in FIG. 4 (b), and as described above, it has a form in which a key version number and a random number are added to the command character string information "INITIALIZE UPDATE". Have. This command also serves as an authentication command for the smartphone 10 (external device 200) to authenticate the SIM card 11 (information processing device 100) as a legitimate communication partner.

すなわち、「INITIALIZE UPDATEコマンド」を受信したSIMカード11内の管理プログラムSDは、鍵テーブルT1から、指定されたキーバージョン番号に対応する暗号鍵を取り出し、暗号化処理の準備を行うとともに、与えられた乱数に対して所定のアルゴリズムに基づく演算を施し、演算結果を当該コマンドに対する応答として返信する。一方、スマートフォン10内のアプリケーションプログラムAP3は、返信されてきた演算結果が、与えた乱数に対する正しい演算結果であるか否かを検証し、正しい演算結果であった場合に、現在交信中のSIMカード11を正規の交信相手と認証する。 That is, the management program SD in the SIM card 11 that has received the "INITIALIZE UPDATE command" extracts the encryption key corresponding to the specified key version number from the key table T1, prepares for the encryption process, and is given. An operation based on a predetermined algorithm is performed on the random number, and the operation result is returned as a response to the command. On the other hand, the application program AP3 in the smartphone 10 verifies whether or not the returned calculation result is the correct calculation result for the given random number, and if the calculation result is correct, the SIM card currently being communicated. Authenticate 11 as a legitimate contact.

続くステップS4では、「EXTERNAL AUTHENTICATEコマンド」の送信が行われる。このコマンドは、「外部認証コマンド」であり、SIMカード11(情報処理装置100)がスマートフォン10(外部装置200)を正規の交信相手として認証するための認証コマンドである。スマートフォン10は、ステップS3の応答により返信されてきたデータに対して所定のアルゴリズムに基づく演算を施し、演算結果を「EXTERNAL AUTHENTICATE」なるコマンド文字列情報に付加してSIMカード11に送信する。SIMカード11(管理プログラムSD)は、「EXTERNAL AUTHENTICATEコマンド」によって送信されてきた演算結果が、正しい演算結果であるか否かを検証し、正しい演算結果であった場合に、現在交信中のスマートフォン10を正規の交信相手と認証する。 In the following step S4, the "EXTERNAL AUTHENTICATE command" is transmitted. This command is an "external authentication command", and is an authentication command for the SIM card 11 (information processing device 100) to authenticate the smartphone 10 (external device 200) as a legitimate communication partner. The smartphone 10 performs an operation based on a predetermined algorithm on the data returned by the response in step S3, adds the operation result to the command character string information "EXTERNAL AUTHENTICATE", and transmits the operation result to the SIM card 11. The SIM card 11 (management program SD) verifies whether or not the calculation result transmitted by the "EXTERNAL AUTHENTICATE command" is the correct calculation result, and if it is the correct calculation result, the smartphone currently communicating. Authenticate 10 as a legitimate contact.

このステップS3,S4による相互認証の具体的なプロセスは、一般に利用されている公知の技術であるため、ここでは詳しい説明は省略する。こうして、SIMカード11とスマートフォン10との間での相互認証が完了すると、両者間に暗号通信路が開設される。図の破線より下に示されたステップS5以降のコマンドは、この暗号通信路を介して与えられることになる。すなわち、ステップS5以降のコマンドの実質的な内容部分は、所定の暗号化プロトコルに基づいて暗号化され、「SCP:Secure Channel Protocol」により保護されたコマンドとして送信される。 Since the specific process of mutual authentication according to steps S3 and S4 is a commonly used known technique, detailed description thereof will be omitted here. In this way, when mutual authentication between the SIM card 11 and the smartphone 10 is completed, an encrypted communication path is established between the two. The commands after step S5 shown below the broken line in the figure will be given via this encrypted communication path. That is, the substantial content portion of the command after step S5 is encrypted based on a predetermined encryption protocol and transmitted as a command protected by "SCP: Secure Channel Protocol".

なお、現行の規格では、暗号通信路の開設時(「EXTERNAL AUTHENTICATEコマンド」の処理時)に、SCPについてレベルを設定することが可能である。具体的には、「レベル1:コマンド改竄検知用のチェックコード付与」と「レベル2:コマンド改竄検知用のチェックコード付与+コマンドデータフィールドの暗号化」などが定められており、ステップS5以降にやりとりされるコマンドには、開設時に設定されたレベルが適用されることになる。このようなSCPレベルの設定を行った場合、レベル2の設定が行われたときにのみ、ステップS5以降のコマンドのデータフィールドに対して暗号化が行われることになる。なお、ステップS5,S6の例では、コマンドに対する応答については、SCPによる保護を行わず、平文のまま通常の通信路を介して返信するようにしているが、必要があれば、これらの応答についても、暗号通信路を介して返信するようにしてもよい。 In the current standard, it is possible to set the level of SCP when opening an encrypted communication channel (when processing the "EXTERNAL AUTHENTICATE command"). Specifically, "level 1: assigning a check code for detecting command tampering" and "level 2: assigning a check code for detecting command tampering + encrypting a command data field" are defined, and in step S5 and thereafter. The level set at the time of opening will be applied to the exchanged commands. When the SCP level is set in this way, the data fields of the commands in steps S5 and subsequent steps are encrypted only when the level 2 is set. In the examples of steps S5 and S6, the responses to the commands are not protected by SCP, and are returned in plain text via the normal communication path. However, if necessary, these responses are to be answered. However, the reply may be made via the encrypted communication path.

<<< §2. 管理プログラムのセキュリティ強度と階層構造 >>>
上述の§1では、情報処理装置100に組み込まれた管理プログラムSDによって、外部装置200との間に暗号通信路を開設して両者間で暗号通信を行うための手順を簡単に説明した。ここでは、この管理プログラムSDによって開設される暗号通信路にセキュリティ強度の相違がある点と、情報処理装置100に複数の管理プログラムSDが階層構造をもって組み込まれる点について説明する。
<<< §2. Management program security strength and hierarchical structure >>>
In §1 described above, the procedure for establishing an encrypted communication path with the external device 200 by the management program SD incorporated in the information processing apparatus 100 and performing encrypted communication between the two is briefly described. Here, it will be described that there is a difference in security strength between the encrypted communication paths established by the management program SD and that a plurality of management program SDs are incorporated into the information processing apparatus 100 in a hierarchical structure.

図6は、現在、ICカードに関する仕様として定められている暗号通信路開設コマンドCMDのデータ構造を示す図である。§1で述べた例の場合、暗号通信路開設コマンドCMDのデータ構造は、図6(a) に示すように、先頭から順に、「コマンド文字列情報」、「格納場所指定情報」、「乱数」を並べたものになり、具体的には、図6(b) に示すように、「INITIALIZE UPDATE」なる文字列を先頭に、「キーバージョン暗号」と「乱数」が後続する書式になる。 FIG. 6 is a diagram showing a data structure of an encrypted communication channel opening command CMD, which is currently defined as a specification for an IC card. In the case of the example described in §1, the data structure of the encrypted communication path opening command CMD is, as shown in FIG. 6A, "command character string information", "storage location specification information", and "random number" in order from the beginning. , And specifically, as shown in Fig. 6 (b), the format is such that the character string "INITIALIZE UPDATE" is at the beginning, followed by "key version encryption" and "random number".

前述したように、先頭の「コマンド文字列情報(INITIALIZE UPDATE)」は、当該コマンドが暗号通信路を開設するコマンドであることを示すための文字列である。続く「格納場所指定情報」は、暗号通信路の開設に用いる特定の暗号鍵を指定するための暗号鍵指定情報であり、図3に示すような鍵テーブルTを用いて暗号鍵を格納する場合は「キーバージョン番号」によって構成される。最後の「乱数」は、前述したとおり、スマートフォン10がSIMカード11を正規の交信相手として認証するために利用されるデータである。 As described above, the first "command character string information (INITIALIZE UPDATE)" is a character string for indicating that the command is a command for opening an encrypted communication path. The following "storage location designation information" is encryption key designation information for designating a specific encryption key used for opening an encrypted communication path, and is a case where the encryption key is stored using the key table T as shown in FIG. Consists of "key version number". The final "random number" is data used by the smartphone 10 to authenticate the SIM card 11 as a legitimate communication partner, as described above.

図6(a) ,(b) に例示する暗号通信路開設コマンドCMDのデータ構造は、GlobalPlatform (登録商標)や3GPP/ETSIなどの国際的な仕様において、暗号化プロトコルSCP01,SCP02,SCP03として定められているものである。当該仕様には、この他にもいくつかの暗号化プロトコルの仕様が定められており、暗号通信路開設コマンドCMDのデータ構造は、各仕様に応じてそれぞれ異なるデータ構造を有する。たとえば、暗号化プロトコルSCP80については、図6(c) に示すように、「ENVELOPE」なる文字列を先頭におく暗号通信路開設コマンドCMDが定義されており、暗号化プロトコルSCP10については、図6(d) に示すように、「MANAGE SECURITY ENVIRONMENT」なる文字列を先頭におく暗号通信路開設コマンドCMDが定義されている。前述したとおり、これら各コマンドCMDのデータ構造は、説明の便宜上、一部の情報のみを抽出した概念的なデータ構造であり、実際のデータ構造それ自体を示すものではない。 The data structure of the encrypted communication path establishment command CMD illustrated in FIGS. 6 (a) and 6 (b) is defined as the encryption protocols SCP01, CP02, and CP03 in international specifications such as GlobalPlatform (registered trademark) and 3GPP / ETSI. It is what has been done. In addition to this, some encryption protocol specifications are defined in the specifications, and the data structure of the encrypted communication path opening command CMD has a different data structure according to each specification. For example, for the encryption protocol SCP80, as shown in FIG. 6 (c), a cryptographic communication path opening command CMD that puts the character string "ENVELOPE" at the beginning is defined, and for the encryption protocol SCP10, FIG. As shown in (d), a cryptographic communication path establishment command CMD that starts with the character string "MANAGE SECURITY ENVIRONMENT" is defined. As described above, the data structure of each of these command CMDs is a conceptual data structure in which only a part of the information is extracted for convenience of explanation, and does not indicate the actual data structure itself.

図7は、各暗号化プロトコルに用いられるコマンド文字列情報と暗号アルゴリズムの種別情報との対応関係を示す表である。ここで、表の各欄に示すSCP01,SCP02,SCP03,SCP10,SCP80,SCP81などの文字列は、個々の暗号化プロトコルを特定する情報(本願では、SCP種別と呼ぶ)である。また、表の縦見出しは、各暗号化プロトコルが用いる暗号アルゴリズムの種別を示し、表の横見出しは、各暗号化プロトコルに用いられるコマンド文字列情報を示している。なお、この表における「SCPxx」は、現時点では、GlobalPlatform (登録商標)による仕様化はなされていないが、今後、策定される可能性のある暗号化プロトコルを示している。 FIG. 7 is a table showing the correspondence between the command character string information used for each encryption protocol and the type information of the encryption algorithm. Here, the character strings such as SCP01, SCP02, SCP03, SCP10, SCP80, and CSP81 shown in each column of the table are information (referred to in the present application as CSP type) that specifies each encryption protocol. The vertical heading of the table indicates the type of cryptographic algorithm used by each cryptographic protocol, and the horizontal heading of the table indicates the command character string information used by each cryptographic protocol. Note that "SCPxx" in this table indicates an encryption protocol that may be formulated in the future, although it has not been specified by GlobalPlatform (registered trademark) at this time.

このように、現時点において、多数の暗号化プロトコルが定められており、今後も、新たな暗号化プロトコルが追加策定されてゆくものと予想される。また、各暗号化プロトコルが用いる暗号アルゴリズムも多様化してゆくものと予想される。ここで重要な点は、個々の暗号化プロトコルによって、セキュリティ強度に差が生じる点である。たとえば、暗号アルゴリズムに関しては、Triple-DESよりもAESの方が、理論的にセキュリティ強度が高いとされているため、図7に示す例の場合、暗号化プロトコルSCP01,SCP02よりも、SCP03の方がセキュリティ強度が高くなる。 As described above, a large number of cryptographic protocols have been established at present, and it is expected that new cryptographic protocols will be additionally formulated in the future. In addition, it is expected that the cryptographic algorithms used by each cryptographic protocol will also diversify. The important point here is that the security strength differs depending on each encryption protocol. For example, regarding the cryptographic algorithm, AES is theoretically considered to have higher security strength than Triple-DES. Therefore, in the case of the example shown in FIG. 7, SCP03 is better than the cryptographic protocols SCP01 and CP02. However, the security strength is increased.

また、同じ暗号アルゴリズムを採用していたとしても、暗号化プロトコルの仕様によってセキュリティ強度に差が生じる。たとえば、図7に示す例の場合、暗号化プロトコルSCP01とSCP02は、いずれもTriple-DESを暗号アルゴリズムとして用いているが、暗号化プロトコルSCP02の方がSCP01よりもセキュリティ強度が高いとされている。 Moreover, even if the same cryptographic algorithm is adopted, the security strength differs depending on the specifications of the cryptographic protocol. For example, in the case of the example shown in FIG. 7, the encryption protocols CP01 and SCP02 both use Triple-DES as the encryption algorithm, but the encryption protocol SCP02 is said to have higher security strength than SCP01. ..

§1で述べたように、一般的なICカードには、少なくとも1組の管理プログラムSD(Security Domain プログラム)が組み込まれており、外部装置との間の暗号通信路は、この管理プログラムSDによって開設される。管理プログラムSDは、図7の表に示されているような多様な暗号化プロトコルのうちの任意の1つもしくは複数をサポートするように構成されている。したがって、同一の情報処理装置100内に複数の管理プログラムSDが組み込まれている場合、個々の管理プログラムSDごとに、それぞれ採用する暗号化プロトコルが異なることも少なくない。たとえば、第1の管理プログラムSDは暗号化プロトコルSCP81のみを採用しているが、第2の管理プログラムSDは暗号化プロトコルSCP01,SCP02の双方を採用している、といった具合である。 As described in §1, a general IC card incorporates at least one set of management program SD (Security Domain program), and the encrypted communication path to and from the external device is determined by this management program SD. It will be opened. The management program SD is configured to support any one or more of the various cryptographic protocols shown in the table of FIG. Therefore, when a plurality of management program SDs are incorporated in the same information processing apparatus 100, the encryption protocol adopted for each management program SD is often different. For example, the first management program SD adopts only the encryption protocol CP81, but the second management program SD adopts both the encryption protocols CP01 and CP02, and so on.

当然、どの暗号化プロトコルを採用するかによって、管理プログラムSDによって開設される暗号通信路のセキュリティ強度に差が生じることになる。もちろん、外部装置200側のアプリケーションプログラムAP3は、情報処理装置100内の特定の管理プログラムSDに対して暗号通信路の開設を要求して通信を行うので、たとえ、セキュリティ強度の低い暗号通信路を介して情報のやりとりが行われることになったとしても、当該アプリケーションプログラムAP3は、それを承知の上で、当該特定の管理プログラムSDを指定しているのであるから、それ自体が重大な問題になるわけではない。 Naturally, the security strength of the encrypted communication path established by the management program SD will differ depending on which encryption protocol is adopted. Of course, since the application program AP3 on the external device 200 side requests the specific management program SD in the information processing device 100 to open the encrypted communication path and communicates with it, even if the encrypted communication path with low security strength is used. Even if information is exchanged via the system, the application program AP3 knows that and specifies the specific management program SD, which itself poses a serious problem. It does not mean that.

図8(a) は、SIMカード11(情報処理装置100)内に構築されるアプリケーションプログラムの階層構造を示す図である。この図において、階層構造の最上位に配置されているISD(Issuer Security Domain)は、発行者SDと呼ばれる管理プログラムであり、このSIMカード11の工場出荷時に書込まれるプログラムである。図示の例の場合、このISDの下位にSSD1,SSD2,AP01,AP02なるプログラムが配置されており、更に、SSD1の下位にAP11,AP12が配置され、SSD2の下位にSSD3,AP21,AP22,AP23が配置され、更に、SSD3の下位にAP31,AP32が配置されている。 FIG. 8A is a diagram showing a hierarchical structure of an application program constructed in the SIM card 11 (information processing device 100). In this figure, the ISD (Issuer Security Domain) arranged at the top of the hierarchical structure is a management program called an issuer SD, which is a program written at the time of factory shipment of the SIM card 11. In the case of the illustrated example, the programs SSD1, SSD2, AP01, AP02 are arranged below this ISD, AP11 and AP12 are arranged below SSD1, and SSD3, AP21, AP22, AP23 are arranged below SSD2. Are arranged, and AP31 and AP32 are arranged below the SSD3.

この図8(a) にブロックで示されている各プログラムは、いずれもSIMカード11(情報処理装置100)内に組み込まれているアプリケーションプログラムである。ここで、SSD1,SSD2,SSD3(Supplemental Security Domain)は、ISDと同様に管理プログラムであるが、ISDが、工場出荷時に書込まれる最上位の管理プログラムであるのに対して、SSD1,SSD2,SSD3は、ISDもしくは別なSSDの下位に配置されるプログラムになる。 Each of the programs shown in blocks in FIG. 8A is an application program incorporated in the SIM card 11 (information processing device 100). Here, SSD1, SSD2, SSD3 (Supplemental Security Domain) are management programs like ISD, but while ISD is the highest management program written at the time of factory shipment, SSD1, SSD2, SSD3 becomes a program placed under ISD or another SSD.

前述したように、管理プログラムも、アプリケーションプログラムの1つであることに変わりはないが、階層構造上、自己の下位に別なアプリケーションプログラム(一般アプリケーションプログラムであってもよいし、別な管理プログラムであってもよい)を配置して管理下におくことができる。したがって、図示の例の場合、管理プログラムSSD1の下位には、2組の一般アプリケーションプログラムAP11,AP12が配置されているだけであるが、管理プログラムSSD2の下位には、1組の別な管理プログラムSSD3と3組の一般アプリケーションプログラムAP21,AP22,AP23が配置され、更に、管理プログラムSSD3の下位には、2組の一般アプリケーションプログラムAP31,AP32が配置されている。 As mentioned above, the management program is still one of the application programs, but due to the hierarchical structure, another application program (general application program may be used or another management program) is subordinate to the management program. Can be placed and kept under control. Therefore, in the case of the illustrated example, only two sets of general application programs AP11 and AP12 are arranged under the management program SSD1, but one set of another management program is arranged under the management program SSD2. SSD3 and three sets of general application programs AP21, AP22, and AP23 are arranged, and further, two sets of general application programs AP31 and AP32 are arranged below the management program SSD3.

管理プログラムSDには、SIMカード11(情報処理装置100)全体を管理する機能と、下位のアプリケーションプログラムを管理する機能とが備わっている。具体的には、一般的なSDプログラムには、次のような機能が用意されている。これらの機能の一覧表は、図8(b) にも掲載されている。
<機能1>ICカードのライフサイクル管理
<機能2>アプリケーションプログラムのライフサイクル管理
<機能3>アプリケーションインスタンスのライフサイクル管理
<機能4>アプリケーションプログラムのロード
<機能5>アプリケーションインスタンスの生成(インストール)
<機能6>アプリケーションプログラムやインスタンスの削除
<機能7>アプリケーション向け発行データの書込み
<機能8>データの読出し
<機能9>セキュアな通信路の確保
The management program SD has a function of managing the entire SIM card 11 (information processing device 100) and a function of managing lower-level application programs. Specifically, a general SD program has the following functions. A list of these features is also shown in Figure 8 (b).
<Function 1> IC card life cycle management <Function 2> Application program life cycle management <Function 3> Application instance life cycle management <Function 4> Application program loading <Function 5> Application instance generation (installation)
<Function 6> Deletion of application programs and instances <Function 7> Writing of issued data for applications <Function 8> Reading of data <Function 9> Securing a secure communication path

もっとも、上記9つの機能は、必ずしもすべての管理プログラムSDに備わっているものではない。通常、最上位階層のISDは、すべての機能を備えているが、下位階層におかれるSSDについては、いくつかの機能が制限される場合もある。たとえば、上記機能1「ICカードのライフサイクル管理」は、通常、ISDにのみ備わっている。また、上記機能のいくつかは、自己の下位階層に配置されているアプリケーションプログラム(自己の管理下にあるアプリケーションプログラム)のために提供する機能である。 However, the above nine functions are not necessarily provided in all management programs SD. Normally, the ISD of the uppermost layer has all the functions, but some functions may be restricted for the SSD placed in the lower layer. For example, the above-mentioned function 1 "IC card life cycle management" is usually provided only in ISD. In addition, some of the above functions are functions provided for application programs (application programs under the control of the user) arranged in the lower hierarchy of the user.

以下、上記9つの機能のうち、本発明に関連するいくつかの機能について簡単に説明しておく。まず、管理プログラムSDが、自己の管理下にアプリケーションプログラムを組み込んで、動作可能となるようにするには、上記機能4により、アプリケーションプログラムをロードし、続いて、上記機能5により、アプリケーションプログラムのインスタンスを生成し、更に、上記機能7により、アプリケーション向け発行データの書込みを行うことになる。 Hereinafter, some of the above nine functions related to the present invention will be briefly described. First, in order for the management program SD to incorporate the application program under its own control and enable it to operate, the application program is loaded by the above function 4, and then the application program is loaded by the above function 5. An instance is generated, and further, the issue data for the application is written by the above function 7.

より具体的に説明すれば、機能4「アプリケーションプログラムのロード」の処理は、外部装置から与えられるロードコマンドに応じて、アプリケーションプログラムのパッケージをメモリ上に格納する処理である。また、機能5「アプリケーションプログラムのインスタンスの生成」の処理は、いわゆるインストール処理であり、外部装置から与えられるインストールコマンドに応じて、ロード済みのアプリケーションプログラムのパッケージをメモリ上に展開し、アプリケーションインスタンスを生成する処理である。アプリケーションプログラムの実行は、このインスタンス化されたプログラムコードを実行する処理ということになる。 More specifically, the process of function 4 "loading the application program" is a process of storing the package of the application program in the memory in response to the load command given from the external device. In addition, the process of function 5 "Generate application program instance" is a so-called installation process, and the loaded application program package is expanded on the memory according to the installation command given from the external device to develop the application instance. This is the process to generate. Execution of the application program is the process of executing this instantiated program code.

そして、機能7「アプリケーション向け発行データの書込み」の処理は、当該アプリケーションプログラムの実行に必要なデータ(発行データ)をメモリ上に格納する処理である。たとえば、クレジット決済機能をもったアプリケーションプログラムの場合、プログラムを実行可能にするためには、クレジットカード番号やユーザの個人情報などを発行データとして書き込む処理を行う必要がある。また、管理プログラムSDの場合、プログラムを実行可能にするためには、暗号通信路の開設に必要な鍵情報を発行データとして書き込む処理(鍵テーブルTへの暗号鍵の書込処理)を行う必要がある。 Then, the process of the function 7 "writing the issue data for the application" is a process of storing the data (issued data) necessary for executing the application program in the memory. For example, in the case of an application program having a credit payment function, in order to make the program executable, it is necessary to perform a process of writing a credit card number, a user's personal information, etc. as issuance data. Further, in the case of the management program SD, in order to make the program executable, it is necessary to perform a process of writing the key information necessary for opening the encrypted communication path as issuance data (processing of writing the encryption key to the key table T). There is.

最後の機能9「セキュアな通信路の確保」の処理は、§1で述べたように、「SCP:Secure Channel Protocol」と呼ばれる所定の暗号化プロトコルに基づいて、外部装置200との間にセキュアな暗号通信路を開設して暗号通信を行う機能である。このような機能を実現するため、図2に示すように、管理プログラムSD内には、暗号通信路開設ルーチンR1と鍵テーブルT1とが組み込まれている。暗号通信路開設ルーチンR1は、上記機能5「アプリケーションプログラムのインスタンスの生成」によって組み込まれることになり、鍵テーブルT1の内容は、上記機能7「アプリケーション向け発行データの書込み」によって書込まれることになる。 As described in §1, the process of the final function 9 “securing a secure communication path” is secure with the external device 200 based on a predetermined encryption protocol called “SCP: Secure Channel Protocol”. It is a function to open a cryptographic communication channel and perform cryptographic communication. In order to realize such a function, as shown in FIG. 2, the encrypted communication channel opening routine R1 and the key table T1 are incorporated in the management program SD. The encrypted communication channel opening routine R1 will be incorporated by the above function 5 "Generation of an instance of the application program", and the contents of the key table T1 will be written by the above function 7 "Writing the issue data for the application". Become.

なお、GlobalPlatform (登録商標)の仕様では、管理プログラムSDが前述した「機能1〜機能7」を行う場合は、暗号通信路(機能9によって開設されたセキュアな通信路)を介して情報のやりとりを実行することが必須とされているが、「機能8:データの読出し」については暗号通信路の開設は必須にはなっていない。図5のステップS2のプロセスは、暗号通信路の開設前に暗号通信路を介すことなく情報のやり取りが可能なデータの読出処理が行われた例を示すものである。これに対して、機能4(ロード機能),機能5(インストール機能),機能7(発行機能)等の処理を実行させるためのコマンドは、図5のステップS5,S6のように、SCPにより保護されたコマンドとして、暗号化された状態で送信されることになる。 According to the specifications of Global Platform (registered trademark), when the management program SD performs the above-mentioned "functions 1 to 7", information is exchanged via an encrypted communication path (a secure communication path established by the function 9). However, it is not mandatory to open an encrypted communication channel for "Function 8: Reading data". The process of step S2 in FIG. 5 shows an example in which data reading processing capable of exchanging information without going through the encrypted communication path is performed before opening the encrypted communication path. On the other hand, commands for executing processing such as function 4 (load function), function 5 (installation function), and function 7 (issue function) are protected by SCP as in steps S5 and S6 of FIG. As a command, it will be sent in an encrypted state.

図9は、工場出荷時の情報処理装置100(SIMカード11)と外部装置200(スマートフォン10または外部サーバ20)との間の情報通信の態様の一例を示すブロック図である。図示の例の場合、情報処理装置100には、工場出荷時において、OSプログラムと、ISD(発行者SD:最上位階層の管理プログラム)と、2組のアプリケーションプログラムAP01,AP02とが格納され、動作可能な状態になっている。ここで、管理プログラムISDには、暗号通信路開設ルーチンR00と鍵テーブルT00とが組み込まれており、これを利用して、所定の暗号化プロトコルに基づく暗号通信路の開設を行うことが可能である。 FIG. 9 is a block diagram showing an example of an mode of information communication between the information processing device 100 (SIM card 11) at the time of shipment from the factory and the external device 200 (smartphone 10 or external server 20). In the case of the illustrated example, the information processing apparatus 100 stores an OS program, an ISD (issuer SD: top-level management program), and two sets of application programs AP01 and AP02 at the time of shipment from the factory. It is ready for operation. Here, the management program ISD incorporates a cryptographic channel opening routine R00 and a key table T00, which can be used to open a cryptographic channel based on a predetermined encryption protocol. be.

ここでは、説明の便宜上、図9に示すような外部装置200(スマートフォン10または外部サーバ20)を用意した場合を考えてみよう。この外部装置200に用意されているアプリケーションプログラムAP(ISD)は、情報処理装置100内の管理プログラムISDとの間に暗号通信路を開設するためのプログラムであり、管理プログラムISDと同様に暗号通信路開設ルーチンR00と鍵テーブルT00とが組み込まれている。一方、図示の外部装置200には、アプリケーションプログラムAP(SSD1)も用意されている。このプログラムAP(SSD1)は、情報処理装置100内に後で組み込まれる管理プログラムSSD1との間に暗号通信路を開設するためのプログラムであり、暗号通信路開設ルーチンR10と鍵テーブルT10とが組み込まれている。 Here, for convenience of explanation, consider the case where an external device 200 (smartphone 10 or external server 20) as shown in FIG. 9 is prepared. The application program AP (ISD) prepared in the external device 200 is a program for establishing an encrypted communication path with the management program ISD in the information processing device 100, and is encrypted communication like the management program ISD. The road opening routine R00 and the key table T00 are incorporated. On the other hand, the external device 200 shown in the figure also has an application program AP (SSD1). This program AP (SSD1) is a program for opening an encrypted communication path with the management program SSD1 to be incorporated in the information processing apparatus 100 later, and the encrypted communication path opening routine R10 and the key table T10 are incorporated. It has been.

ここで、図9に示す工場出荷時の情報処理装置100には、管理プログラムISDは組み込まれているが、管理プログラムSSD1はまだ組み込まれていない。すなわち、この図9に示す情報処理装置100の階層構造は、図8の階層構造図におけるISD,AP01,AP02のブロックのみが存在している状態ということができる。図8の階層構造図は、図9に示す情報処理装置100を入手した利用者が、様々なアプリケーションプログラムを組み込む作業を行った後の状態ということになる。 Here, the information processing apparatus 100 at the time of shipment from the factory shown in FIG. 9 incorporates the management program ISD, but does not yet incorporate the management program SSD1. That is, it can be said that the hierarchical structure of the information processing apparatus 100 shown in FIG. 9 is a state in which only the blocks of ISD, AP01, and AP02 in the hierarchical structure diagram of FIG. 8 exist. The hierarchical structure diagram of FIG. 8 is a state after the user who has obtained the information processing apparatus 100 shown in FIG. 9 has performed work of incorporating various application programs.

図10は、利用開始時の情報処理装置100(SIMカード11)と外部装置200(スマートフォン10または外部サーバ20)との間の情報通信の態様の一例を示すブロック図である。図10に示す情報処理装置100には、新たに管理プログラムSSD1が格納され、動作可能な状態になっている。図示の管理プログラムSSD1には、暗号通信路開設ルーチンR10と鍵テーブルT10とが組み込まれており、これを利用して、外部装置200側に用意されているアプリケーションプログラムAP(SSD1)との間に暗号通信路を開設して暗号通信を行うことが可能である。 FIG. 10 is a block diagram showing an example of an mode of information communication between the information processing device 100 (SIM card 11) and the external device 200 (smartphone 10 or external server 20) at the start of use. The information processing device 100 shown in FIG. 10 newly stores the management program SSD1 and is in an operable state. The illustrated management program SSD1 incorporates an encrypted communication channel opening routine R10 and a key table T10, and uses this to be used between the application program AP (SSD1) prepared on the external device 200 side. It is possible to open an encrypted communication channel and perform encrypted communication.

なお、GlobalPlatform (登録商標)の仕様では、SIMカード11内に複数の管理プログラムSDを組み込む際には、各管理プログラムSDが利用する鍵テーブルTはそれぞれ別個のテーブルとして格納される。したがって、図10に示す例の場合、鍵テーブルT00と鍵テーブルT10とは別個の独立した鍵テーブルになっている。 According to the specifications of GlobalPlatform (registered trademark), when a plurality of management program SDs are incorporated in the SIM card 11, the key table T used by each management program SD is stored as a separate table. Therefore, in the case of the example shown in FIG. 10, the key table T00 and the key table T10 are separate and independent key tables.

もっとも、本発明を実施する上では、必ずしも各管理プログラムSDが利用する鍵テーブルTを別個のテーブルとする必要はなく、たとえば、図3に示すような共通の鍵テーブルTを設けておき、鍵テーブルT00,T10は、この鍵テーブルTの一部の領域として構成してもかまわない。たとえば、鍵テーブルT00はキーバージョン「0x20」の行の領域によって構成し、鍵テーブルT10は、キーバージョン「0x21」の行の領域によって構成した場合、鍵テーブルT00に記録されている暗号鍵は、KeyD,KeyE,KeyF、鍵テーブルT10に記録されている暗号鍵は、KeyG,KeyH,KeyIということになる。 However, in practicing the present invention, the key table T used by each management program SD does not necessarily have to be a separate table. For example, a common key table T as shown in FIG. 3 is provided and a key is provided. The tables T00 and T10 may be configured as a part of the key table T. For example, when the key table T00 is composed of the row area of the key version "0x20" and the key table T10 is composed of the row area of the key version "0x21", the encryption key recorded in the key table T00 is. The encryption keys recorded in the KeyD, KeyE, KeyF, and the key table T10 are KeyG, KeyH, and KeyI.

情報処理装置100を、図9に示す状態から図10に示す状態にもってゆくには、図8(a) に示す管理プログラムISDの下位階層、すなわち、管理プログラムISDの管理下に、新たな管理プログラムSSD1を組み込む処理を行う必要がある。そのためには、まず、外部装置200から情報処理装置100の管理プログラムISDに対して、暗号通信路開設コマンドを与え、管理プログラムISDの機能9「セキュアな通信路の確保」の処理によって両装置間に暗号通信路を開設した上で、この暗号通信路を介して、次のようなコマンドを与える作業を行えばよい。 In order to move the information processing apparatus 100 from the state shown in FIG. 9 to the state shown in FIG. 10, a new management is performed under the control of the management program ISD shown in FIG. 8A, that is, the management program ISD. It is necessary to perform a process of incorporating the program SSD1. To do so, first, the external device 200 gives a command to open an encrypted communication path to the management program ISD of the information processing device 100, and the management program ISD functions 9 "securing a secure communication path" between the two devices. After establishing a cryptographic communication path in, the work of giving the following command may be performed via this cryptographic communication path.

まず、外部装置200から情報処理装置100の管理プログラムISDに対して、ロードコマンドを与え、管理プログラムISDによる機能4「アプリケーションプログラムのロード」の処理を実行させる。この処理により、新たな管理プログラムSSD1を構成するプログラムパッケージのバイナリデータが情報処理装置100内のメモリに格納される。このプログラムパッケージは、インストール前のプログラムであり、CPUがそのまま実行可能な状態にはなっていない。 First, a load command is given from the external device 200 to the management program ISD of the information processing device 100 to execute the process of function 4 "loading the application program" by the management program ISD. By this process, the binary data of the program package constituting the new management program SSD1 is stored in the memory in the information processing apparatus 100. This program package is a program before installation, and the CPU is not ready to be executed as it is.

続いて、外部装置200から情報処理装置100の管理プログラムISDに対して、インストールコマンドを与え、管理プログラムISDによる機能5「アプリケーションプログラムのインスタンスの生成」の処理を実行させる。この処理により、メモリに格納されていたプログラムパッケージがメモリ上に展開され、管理プログラムSSD1を構成するアプリケーションインスタンスが生成される。このアプリケーションインスタンスは、CPUによって実行可能なルーチンではあるが、管理プログラムSSD1としての動作を行うには、まだ、発行データ(この場合、暗号鍵)が不足している。別言すれば、この時点では、図10のSSD1のブロック内に描かれている暗号通信路開設ルーチンR10はアプリケーションインスタンスとしてメモリ上に格納された状態になっているが、鍵テーブルT10(の内容となる暗号鍵)は、まだメモリ上に格納されていない。 Subsequently, an installation command is given from the external device 200 to the management program ISD of the information processing device 100 to execute the process of function 5 "instance generation of application program" by the management program ISD. By this process, the program package stored in the memory is expanded on the memory, and the application instance constituting the management program SSD1 is generated. Although this application instance is a routine that can be executed by the CPU, the issued data (in this case, the encryption key) is still insufficient to operate as the management program SSD1. In other words, at this point, the encrypted communication channel opening routine R10 drawn in the block of SSD1 in FIG. 10 is in a state of being stored in the memory as an application instance, but the contents of the key table T10 (contents). The encryption key) is not yet stored in the memory.

そこで最後に、外部装置200から情報処理装置100の管理プログラムISDに対して、発行データの書込コマンドを与え、管理プログラムISDによる機能7「アプリケーション向け発行データの書込み」の処理(鍵書込処理)を実行させる。この処理により、管理プログラムSSD1の動作に必要な発行データ(暗号鍵)がメモリに書込まれる。すなわち、図10に示す鍵テーブルT10の内容となる暗号鍵が発行データとしてメモリに書込まれることになる。これにより、新たな管理プログラムSSD1が、管理プログラムISDの管理下に、動作可能な状態で組み込まれたことになる。したがって、管理プログラムSSD1は、必要に応じて、暗号通信路開設ルーチンR10および鍵テーブルT10を用いて、機能9「セキュアな通信路の確保」の処理を実行することができる。 Therefore, finally, the external device 200 gives a command to write the issued data to the management program ISD of the information processing device 100, and the process of function 7 "writing the issued data for the application" by the management program ISD (key writing process). ) Is executed. By this process, the issuance data (encryption key) necessary for the operation of the management program SSD1 is written in the memory. That is, the encryption key which is the content of the key table T10 shown in FIG. 10 is written in the memory as the issue data. As a result, the new management program SSD1 is incorporated under the control of the management program ISD in an operable state. Therefore, the management program SSD1 can execute the process of function 9 “securing a secure communication channel” by using the encrypted communication channel opening routine R10 and the key table T10, if necessary.

図8(a) の階層構造図に示されている管理プログラムSSD2も、同様の手順によって、管理プログラムISDの管理下に動作可能な状態で組み込まれる。そして今度は、管理プログラムSSD1に暗号通信路を開設させた上で、同様の手順によって、その管理下にアプリケーションプログラムAP11,AP12を動作可能な状態で組み込むことができる。また、管理プログラムSSD2に暗号通信路を開設させた上で、同様の手順によって、その管理下にアプリケーションプログラムAP21〜AP23および管理プログラムSSD3を動作可能な状態で組み込むことができる。更に、管理プログラムSSD3に暗号通信路を開設させた上で、その管理下にアプリケーションプログラムAP31,AP32を動作可能な状態で組み込むことができる。 The management program SSD2 shown in the hierarchical structure diagram of FIG. 8A is also incorporated in a state in which it can operate under the control of the management program ISD by the same procedure. Then, this time, after opening the encrypted communication path in the management program SSD1, the application programs AP11 and AP12 can be incorporated under the management in an operable state by the same procedure. Further, after the management program SSD2 is provided with an encrypted communication path, the application programs AP21 to AP23 and the management program SSD3 can be incorporated under the control of the management program SSD2 in an operable state by the same procedure. Further, after the management program SSD3 is provided with an encrypted communication path, the application programs AP31 and AP32 can be incorporated under the management in an operable state.

このような手順が行われることに留意すると、結局、ある1つの管理プログラムを指定して、その管理下に別なアプリケーションプログラムを組み込む処理を行う場合、当該指定管理プログラムの機能9「セキュアな通信路の確保」を利用して暗号通信路を開設し、当該暗号通信路を介して、当該指定管理プログラムに、機能4「アプリケーションプログラムのロード」,機能5「アプリケーションプログラムのインスタンスの生成(インストール)」,機能7「アプリケーション向け発行データの書込み」の処理を行わせるためのコマンドが与えられることになる。要するに、ある管理プログラムの下位階層に、新たなアプリケーションプログラムを組み込む場合、当該管理プログラムが開設した暗号通信路を介して、新たなアプリケーションプログラムのためのロード処理、インストール処理、発行処理を指示するコマンドが与えられることになる。 Keeping in mind that such a procedure is performed, after all, when a certain management program is designated and another application program is incorporated under the management, the function 9 “Secure communication” of the designated management program is performed. An encrypted communication path is established by using "Securing a path", and the function 4 "loading the application program" and the function 5 "creating (installing) an instance of the application program" are added to the designated management program via the encrypted communication path. , Function 7 A command is given to perform the process of "writing the issued data for the application". In short, when a new application program is installed in the lower layer of a certain management program, a command that instructs load processing, installation processing, and issuance processing for the new application program via the encrypted communication path established by the management program. Will be given.

<<< §3. ICカードに与える具体的なコマンド >>>
図11は、GlobalPlatform (登録商標)の仕様に準拠したICカードに与える具体的なコマンドの書式例を示す図である。もちろん、ICカード用のコマンドには、この他にも様々なコマンドが用いられるが、図11(a) 〜(h) に示すコマンドは、§1,§2の説明で用いたコマンドおよび§4以降で述べる具体的な実施形態に関連したコマンドである。以下、これら各コマンドの書式および当該コマンドに応じてICカード側で実行される処理内容について簡単に説明を行う。なお、図11に示す各コマンド書式のデータ構造は、図6に示すコマンド書式のデータ構造と同様に、一部の情報のみを抽出した概念的なデータ構造であり、実際のデータ構造それ自体を示すものではない。
<<< §3. Specific commands given to the IC card >>>
FIG. 11 is a diagram showing a specific command format example given to an IC card conforming to the specifications of Global Platform (registered trademark). Of course, various other commands are used as commands for IC cards, but the commands shown in FIGS. 11 (a) to 11 (h) are the commands used in the explanations of §1 and §2 and §4. These are commands related to the specific embodiments described below. Hereinafter, the format of each of these commands and the processing content executed on the IC card side in response to the command will be briefly described. Note that the data structure of each command format shown in FIG. 11 is a conceptual data structure obtained by extracting only a part of information like the data structure of the command format shown in FIG. 6, and the actual data structure itself can be used. It does not indicate.

<3−1. アプリケーション選択コマンド>
まず、図11(a) に示す「アプリケーション選択コマンド」について説明する。このコマンドは、図5のダイアグラムのステップS1で説明したコマンドであり、特定のチャネル番号を指定して、情報処理装置100側の特定のアプリケーションプログラムを選択するコマンドである。図示のとおり、「SELECT (#n)+アプリ名」というデータ構造を有し、チャネル番号#nを指定して、「アプリ名」で特定されるアプリケーションプログラムを選択する指示である。
<3-1. Application selection command>
First, the “application selection command” shown in FIG. 11A will be described. This command is the command described in step S1 of the diagram of FIG. 5, and is a command for designating a specific channel number and selecting a specific application program on the information processing apparatus 100 side. As shown in the figure, it has a data structure of "SELECT (#n) + application name", specifies a channel number #n, and is an instruction to select an application program specified by "application name".

チャネル番号#nは、外部装置200から情報処理装置100に対してコマンドを与える際に、当該コマンドがどのアプリケーションプログラム宛のコマンドであるかを識別させるために用いられる。情報処理装置100には、複数のアプリケーションプログラムが格納されているため、外部装置から与えるコマンドのそれぞれにチャネル番号#nを付加して識別できるようにする必要がある。「アプリケーション選択コマンド」は、特定のアプリケーションプログラムに特定のチャネル番号#nを対応づけるための初期設定を行う役割を果たす。 When a command is given from the external device 200 to the information processing device 100, the channel number #n is used to identify which application program the command is addressed to. Since a plurality of application programs are stored in the information processing device 100, it is necessary to add a channel number #n to each of the commands given from the external device so that they can be identified. The "application selection command" plays a role of performing initial setting for associating a specific channel number #n with a specific application program.

たとえば、「SELECT (#3)+ISD」というアプリケーション選択コマンドを情報処理装置100に与えると、管理プログラムISDがチャネル番号#3に対応づけられる。具体的には、当該コマンドを受信した情報処理装置100内のOSプログラムが、管理プログラムISDがチャネル番号#3に対応づけられた旨の記録を行うことになる。以後、チャネル番号#3が付与されたコマンドは、すべて管理プログラムISD宛のコマンドとして取り扱われ、管理プログラムISDによって実行されることになる。 For example, when the application selection command "SELECT (# 3) + ISD" is given to the information processing apparatus 100, the management program ISD is associated with the channel number # 3. Specifically, the OS program in the information processing apparatus 100 that has received the command records that the management program ISD is associated with the channel number # 3. After that, all the commands to which the channel number # 3 is assigned are treated as commands addressed to the management program ISD and executed by the management program ISD.

<3−2. アプリケーションロードコマンド>
次に、図11(b) に示す「アプリケーションロードコマンド」について説明する。このコマンドは、図8(b) に示すSDプログラムの機能4を実行させるためのコマンドであり、特定の管理プログラムSDの管理下に、新たなアプリケーションプログラムを組み込む際の最初のステップとして実行されるコマンドである。実際には、図示のとおり、2つのコマンドによって構成される。
<3-2. Application load command>
Next, the “application load command” shown in FIG. 11B will be described. This command is a command for executing the function 4 of the SD program shown in FIG. 8 (b), and is executed as the first step when incorporating a new application program under the control of a specific management program SD. It is a command. Actually, as shown in the figure, it is composed of two commands.

第1段階のロードコマンドは、「INSTALL for load (#n)+パッケージ名」というデータ構造を有し、チャネル番号#nを指定して、「パッケージ名」で特定されるパッケージをロードする旨の指示を伝えるコマンドになる。第2段階のロードコマンドは、「LOAD (#n)+バイナリデータ」というデータ構造を有し、チャネル番号#nを指定して、後続するバイナリデータのパッケージを、メモリにそのまま格納する旨の指示を伝えるコマンドになる。 The load command of the first stage has a data structure of "INSTALL for load (#n) + package name", specifies the channel number #n, and loads the package specified by "package name". It becomes a command to convey instructions. The load command of the second stage has a data structure of "LOAD (# n) + binary data", specifies the channel number # n, and instructs that the subsequent binary data package is stored in the memory as it is. It becomes a command to convey.

ここでは、上位管理プログラムISDの管理下に、新たに下位管理プログラムSSD1を組み込む場合の手順を例にとって、この「アプリケーションロードコマンド」を説明してみる。なお、説明の便宜上、上述した「SELECT (#3)+ISD」というアプリケーション選択コマンドによって、既に、管理プログラムISDがチャネル番号#3に対応づけられているものとしよう。この場合、第1段階のロードコマンドとしては「INSTALL for load (#3)+PackSSD1」のようなコマンドを与え、第2段階のロードコマンドとしては「LOAD (#3)+バイナリデータ」のようなコマンドを与えることになる。 Here, this "application load command" will be described by taking as an example the procedure when the lower management program SSD1 is newly incorporated under the control of the upper management program ISD. For convenience of explanation, it is assumed that the management program ISD is already associated with the channel number # 3 by the above-mentioned application selection command "SELECT (# 3) + ISD". In this case, a command such as "INSTALL for load (# 3) + PackSSD1" is given as the load command of the first stage, and a command such as "LOAD (# 3) + binary data" is given as the load command of the second stage. Will be given.

上記2段階からなるアプリケーションロードコマンドには、いずれもチャネル番号「#3」が付与されたコマンドなので、「#3」への対応づけがなされている上位管理プログラムISDによって処理されることになる。上位管理プログラムISDは、第2段階のロードコマンドに含まれていた「バイナリデータ」の部分をそのままメモリの所定箇所に格納し、当該「バイナリデータ」が「PackSSD1」なるパッケージ名であるかの確認を行う。ここで、「バイナリデータ」の実体は、新たに組み込まれる下位管理プログラムSSD1用のプログラムデータである。 Since the application load command consisting of the above two steps is a command to which the channel number "# 3" is assigned, it will be processed by the higher-level management program ISD associated with "# 3". The higher-level management program ISD stores the "binary data" part included in the load command of the second stage as it is in a predetermined location in the memory, and confirms whether the "binary data" is the package name "PackSSD1". I do. Here, the substance of the "binary data" is the program data for the newly incorporated lower management program SSD1.

<3−3. アプリケーションプログラムのインストールコマンド>
続いて、図11(c) に示す「アプリケーションプログラムのインストールコマンド」について説明する。このコマンドは、図8(b) に示すSDプログラムの機能5を実行させるためのコマンドであり、特定の管理プログラムSDの管理下に、新たなアプリケーションプログラムを組み込む際の第2のステップとして実行されるコマンドである。
<3-3. Application program installation command>
Subsequently, the “application program installation command” shown in FIG. 11 (c) will be described. This command is a command for executing the function 5 of the SD program shown in FIG. 8 (b), and is executed as a second step when incorporating a new application program under the control of a specific management program SD. Command.

ここで言うアプリケーションプログラムのインストールとは、アプリケーションのロードによってメモリ上に格納された状態になっているアプリケーションプログラムのパッケージを、メモリ上にアプリケーションインスタンスとして展開し、CPUが実行できる状態にする処理である。別言すれば、アプリケーションプログラムのインストールとは、既にロードされているパッケージをメモリ上に展開して、アプリケーションインスタンスを生成する処理ということになる。 The application program installation referred to here is a process of expanding the application program package stored in the memory by loading the application as an application instance in the memory so that the CPU can execute it. .. In other words, installing an application program is the process of expanding an already loaded package into memory and creating an application instance.

このアプリケーションプログラムのインストールコマンドは、図示のとおり、「INSTALL for install (#n)+パッケージ名+アプリ名+パラメータ」というデータ構造を有し、チャネル番号#nを指定して、「パッケージ名」で特定されるパッケージを展開して、アプリケーションインスタンスを生成し、当該アプリケーションインスタンスに「アプリ名」で指定される名称を付与する旨の指示を伝えるコマンドになる。なお、GlobalPlatform の仕様に準拠したインストールコマンドでは、「パッケージ名」の後に「クラス名」なるデータを配置し、当該「クラス名」で特定されるアプリケーションインスタンスが生成されることになるが、本願では便宜上、「クラス名」の説明については省略する。 As shown in the figure, the installation command of this application program has a data structure of "INSTALL for install (#n) + package name + application name + parameter", specify the channel number #n, and use "package name". It is a command that expands the specified package, creates an application instance, and conveys an instruction to give the application instance a name specified by "application name". In addition, in the installation command conforming to the GlobalPlatform specifications, the data "class name" is placed after the "package name", and the application instance specified by the "class name" is generated. For convenience, the description of "class name" will be omitted.

なお、このインストールコマンドに付随する「パラメータ」の部分には、機能指定情報が含まれている。この機能指定情報は、インストール対象となるアプリケーションプログラムが実行可能な処理機能を指定する情報であり、インストール後、当該アプリケーションプログラムは、この機能指定情報で指定された所定の処理機能を実行することが可能になる。別言すれば、この機能指定情報で指定されなかった処理機能については、実行することができなくなる。これは、機能指定情報で指定されなかった処理機能については、インストール時に実行制限がかけられるためである。 The "parameter" part attached to this installation command includes function specification information. This function specification information is information that specifies a processing function that can be executed by the application program to be installed, and after installation, the application program may execute a predetermined processing function specified by this function specification information. It will be possible. In other words, the processing function not specified in this function specification information cannot be executed. This is because execution restrictions are applied at the time of installation for processing functions that are not specified in the function specification information.

アプリケーションロードコマンドによってロードされた「バイナリデータ」には、元来、様々な処理機能を実行するためのプログラムルーチンが含まれており、インストールされたアプリケーションプログラム自体は、様々な処理機能を有している。ただ、インストール処理が完了した時点では、これらの処理機能のうち、機能指定情報で指定された機能だけが実行可能な状態になる。このように、指定機能だけが実行可能となるようにするのは、セキュリティ上の配慮のためである。すなわち、インストール対象となるアプリケーションプログラムに与えるべき権限に応じて、必要な処理機能だけが実行可能となるようなインストール処理が行われることになる。 The "binary data" loaded by the application load command originally contains program routines for executing various processing functions, and the installed application program itself has various processing functions. There is. However, when the installation process is completed, only the functions specified in the function specification information can be executed among these processing functions. In this way, it is for security reasons that only the specified function can be executed. That is, the installation process is performed so that only the necessary processing functions can be executed according to the authority to be given to the application program to be installed.

前述したコマンド書式例(b) についての説明では、上位管理プログラムISDの管理下に、新たに下位管理プログラムSSD1を組み込む場合を例にとって、「INSTALL for load (#3)+PackSSD1」および「LOAD (#3)+バイナリデータ」なるアプリケーションロードコマンドにより、情報処理装置100のメモリ内に、「PackSSD1」なるパッケージをロードする手順を述べた。ここでは、その続きとして、「INSTALL for install (#3)+PackSSD1+SSD1+パラメータ」のようなアプリケーションプログラムのインストールコマンドが与えられた場合の具体的な処理を説明する。このコマンドにもチャネル番号「#3」が付与されているため、「#3」に対応づけられた上位管理プログラムISDによって処理される。 In the explanation of the command format example (b) described above, "INSTALL for load (# 3) + Pack SSD1" and "LOAD (#)" are taken as an example in which the lower management program SSD1 is newly installed under the control of the upper management program ISD. The procedure for loading the package "PackSSD1" into the memory of the information processing device 100 by the application load command "3) + binary data" has been described. Here, as a continuation, a specific process when an application program installation command such as "INSTALL for install (# 3) + PackSSD1 + SSD1 + parameter" is given will be described. Since the channel number "# 3" is also assigned to this command, it is processed by the higher-level management program ISD associated with "# 3".

そこで、管理プログラムISDは、図8(b) に示すSDプログラムの機能5により、「PackSSD1」なるパッケージ名で既にロードされているアプリケーションプログラムパッケージをメモリ上に展開してアプリケーションインスタンスを作成するインストール処理を実行する。こうしてインストールされた新たなアプリケーションプログラムには、指定されたアプリ名「SSD1」が付与され、階層構造上、管理プログラムISDの管理下におかれることになる。 Therefore, the management program ISD uses the SD program function 5 shown in FIG. 8 (b) to expand the application program package already loaded with the package name "PackSSD1" on the memory and create an application instance. To execute. The new application program installed in this way is given the designated application name "SSD1" and is under the control of the management program ISD in terms of the hierarchical structure.

GlobalPlatform (登録商標)の仕様では、このインストールの処理を行う際に、「パラメータ」内の機能指定情報によって指定された特定の暗号化プロトコルを利用した暗号通信路開設機能が設定されることになる。通常、パッケージとしてロードされた状態の管理プログラムには、複数の暗号化プロトコルに基づく暗号通信路開設ルーチンが含まれているが、インストール時には、上記「パラメータ」内の機能指定情報による指定を行うことにより、特定の暗号化プロトコルのみが選択され、選択された暗号化プロトコルに関連する処理機能だけが実行可能となる状態でインストールされることになる。なお、後述するように、機能指定情報では、暗号通信路開設機能以外にも様々な処理機能が指摘でき、このような様々な処理機能も、必要に応じて、実行可能な状態でインストールされる。 According to the GlobalPlatform (registered trademark) specifications, when performing this installation process, a cryptographic channel opening function using a specific encryption protocol specified by the function specification information in the "parameter" will be set. .. Normally, the management program loaded as a package includes a cryptographic communication path opening routine based on multiple cryptographic protocols, but at the time of installation, it should be specified by the function specification information in the above "parameters". As a result, only a specific cryptographic protocol is selected, and only the processing functions related to the selected cryptographic protocol are installed so that they can be executed. As will be described later, various processing functions other than the encrypted communication channel opening function can be pointed out in the function designation information, and such various processing functions are also installed in an executable state as needed. ..

たとえば、「PackSSD1」なるパッケージには、暗号化プロトコル「SCP01(Triple-DES)」と「SCP02(Triple-DES)」との2通りについての暗号通信路開設ルーチンが含まれていたものとしよう。この場合、アプリケーションプログラムのインストールコマンドのパラメータ(機能指定情報)において、「SCP01(Triple-DES)」を指定すれば、「SCP01(Triple-DES)」用の暗号通信路開設ルーチンがインストールされ、以後、当該管理プログラムSSD1は、暗号化プロトコル「SCP01(Triple-DES)」を用いて暗号通信路の開設を行うことになる。一方、パラメータ(機能指定情報)において、「SCP02(Triple-DES)」を指定すれば、「SCP02(Triple-DES)」用の暗号通信路開設ルーチンがインストールされ、以後、当該管理プログラムSSD1は、暗号化プロトコル「SCP02(Triple-DES)」を用いて暗号通信路の開設を行うことになる。 For example, suppose that the package "PackSSD1" contains a cryptographic channel opening routine for two types of encryption protocols, "SCP01 (Triple-DES)" and "SCP02 (Triple-DES)". In this case, if "SCP01 (Triple-DES)" is specified in the parameter (function specification information) of the installation command of the application program, the encrypted communication path opening routine for "SCP01 (Triple-DES)" is installed, and thereafter. , The management program SSD1 will open an encrypted communication path using the encryption protocol "SCP01 (Triple-DES)". On the other hand, if "SCP02 (Triple-DES)" is specified in the parameter (function designation information), the encrypted communication path opening routine for "SCP02 (Triple-DES)" is installed, and thereafter, the management program SSD1 An encrypted communication path will be opened using the encryption protocol "SCP02 (Triple-DES)".

<3−4. アプリケーション向け発行データの書込コマンド>
ここでは、図11(d) に示す「アプリケーション向け発行データの書込コマンド」について説明する。このコマンドは、図8(b) に示すSDプログラムの機能7を実行させるためのコマンドであり、所定のアプリケーションプログラムのために、発行データを書き込むためのコマンドである。
<3-4. Issued data write command for applications >
Here, the “command for writing issued data for applications” shown in FIG. 11 (d) will be described. This command is a command for executing the function 7 of the SD program shown in FIG. 8 (b), and is a command for writing issued data for a predetermined application program.

既に述べたとおり、管理プログラムを含めて、多くのアプリケーションプログラムは、インストールしただけでは正常な動作を行うことができず、実行に必要なデータ(発行データ)をメモリ上に格納する発行処理を行う必要がある。たとえば、クレジット決済機能をもったアプリケーションプログラムの場合、プログラムを実行可能にするためには、クレジットカード番号やユーザの個人情報などを発行データとして書き込む発行処理を行う必要がある。同様に、管理プログラムSDの場合は、プログラムを実行可能にするためには、暗号通信路の開設に必要な暗号鍵を発行データとして書き込む発行処理を行う必要がある。 As already mentioned, many application programs, including management programs, cannot perform normal operations just by installing them, and perform an issuance process that stores the data (issued data) necessary for execution in memory. There is a need. For example, in the case of an application program having a credit payment function, in order to make the program executable, it is necessary to perform an issuance process in which a credit card number, a user's personal information, etc. are written as issuance data. Similarly, in the case of the management program SD, in order to make the program executable, it is necessary to perform an issuing process of writing the encryption key required for opening the encrypted communication path as issuance data.

図11(d) には、このような発行データの書込みを行うための2通りの書込コマンドが示されている。書込コマンドその1は、発行データを書き込むための汎用の書込コマンドであり、「STORE DATA (#n)+発行データ」というデータ構造を有し、チャネル番号#nを指定して、「発行データ」の部分のデータを発行データとして書き込む旨の指示を伝えるコマンドになる。このコマンドは、管理プログラムのみならず、一般アプリケーションプログラムに対しても与えることができる汎用コマンドである。上述したように、クレジット決済機能をもったアプリケーションプログラムに対して与えれば、「発行データ」としてクレジットカード番号、ユーザの個人情報や決済処理に用いる鍵データなどを書き込むことができる。また、管理プログラムSDに対して与えれば、「発行データ」として暗号通信路の開設に必要な鍵データなどを書き込むことができる。図3に例示した鍵テーブルTの内容も、「発行データ」として書き込むことができる。 FIG. 11 (d) shows two types of write commands for writing such issued data. The write command No. 1 is a general-purpose write command for writing the issue data, has a data structure of "STORE DATA (#n) + issue data", specifies the channel number #n, and "issues". It is a command that conveys an instruction to write the data in the "data" part as issued data. This command is a general-purpose command that can be given not only to the management program but also to general application programs. As described above, if it is given to an application program having a credit payment function, a credit card number, user's personal information, key data used for payment processing, etc. can be written as "issued data". Further, if given to the management program SD, key data or the like necessary for opening an encrypted communication path can be written as "issued data". The contents of the key table T illustrated in FIG. 3 can also be written as "issued data".

一方、書込コマンドその2は、鍵データ(暗号鍵)を書き込むための専用の書込コマンドであり、「PUT KEY (#n)+鍵データ」というデータ構造を有し、チャネル番号#nを指定して、「鍵データ」の部分のデータを図3に例示した鍵テーブルT(インストール時に空の格納場所のみが用意されている)に書き込む旨の指示を伝えるコマンドになる。図3に例示した鍵テーブルTの内容は、上述した書込コマンドその1によって発行データとして書き込むこともできるし、書込コマンドその2によって鍵データとして書き込むこともできる。 On the other hand, the write command No. 2 is a dedicated write command for writing the key data (encryption key), has a data structure of "PUT KEY (# n) + key data", and has a channel number # n. It is a command to specify and convey an instruction to write the data of the "key data" part to the key table T (only an empty storage location is prepared at the time of installation) illustrated in FIG. The contents of the key table T illustrated in FIG. 3 can be written as issuance data by the above-mentioned write command 1, or can be written as key data by the write command 2.

前述したコマンド書式例(b) および(c) の説明では、上位管理プログラムISDの管理下に、新たに下位管理プログラムSSD1を組み込む場合を例にとって、管理プログラムSSD1をロードし、インストールする段階までを説明した。こうしてインストールされた管理プログラムSSD1には、鍵テーブルT用の格納場所が確保されているものの、その中身は空のままであり、鍵データの書込みを行わない限り、暗号通信路の開設を行うことはできない。そこで、下位管理プログラムSSD1の組込処理の最終段階として、発行データの書込コマンドを与えて鍵データを鍵テーブルTに書き込む必要がある。 In the explanations of the command format examples (b) and (c) described above, the stage of loading and installing the management program SSD1 is described by taking as an example the case where the lower management program SSD1 is newly incorporated under the control of the upper management program ISD. explained. Although the storage location for the key table T is secured in the management program SSD1 installed in this way, the contents remain empty, and the encrypted communication path is opened unless the key data is written. Can't. Therefore, as the final stage of the embedded processing of the lower management program SSD1, it is necessary to give the issue data write command and write the key data to the key table T.

書込コマンドその1を用いて鍵データの書込みを行う場合は、「STORE DATA (#n)+鍵データ」なる発行データの書込コマンドを与えればよい(鍵データが発行データになる)。後に詳述するが、このコマンドにおけるチャネル番号「#n」は、上位管理プログラムISDを指定する番号でもよいし、下位管理プログラムSSD1を指定する番号でもよい。すなわち、後に説明する「(h) 発行データ書込対象指定コマンド」によって予め書込対象を指定しておくことにより、当該コマンドを実行する管理プログラムは、与えられた書込データを指定された書込対象についての鍵データとして書き込むことができる。したがって、上例の場合、鍵データは、下位管理プログラムSSD1用の鍵データとして書き込むことができる。 When writing the key data using the write command No. 1, the write command of the issue data "STORE DATA (#n) + key data" may be given (the key data becomes the issue data). As will be described in detail later, the channel number "#n" in this command may be a number that specifies the upper management program ISD or a number that specifies the lower management program SSD1. That is, by designating the write target in advance by the "(h) Issued data write target specification command" described later, the management program that executes the command can specify the given write data. It can be written as key data about the inclusion target. Therefore, in the case of the above example, the key data can be written as the key data for the lower management program SSD1.

一方、書込コマンドその2を用いて鍵データの書込みを行う場合は、「PUT KEY (#n)+鍵データ」なる発行データの書込コマンドを与えればよい。このコマンドは、当該コマンドを受信した管理プログラム自身に、自分が使用する鍵データの書込処理を実行させるためのコマンドである。したがって、上例の場合、このコマンドにおけるチャネル番号「#n」は、下位管理プログラムSSD1を指定する番号になり、鍵データは、下位管理プログラムSSD1用の鍵データとして書込まれる。 On the other hand, when writing the key data using the write command No. 2, the issue data write command "PUT KEY (#n) + key data" may be given. This command is a command for causing the management program itself that has received the command to execute the writing process of the key data used by itself. Therefore, in the case of the above example, the channel number "# n" in this command is a number that specifies the lower management program SSD1, and the key data is written as the key data for the lower management program SSD1.

書込コマンドその1の一般書式は、「STORE DATA (#n)+発行データ」なる形式を採っているが、GlobalPlatform (登録商標)の仕様によると、発行データとして鍵データを用いる場合には、発行データの部分に所定の指定子を用いて鍵データであることを明示する規則になっている。したがって、発行データの部分を鍵データとする「STORE DATA (#n)+鍵データ」なる形式の書込コマンドを受信した場合、当該書込コマンドが鍵データの書込コマンドであることを認識することができる。一方、書込コマンドその2は、鍵データの書込専用のコマンドであるから、当該書込コマンドを受信した時点で、鍵データの書込コマンドであることを認識することができる。 The general format of write command 1 is "STORE DATA (#n) + issued data", but according to the specifications of GlobalPlatform (registered trademark), when key data is used as issued data, It is a rule to clearly indicate that it is key data by using a predetermined specifier in the issue data part. Therefore, when a write command in the format of "STORE DATA (#n) + key data" with the issued data part as the key data is received, it is recognized that the write command is a key data write command. be able to. On the other hand, since the write command No. 2 is a command dedicated to writing key data, it can be recognized that it is a key data write command when the write command is received.

なお、図3に示すような二次元マトリックスのセルの集合体からなる鍵テーブルTに鍵データを書き込む場合は、格納位置となるセルを特定する必要がある。個々のセルは、キーバージョン番号とキーIDとによって特定されるが、キーIDについては、たとえば図示の例のように、「0x01となるセルを先頭として順番に格納する」というような格納ルールを定めておけば、キーバージョン番号を特定するだけで鍵データの書込位置を特定することができる。この場合、書込コマンドには、書込位置を指定する書込場所指定情報として、キーバージョン番号を特定する情報を含ませておけばよい。 When writing key data to the key table T composed of a collection of cells in a two-dimensional matrix as shown in FIG. 3, it is necessary to specify the cell as the storage position. Each cell is specified by the key version number and the key ID. For the key ID, for example, as shown in the illustrated example, a storage rule such as "store the cell having 0x01 in order" is applied. If it is determined, the writing position of the key data can be specified only by specifying the key version number. In this case, the write command may include information for specifying the key version number as the write location specification information for specifying the write position.

<3−5. 暗号通信路開設コマンド>
続いて、図11(e) に示す「暗号通信路開設コマンド」について説明する。このコマンドは、図8(b) に示すSDプログラムの機能9を実行させるためのコマンドであり、特定の管理プログラムSDに対して、暗号通信路を開設させるためのコマンドである。この暗号通信路開設コマンドについては、既に、図5のダイアグラムのステップS3で説明を行い、その書式については、既に、図6を参照して説明したとおりである。
<3-5. Cryptographic channel opening command >
Next, the “encrypted channel opening command” shown in FIG. 11 (e) will be described. This command is a command for executing the function 9 of the SD program shown in FIG. 8 (b), and is a command for opening an encrypted communication path for a specific management program SD. This encrypted communication channel opening command has already been described in step S3 of the diagram of FIG. 5, and the format thereof has already been described with reference to FIG.

すなわち、この暗号通信路開設コマンドは、図示のとおり、「INITIALIZE UPDATE (#n)+パラメータ」というデータ構造を有し、チャネル番号#nで指定される管理プログラムSDに対して、暗号通信路を開設する指示を与えるとともに、外部装置200が、情報処理装置100を正規の交信相手として認証するために用いるレスポンスを要求するコマンドである。 That is, as shown in the figure, this encrypted communication channel opening command has a data structure of "INITIALIZE UPDATE (#n) + parameter", and provides an encrypted communication channel to the management program SD specified by the channel number #n. It is a command that gives an instruction to open and requests a response that the external device 200 uses to authenticate the information processing device 100 as a legitimate communication partner.

前述したとおり、この暗号通信路開設コマンドには、パラメータとして、キーバージョン番号および乱数が付加されている。管理プログラムSDは、図3に示す鍵テーブルTからコマンドに付加されているキーバージョン番号で特定される暗号鍵を取り出し、取り出した暗号鍵と所定の暗号化アルゴリズムを用いて、外部装置200との間に暗号通信路を開設する処理を行い、更に、コマンドに付加されている乱数に対して所定のアルゴリズムに基づく演算を施し、演算結果を当該コマンドに対するレスポンスとして返信する。 As described above, a key version number and a random number are added as parameters to this encrypted communication channel opening command. The management program SD extracts the encryption key specified by the key version number added to the command from the key table T shown in FIG. 3, and uses the extracted encryption key and a predetermined encryption algorithm to connect with the external device 200. A process of establishing an encrypted communication path between them is performed, an operation based on a predetermined algorithm is performed on the random number added to the command, and the operation result is returned as a response to the command.

<3−6. 外部認証コマンド>
続いて、図11(f) に示す「外部認証コマンド」について説明する。このコマンドは、チャネル番号#nで指定される管理プログラムSDが、現在通信を行っている外部装置200を正規の交信相手として認証するためのコマンドであり、既に、図5のダイアグラムのステップS4で説明を行ったものである。
<3-6. External authentication command>
Subsequently, the “external authentication command” shown in FIG. 11 (f) will be described. This command is a command for the management program SD specified by the channel number # n to authenticate the external device 200 currently communicating as a legitimate communication partner, and has already been performed in step S4 of the diagram of FIG. This is an explanation.

§3−5で述べたとおり、暗号通信路開設コマンド「INITIALIZE UPDATE (#n)+パラメータ」は、暗号通信路を開設する指示を与えるとともに、外部装置200が、情報処理装置100を正規の交信相手として認証するために用いるレスポンスを要求するコマンドである。外部装置200は、当該レスポンスが正当なものであれば、情報処理装置100を正規の交信相手と判断する。 As described in §3-5, the encrypted communication channel opening command "INITIALIZE UPDATE (#n) + parameter" gives an instruction to open the encrypted communication channel, and the external device 200 normally communicates with the information processing device 100. This command requests a response used to authenticate as a partner. If the response is valid, the external device 200 determines that the information processing device 100 is a legitimate communication partner.

ここで説明する外部認証コマンドは、図示のとおり、「EXTERNAL AUTHENTICATE (#n)+ホスト認証コード」というデータ構造を有し、チャネル番号#nを指定して、外部装置200を正規の交信相手として認証するためのホスト認証コードが付加されている。情報処理装置100は、当該ホスト認証コードが正当なものであれば、外部装置200を正規の交信相手と判断する。 As shown in the figure, the external authentication command described here has a data structure of "EXTERNAL AUTHENTICATE (#n) + host authentication code", specifies the channel number #n, and uses the external device 200 as a regular communication partner. A host authentication code for authentication is added. If the host authentication code is valid, the information processing device 100 determines that the external device 200 is a legitimate communication partner.

このように、外部認証コマンド「EXTERNAL AUTHENTICATE (#n)+ホスト認証コード」は、暗号通信路開設コマンド「INITIALIZE UPDATE (#n)+パラメータ」に続いて与えられるコマンドであり、両者によって、情報処理装置100と外部装置200との間に相互認証が行われることになる。 In this way, the external authentication command "EXTERNAL AUTHENTICATE (#n) + host authentication code" is a command given following the encrypted communication channel opening command "INITIALIZE UPDATE (#n) + parameter", and information processing is performed by both. Mutual authentication will be performed between the device 100 and the external device 200.

<3−7. 管理プログラム変更コマンド>
次に、図11(g) に示す「管理プログラム変更コマンド」について説明する。このコマンドは、管理プログラムの階層構造を変更するために用いられるコマンドである。図8(a) には、アプリケーションプログラムの階層構造の一例を示したが、管理プログラム変更コマンドを用いると、このような階層構造の変更を行うことができる。
<3-7. Management program change command>
Next, the “management program change command” shown in FIG. 11 (g) will be described. This command is a command used to change the hierarchical structure of the management program. FIG. 8A shows an example of the hierarchical structure of the application program, but such a hierarchical structure can be changed by using the management program change command.

この管理プログラム変更コマンドは、図11(g) に示すとおり、「INSTALL for extradition (#n)+新管理プログラム名+移動対象アプリ名」というデータ構造を有し、チャネル番号#nによって特定の管理プログラムSDを指定して、当該管理プログラムSDに対して、現時点で自己の管理下にある移動対象となるアプリケーションプログラムを、新たな管理プログラムの管理下に移動させる旨の指示を伝えるコマンドになる。 As shown in FIG. 11 (g), this management program change command has a data structure of "INSTALL for extradition (#n) + new management program name + application name to be moved", and specific management is performed by channel number # n. It is a command that specifies a program SD and conveys an instruction to the management program SD to move the application program to be moved, which is currently under its control, to the control of a new management program.

たとえば、図8(a) に示す階層構造において、管理プログラムSSD3を管理プログラムSSD2の管理下から、管理プログラムSSD1の管理下へと移動させる場合を考えてみる。この場合、現在の上位管理プログラムSSD2に対して、「INSTALL for extradition (#n)+SSD1+SSD3」という管理プログラム変更コマンドを与えることになる。その結果、現在の上位管理プログラムSSD2は、移動対象となる下位管理プログラムSSD3を、移動先となる新たな上位管理プログラムSSD1の管理下へ移動させる処理を実行する。このとき、管理プログラムSSD3の更に下層の一般アプリケーションプログラムAP31,AP32も一緒に移動する。 For example, in the hierarchical structure shown in FIG. 8A, consider a case where the management program SSD3 is moved from the control of the management program SSD2 to the control of the management program SSD1. In this case, the management program change command "INSTALL for extradition (#n) + SSD1 + SSD3" is given to the current upper management program SSD2. As a result, the current upper management program SSD2 executes a process of moving the lower management program SSD3 to be moved under the control of the new upper management program SSD1 to be moved. At this time, the general application programs AP31 and AP32, which are lower layers of the management program SSD3, also move together.

このような移動は、管理プログラムSSD1について、ロード機能やインストール機能が制限されていた場合に行われることが多い。この場合、管理プログラムSSD1は、自己の下位に管理プログラムSSD3を直接インストールすることができないので、とりあえず、インストール機能を有する管理プログラムSSD2が自己の下位にインストールし、これを管理プログラムSSD1の下位に移動した後で発行データ(暗号データ)を書き込む、という手順を踏むことになる。すなわち、管理プログラムSSD3についての発行データの書込処理は、移動先である管理プログラムSSD1が開設した暗号通信路を介して行うことになる。 Such movement is often performed when the load function and the install function of the management program SSD1 are restricted. In this case, the management program SSD1 cannot directly install the management program SSD3 under its own, so for the time being, the management program SSD2 having an installation function installs it under its own and moves it to the lower part of the management program SSD1. After that, the issue data (encrypted data) is written. That is, the process of writing the issued data for the management program SSD3 is performed via the encrypted communication path established by the management program SSD1 which is the destination.

結局、この管理プログラム変更コマンドの実体は、インストールコマンドと同様に、上位の管理プログラムの管理下に下位の管理プログラムを配置するためのコマンドということになる。そこで、本願における「インストールコマンド」には、§3−3で述べたアプリケーションプログラムのインストールコマンド(コマンド(c) )だけでなく、ここで述べた管理プログラム変更コマンド(コマンド(g) )も含まれるものとする。 After all, the substance of this management program change command is a command for arranging the lower management program under the control of the upper management program, like the installation command. Therefore, the "installation command" in the present application includes not only the application program installation command (command (c)) described in §3-3, but also the management program change command (command (g)) described here. It shall be.

<3−8. 発行データ書込対象指定コマンド>
最後に、図11(h) に示す「発行データ書込対象指定コマンド」について説明する。§3−4では、「発行データの書込コマンドその1」についての説明を行ったが、ここで述べる「発行データ書込対象指定コマンド」は、「発行データの書込コマンドその1」を与える前に、予め発行データの書込対象を指定しておくためのコマンドである。
<3-8. Issued data write target specification command>
Finally, the “issued data write target specification command” shown in FIG. 11 (h) will be described. In §3-4, "Issued data writing command No. 1" was explained, but the "Issued data writing target specification command" described here gives "Issued data writing command No. 1". This is a command for specifying the writing target of the issued data in advance.

この発行データ書込対象指定コマンドは、図11(h) に示すとおり、「INSTALL for personalization (#n)+発行対象アプリ名」というデータ構造を有し、チャネル番号#nによって特定の管理プログラムSDを指定して、当該管理プログラムSDに対して、「発行対象アプリ名」として指定されたアプリケーションプログラムを発行データの書込対象として指定するコマンドになる。 As shown in FIG. 11 (h), this issue data write target specification command has a data structure of "INSTALL for personalization (#n) + issue target application name", and is a specific management program SD according to the channel number #n. Is specified to be a command for the management program SD to specify the application program specified as the "issue target application name" as the issue data write target.

ここでも、上位管理プログラムISDの管理下に、新たに下位管理プログラムSSD1を組み込む場合を例にとって以下の説明を行うことにする。前述したとおり、上位管理プログラムISDの下位階層に管理プログラムSSD1をロードし、インストールする段階までが完了すれば、あとは最終段階として、下位管理プログラムSSD1について鍵データの書込みを行うだけである。このとき、図11(d) に示す書込コマンドその1を用いて鍵データの書込みを行うには、下位管理プログラムSSD1に対して「STORE DATA (#n)+鍵データ」なる発行データの書込コマンドを与え、下位管理プログラムSSD1に鍵データの書込処理を実行させる必要がある。 Here, too, the following description will be given by taking as an example a case where the lower management program SSD1 is newly incorporated under the control of the upper management program ISD. As described above, once the management program SSD1 is loaded into the lower layer of the upper management program ISD and the installation stage is completed, the key data is only written to the lower management program SSD1 as the final stage. At this time, in order to write the key data using the write command 1 shown in FIG. 11 (d), the issue data document "STORE DATA (#n) + key data" is written to the lower management program SSD1. It is necessary to give an embedded command to cause the lower management program SSD1 to execute the key data writing process.

ところが、発行データ書込対象指定コマンドを用いれば、上位管理プログラムISDに対して「STORE DATA (#n)+鍵データ」なる発行データの書込コマンドを与えつつ、実際には、当該書込コマンドを下位管理プログラムSSD1に引き渡し、下位管理プログラムSSD1に実行させることが可能になる。そのためには、上位管理プログラムISDに対して「STORE DATA (#n)+鍵データ」なる発行データの書込コマンドを与える前に、上位管理プログラムISDに対して「INSTALL for personalization (#n)+SSD1」という発行データ書込対象指定コマンドを与えておくようにし、後続する発行データの書込コマンドについての鍵データの書込対象が下位管理プログラムSSD1である旨の指定を行っておけばよい。 However, if the issue data write target specification command is used, the issue data write command "STORE DATA (#n) + key data" is given to the higher-level management program ISD, and the write command is actually given. Can be passed to the lower management program SSD1 and executed by the lower management program SSD1. For that purpose, before giving the issue data write command "STORE DATA (#n) + key data" to the upper management program ISD, "INSTALL for personalization (# n) + SSD1" to the upper management program ISD. It is sufficient to give the issue data write target specification command, and specify that the key data write target for the subsequent issue data write command is the lower management program SSD1.

<<< §4. 本発明が解決すべき課題 >>>
以上、§1〜§3において、GlobalPlatform (登録商標)の仕様に準拠した一般的なICカードの基本構成および管理プログラムの基本機能についての説明を行った。これらの説明を踏まえて、ここでは、本発明が解決すべき課題を具体的に述べておく。
<<< §4. Problems to be solved by the present invention >>>
In the above, in §1 to §3, the basic configuration of a general IC card conforming to the specifications of Global Platform (registered trademark) and the basic functions of a management program have been described. Based on these explanations, the problems to be solved by the present invention will be specifically described here.

図12は、本発明に係る情報処理装置100の基本構成と、外部装置200との間の情報通信の態様を示すブロック図である。ここでも、§1〜§3における説明と同様に、情報処理装置100が、スマートフォン10に装着されたSIMカード11であり、外部装置200が、当該スマートフォン10または外部サーバ20である場合を想定して、以下の説明を行うことにする。 FIG. 12 is a block diagram showing an aspect of information communication between the basic configuration of the information processing device 100 according to the present invention and the external device 200. Here, as in the description in §1 to §3, it is assumed that the information processing device 100 is the SIM card 11 mounted on the smartphone 10 and the external device 200 is the smartphone 10 or the external server 20. Therefore, the following explanation will be given.

情報処理装置100は、外部装置200との間で暗号通信を行う機能を有しており、図示のとおり、情報格納部110およびプログラム実行部120を備えている。この実施例の場合、情報格納部110は、不揮発性メモリによって構成され、プログラムおよび当該プログラムが利用するデータを格納する役割を果たす。より具体的には、情報格納部110は、プログラムを格納するためのプログラム格納部111と、データを格納するためのデータ格納部112と、を含んでいる。 The information processing device 100 has a function of performing encrypted communication with the external device 200, and includes an information storage unit 110 and a program execution unit 120 as shown in the figure. In the case of this embodiment, the information storage unit 110 is configured by the non-volatile memory and plays a role of storing the program and the data used by the program. More specifically, the information storage unit 110 includes a program storage unit 111 for storing a program and a data storage unit 112 for storing data.

一方、プログラム実行部120は、情報格納部110に格納されているプログラムを実行する役割を果たす。より具体的には、プログラム実行部120は、CPUおよび必要に応じてRAMなどの作業用メモリを備えており、データ格納部112に格納されているデータを利用して、プログラム格納部111に格納されているプログラムを実行する。プログラム実行部120と外部装置200との間には通信路が設けられている。プログラム実行部120は、この通信路を介して外部装置200から与えられたコマンドを実行し、その結果をレスポンスとして外部装置200に返すことになる。 On the other hand, the program execution unit 120 plays a role of executing the program stored in the information storage unit 110. More specifically, the program execution unit 120 includes a CPU and, if necessary, a working memory such as a RAM, and stores the data stored in the data storage unit 112 in the program storage unit 111. Run the program that has been created. A communication path is provided between the program execution unit 120 and the external device 200. The program execution unit 120 executes a command given from the external device 200 via this communication path, and returns the result as a response to the external device 200.

図示のとおり、情報格納部110には、様々なプログラムやデータが格納されている。まず、プログラム格納部111には、OSプログラムおよびアプリケーションプログラムが格納されている。§1で述べたとおり、アプリケーションプログラムは、管理プログラムと一般アプリケーションプログラムとによって構成され、図示の例の場合、2組の管理プログラムISD,SSD1と、2組の一般アプリケーションプログラムAP01,AP02が格納されている状態が示されている。ここで、管理プログラムISDおよびSSD1の間には、図8(a) の階層構造図に示されているように、相互に上下関係が定義されている。 As shown in the figure, various programs and data are stored in the information storage unit 110. First, the OS program and the application program are stored in the program storage unit 111. As described in §1, the application program is composed of a management program and a general application program, and in the case of the illustrated example, two sets of management programs ISD and SSD1 and two sets of general application programs AP01 and AP02 are stored. The state is shown. Here, as shown in the hierarchical structure diagram of FIG. 8A, a hierarchical relationship is defined between the management programs ISD and SSD1.

なお、図12に示す実施例では、プログラム格納部111に、アプリケーションプログラムとして、2組の管理プログラムと2組の一般アプリケーションプログラムとが格納されている例が示されているが、本発明に係る情報処理装置では、必ずしも複数の管理プログラムと複数の一般アプリケーションプログラムとが格納されている必要はなく、少なくとも1つの管理プログラム(図示の例の場合は、管理プログラムISD)が格納されている状態であれば、本発明を実施することが可能である。 In the embodiment shown in FIG. 12, an example in which two sets of management programs and two sets of general application programs are stored as application programs in the program storage unit 111 is shown, but it relates to the present invention. In the information processing device, it is not always necessary that a plurality of management programs and a plurality of general application programs are stored, and at least one management program (in the case of the illustrated example, the management program ISD) is stored. If so, it is possible to carry out the present invention.

ここで、管理プログラムISD,SSD1は、既に述べたとおり、自己を上位階層、別なアプリケーションプログラム(一般アプリケーションプログラムであるか、管理プログラムであるかを問わない)を下位階層として、下位階層のアプリケーションプログラムを自己の管理下におくプログラムであり、自己もしくは自己の管理下にあるアプリケーションプログラムのために、所定の暗号化プロトコルおよび所定の暗号鍵を用いて、外部装置200との間に暗号通信路を開設する暗号通信路開設機能を有し、外部装置200から与えられる暗号通信路開設コマンドに基づいて当該機能が実行される。 Here, as described above, the management programs ISD and SSD1 have their own upper layer and another application program (regardless of whether it is a general application program or a management program) as a lower layer, and the application in the lower layer. A program that keeps the program under its own control, and is an encrypted communication path to and from the external device 200 using a predetermined encryption protocol and a predetermined encryption key for the self or the application program under the control of the self. It has a cryptographic communication path opening function for opening a program, and the function is executed based on a cryptographic communication path opening command given from the external device 200.

また、管理プログラムISD,SSD1は、いずれも自己の管理下に新たなアプリケーションプログラム(一般アプリケーションプログラムであるか、管理プログラムであるかを問わない)を組み込む機能も有している。具体的には、§2で説明したとおり、新たなアプリケーションプログラムのためのロード処理、インストール処理、発行処理を実行することになる。 In addition, the management programs ISD and SSD1 both have a function of incorporating a new application program (regardless of whether it is a general application program or a management program) under their own control. Specifically, as explained in §2, load processing, installation processing, and issuance processing for a new application program will be executed.

一方、データ格納部112には、OSプログラムや各アプリケーションプログラムが利用するデータも格納されている。図には、プログラム格納部111に格納されている各プログラムに対応して、それぞれOS用データ、ISD用データ、SSD1用データ、AP01用データ、AP02用データが格納されている状態が示されている。各プログラムは、対応する各データを利用して実行されることになる。前述したとおり、管理プログラムは、図3に示すような鍵テーブルTを必要とするが、図示の例の場合、管理プログラムISD用の鍵テーブルT(ISD)はISD用データの一部として格納され、管理プログラムSSD1用の鍵テーブルT(SSD1)はSSD1用データの一部として格納される。 On the other hand, the data storage unit 112 also stores data used by the OS program and each application program. The figure shows a state in which OS data, ISD data, SSD1 data, AP01 data, and AP02 data are stored corresponding to each program stored in the program storage unit 111. There is. Each program will be executed using each corresponding data. As described above, the management program requires the key table T as shown in FIG. 3, but in the case of the illustrated example, the key table T (ISD) for the management program ISD is stored as a part of the ISD data. , The key table T (SSD1) for the management program SSD1 is stored as a part of the data for SSD1.

もっとも、この図12のブロック図に示されている構成自体は、これまで述べてきた従来の情報処理装置の構成と全く同じである。本発明に係る情報処理装置100の特徴は、管理プログラムISDもしくはSSD1に、新たに付加的な処理機能を設けた点にある。この処理機能は、ISD用データもしくはSSD1用データの一部として格納される鍵テーブルについて、常に必要最小限の暗号鍵のみが格納された状態を維持し、その記憶容量を節約するとともに、セキュリティ上の問題を低減させるという特有の作用効果を奏する。 However, the configuration itself shown in the block diagram of FIG. 12 is exactly the same as the configuration of the conventional information processing apparatus described so far. The feature of the information processing apparatus 100 according to the present invention is that the management program ISD or SSD1 is newly provided with an additional processing function. This processing function always maintains the state in which only the minimum necessary encryption key is stored in the key table stored as a part of the ISD data or the SSD1 data, saves the storage capacity, and is for security reasons. It has a unique effect of reducing the problem of.

§2で述べたとおり、管理プログラムISD(Issuer Security Domain)は、工場出荷時に書込まれる最上位の管理プログラムであり、情報処理装置100が出荷された時点で既に書き込まれている必須のプログラムである。もちろん、OSプログラムも同様である。一方、管理プログラムISDの下位階層に組み込まれる管理プログラムSSD(Supplemental Security Domain)は、通常、情報処理装置100が工場から出荷された後に、必要に応じて組み込まれる付随的なプログラムである。 As described in §2, the management program ISD (Issuer Security Domain) is the highest-level management program written at the time of shipment from the factory, and is an essential program already written when the information processing apparatus 100 is shipped. be. Of course, the same applies to the OS program. On the other hand, the management program SSD (Supplemental Security Domain) incorporated in the lower layer of the management program ISD is usually an incidental program incorporated as needed after the information processing apparatus 100 is shipped from the factory.

したがって、図12に示されている管理プログラムSSD1は、この情報処理装置100の工場出荷後に新たに組み込まれたアプリケーションプログラムであり、当該管理プログラムSSD1の組込処理は、§2で述べたとおり、上位の管理プログラムISDによって実行されることになる。すなわち、管理プログラムISDに、図11(b) に示すアプリケーションロードコマンドを与えることにより、管理プログラムSSD1となるべきプログラムパッケージをロードするロード処理を実行させ、管理プログラムISDに、図11(c) に示すインストールコマンドを与えることにより、ロードしたパッケージを展開するインストール処理を実行させ、最後に、管理プログラムISDに、図11(d) に示す書込コマンドを与えることにより、インストールされた管理プログラムSSD1が利用する暗号鍵を書き込む鍵書込処理を実行させることになる。なお、§3で述べたように、この鍵書込処理については、インストールされたばかりの管理プログラムSSD1自身に実行させることも可能であるが、以下に示す基本的実施形態では、管理プログラムISDによって鍵書込処理が実行される例を述べることにする。 Therefore, the management program SSD1 shown in FIG. 12 is an application program newly incorporated after the information processing apparatus 100 is shipped from the factory, and the embedded processing of the management program SSD1 is as described in §2. It will be executed by the higher-level management program ISD. That is, by giving the application load command shown in FIG. 11 (b) to the management program ISD, a load process for loading the program package to be the management program SSD1 is executed, and the management program ISD is made to execute the load process shown in FIG. 11 (c). By giving the installation command shown, the installation process for expanding the loaded package is executed, and finally, by giving the write command shown in FIG. 11 (d) to the management program ISD, the installed management program SSD1 The key writing process for writing the encryption key to be used will be executed. As described in §3, this key writing process can be executed by the newly installed management program SSD1 itself, but in the basic embodiment shown below, the key is used by the management program ISD. An example in which the writing process is executed will be described.

ここで、暗号鍵の格納は、次の準備段階および書込段階の2段階に分けて行われる。準備段階は、インストール時(図11(c) のインストールコマンドが与えらえた時)に実行される処理であり、データ格納部112内のSSD1用データの一部として、鍵テーブルT(SSD1)を用意する処理である。もっとも、この準備段階で用意される鍵テーブルT(SSD1)は、空の格納場所から構成される仮想的なテーブルであり、暗号鍵の実データが記録されるわけではない。別言すれば、インストール時に行われる準備段階では、論理的な鍵空間上に暗号鍵を格納するための鍵テーブルが用意されるだけであり、この段階では、メモリの記憶容量が無駄に消費されることはない。 Here, the storage of the encryption key is performed in two stages, the next preparation stage and the writing stage. The preparation stage is a process executed at the time of installation (when the installation command shown in FIG. 11C is given), and the key table T (SSD1) is used as a part of the SSD1 data in the data storage unit 112. This is the process to prepare. However, the key table T (SSD1) prepared in this preparation stage is a virtual table composed of empty storage locations, and the actual data of the encryption key is not recorded. In other words, in the preparatory stage performed at the time of installation, only the key table for storing the encryption key is prepared in the logical key space, and the storage capacity of the memory is wasted at this stage. There is nothing.

一方、書込段階は、鍵書込時(図11(d) の書込コマンドが与えらえた時)に実行される処理であり、準備段階で用意された鍵テーブルT(SSD1)の所定の格納場所に、実際の鍵データ(暗号鍵)を書き込む処理である。すなわち、論理空間上に構築されていた鍵テーブルT(SSD1)の所定箇所に対応するメモリ上の実空間上に、暗号鍵のデータが実際に書き込まれることになる。したがって、この書込段階を実行すると、暗号鍵の実データに相当する記憶容量が消費されることになる。このため、本来は必要のない暗号鍵が書込段階で実際に書き込まれることになると、メモリが無駄に消費されることになる。 On the other hand, the writing stage is a process executed at the time of key writing (when the writing command shown in FIG. 11D is given), and is a predetermined key table T (SSD1) prepared in the preparation stage. This is the process of writing the actual key data (encryption key) to the storage location. That is, the data of the encryption key is actually written in the real space on the memory corresponding to the predetermined location of the key table T (SSD1) constructed in the logical space. Therefore, when this writing step is executed, the storage capacity corresponding to the actual data of the encryption key is consumed. Therefore, if an encryption key that is not originally required is actually written at the writing stage, the memory is wasted.

スマートフォンやICカードなどの携帯型の小型情報処理装置の場合、内蔵するメモリの記憶容量が小さいため、できるだけ無駄を省き、必要最小限の暗号鍵のみが格納された状態を保つことが重要である。特に、ICカード用のメモリでは、一般的なUSBメモリ等に比べて、高度なセキュリティを要求されることが多いため、セキュリティがより堅固な高価なメモリが用いられることが多い。したがって、大容量のメモリを内蔵することは、コストダウンを図る上で困難であり、運用上、記憶容量の節約が強く求められる。更に、特願2015−168868号明細書などには、複数の暗号化プロトコルを切り替えて利用する技術なども開示されており、このような技術を利用するようになると、鍵テーブルTに格納すべき暗号鍵の数はより増加することが予想され、鍵空間の効率的な利用が益々重要になってくる。 In the case of a small portable information processing device such as a smartphone or IC card, the storage capacity of the built-in memory is small, so it is important to reduce waste as much as possible and keep only the minimum necessary encryption key stored. .. In particular, since the memory for an IC card is often required to have a higher level of security than a general USB memory or the like, an expensive memory with more robust security is often used. Therefore, it is difficult to incorporate a large-capacity memory in order to reduce the cost, and it is strongly required to save the storage capacity in operation. Further, Japanese Patent Application No. 2015-168868 also discloses a technique for switching and using a plurality of encryption protocols, and when such a technique is used, it should be stored in the key table T. The number of cryptographic keys is expected to increase, and efficient use of key space will become increasingly important.

また、不要な暗号鍵が格納されていると、万一、外部に漏洩した場合には、セキュリティ上の問題も生じる。すなわち、たとえ特定の情報処理装置100にとっては不要な暗号鍵であったとしても、外部に漏洩した場合は、外部装置200や別な情報処理装置も含めたシステム全体のセキュリティを脅かす要因になる。したがって、不要な暗号鍵を鍵テーブルT(SSD1)に格納しておくことは、セキュリティ上、決して好ましくはない。 In addition, if an unnecessary encryption key is stored, a security problem will occur if it is leaked to the outside. That is, even if the encryption key is unnecessary for the specific information processing device 100, if it is leaked to the outside, it becomes a factor that threatens the security of the entire system including the external device 200 and another information processing device. Therefore, storing unnecessary encryption keys in the key table T (SSD1) is not preferable in terms of security.

もちろん、不要な暗号鍵をわざわざ書き込む必要はないので、通常であれば、鍵テーブルT(SSD1)には、必要な暗号鍵のみが書き込まれるはずである。しかしながら、実際には、本来は必要のない暗号鍵について、上記書込処理が実行され、鍵テーブルT(SSD1)に書き込まれてしまうことも少なくない。これは、書込処理が、外部装置200から与えられる書込コマンド(図11(d) )に基づいて一義的に実行される処理であるためである。 Of course, since it is not necessary to bother to write an unnecessary encryption key, normally, only the necessary encryption key should be written in the key table T (SSD1). However, in reality, it is not uncommon for the above-mentioned writing process to be executed for an encryption key that is not originally required and written to the key table T (SSD1). This is because the write process is a process that is uniquely executed based on the write command (FIG. 11 (d)) given by the external device 200.

別言すれば、従来の管理プログラムISDは、外部装置200から特定の暗号鍵の書込コマンドが与えられると、下位にインストールした管理プログラムSSD1にとって当該特定の暗号鍵が必要であろうがなかろうが、当該書込コマンドを忠実に実行し、当該特定の暗号鍵を鍵テーブルT(SSD1)の指定箇所に書き込む処理を実行する。もちろん、外部装置200側で十分な吟味を行い、インストールした管理プログラムSSD1にとって必要な暗号鍵のみを厳選して書込コマンドを与えるようにすれば問題は生じないが、外部装置200側に用意されるアプリケーションプログラム(管理プログラムSSD1を情報処理装置100内に新たに組み込む処理を行うためのプログラム)がそのような配慮を行わない粗雑なプログラムであった場合、不要な暗号鍵が書き込まれてしまうことは避けられない。 In other words, the conventional management program ISD may or may not require the specific encryption key for the management program SSD1 installed below when a specific encryption key write command is given from the external device 200. Will faithfully execute the write command and execute the process of writing the specific encryption key to the designated location of the key table T (SSD1). Of course, if the external device 200 side is thoroughly examined and only the encryption key required for the installed management program SSD1 is carefully selected and the write command is given, no problem will occur, but it is prepared on the external device 200 side. If the application program (a program for performing a process of newly incorporating the management program SSD1 into the information processing device 100) is a crude program that does not give such consideration, an unnecessary encryption key will be written. Is inevitable.

特に、スマートフォンやICカードなどの情報処理装置は、社会生活を営むのに欠かせない物品として広く普及しており、大手企業から中小企業に至るまで、様々な事業者から様々なアプリケーションプログラムが提供されている。このため、外部装置200側に用意されるアプリケーションプログラムも種々雑多であり、情報処理装置100側にインストールされるアプリケーションプログラムに必要な暗号鍵のみを書き込むような適切な書込コマンドを送信するような配慮がなされていないことも少なくない。 In particular, information processing devices such as smartphones and IC cards are widely used as indispensable items for social life, and various application programs are provided by various businesses from large companies to small and medium-sized companies. Has been done. Therefore, the application programs prepared on the external device 200 side are also various, and an appropriate write command for writing only the encryption key required for the application program installed on the information processing device 100 side is transmitted. Often no consideration is given.

前述したように、図11(c) に示すインストールコマンドにはパラメータが付随しており、このパラメータには機能指定情報が含まれている。そして、このインストールコマンド(管理プログラムSSD1をインストールするコマンド)を受信した管理プログラムISDは、インストール対象となる管理プログラムSSD1のプログラムをメモリ上に展開する際に、機能指定情報で指定された処理機能(たとえば、SCP種別「SCP02」で示される暗号化プロトコルを用いた暗号通信路開設機能)だけが実行可能となるような処置を施す。この場合、後続して与えられる書込コマンドでは、本来であれば、「SCP02」が利用する暗号鍵のみを書き込む指示を与えるべきであるが、外部装置200側に用意されるアプリケーションプログラムが粗雑なプログラムであると、そのような細かな配慮を行うことなしに、常に、すべての暗号鍵についての書込コマンドをそれぞれ送信する処理が行われるケースも少なくない。 As described above, the installation command shown in FIG. 11 (c) is accompanied by a parameter, and this parameter includes function specification information. Then, when the management program ISD that receives this installation command (command to install the management program SSD1) expands the program of the management program SSD1 to be installed on the memory, the processing function specified by the function designation information (the processing function (command to install the management program SSD1)) For example, a measure is taken so that only the encrypted communication path opening function using the encryption protocol indicated by the SCP type "SCP02") can be executed. In this case, the write command given thereafter should normally give an instruction to write only the encryption key used by "SCP02", but the application program prepared on the external device 200 side is crude. In a program, there are many cases in which a process of sending a write command for all encryption keys is always performed without giving such detailed consideration.

たとえば、図7に示されている複数のSCP種別のいずれが指定されても対応できるようにするには、これら個々のSCP種別が利用するすべての暗号鍵が順次書き込まれるように、複数の書込コマンドを順番に送信する仕様を採用すればよい。この場合、インストールコマンドの機能指定情報で指定した内容を吟味する手間を省いた安易なプログラムルーチンからなる粗雑なアプリケーションプログラムを外部装置200側に用意しておけば足りる。実際、そのような粗雑なアプリケーションプログラムであっても、動作上、支障が生じることはない。また、そのような安易な意図ではないにせよ、何らかのバグによって、不要な暗号鍵の書込処理を指示する書込コマンドが送信されてしまうケースもあり得る。 For example, in order to be able to handle any of the plurality of SCP types shown in FIG. 7, a plurality of documents are written so that all the encryption keys used by these individual SCP types are sequentially written. A specification may be adopted in which the embedded commands are sent in order. In this case, it is sufficient to prepare a crude application program consisting of a simple program routine that saves the trouble of examining the contents specified in the function specification information of the installation command on the external device 200 side. In fact, even such a crude application program does not cause any operational problems. In addition, even if it is not such an easy intention, there may be a case where a write command instructing the writing process of an unnecessary encryption key is transmitted due to some bug.

このように、外部装置200側に粗雑なアプリケーションプログラムが用意されていると、インストール対象となる管理プログラムSSD1については不要な暗号鍵が鍵テーブルT(SSD1)に書き込まれてしまうことになる。上述したとおり、鍵テーブルTに暗号鍵の実データが書き込まれると、当該実データに相当する記憶容量が実際に消費されてしまうことになる。このような問題は、インストール対象となるアプリケーションプログラムが管理プログラムである場合だけでなく、一般アプリである場合にも生じる。すなわち、何らかの暗号鍵を利用した処理機能を有するアプリケーションプログラムは、管理プログラムのみではなく、一般アプリにも存在する。これは、暗号鍵は、暗号通信路の開設に利用されるだけでなく、データの改竄をチェックする検証処理、トークンを用いた検証処理、暗号化されたプログラムの復号処理など、様々な処理に利用されるためである。 In this way, if a crude application program is prepared on the external device 200 side, an unnecessary encryption key for the management program SSD1 to be installed will be written to the key table T (SSD1). As described above, when the actual data of the encryption key is written in the key table T, the storage capacity corresponding to the actual data is actually consumed. Such a problem occurs not only when the application program to be installed is a management program but also when it is a general application. That is, an application program having a processing function using some kind of encryption key exists not only in the management program but also in the general application. This is because the encryption key is used not only for opening an encrypted communication channel, but also for various processes such as verification processing for checking data tampering, verification processing using tokens, and decryption processing for encrypted programs. This is because it is used.

GlobalPlatform (登録商標)の仕様では、図11(c) に示すインストールコマンドのパラメータの部分に、図13に示すように、「特権パラメータ(privilege)」と「SCP種別パラメータ」とを含ませることが定められている。これらのパラメータは、いずれも、本願にいう「機能指定情報」であり、管理プログラムがインストール処理を実行する際には、インストール対象となるアプリケーションプログラムについて、この機能指定情報によって指定された指定機能が実行可能となるような処理が施される。 According to the specifications of GlobalPlatform (registered trademark), as shown in FIG. 13, "privilege" and "SCP type parameter" may be included in the parameter part of the installation command shown in FIG. 11 (c). It has been decided. All of these parameters are "function designation information" referred to in the present application, and when the management program executes the installation process, the designated function specified by this function designation information is applied to the application program to be installed. Processing is performed so that it can be executed.

ここで、「SCP種別パラメータ」は、インストール対象となるアプリケーションプログラムが管理プログラム(すなわち、暗号通信路開設機能を有するプログラム)である場合に付加されるパラメータであり、当該インストール対象となる管理プログラムが、インストール後にサポートする暗号化プロトコルを特定する情報になる。具体的には、現在のところ、図7に例示するような種々の暗号化プロトコル(SCP種別)が一般に利用されているが、図13に示すSCP種別パラメータとして、たとえば、「SCP02」を指定した場合、インストール対象となる管理プログラムは、インストール後に、SCP種別「SCP02」で特定される暗号化プロトコルのみをサポートすることになる。 Here, the "SCP type parameter" is a parameter added when the application program to be installed is a management program (that is, a program having an encrypted communication path opening function), and the management program to be installed is , Information that identifies the encryption protocol to support after installation. Specifically, at present, various cryptographic protocols (SCP types) as illustrated in FIG. 7 are generally used, and for example, "SCP02" is specified as the SCP type parameter shown in FIG. In this case, the management program to be installed supports only the encryption protocol specified by the SCP type "SCP02" after installation.

これに対して、「特権パラメータ(privilege)」は、インストール対象となるアプリケーションプログラムについて、様々な機能指定を行うためのパラメータであり、GlobalPlatform (登録商標)により、図14に示すような細かな仕様が定められている。具体的には、この「特権パラメータ(privilege)」は、全3バイト(24ビット)によって構成されており、図14(a) の表の各行に示されているビットパターン#0〜#20について、図14(b) に示すような特権が定義されている。ここで、図14(a) の表の各欄において、「1」は当該ビットが「1」であることを示し、「0」は当該ビットが「0」であることを示し、「−」は当該ビットの値が不問であることを示している。なお、ビットパターン#20は、将来の機能拡張のために予約されているパターンであり、表の各欄において、「X」は当該ビットが「0」であることを示している。 On the other hand, the "privilege" is a parameter for specifying various functions of the application program to be installed, and is specified by GlobalPlatform (registered trademark) in detail as shown in FIG. Is stipulated. Specifically, this "privilege" is composed of all 3 bytes (24 bits), and the bit patterns # 0 to # 20 shown in each row of the table in FIG. 14 (a). , The privileges shown in FIG. 14 (b) are defined. Here, in each column of the table of FIG. 14A, "1" indicates that the bit is "1", "0" indicates that the bit is "0", and "-". Indicates that the value of the bit does not matter. Note that bit pattern # 20 is a pattern reserved for future function expansion, and in each column of the table, "X" indicates that the bit is "0".

たとえば、1バイト目のビットb8が「1」になるビットパターン#0は、インストール対象となるアプリケーションプログラムが管理プログラム(Security Domain プログラム)であることを示している。したがって、「特権パラメータ(privilege)」の1バイト目のビットb8が「1」の場合、インストールコマンドのパラメータには、図13に示すように、「特権パラメータ(privilege)」だけでなく「SCP種別パラメータ」も付随することになる。 For example, the bit pattern # 0 in which the bit b8 of the first byte becomes "1" indicates that the application program to be installed is a management program (Security Domain program). Therefore, when the bit b8 of the first byte of the "privilege" is "1", the parameters of the installation command include not only the "privilege" but also the "SCP type" as shown in FIG. "Parameter" will also be attached.

同様に、1バイト目のビットb7が「1」,ビットb1が「0」になるビットパターン#1は、インストール対象となるアプリケーションプログラムが「DAP Verification」の処理機能を有していることを示しており、1バイト目のビットb7が「1」,ビットb1が「1」になるビットパターン#7は、インストール対象となるアプリケーションプログラムが「Mandated DAP Verification」の処理機能を有していることを示している。ビットパターン#1,#7の1バイト目のビットb8が「1」になっているのは、これらの処理機能が管理プログラムに対してのみ与えられる機能であるためである。 Similarly, the bit pattern # 1 in which the bit b7 of the first byte is "1" and the bit b1 is "0" indicates that the application program to be installed has the processing function of "DAP Verification". Bit pattern # 7, in which bit b7 of the first byte is "1" and bit b1 is "1", indicates that the application program to be installed has the processing function of "Mandated DAP Verification". Shown. The bit b8 of the first byte of the bit patterns # 1 and # 7 is set to "1" because these processing functions are given only to the management program.

各ビットパターンの多くのビットは「−」になっているため、実際には、複数のビットパターンを組み合わせた指定が可能である。たとえば、「11100000 00100000 010000000」なる「特権パラメータ(privilege)」は、インストール対象となるアプリケーションプログラムが、管理プログラムであり(#0)、「DAP Verification」(#1)、「Delegated Management」(#2)、「Token Verification」(#10)、「Ciphered Load File Data Block」(#17)の各処理機能が与えられることを示している。 Since many bits of each bit pattern are "-", it is actually possible to specify a combination of a plurality of bit patterns. For example, in the "privilege" of "11100000 00100000 010000000", the application program to be installed is a management program (# 0), "DAP Verification" (# 1), and "Delegated Management" (# 2). ), "Token Verification" (# 10), and "Ciphered Load File Data Block" (# 17).

図14(b) は、この「特権パラメータ(privilege)」の各ビットパターン#0〜#20のそれぞれに対応する特権名とその概要(意味)を示す表である。ここで、特権名の欄が太枠で示されている特権は、暗号鍵を利用した処理機能が与えられることを示している。したがって、これら太枠で示されている特権が機能指定情報として指定されていた場合、インストール処理に続いて、暗号鍵の書込処理が行われることになる。 FIG. 14B is a table showing privilege names corresponding to each of the bit patterns # 0 to # 20 of the “privilege” and their outlines (meanings). Here, the privilege shown in the bold frame in the privilege name column indicates that the processing function using the encryption key is given. Therefore, when the privileges shown in these thick frames are specified as the function specification information, the encryption key writing process is performed after the installation process.

各特権で与えられる個々の処理機能は、GlobalPlatform (登録商標)の仕様で定められている公知の機能であるため、ここでは詳しい説明は省略するが、たとえば、「DAP Verification」(#1)は、暗号鍵を用いてデータの改竄をチェックする検証処理機能を指し、「Token Verification」(#10)は、トークンを用いた検証処理機能を指し、「Ciphered Load File Data Block」(#17)は、暗号化されたプログラムの復号処理機能を指す。「特権パラメータ(privilege)」によって指定された処理機能は、インストール後に、利用可能な処理機能ということになる。 Since the individual processing functions given by each privilege are known functions defined in the specifications of Global Platform (registered trademark), detailed description is omitted here, but for example, "DAP Verification" (# 1) is , Refers to the verification processing function that checks data tampering using an encryption key, "Token Verification" (# 10) refers to the verification processing function that uses tokens, and "Ciphered Load File Data Block" (# 17) , Refers to the decryption processing function of the encrypted program. The processing function specified by the "privilege" is the processing function that can be used after installation.

結局、図13に示す機能指定情報は、図14に示す種々の特権のうちのどれを与えるか(どの処理機能が実行可能となるようなインストールを行うか)を指定する情報(特権パラメータ(privilege))であるとともに、インストール対象が管理プログラムであった場合には、更に、図7に示す種々のSCP種別のうちのどの種別をサポートさせるか(どの暗号化プロトコルに基づく暗号通信路開設機能が実行可能となるようなインストールを行うか)を指定する情報(SCP種別パラメータ)ということになる。そして、インストール処理完了後は、「特権パラメータ(privilege)」で指定された暗号鍵を利用した処理機能(図14(b) に太枠で示されている処理機能)および「SCP種別パラメータ」で指定された暗号通信路開設機能において利用する暗号鍵を書き込むための鍵書込処理を実行する必要がある。 After all, the function designation information shown in FIG. 13 is information (privilege) that specifies which of the various privileges shown in FIG. 14 should be given (which processing function should be installed so as to be executable). )) And, if the installation target is a management program, which of the various SCP types shown in FIG. 7 should be supported (which encryption protocol-based encrypted communication path opening function is available. This is information (SCP type parameter) that specifies (whether to install so that it can be executed). Then, after the installation process is completed, the processing function using the encryption key specified in the "privilege" (the processing function shown in the thick frame in FIG. 14 (b)) and the "SCP type parameter" are used. It is necessary to execute the key writing process for writing the encryption key used in the specified encrypted communication path opening function.

結局、インストール処理後の鍵書込処理によって書き込むべき暗号鍵には、暗号通信路開設機能に利用する暗号鍵だけでなく、特権パラメータ(privilege)によって指定されたいくつかの処理機能に利用する暗号鍵も含まれることになる。したがって、本来であれば、外部装置200側に用意されるアプリケーションプログラムは、インストールコマンドに含まれている特権パラメータ(privilege)およびSCP種別パラメータの内容を吟味して、必要な暗号鍵のみを書き込むための書込コマンドを送信すべきであるが、上述したとおり、粗雑なプログラムの場合、そのような細かな配慮を行うことなしに、あらゆる処理機能に必要な暗号鍵を、とりあえずすべて書き込んでしまうという杜撰な方法を採用するケースも少なくない。 After all, the encryption key to be written by the key writing process after the installation process is not only the encryption key used for the encrypted communication path opening function, but also the encryption used for some processing functions specified by the privilege parameter (privilege). The key will also be included. Therefore, the application program originally prepared on the external device 200 side examines the contents of the privilege parameter (privilege) and the SCP type parameter included in the installation command and writes only the necessary encryption key. However, as mentioned above, in the case of a crude program, all the encryption keys required for all processing functions are written for the time being without such detailed consideration. There are many cases in which a sloppy method is adopted.

このため、実際には、利用されることのない無駄な暗号鍵が多数格納されることになり、貴重な記憶容量の無駄遣いが行われるとともに、セキュリティを低下させる問題も発生することになる。本発明は、このような問題を解決するための新たな手段を提案するものである。以下、その具体的な手法を、第1の実施形態(§5)および第2の実施形態(§6)について詳述する。 For this reason, in reality, a large number of useless encryption keys that are not used are stored, which wastes valuable storage capacity and causes a problem of lowering security. The present invention proposes a new means for solving such a problem. Hereinafter, the specific method will be described in detail with respect to the first embodiment (§5) and the second embodiment (§6).

<<< §5. 本発明の第1の実施形態 >>>
まず、本発明の第1の実施形態について詳述する。
<<< §5. First Embodiment of the present invention >>>
First, the first embodiment of the present invention will be described in detail.

<5.1 第1の実施形態に係る情報処理装置の構成>
本発明の第1の実施形態に係る情報処理装置100は、図12に示すとおり、外部装置200との間で暗号通信を行う機能を有しており、プログラムおよび当該プログラムが利用するデータを格納する情報格納部110と、この情報格納部110に格納されているプログラムを実行するプログラム実行部120とを備えている。そして、情報格納部110には、少なくとも1つの管理プログラムが格納されている。図12には、2組の管理プログラムISD,SSD1が格納された状態が示されているが、ここでは、説明の便宜上、上位管理プログラムISDのみが格納されていたものとしよう。
<Structure of Information Processing Device According to 5.1 First Embodiment>
As shown in FIG. 12, the information processing device 100 according to the first embodiment of the present invention has a function of performing encrypted communication with the external device 200, and stores a program and data used by the program. The information storage unit 110 is provided, and the program execution unit 120 that executes the program stored in the information storage unit 110 is provided. At least one management program is stored in the information storage unit 110. FIG. 12 shows a state in which two sets of management programs ISD and SSD1 are stored, but here, for convenience of explanation, it is assumed that only the upper management program ISD is stored.

既に述べたとおり、管理プログラムISDは、外部装置200から与えられるロードコマンド(図11(b) )に応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、情報格納部110に格納するプログラムロード処理を実行する機能を有している。ここでは、ロード対象となるアプリケーションプログラムが、下位階層の管理プログラムSSD1であった場合を考えてみる。この場合、管理プログラムSSD1の元になるパッケージがロードされることになる。 As described above, the management program ISD loads the application program package having a plurality of processing functions, each of which uses the encryption key, in response to the load command (FIG. 11 (b)) given from the external device 200. It has a function of executing a program load process stored in the information storage unit 110. Here, consider the case where the application program to be loaded is the lower-level management program SSD1. In this case, the package that is the basis of the management program SSD1 will be loaded.

また、管理プログラムISDは、外部装置200から与えられるインストールコマンド(図11(c) )に応じて、プログラムロード処理によってロードされたパッケージを情報格納部110に展開して、当該アプリケーションプログラム(管理プログラムSSD1)をインストールするインストール処理を実行する機能を有している。すなわち、ロード済みのアプリケーションプログラムのパッケージを展開して、アプリケーションインスタンスを生成する処理が行われる。インストールされたアプリケーションプログラムの実行は、このインスタンス化されたプログラムコードを実行する処理ということになる。 Further, the management program ISD expands the package loaded by the program load process into the information storage unit 110 in response to the installation command (FIG. 11 (c)) given from the external device 200, and the management program ISD expands the application program (management program). It has a function to execute an installation process to install SSD1). That is, the process of unpacking the loaded application program package and creating the application instance is performed. Executing the installed application program is the process of executing this instantiated program code.

このとき、図13に示すようなインストールコマンドのパラメータに含まれている機能指定情報によって指定された指定機能だけが実行可能となるようなインスタンス化が行われる。たとえば、機能指定情報を構成する「特権パラメータ(privilege)」によって「Token Verification」なる処理機能が指定され、「SCP種別パラメータ」によって「SCP02」が指定されていた場合、「Token Verification」なる処理機能に必要なルーチンと、「SCP02」に対応する暗号化プロトコルを用いた暗号通信路開設に必要なルーチンとが実行可能となるようなインスタンス化が行われる。GlobalPlatform (登録商標)の仕様では、指定されていない処理機能は、実行不能な状態になる。 At this time, instantiation is performed so that only the specified function specified by the function specification information included in the parameters of the installation command as shown in FIG. 13 can be executed. For example, if the processing function "Token Verification" is specified by the "privilege" that configures the function specification information and "SCP02" is specified by the "SCP type parameter", the processing function "Token Verification" is specified. The routine required for the above and the routine required for opening an encrypted communication channel using the encryption protocol corresponding to "SCP02" are instantiated so as to be executable. According to the GlobalPlatform® specifications, processing functions that are not specified are in an unexecutable state.

すなわち、管理プログラムISDがインストール処理を実行する際には、インストールされたアプリケーションプログラム(管理プログラムSSD1)について、暗号鍵を利用する複数の処理機能のうち、インストールコマンドに含まれている機能指定情報によって指定された指定機能(上例の場合、「Token Verification」なる処理機能と「SCP02」に対応する暗号化プロトコルを用いた暗号通信路開設機能)だけが実行可能となるような処理が行われる。 That is, when the management program ISD executes the installation process, the installed application program (management program SSD1) is based on the function specification information included in the installation command among the plurality of processing functions that use the encryption key. Processing is performed so that only the designated designated function (in the above example, the processing function "Token Verification" and the encrypted communication path opening function using the encryption protocol corresponding to "SCP02") can be executed.

なお、管理プログラムISDは、特定のアプリケーションプログラムについてのインストール処理を実行する際に、必要に応じて、当該アプリケーションプログラムのために、情報格納部110の論理的な鍵空間上に暗号鍵を格納するための鍵テーブルTを構築する処理を行うことができる。上例の場合、インストール対象となるアプリケーションプログラムは、管理プログラムSSD1であるから、鍵テーブルT(SSD1)を構築する処理が行われる。前述したとおり、ここで構築される鍵空間は、論理的な空間であるので、たとえ図3に示すような二次元マトリックス状の鍵空間であっても、実メモリが無駄に消費されることはない。 When executing the installation process for a specific application program, the management program ISD stores the encryption key in the logical key space of the information storage unit 110 for the application program, if necessary. It is possible to perform the process of constructing the key table T for the purpose. In the case of the above example, since the application program to be installed is the management program SSD1, the process of constructing the key table T (SSD1) is performed. As described above, since the key space constructed here is a logical space, even if it is a two-dimensional matrix-like key space as shown in FIG. 3, the real memory is not wasted. No.

続いて、鍵書込処理が実行される。管理プログラムISDは、外部装置200から与えられる鍵書込コマンド(図11(d) )に応じて、インストールされたアプリケーションプログラム(管理プログラムSSD1)が利用する暗号鍵を情報格納部110に格納する鍵書込処理を実行する機能を有している。この鍵書込処理では、論理空間上に構築された鍵テーブルT(SSD1)の所定箇所に対応するメモリ上の実空間上に、暗号鍵のデータの書き込みが行われることになるので、実メモリの記憶容量が実際に消費されることになる。もっとも、「どのような暗号鍵を鍵テーブルT(SSD1)上のどの格納場所に書き込むか」という指示は、外部装置200から与えられる鍵書込コマンドの指示に従うことになる。 Subsequently, the key writing process is executed. The management program ISD is a key for storing the encryption key used by the installed application program (management program SSD1) in the information storage unit 110 in response to the key writing command (FIG. 11 (d)) given by the external device 200. It has a function to execute write processing. In this key writing process, the encryption key data is written in the real space on the memory corresponding to the predetermined location of the key table T (SSD1) constructed in the logical space, so that the real memory is written. The storage capacity of is actually consumed. However, the instruction of "what kind of encryption key is written in which storage location on the key table T (SSD1)" follows the instruction of the key writing command given from the external device 200.

鍵書込コマンドとしては、図11(d) に示すように、暗号鍵の実データを発行データとして与える汎用の「書込コマンドその1」を利用してもよいし、暗号鍵の実データを鍵データとして与える鍵書込専用の「書込コマンドその2」を利用してもよい。この場合、鍵書込処理は、管理プログラムISDではなく、管理プログラムSSD1自身によって実行される。GlobalPlatform (登録商標)の仕様では、鍵データの書込みは、図3に示すような2次元マトリックス状の鍵テーブルTの行単位で行われる。 As the key write command, as shown in FIG. 11 (d), a general-purpose "write command 1" that gives the actual data of the encryption key as the issue data may be used, or the actual data of the encryption key may be used. You may use "write command 2" dedicated to key writing given as key data. In this case, the key writing process is executed by the management program SSD1 itself, not by the management program ISD. According to the specifications of GlobalPlatform (registered trademark), key data is written in units of rows of a two-dimensional matrix-shaped key table T as shown in FIG.

ここに示す実施例の場合、鍵テーブルTは、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体であるが、外部装置200から与えられる鍵書込コマンドには、書込場所指定情報としてキーバージョン番号が含まれており(図11(d) では省略されている)、管理プログラムISDは、鍵書込コマンドを受信すると、このキーバージョン番号に基づいて暗号鍵の格納場所を特定し、図11(d) に示す書込コマンドに、発行データもしくは鍵データとして含まれていた暗号鍵の実データを、特定された格納場所に書き込む処理を行う。 In the case of the embodiment shown here, the key table T is a collection of cells in a two-dimensional matrix in which one cell can be specified by the combination of the key version number and the key ID, but is given by the external device 200. The key write command to be executed includes the key version number as the write location specification information (omitted in FIG. 11 (d)), and when the management program ISD receives the key write command, this key is used. The storage location of the encryption key is specified based on the version number, and the actual data of the encryption key included as the issued data or the key data is written to the specified storage location in the write command shown in FIG. 11 (d). Perform processing.

このように、「どの暗号鍵を鍵テーブルTのどの欄に書き込むか」という内容は、専ら、外部装置200から与えられる鍵書込コマンドによって指示されることになる。したがって、§4で述べたように、外部装置200側に用意されたアプリケーションプログラムが杜撰な指示を行う粗雑なプログラムであった場合、本来は利用されることのない無駄な暗号鍵が書き込まれ、貴重な記憶容量の無駄遣いが行われるとともに、セキュリティを低下させるという問題が発生する。 In this way, the content of "which encryption key is written in which column of the key table T" is exclusively instructed by the key writing command given from the external device 200. Therefore, as described in §4, if the application program prepared on the external device 200 side is a crude program that gives a sloppy instruction, a useless encryption key that is not originally used is written. Valuable storage capacity is wasted and security is reduced.

たとえば、上例のように、管理プログラムSSD1について、「Token Verification」なる処理機能と「SCP02」なる暗号化プロトコルを用いた暗号通信路開設機能だけが実行可能となるようなインストール処理が行われた場合、これに後続する鍵書込処理では、これらの機能に必要な暗号鍵のみの書込みを行うのが好ましいが、実際には前述したとおり、不要な暗号鍵の書込みを指示する書込コマンドが与えられる場合も少なくない。 For example, as in the above example, the management program SSD1 was installed so that only the processing function "Token Verification" and the encryption communication channel opening function using the encryption protocol "SCP02" could be executed. In this case, in the key writing process that follows this, it is preferable to write only the encryption keys necessary for these functions, but in reality, as described above, the write command instructing the writing of unnecessary encryption keys is used. It is often given.

<5.2 第1の実施形態の基本概念>
本発明の第1の実施形態の基本概念は、上例のような状況において、管理プログラムISDもしくは管理プログラムSSD1が、外部装置200から鍵書込コマンド(図11(d) )を受信した場合でも、受信した書込コマンドが、不要な暗号鍵の書込みを指示するコマンドであった場合には、これを拒絶して実行しないようにする、という点にある。すなわち、本発明の第1の実施形態に係る管理プログラムは、鍵書込処理を実行する前に、当該鍵書込処理によって格納される暗号鍵を利用する処理機能が実行可能な機能であるか否かを判定し、実行可能な機能であった場合には、当該鍵書込処理を実行するが、実行可能な機能でなかった場合には、当該鍵書込処理を拒絶することになる。
<5.2 Basic concept of the first embodiment>
The basic concept of the first embodiment of the present invention is that even when the management program ISD or the management program SSD1 receives a key writing command (FIG. 11 (d)) from the external device 200 in the situation as in the above example. If the received write command is a command instructing the writing of an unnecessary encryption key, it is rejected and not executed. That is, is the management program according to the first embodiment of the present invention a function capable of executing a processing function using the encryption key stored by the key writing process before executing the key writing process? Whether or not it is determined, and if it is an executable function, the key writing process is executed, but if it is not an executable function, the key writing process is rejected.

GlobalPlatform (登録商標)の仕様では、上述したとおり、鍵テーブルTへの暗号鍵の書込みは行単位で行われ、外部装置200から与えられる鍵書込コマンドには、ある1つのキーバージョン番号を指定する書込場所指定情報と、当該キーバージョン番号に対応する行に書き込むべき暗号鍵の実データが含まれている。そこで、上例の場合、ある1つのキーバージョン番号を指定した鍵書込コマンドが与えられた場合、管理プログラムISDは、当該キーバージョン番号に対応する行に格納すべき暗号鍵の要否を判定し、不要な暗号鍵であった場合には、当該鍵書込コマンドを拒絶する処理を行うことになる。別言すれば、外部装置200から与えられる鍵書込コマンドのうち、必要な暗号鍵の書込みを指示するコマンドのみが実行され、不要な暗号鍵の書込みを指示するコマンドは拒絶される。 According to the specifications of GlobalPlatform (registered trademark), as described above, the encryption key is written to the key table T on a line-by-line basis, and one key version number is specified for the key write command given from the external device 200. The writing location specification information to be written and the actual data of the encryption key to be written in the line corresponding to the key version number are included. Therefore, in the above example, when a key writing command specifying a certain key version number is given, the management program ISD determines whether or not an encryption key to be stored in the line corresponding to the key version number is necessary. However, if the encryption key is unnecessary, the process of rejecting the key writing command is performed. In other words, among the key writing commands given from the external device 200, only the command instructing the writing of the necessary encryption key is executed, and the command instructing the writing of the unnecessary encryption key is rejected.

鍵書込コマンドによって書込が指示された暗号鍵について、要不要の判定を行うためには、管理プログラムISDが、特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を特定する情報を含む実行可能リストを作成し、これを情報格納部110に格納する処理を行うようにすればよい。そうすれば、鍵書込処理を実行する前に、この実行可能リストを参照することにより、判定対象となる処理機能が実行可能な機能であるか否かを判断することができる。 In order to determine whether or not the encryption key for which writing is instructed by the key writing command is necessary, the application program can be executed when the management program ISD executes the installation process for a specific application program. An executable list including information for specifying various functions may be created, and the process of storing the executable list in the information storage unit 110 may be performed. Then, by referring to this executable list before executing the key writing process, it is possible to determine whether or not the processing function to be determined is an executable function.

たとえば、上例の場合のように、管理プログラムSSD1について、「Token Verification」なる処理機能と「SCP02」なる暗号化プロトコルを用いた暗号通信路開設機能だけが実行可能となるようなインストール処理が行われた場合、この2つの処理機能を特定する情報を含む実行可能リストを作成し、これをISD用データもしくはSSD1用データの一部としてデータ格納部112に格納しておけばよい。そうすれば、鍵書込処理を実行する前に、この実行可能リストを参照すれば、どの処理機能が実行可能かを確認することができる。 For example, as in the case of the above example, the management program SSD1 is installed so that only the processing function "Token Verification" and the encryption communication path opening function using the encryption protocol "SCP02" can be executed. If so, an executable list including information that identifies these two processing functions may be created and stored in the data storage unit 112 as a part of the ISD data or the SSD1 data. Then, before executing the key writing process, it is possible to confirm which process function can be executed by referring to this executable list.

もっとも、通常、鍵書込コマンドには、「どの暗号鍵をどこに書き込むか」という情報は含まれているものの、「当該暗号鍵がどの処理機能に用いられるか」という情報は含まれていない。たとえば、GlobalPlatform (登録商標)の仕様では、鍵書込コマンド(図11(d) )には、暗号鍵の実データとキーバージョン番号とが含まれているため、鍵テーブルT上の書込場所は認識できるが、書込対象となる暗号鍵がどの処理機能に用いられるかという点については認識することはできない。 However, although the key writing command usually includes information on "which encryption key is written where", it does not include information on "which processing function the encryption key is used for". For example, in the specifications of GlobalPlatform (registered trademark), since the key writing command (Fig. 11 (d)) includes the actual data of the encryption key and the key version number, the writing location on the key table T However, it is not possible to recognize which processing function the encryption key to be written is used for.

そこで、ここで述べる実施形態では、暗号鍵を利用する特定の処理機能と当該暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報を作成し、これを情報格納部110に格納しておく。そうすれば、管理プログラムが、鍵書込コマンドを受信したときには、この対応情報を参照することにより、受信した鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所に対応づけられている特定の処理機能を判定対象と認識し、当該判定対象が実行可能な機能であった場合には、受信した鍵書込コマンドを実行し、実行可能な機能でなかった場合には、受信した鍵書込コマンドを拒絶することができる。 Therefore, in the embodiment described here, correspondence information for associating a specific processing function using an encryption key with a storage location on a key table for storing the encryption key is created, and this is stored in the information storage unit 110. Store it. Then, when the management program receives the key write command, it refers to this corresponding information to the storage location specified by the write location specification information included in the received key write command. When the associated specific processing function is recognized as a judgment target and the judgment target is an executable function, the received key write command is executed and the function is not executable. Can reject the received key write command.

<5.3 第1の実施形態の具体的な内容>
上述した対応情報を作成するには、予め、暗号鍵を用いるあらゆる処理機能について、それぞれ特定の格納場所を対応づけておけばよい。図15は、このような対応づけを示す格納場所一覧テーブルGの具体的な一例を示す図である。この格納場所一覧テーブルGには、合計11組の機能のそれぞれについて、特定のキーバージョン番号の範囲が対応づけられている。ここで、前半の5組の機能は、図13に示す「特権パラメータ(privilege)」によって指定される処理機能であり、図14(b) に太枠で囲って示した#1,#7,#10,#16,#17の特権に対応する処理機能(暗号鍵を必要とする処理機能)である。一方、後半の6組の機能は、図13に示す「SCP種別パラメータ」によって指定される処理機能であり、図7の表に記載された個々のSCP種別に対応する暗号化プロトコルを用いた暗号通信路開設機能に相当する。
<5.3 Specific contents of the first embodiment>
In order to create the above-mentioned correspondence information, it is sufficient to associate a specific storage location with each of all the processing functions using the encryption key in advance. FIG. 15 is a diagram showing a specific example of the storage location list table G showing such association. In this storage location list table G, a specific range of key version numbers is associated with each of a total of 11 sets of functions. Here, the first five sets of functions are the processing functions specified by the "privilege" shown in FIG. 13, and are shown in a thick frame in FIG. 14 (b), # 1, # 7, This is a processing function (processing function that requires an encryption key) corresponding to the privileges of # 10, # 16, and # 17. On the other hand, the latter six sets of functions are processing functions specified by the "SCP type parameters" shown in FIG. 13, and are encrypted using the encryption protocol corresponding to each SCP type shown in the table of FIG. Corresponds to the communication channel opening function.

このような格納場所一覧テーブルGを予め定めておき、情報処理装置100側と外部装置200側とで共用する情報にすれば、暗号鍵を用いる任意の処理機能に関しては、それぞれ特定のキーバージョン番号が自動的に割り当てられることになる。したがって、たとえば、外部装置200から情報処理装置100に対して、「DAP Verification」という処理機能に利用される暗号鍵を書き込む鍵書込コマンドを送信する場合には、書込場所指定情報として、必ず「0x10〜0x1F」の範囲内のキーバージョン番号を指定することが暗黙の了解事項になる。実際、GlobalPlatform (登録商標)の仕様では、このような格納場所一覧テーブルGが定められている(なお、図15に示すテーブルGは、説明の便宜を考慮して作成したテーブルであり、GlobalPlatform (登録商標)の仕様に基づくテーブルではない)。 If such a storage location list table G is defined in advance and used as information shared by the information processing device 100 side and the external device 200 side, a specific key version number is used for any processing function using an encryption key. Will be assigned automatically. Therefore, for example, when a key writing command for writing an encryption key used for a processing function called "DAP Verification" is transmitted from the external device 200 to the information processing device 100, the writing location designation information is always used. It is an implicit understanding to specify a key version number within the range of "0x10 to 0x1F". In fact, in the specifications of GlobalPlatform (registered trademark), such a storage location list table G is defined (Note that the table G shown in FIG. 15 is a table created for convenience of explanation, and GlobalPlatform ( It is not a table based on the specifications of (registered trademark)).

この図15に示すような格納場所一覧テーブルGを情報処理装置100側に用意しておけば、実行可能な特定の処理機能と当該処理機能に用いる暗号鍵を格納する格納場所とを対応づける対応情報を作成することができる。ここでは、このような対応情報を示すテーブルを機能テーブルFと呼ぶことにする。 If the storage location list table G as shown in FIG. 15 is prepared on the information processing apparatus 100 side, the specific processing function that can be executed is associated with the storage location that stores the encryption key used for the processing function. Information can be created. Here, a table showing such correspondence information will be referred to as a function table F.

図16は、管理プログラムSSD1のインストール時に作成された機能テーブルF(SSD1)の一例であり、当該管理プログラムSSD1が、インストール後に、「Token Verification」なる処理機能(トークンを用いた検証処理)と「SCP02」なる処理機能(暗号化プロトコル「SCP02」を用いた暗号通信路開設処理機能)とを実行可能であることが示されている。また、「Token Verification」なる処理機能に利用する暗号鍵の格納場所が、キーバージョン番号「0x30〜0x3F」の範囲であることが示され、「SCP02」なる処理機能に利用する暗号鍵の格納場所が、キーバージョン番号「0x70〜0x7F」の範囲であることが示されている。 FIG. 16 is an example of the function table F (SSD1) created at the time of installation of the management program SSD1, and the management program SSD1 has a processing function (verification process using tokens) and “Token Verification” after installation. It is shown that the processing function "SCP02" (encryption communication path opening processing function using the encryption protocol "SCP02") can be executed. Further, it is shown that the storage location of the encryption key used for the processing function "Token Verification" is in the range of the key version number "0x30 to 0x3F", and the storage location of the encryption key used for the processing function "SCP02". Is shown to be in the range of key version numbers "0x70 to 0x7F".

この図16に示す機能テーブルF(SSD1)は、これまで述べてきた例のように、上位管理プログラムISDが、その下位階層に管理プログラムSSD1を組み込む過程で作成される。具体的には、管理プログラムISDに対して、新たに管理プログラムSSD1をインストールするためのインストールコマンド(図11(c) )が与えられ、それに付随するパラメータ(機能指定情報)として、「Token Verification」を示す「特権パラメータ(privilege)」および「SCP02」なる「SCP種別パラメータ」が含まれていた場合に、管理プログラムISDによって、図16に示す機能テーブルF(SSD1)が作成され、ISD用データの一部としてデータ格納部112に格納される。 The function table F (SSD1) shown in FIG. 16 is created in the process of incorporating the management program SSD1 into the lower layer of the upper management program ISD, as in the examples described so far. Specifically, an installation command (FIG. 11 (c)) for newly installing the management program SSD1 is given to the management program ISD, and "Token Verification" is given as a parameter (function specification information) associated therewith. When the "privilege" indicating "privilege" and the "SCP type parameter" of "SCP02" are included, the management program ISD creates the function table F (SSD1) shown in FIG. It is stored in the data storage unit 112 as a part.

要するに、図16に示す機能テーブルF(SSD1)は、特定のアプリケーションプログラム(管理プログラムSSD1)が実行可能な機能を特定する情報を含む実行可能リストと言うことができ、暗号鍵を利用する特定の処理機能と当該暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報と言うこともできる。 In short, the function table F (SSD1) shown in FIG. 16 can be said to be an executable list containing information that identifies functions that can be executed by a specific application program (management program SSD1), and is a specific that uses an encryption key. It can also be said to be correspondence information that associates the processing function with the storage location on the key table for storing the encryption key.

この機能テーブルF(SSD1)の「機能」欄の「Token Verification」および「SCP02」なる情報は、インストールコマンドに付随するパラメータ(機能指定情報)から入手することができる。一方、「キーバージョン番号」欄の「0x30〜0x3F」および「0x70〜0x7F」なる情報は、図15に示す格納場所一覧テーブルGを参照することにより入手することができる。 The information "Token Verification" and "SCP02" in the "Function" column of the function table F (SSD1) can be obtained from the parameters (function specification information) attached to the installation command. On the other hand, the information "0x30 to 0x3F" and "0x70 to 0x7F" in the "key version number" column can be obtained by referring to the storage location list table G shown in FIG.

したがって、管理プログラムISDによるインストールコマンドの実行後には、図17に示すように、ISD用データとしては、上位管理プログラムISD自身が利用する鍵テーブルT(ISD)と、下位階層に組み込んだ管理プログラムSSD1についての機能テーブルF(SSD1)とが格納された状態になり、SSD1用データとしては、下位管理プログラムSSD1自身が利用する鍵テーブルT(SSD1)が格納された状態になる。もっとも、この時点では、鍵テーブルT(SSD1)は、論理的な鍵空間上に構築された仮想のテーブルであり、暗号鍵の実データは格納されていない。 Therefore, after the installation command is executed by the management program ISD, as shown in FIG. 17, the ISD data includes the key table T (ISD) used by the upper management program ISD itself and the management program SSD1 incorporated in the lower hierarchy. The function table F (SSD1) for is stored, and the key table T (SSD1) used by the lower management program SSD1 itself is stored as the data for SSD1. However, at this point, the key table T (SSD1) is a virtual table constructed on a logical key space, and the actual data of the encryption key is not stored.

そこで、続いて、外部装置200から、鍵テーブルT(SSD1)に暗号鍵の実データを書き込むための鍵書込コマンドが与えられることになる。管理プログラムISDは、この鍵書込コマンドを受信したときに、当該鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルF(SSD1)に含まれているか否かを判定し、含まれていた場合には、当該鍵書込コマンドを実行し、含まれていなかった場合には、当該鍵書込コマンドを拒絶することができる。 Therefore, subsequently, the external device 200 gives a key writing command for writing the actual data of the encryption key to the key table T (SSD1). When the management program ISD receives this key write command, the storage location specified by the write location specification information included in the key write command is included in the function table F (SSD1). Whether or not it is included can be determined, and if it is included, the key write command can be executed, and if it is not included, the key write command can be rejected.

たとえば、鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号が、「0x30〜0x3F」および「0x70〜0x7F」の範囲内にある場合は、当該鍵書込コマンドは、インストールされた管理プログラムSSD1が実行可能な「Token Verification」もしくは「SCP02」なる処理機能に用いられる暗号鍵についての鍵書込コマンドであると判断することができるので、当該鍵書込コマンドを実行して暗号鍵の書込みを行うことになる。一方、鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号が、上記範囲外であった場合には、インストールされた管理プログラムSSD1が実行可能な処理機能に用いられる暗号鍵についての鍵書込コマンドではない、と判断することができるので、当該鍵書込コマンドは拒絶される。この場合、鍵書込コマンドに対して、エラーのレスポンスが返されることになる。 For example, if the key version number included in the key write command as the write location specification information is within the range of "0x30 to 0x3F" and "0x70 to 0x7F", the key write command is installed. Since it can be determined that the management program SSD1 is a key writing command for the encryption key used for the executable "Token Verification" or "SCP02" processing function, the key writing command is executed for encryption. The key will be written. On the other hand, if the key version number included in the key write command as the write location specification information is out of the above range, the encrypted key used for the processing function that can be executed by the installed management program SSD1. Since it can be determined that the key writing command is not, the key writing command is rejected. In this case, an error response will be returned for the key write command.

結局、ここで述べた第1の実施形態を実施する上では、まず、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 After all, in implementing the first embodiment described here, first, the storage location list table G as shown in FIG. 15 is stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際に、この格納場所一覧テーブルGを参照することにより、当該アプリケーションプログラム(SSDI)が実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルF(SSD1)を作成し、これをデータ格納部112に格納するようにする。図16は、このような機能テーブルF(SSD1)の一例であり、図17には、この機能テーブルF(SSD1)を、ISD用データとしてデータ格納部112に格納した例が示されている。なお、鍵書込処理を下位管理プログラムSSD1自身に実行させる場合には、機能テーブルF(SSD1)をSSD1用データとして格納しておけばよい。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the application program (SSDI) can be executed by referring to the storage location list table G. A function table F (SSD1) that associates each of these functions with the storage location of the encryption key used for the function is created, and the function table F (SSD1) is stored in the data storage unit 112. FIG. 16 shows an example of such a function table F (SSD1), and FIG. 17 shows an example in which the function table F (SSD1) is stored in the data storage unit 112 as ISD data. When the lower management program SSD1 itself executes the key writing process, the function table F (SSD1) may be stored as SSD1 data.

続いて、管理プログラムISDが、鍵書込コマンドを受信したときには、この機能テーブルF(SSD1)を参照することにより、受信した鍵書込コマンドに含まれている書込場所指定情報(キーバージョン番号)によって指定されている格納場所が、当該機能テーブルF(SSD1)に含まれているか否かを判定し、含まれていた場合には、当該鍵書込コマンドを実行し、含まれていなかった場合には、当該鍵書込コマンドを拒絶する処理を行えばよい。 Subsequently, when the management program ISD receives the key write command, the write location specification information (key version number) included in the received key write command is referred to by referring to this function table F (SSD1). ) Is included in the function table F (SSD1), and if it is included, the key write command is executed and the storage location is not included. In that case, the process of rejecting the key writing command may be performed.

<5.4 第1の実施形態の変形例>
ここでは、これまで述べてきた第1の実施形態について、いくつかの変形例を述べておく。第1の変形例は、図16に示す機能テーブルF(SSD1)の代わりに、図18(a) に示す機能テーブルF′(SSD1)を用いる例である。図16に示す機能テーブルF(SSD1)が、インストール処理後に管理プログラムSSD1が実行可能になる処理機能と、当該処理機能に用いる暗号鍵の格納場所と、の対応関係を示すテーブルであるのに対して、図18(a) に示す機能テーブルF′(SSD1)は、単に、インストール処理後に管理プログラムSSD1が実行可能になる処理機能を列挙したテーブルになっている。
<5.4 Modification of the first embodiment>
Here, some modifications of the first embodiment described so far will be described. The first modification is an example in which the function table F'(SSD1) shown in FIG. 18A is used instead of the function table F (SSD1) shown in FIG. While the function table F (SSD1) shown in FIG. 16 is a table showing the correspondence between the processing function that enables the management program SSD1 to be executed after the installation process and the storage location of the encryption key used for the processing function. The function table F'(SSD1) shown in FIG. 18A is simply a table listing the processing functions that enable the management program SSD1 to be executed after the installation process.

この第1の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 In carrying out this first modification, the storage location list table G as shown in FIG. 15 is also stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際には、図18(a) に示す例のように、当該アプリケーションプログラム(SSDI)が実行可能な機能を列挙した機能テーブルF′(SSD1)を作成し、これをデータ格納部112に格納するようにする。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the application program (SSDI) is executed as in the example shown in FIG. 18 (a). A function table F'(SSD1) listing possible functions is created, and this is stored in the data storage unit 112.

続いて、管理プログラムISDが、鍵書込コマンドを受信したときには、受信した鍵書込コマンドに含まれている書込場所指定情報(キーバージョン番号)によって指定されている格納場所が、図18(a) に示す機能テーブルF′(SSD1)に列挙されている実行可能な機能に対して、図15に示す格納場所一覧テーブルGにおいて対応づけられている格納場所であるか否かを判定し、肯定的な判定結果が得られた場合には、当該鍵書込コマンドを実行し、否定的な判定結果が得られた場合には、当該鍵書込コマンドを拒絶する処理を行えばよい。 Subsequently, when the management program ISD receives the key write command, the storage location specified by the write location specification information (key version number) included in the received key write command is shown in FIG. It is determined whether or not the executable functions listed in the function table F'(SSD1) shown in a) are the storage locations associated with the storage location list table G shown in FIG. If a positive determination result is obtained, the key writing command may be executed, and if a negative determination result is obtained, the key writing command may be rejected.

たとえば、鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号が「0x30」であった場合を考えてみよう。ここで、図18(a) に示す機能テーブルF′(SSD1)に列挙されている実行可能な処理機能は、「Token Verification」および「SCP02」であるから、図15に示す格納場所一覧テーブルGを参照すれば、キーバージョン番号「0x30」なる格納場所は、実行可能な処理機能「Token Verification」および「SCP02」に対応づけられている格納場所になる。したがって、この場合、肯定的な判定結果が得られ、当該鍵書込コマンドは実行されることになる。 For example, consider the case where the key version number included in the key writing command as the writing location specification information is "0x30". Here, since the executable processing functions listed in the function table F'(SSD1) shown in FIG. 18A are "Token Verification" and "SCP02", the storage location list table G shown in FIG. 15 The storage location of the key version number “0x30” is the storage location associated with the executable processing functions “Token Verification” and “SCP02”. Therefore, in this case, a positive determination result is obtained, and the key writing command is executed.

第2の変形例は、図16に示す機能テーブルF(SSD1)の代わりに、図18(b) に示す機能テーブルF''(SSD1)を用いる例である。図16に示す機能テーブルF(SSD1)が、インストール処理後に管理プログラムSSD1が実行可能になる処理機能と、当該処理機能に用いる暗号鍵の格納場所と、の対応関係を示すテーブルであるのに対して、図18(b) に示す機能テーブルF''(SSD1)は、インストール処理後に管理プログラムSSD1が実行可能になる処理機能に利用される暗号鍵の格納場所を列挙したテーブルになっている。 The second modification is an example in which the function table F'' (SSD1) shown in FIG. 18B is used instead of the function table F (SSD1) shown in FIG. While the function table F (SSD1) shown in FIG. 16 is a table showing the correspondence between the processing function that enables the management program SSD1 to be executed after the installation process and the storage location of the encryption key used for the processing function. The function table F'' (SSD1) shown in FIG. 18B is a table listing the storage locations of the encryption keys used for the processing function that enables the management program SSD1 to be executed after the installation process.

この第2の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 In carrying out this second modification, the storage location list table G as shown in FIG. 15 is also stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際には、図15に示す格納場所一覧テーブルGを参照することにより、図18(b) に示す例のように、当該アプリケーションプログラム(SSDI)が実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルF''(SSD1)を作成し、これをデータ格納部112に格納するようにする。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the management program ISD refers to the storage location list table G shown in FIG. As in the example shown in, a function table F'' (SSD1) that lists the storage locations of the encryption keys used for the functions that can be executed by the application program (SSDI) is created and stored in the data storage unit 112. To do.

続いて、管理プログラムISDが、鍵書込コマンドを受信したときには、図18(b) に示す機能テーブルF''(SSD1)を参照することにより、受信した鍵書込コマンドに含まれている書込場所指定情報(キーバージョン番号)によって指定されている格納場所が、当該機能テーブルF''(SSD1)に含まれているか否かを判定し、含まれていた場合には、当該鍵書込コマンドを実行し、含まれていなかった場合には、当該鍵書込コマンドを拒絶する処理を行えばよい。 Subsequently, when the management program ISD receives the key write command, the book included in the received key write command is included in the received key write command by referring to the function table F'' (SSD1) shown in FIG. 18 (b). It is determined whether or not the storage location specified by the embedded location specification information (key version number) is included in the function table F'' (SSD1), and if it is included, the key is written. The command may be executed, and if it is not included, the key write command may be rejected.

たとえば、鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号が「0x30」であった場合は、「0x30」は、図18(b) に示す機能テーブルF''(SSD1)に含まれている。したがって、この場合、当該鍵書込コマンドは実行されることになる。 For example, when the key version number included in the key writing command as the writing location specification information is "0x30", "0x30" is the function table F'' (SSD1) shown in FIG. 18 (b). Included in. Therefore, in this case, the key writing command is executed.

なお、これまで述べてきた実施例は、上位管理プログラムISDが、その管理下にインストールした下位管理プログラムSSD1のために、鍵書込コマンドを実行して暗号鍵の書込処理を実行する例であるが、鍵書込コマンドの実行は、その実行可否の判断も含めて、下位管理プログラムSSD1自身が実行することも可能である。すなわち、§3で述べたとおり、図11(d) に示す書込コマンドその1「STORE DATA (#n)+発行データ」を実行する際には、事前に、図11(h) に示す発行データ書込対象指定コマンド「INSTALL for personalization (#n)+発行対象アプリ名」を実行しておくことにより、発行データの書込対象を指定することができる。 In addition, the examples described so far are examples in which the upper management program ISD executes the key writing command to execute the encryption key writing process for the lower management program SSD1 installed under the management. However, the execution of the key writing command can also be executed by the lower management program SSD1 itself, including the determination of whether or not the command can be executed. That is, as described in §3, when the writing command 1 “STORE DATA (#n) + issue data” shown in FIG. 11 (d) is executed, the issue shown in FIG. 11 (h) is issued in advance. By executing the data write target specification command "INSTALL for personalization (#n) + issue target application name", the issue data write target can be specified.

したがって、下位管理プログラムSSD1のための発行データ(暗号鍵)の書込処理は、上位管理プログラムISDによって行うこともできるし、下位管理プログラムSSD1自身によって行うこともできる。また、図11(d) に示す書込コマンドその2「PUT KEY (#n)+鍵データ」は、任意の管理プログラムに対して、自分自身が利用する暗号鍵の書込処理を自分自身で実行させるコマンドである。したがって、この書込コマンドその2が与えられた場合には、下位管理プログラムSSD1自身によって、鍵書込コマンドの実行が行われることになる。 Therefore, the writing process of the issued data (encryption key) for the lower management program SSD1 can be performed by the upper management program ISD or by the lower management program SSD1 itself. In addition, the write command 2 "PUT KEY (#n) + key data" shown in FIG. 11 (d) allows the user to write the encryption key used by himself / herself to an arbitrary management program. This is the command to be executed. Therefore, when the write command 2 is given, the key write command is executed by the lower management program SSD1 itself.

<5.5 第1の実施形態における処理手順>
最後に、第1の実施形態において、ある管理プログラムが自己の管理下に、新たなアプリケーションプログラムを組み込む場合の処理手順を、図19の流れ図を参照して簡単に説明しておく。
<5.5 Processing procedure in the first embodiment>
Finally, in the first embodiment, the processing procedure when a certain management program incorporates a new application program under its own control will be briefly described with reference to the flow chart of FIG.

まず、ステップS11において、外部装置200から与えられたアプリケーションロードコマンド(第1段階)の受信が行われ、ステップS12において、当該コマンドが実行される。この処理は、プログラムロード処理の第1段階に相当する。続いて、ステップS13において、外部装置200から与えられたアプリケーションロードコマンド(第2段階)の受信が行われ、ステップS14において、当該コマンドが実行される。この処理は、プログラムロード処理の第2段階に相当する。このようなプログラムロード処理は、図11(b) に示すコマンドの処理として、既に述べたとおりである。 First, in step S11, the application load command (first stage) given from the external device 200 is received, and in step S12, the command is executed. This process corresponds to the first stage of the program load process. Subsequently, in step S13, the application load command (second stage) given from the external device 200 is received, and in step S14, the command is executed. This process corresponds to the second stage of the program load process. Such a program load process is as described above as a command process shown in FIG. 11 (b).

次に、ステップS15において、外部装置200から与えられたアプリケーションプログラムのインストールコマンドの受信が行われ、ステップS16において、当該コマンドが実行される。この処理は、ステップS14までの処理でロードされたアプリケーションプログラムのバイナリデータをメモリ上に展開してインスタンス化するインストール処理に相当する。このとき、前述したように、機能テーブルF(SSD1),F′(SSD1),F''(SSD1)などを作成する処理が行われる。このようなインストール処理は、図11(c) に示すコマンドの処理として、既に述べたとおりである。 Next, in step S15, the installation command of the application program given from the external device 200 is received, and in step S16, the command is executed. This process corresponds to the installation process of expanding and instantiating the binary data of the application program loaded in the processes up to step S14 on the memory. At this time, as described above, the process of creating the function tables F (SSD1), F'(SSD1), F''(SSD1) and the like is performed. Such an installation process is as described above as a command process shown in FIG. 11 (c).

そして、ステップS17において、外部装置200から与えられた、暗号鍵の書込みを目的とするアプリケーション向け発行データの書込コマンド(鍵書込コマンド)の受信が行われる。本発明の第1の実施形態では、受信した鍵書込コマンドを実行する前に、ステップS18,S19における判定処理が行われる。すなわち、ステップS18において、ステップS16で作成した機能テーブルが参照され、ステップS19において、受信した鍵書込コマンドによる書込対象となる暗号鍵を利用する処理機能が実行可能な機能であるか否かの判定が行われる。機能テーブルを利用した具体的な判定方法は、これまで述べたとおりである。 Then, in step S17, the writing command (key writing command) of the issued data for the application for the purpose of writing the encryption key given from the external device 200 is received. In the first embodiment of the present invention, the determination processing in steps S18 and S19 is performed before executing the received key writing command. That is, in step S18, the function table created in step S16 is referred to, and in step S19, whether or not the processing function using the encryption key to be written by the received key write command is an executable function. Is determined. The specific determination method using the function table is as described above.

ステップS19における判定により肯定的な結果が得られた場合には、ステップS20において、受信した鍵書込コマンドの実行が行われ、暗号鍵の書込みがなされる。この場合、外部装置200に対しては、鍵書込コマンドの正常終了を示すレスポンスが返される。一方、ステップS19における判定により否定的な結果が得られた場合には、ステップS21において、受信した鍵書込コマンドは拒絶され、暗号鍵の書込みは行われない。この場合、外部装置200に対しては、鍵書込コマンドに対するエラーレスポンスが返される。 If a positive result is obtained from the determination in step S19, the received key writing command is executed and the encryption key is written in step S20. In this case, a response indicating the normal termination of the key writing command is returned to the external device 200. On the other hand, if a negative result is obtained by the determination in step S19, the received key writing command is rejected and the encryption key is not written in step S21. In this case, an error response to the key writing command is returned to the external device 200.

<<< §6. 本発明の第2の実施形態 >>>
続いて、本発明の第2の実施形態について詳述する。
<<< §6. Second Embodiment of the present invention >>>
Subsequently, the second embodiment of the present invention will be described in detail.

<6.1 第2の実施形態の基本概念>
本発明の第2の実施形態に係る情報処理装置の基本構成は、§5で述べた第1の実施形態に係る情報処理装置100の基本構成と同様であり、図12のブロック図に示すとおりである。第1の実施形態は、情報処理装置100に、新たなアプリケーションプログラムを組み込む際に、不要な暗号鍵の書込みが行われないようにする、という基本概念に基づくものであり、具体的には、実行不能な処理機能に用いられる暗号鍵についての鍵書込コマンドが与えられた場合には当該コマンドを拒絶する、という方法を採用するものである。
<6.1 Basic concept of the second embodiment>
The basic configuration of the information processing device according to the second embodiment of the present invention is the same as the basic configuration of the information processing device 100 according to the first embodiment described in §5, as shown in the block diagram of FIG. Is. The first embodiment is based on the basic concept of preventing unnecessary writing of an encryption key when incorporating a new application program into the information processing device 100. When a key write command for an encryption key used for an unexecutable processing function is given, the method of rejecting the command is adopted.

これに対して、ここで述べる第2の実施形態は、既にインストール済みの既存のアプリケーションプログラムについて、後に、実行可能な処理機能の変更が行われる場合を想定したものであり、その基本概念は、そのような機能変更によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を削除する、というものである。 On the other hand, the second embodiment described here assumes that the existing application program that has already been installed is changed in the process function that can be executed later, and the basic concept thereof is as follows. When there is a processing function that has been changed from executable to infeasible due to such a function change, the encryption key used for the processing function that has been changed to be infeasible is deleted.

たとえば、前述の§5では、第1の実施形態として、上位管理プログラムISDが、新たなアプリケーションプログラムとして、下位管理プログラムSSD1を組み込む実施例を述べた。この実施例の場合、インストールコマンドのパラメータに含まれる機能指定情報によって、「Token Verification」および「SCP02」という2つの処理機能が指定されていたため、図16に示すような機能テーブルF(SSD1)が作成される。そして、下位管理プログラムSSD1は、「Token Verification」なる処理機能と「SCP02」なる処理機能とが実行可能になるような形態でインストールされることになる。 For example, in §5 described above, as the first embodiment, the upper management program ISD incorporates the lower management program SSD1 as a new application program. In the case of this embodiment, since the two processing functions "Token Verification" and "SCP02" are specified by the function specification information included in the parameters of the installation command, the function table F (SSD1) as shown in FIG. 16 is displayed. Created. Then, the lower management program SSD1 is installed in a form in which the processing function "Token Verification" and the processing function "SCP02" can be executed.

もっとも、アプリケーションロードコマンドによって情報処理装置100内にロードされた下位管理プログラムSSD1のプログラムパッケージには、上記2つの処理機能だけでなく、図14(b) に特権として示されている様々な処理機能や、図7にSCP種別として示されている様々な暗号化プロトコルに対応した暗号通信路開設機能を実行するためのプログラムルーチンが含まれている。上例の場合、インストールされた下位管理プログラムSSD1は、「Token Verification」および「SCP02」という2つの処理機能のみしか実行できなくなるが、これは、上位管理プログラムISDによるインストール処理によって、指定されなかった処理機能についての実行を制限する設定が行われるためである。 However, the program package of the lower management program SSD1 loaded in the information processing apparatus 100 by the application load command includes not only the above two processing functions but also various processing functions shown as privileges in FIG. 14 (b). In addition, a program routine for executing an encrypted communication path opening function corresponding to various encryption protocols shown as a CP type in FIG. 7 is included. In the case of the above example, the installed lower management program SSD1 can execute only two processing functions, "Token Verification" and "SCP02", but this was not specified by the installation processing by the upper management program ISD. This is because settings are made to limit the execution of processing functions.

たとえば、インストール処理によって管理プログラムSSD1をメモリ上に展開してインスタンス化する際に、個々の処理機能についての実行可否を示すフラグを設定し(インストールコマンドのパラメータに含まれる機能指定情報によって指定された処理機能についてのみ実行可能のフラグを設定する)、実行不能のフラグを設定されている処理機能については実行を制限するようにしておけば、上記運用を行うことができる。 For example, when the management program SSD1 is expanded on the memory and instantiated by the installation process, a flag indicating whether or not each processing function can be executed is set (specified by the function specification information included in the parameter of the installation command). The above operation can be performed by limiting the execution of the processing function for which the execution function is set) and the execution function for which the non-execution flag is set.

したがって、実際には、アプリケーションプログラムをインストールした後においても、必要があれば、個々の処理機能について実行可能/実行不能の状態を変更することができる。すなわち、インストール時には実行不能に設定されていた処理機能を後で実行可能に変更したり、逆に、インストール時には実行可能に設定されていた処理機能を後で実行不能に変更したりすることができる。前者の場合は、該当する処理機能のフラグを実行不能から実行可能に変更すればよく、後者の場合は、該当する処理機能のフラグを実行可能から実行不能に変更すればよい。 Therefore, in reality, even after the application program is installed, the executable / non-executable state of each processing function can be changed if necessary. That is, a processing function that was set to be non-executable at the time of installation can be changed to be executable later, and conversely, a processing function that was set to be non-executable at the time of installation can be changed to be non-executable later. .. In the former case, the flag of the corresponding processing function may be changed from infeasible to executable, and in the latter case, the flag of the corresponding processing function may be changed from executable to infeasible.

このような機能変更を可能にするためには、予め、実行可能機能変更処理コマンドを用意しておき、管理プログラムが、当該実行可能機能変更処理コマンドに応じて、個々の処理機能についての実行可能/実行不能の状態(上記フラグの状態)を変更できるようにしておけばよい。したがって、ここで述べる第2の実施形態に係る情報処理装置における管理プログラムには、外部装置から与えられる実行可能機能変更処理コマンドに応じて、既にインストール済みのアプリケーションプログラムが実行可能な処理機能を変更する実行可能機能変更処理を実行する機能が備わっている必要がある。 In order to enable such a function change, an executable function change processing command is prepared in advance, and the management program can execute each processing function according to the executable function change processing command. / It suffices to be able to change the infeasible state (the state of the above flag). Therefore, in the management program in the information processing device according to the second embodiment described here, the processing function that can be executed by the already installed application program is changed according to the executable function change processing command given from the external device. Executable function It is necessary to have a function to execute the change process.

第2の実施形態の特徴は、このように、既にインストール済みの既存のアプリケーションプログラムについての実行可能機能変更処理が行われた際に、実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を削除する鍵削除処理を行う点にある。この鍵削除処理により、もはや不要になった暗号鍵がそのまま格納され続ける事態を避けることができる。したがって、第1の実施形態と同様に、必要最小限の暗号鍵のみが格納された状態を維持し、暗号鍵の格納場所の記憶容量を節約するとともに、セキュリティ上の問題を低減させる、という格別な効果が得られる。 The feature of the second embodiment is that when the executable function change process for the existing application program that has already been installed is performed, there is a process function that is changed from executable to non-executable. The point is to perform a key deletion process that deletes the encryption key used for the processing function that has been changed to be infeasible. By this key deletion process, it is possible to avoid a situation in which an encryption key that is no longer needed is continuously stored as it is. Therefore, as in the first embodiment, the state in which only the minimum necessary encryption key is stored is maintained, the storage capacity of the encryption key storage location is saved, and the security problem is reduced. Effect can be obtained.

<6.2 第2の実施形態の具体的な内容>
続いて、この第2の実施形態を、より具体的な事例について説明する。たとえば、§5で述べた例の場合、上位管理プログラムISDが実行したインストール処理により新たにインストールされた下位管理プログラムSSD1は、「Token Verification」および「SCP02」という2つの処理機能が実行可能な状態に設定されており、図16に示すような機能テーブルF(SSD1)が作成されている。この状態において、たとえば「SCP03」なる処理機能を実行可能にするには、上位管理プログラムISDに対して、前述した実行可能機能変更処理コマンドを与えることにより、機能変更処理を実行させればよい。具体的には、管理プログラムISDは、下位管理プログラムSSD1のインストール時に「実行不能」に設定した「SCP03」なる処理機能についてのフラグを「実行可能」に変更する処理を行えばよい。
<6.2 Specific contents of the second embodiment>
Subsequently, a more specific example of this second embodiment will be described. For example, in the case of the example described in §5, the lower management program SSD1 newly installed by the installation process executed by the upper management program ISD can execute two processing functions of "Token Verification" and "SCP02". The function table F (SSD1) as shown in FIG. 16 is created. In this state, for example, in order to enable the processing function "SCP03" to be executed, the function change processing may be executed by giving the above-mentioned executable function change processing command to the upper management program ISD. Specifically, the management program ISD may perform a process of changing the flag for the processing function "SCP03" set to "executable" when the lower management program SSD1 is installed to "executable".

もちろん、その際には、図16に示す機能テーブルF(SSD1)に対して、機能「SCP03」およびキーバージョン番号「0x80〜0x8F」を追加する処理を行うようにするのが好ましい。そうすれば、実行可能機能変更処理コマンドに後続して与えられる鍵書込コマンドを実行する際に、前述した第1の実施形態と同様の判定を行うことができ、不要な暗号鍵の書込みを阻止することができる。 Of course, in that case, it is preferable to perform a process of adding the function "SCP03" and the key version numbers "0x80 to 0x8F" to the function table F (SSD1) shown in FIG. Then, when the key write command given after the executable function change processing command is executed, the same determination as in the first embodiment described above can be made, and unnecessary encryption key writing can be performed. It can be stopped.

このように、これまで「実行不能」だった処理機能を「実行可能」に変更するにあたっては、前述した第1の実施形態により、無駄な暗号鍵が書き込まれることを防止できる。しかしながら、これまで「実行可能」だった処理機能を「実行不能」に変更するにあたっては、前述した第1の実施形態では、十分な対応ができない。たとえば、上例において、これまで実行可能に設定されていた「Token Verification」という処理機能を実行不能に変更する実行可能機能変更処理コマンドが与えられた場合を考えてみる。このような実行可能機能変更処理コマンドを受信した管理プログラムISDは、下位管理プログラムSSD1のインストール時に「実行可能」に設定した「Token Verification」なる処理機能についてのフラグを「実行不能」に変更する処理を行うことになる。 In this way, when changing the processing function that was previously "unexecutable" to "executable", it is possible to prevent unnecessary encryption keys from being written by the first embodiment described above. However, in changing the processing function that has been "executable" to "unexecutable", the above-mentioned first embodiment cannot sufficiently deal with it. For example, in the above example, consider the case where an executable function change processing command for changing a processing function called "Token Verification", which has been set to be executable, is given. The management program ISD that receives such an executable function change processing command changes the flag for the processing function "Token Verification" set to "executable" when the lower management program SSD1 is installed to "unexecutable". Will be done.

もちろん、その際には、図16に示す機能テーブルF(SSD1)に収録されている機能「Token Verification」およびキーバージョン番号「0x30〜0x3F」を削除する処理を行うようにするのが好ましい。そうすれば、以後、鍵書込コマンドが与えられた場合に、正しい判定を行うことができ、機能「Token Verification」に利用される暗号鍵の書込みを阻止することができる。 Of course, in that case, it is preferable to perform a process of deleting the function "Token Verification" and the key version numbers "0x30 to 0x3F" recorded in the function table F (SSD1) shown in FIG. Then, after that, when the key writing command is given, the correct determination can be made, and the writing of the encryption key used for the function "Token Verification" can be prevented.

ただ、鍵テーブルT上には、まだ、機能「Token Verification」に利用される暗号鍵がそのまま残っており、もはや不要になった機能「Token Verification」用の暗号鍵がそのまま格納された状態になっている。このような事態にも対応できるように、ここで述べる第2の実施形態では、上位管理プログラムISDが下位管理プログラムSSD1について実行可能機能変更処理を実行したときに、当該変更処理によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を、情報格納部から削除する鍵削除処理を併せて実行するようにしている。 However, the encryption key used for the function "Token Verification" still remains on the key table T, and the encryption key for the function "Token Verification" that is no longer needed is stored as it is. ing. In order to cope with such a situation, in the second embodiment described here, when the upper management program ISD executes the executable function change process for the lower management program SSD1, the change process executes the execution from the executable state. When there is a processing function that has been changed to be infeasible, the key deletion process that deletes the encryption key used for the processing function that has been changed to be infeasible from the information storage unit is also executed.

要するに、管理プログラムは、実行可能機能変更処理を実行する際には、実行可能リスト(機能テーブルF)に対する書き換えを行い、この実行可能リスト(機能テーブルF)から削除されることになった処理機能に利用される暗号鍵を、情報格納部から削除する鍵削除処理を実行することになる。この鍵削除処理は、鍵テーブルTを構成するメモリ上の実空間上に書き込まれていた暗号鍵のデータを削除し、メモリ上の実空間を開放する処理ということになるので、メモリ上の利用可能記憶容量は実際に増加する。 In short, the management program rewrites the executable list (function table F) when executing the executable function change process, and the processing function to be deleted from this executable list (function table F). The key deletion process for deleting the encryption key used for is deleted from the information storage unit is executed. This key deletion process is a process of deleting the data of the encryption key written in the real space on the memory constituting the key table T and releasing the real space on the memory. Possible storage capacity actually increases.

なお、鍵削除処理を実行する際に、鍵テーブルT上のどの格納場所のデータを削除するかは、個々の処理機能と鍵テーブル上の個々の格納場所とを対応づける対応情報を参照して決めればよい。第1の実施形態の説明で述べたとおり、管理プログラムは、特定のアプリケーションプログラムについてのインストール処理を実行する際に、暗号鍵を利用する特定の処理機能と当該暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報(たとえば、図16に示す機能テーブルF)を作成し、これを情報格納部に格納する処理を行う。そこで、管理プログラムが、実行可能機能変更処理を実行する際には、この対応情報を参照して、実行可能から実行不能に変更された処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行すればよい。 When executing the key deletion process, which storage location data on the key table T is to be deleted is determined by referring to the correspondence information that associates the individual processing functions with the individual storage locations on the key table. You just have to decide. As described in the description of the first embodiment, the management program has a specific processing function that uses an encryption key when executing an installation process for a specific application program, and a key table for storing the encryption key. Correspondence information (for example, the function table F shown in FIG. 16) that associates with the above storage location is created, and a process of storing this in the information storage unit is performed. Therefore, when the management program executes the executable function change process, it refers to this correspondence information and identifies the storage location associated with the process function changed from executable to non-executable. The key deletion process for deleting the encryption key stored in the stored location may be executed.

ここで述べる実施例の場合、鍵テーブルTは、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなるが、暗号鍵の書込みは、この鍵テーブルTの行単位で行われるため、管理プログラムは、キーバージョン番号に基づいて、書込対象もしくは削除対象となる暗号鍵の格納場所を特定することができる。したがって、たとえば、図16に示すような機能テーブルF(SSD1)が作成されている状態において、機能「Token Verification」を実行可能から実行不能に変更する機能変更処理が行われた場合、キーバージョン番号「0x30〜0x3F」の範囲内に格納されていた暗号鍵はすべて不要になったものと判断し、これらの暗号鍵をすべて削除する鍵削除処理を実行すればよい。 In the case of the embodiment described here, the key table T is composed of a collection of cells in a two-dimensional matrix in which one cell can be specified by the combination of the key version number and the key ID, but the writing of the encryption key is performed. Since this is performed row by row in the key table T, the management program can specify the storage location of the encryption key to be written or deleted based on the key version number. Therefore, for example, when the function table F (SSD1) as shown in FIG. 16 is created and the function change process for changing the function "Token Verification" from executable to inoperable is performed, the key version number. It is determined that all the encryption keys stored in the range of "0x30 to 0x3F" are no longer needed, and the key deletion process for deleting all these encryption keys may be executed.

結局、ここで述べた第2の実施形態を実施する上では、まず、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 After all, in implementing the second embodiment described here, first, the storage location list table G as shown in FIG. 15 is stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際に、この格納場所一覧テーブルGを参照することにより、当該アプリケーションプログラム(SSDI)が実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルF(SSD1)を作成し、これをデータ格納部112に格納するようにする。図16は、このような機能テーブルF(SSD1)の一例であり、図17には、この機能テーブルF(SSD1)を、ISD用データとしてデータ格納部112に格納した例が示されている。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the application program (SSDI) can be executed by referring to the storage location list table G. A function table F (SSD1) that associates each of these functions with the storage location of the encryption key used for the function is created, and the function table F (SSD1) is stored in the data storage unit 112. FIG. 16 shows an example of such a function table F (SSD1), and FIG. 17 shows an example in which the function table F (SSD1) is stored in the data storage unit 112 as ISD data.

続いて、管理プログラムISDが、実行可能機能変更処理コマンドを受信したときには、この機能テーブルF(SSD1)に対する書き換えを行い、機能テーブルF(SSD1)から削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにすればよい。 Subsequently, when the management program ISD receives the executable function change processing command, it rewrites the function table F (SSD1) and associates it with the processing function to be deleted from the function table F (SSD1). The key deletion process for deleting the encryption key stored in the specified storage location may be executed by specifying the stored location.

もちろん、この第2の実施形態についても、図16に示す機能テーブルF(SSD1)の代わりに、図18(a) に示す機能テーブルF′(SSD1)を用いる第1の変形例を実施することが可能である。この第1の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 Of course, also in this second embodiment, the first modification using the function table F'(SSD1) shown in FIG. 18A instead of the function table F (SSD1) shown in FIG. 16 is carried out. Is possible. In carrying out this first modification, the storage location list table G as shown in FIG. 15 is also stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際には、図18(a) に示す例のように、当該アプリケーションプログラム(SSDI)が実行可能な機能を列挙した機能テーブルF′(SSD1)を作成し、これをデータ格納部112に格納するようにする。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the application program (SSDI) is executed as in the example shown in FIG. 18 (a). A function table F'(SSD1) listing possible functions is created, and this is stored in the data storage unit 112.

続いて、管理プログラムISDが、実行可能機能変更処理コマンドを受信したときには、図18(a) に示す機能テーブルF′(SSD1)に対する書き換えを行い、図15に示す格納場所一覧テーブルGを参照することにより、機能テーブルF′(SSD1)から削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を行えばよい。 Subsequently, when the management program ISD receives the executable function change processing command, it rewrites the function table F'(SSD1) shown in FIG. 18A and refers to the storage location list table G shown in FIG. As a result, the storage location associated with the processing function to be deleted from the function table F'(SSD1) is specified, and the encryption key stored in the specified storage location is deleted. Just do.

たとえば、図18(a) に示す機能テーブルF′(SSD1)から処理機能「Token Verification」が削除されることになった場合、図15に示す格納場所一覧テーブルGを参照すれば、「Token Verification」に対応づけられた格納場所がキーバージョン番号「0x30〜0x3F」に相当することがわかるので、鍵テーブルTにおいて、キーバージョン番号「0x30〜0x3F」の範囲内に格納されていた暗号鍵をすべて削除する鍵削除処理が実行される。 For example, when the processing function "Token Verification" is to be deleted from the function table F'(SSD1) shown in FIG. 18A, the storage location list table G shown in FIG. 15 can be referred to as "Token Verification". Since it can be seen that the storage location associated with "" corresponds to the key version number "0x30 to 0x3F", all the encryption keys stored in the range of the key version number "0x30 to 0x3F" in the key table T are stored. The key deletion process to be deleted is executed.

もちろん、この第2の実施形態について、図16に示す機能テーブルF(SSD1)の代わりに、図18(b) に示す機能テーブルF''(SSD1)を用いる第2の変形例を実施することも可能である。図18(b) に示す機能テーブルF''(SSD1)は、インストール処理後に管理プログラムSSD1が実行可能になる処理機能に利用される暗号鍵の格納場所を列挙したテーブルになっている。 Of course, for this second embodiment, a second modification using the function table F'' (SSD1) shown in FIG. 18B instead of the function table F (SSD1) shown in FIG. 16 is carried out. Is also possible. The function table F'' (SSD1) shown in FIG. 18B is a table listing the storage locations of the encryption keys used for the processing function that enables the management program SSD1 to be executed after the installation process.

この第2の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 In carrying out this second modification, the storage location list table G as shown in FIG. 15 is also stored in the data storage unit 112. This storage location list table G is a table of correspondence information that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions, and is also on the external device 200 side. The same correspondence information is shared.

そして、管理プログラムISDが、特定のアプリケーションプログラム(たとえば、下位管理プログラムSSD1)についてのインストール処理を実行する際には、図15に示す格納場所一覧テーブルGを参照することにより、図18(b) に示す例のように、当該アプリケーションプログラム(SSDI)が実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルF''(SSD1)を作成し、これをデータ格納部112に格納するようにする。 Then, when the management program ISD executes the installation process for a specific application program (for example, the lower management program SSD1), the management program ISD refers to the storage location list table G shown in FIG. As in the example shown in, a function table F'' (SSD1) that lists the storage locations of the encryption keys used for the functions that can be executed by the application program (SSDI) is created and stored in the data storage unit 112. To do.

続いて、管理プログラムISDが、実行可能機能変更処理コマンドを受信したときには、図15に示す格納場所一覧テーブルGを参照することにより、図18(b) に示す機能テーブルF''(SSD1)に対する書き換えを行う。そして、機能テーブルF''(SSD1)から削除されることになった格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を行えばよい。 Subsequently, when the management program ISD receives the executable function change processing command, the function table F'' (SSD1) shown in FIG. 18B is referred to by referring to the storage location list table G shown in FIG. Rewrite. Then, the storage location to be deleted from the function table F'' (SSD1) may be specified, and the key deletion process for deleting the encryption key stored in the specified storage location may be performed.

たとえば、処理機能「Token Verification」について、実行可能から実行不能に変更する実行可能機能変更処理コマンドが与えられた場合、図15に示す格納場所一覧テーブルGを参照することにより、「Token Verification」に対応づけられた格納場所がキーバージョン番号「0x30〜0x3F」に相当することがわかるので、図18(b) に示す機能テーブルF''(SSD1)からキーバージョン番号「0x30〜0x3F」を削除する書き換えが行われる。一方、鍵テーブルTについては、上記削除されたキーバージョン番号「0x30〜0x3F」の範囲内に格納されていた暗号鍵をすべて削除する鍵削除処理が実行される。 For example, when an executable function change processing command for changing the processing function "Token Verification" from executable to non-executable is given, the "Token Verification" can be changed by referring to the storage location list table G shown in FIG. Since it can be seen that the associated storage location corresponds to the key version number "0x30 to 0x3F", the key version number "0x30 to 0x3F" is deleted from the function table F'' (SSD1) shown in FIG. 18 (b). Rewriting is done. On the other hand, for the key table T, a key deletion process for deleting all the encryption keys stored in the range of the deleted key version numbers "0x30 to 0x3F" is executed.

<6.3 第2の実施形態における処理手順>
最後に、第2の実施形態において、ある管理プログラムに対して、既に自己の管理下に組み込まれている既存のアプリケーションプログラムについての実行可能機能を変更するための実行可能機能変更処理コマンドが与えられた場合、当該管理プログラムによって実行される処理手順を、図20の流れ図を参照して簡単に説明しておく。
<6.3 Processing procedure in the second embodiment>
Finally, in the second embodiment, an executable function change processing command for changing the executable function of an existing application program already incorporated under its own control is given to a certain management program. In this case, the processing procedure executed by the management program will be briefly described with reference to the flow chart of FIG.

まず、ステップS31において、外部装置200から与えられた実行可能機能変更処理コマンドの受信が行われ、ステップS32において、当該コマンドに基づく機能変更処理が実行される。ここで行われる機能変更処理には、これまで実行不能であった処理機能を実行可能にする処理と、これまで実行可能であった処理機能を実行不能にする処理と、の2通りの形態がある。前述の実施例の場合、このような機能変更処理は、フラグの状態を切り替える処理によって行うことができる。なお、このとき、必要に応じて、機能テーブルの書換処理が実行される。 First, in step S31, the executable function change processing command given from the external device 200 is received, and in step S32, the function change processing based on the command is executed. There are two types of function change processing performed here: a processing that makes a processing function that was previously unexecutable executable, and a processing that makes a processing function that was previously executable unexecutable. be. In the case of the above-described embodiment, such a function change process can be performed by a process of switching the flag state. At this time, the function table rewriting process is executed as necessary.

続いて、ステップS33において、上記機能変更処理によって実行不能になった機能があるか否かが判定され、実行不能になった機能がある場合には、ステップS34の鍵削除処理が実行される。この処理は、既に述べたとおり、実行不能に変更された処理機能に利用される暗号鍵を、情報格納部(鍵テーブルT)から削除する処理である。 Subsequently, in step S33, it is determined whether or not there is a function that has become infeasible due to the function change process, and if there is a function that has become infeasible, the key deletion process in step S34 is executed. As already described, this process is a process of deleting the encryption key used for the processing function changed to be infeasible from the information storage unit (key table T).

そして、ステップS35において、新たな暗号鍵の書込みが必要か否かが判定され、必要な場合には、図19に示すステップS17へ移行し、鍵書込処理が実行される。具体的には、ステップS32の機能変更処理において、実行不能から実行可能に変更された処理機能があり、当該処理機能が暗号鍵を必要とするものであった場合に、新たな暗号鍵の書込必要と判定され、ステップS17以降の処理が実行されることになる。このステップS17以降の処理内容は、既に第1の実施形態として説明したとおりであり、不要な暗号鍵の書込みは阻止される。 Then, in step S35, it is determined whether or not writing of a new encryption key is necessary, and if necessary, the process proceeds to step S17 shown in FIG. 19, and the key writing process is executed. Specifically, in the function change process of step S32, when there is a processing function changed from infeasible to executable, and the processing function requires an encryption key, a new encryption key is written. It is determined that it is necessary to include the data, and the processes after step S17 are executed. The processing contents after step S17 have already been described as the first embodiment, and writing of an unnecessary encryption key is prevented.

10:スマートフォン
11:SIMカード
20:外部サーバ
100:情報処理装置
110:情報格納部
111:プログラム格納部
112:データ格納部
120:プログラム実行部
200:外部装置
A:種別情報
AP1〜AP2,AP01〜AP32:一般アプリケーションプログラム
AP3:AP(ISD),AP(SSD1),外部装置側のアプリケーションプログラム
CMD:暗号通信路開設コマンド
F(ISD),F(SSD1):機能テーブル
F′(SSD1),F''(SSD1):機能テーブル
G:格納場所一覧テーブル
ISD:最上位の管理プログラム
Key,KeyA〜KeyR:暗号鍵
L:鍵長
OS:OSプログラム
R1,R2,R00,R10:暗号通信路開設ルーチン
SD,SSD1〜SSD3:管理プログラム
S1〜S6:ダイアグラムの各ステップ
S11〜S35:流れ図の各ステップ
T,T1,T2,T00,T10:鍵テーブル
T(ISD),T(SSD1):鍵テーブル
V:鍵値データ
10: Smartphone 11: SIM card 20: External server 100: Information processing device 110: Information storage unit 111: Program storage unit 112: Data storage unit 120: Program execution unit 200: External device A: Type information AP1 to AP2, AP01 to AP32: General application program AP3: AP (ISD), AP (SSD1), application program on the external device side CMD: Cryptographic communication path establishment command F (ISD), F (SSD1): Function table F'(SSD1), F''(SSD1): Function table G: Storage location list table ISD: Top-level management program Key, KeyA to KeyR: Encryption key L: Key length OS: OS program R1, R2, R00, R10: Encryption communication path opening routine SD , SSD1 to SSD3: Management programs S1 to S6: Diagram steps S11 to S35: Flow diagram steps T, T1, T2, T00, T10: Key table T (ISD), T (SSD1): Key table V: Key Value data

Claims (12)

暗号鍵を利用した様々な処理機能を有する情報処理装置であって、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
前記情報格納部に格納されているプログラムを実行するプログラム実行部と、
を備え、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、前記情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、前記プログラムロード処理によってロードされたパッケージを前記情報格納部に展開して、前記アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を前記情報格納部に格納する鍵書込処理と、
を実行する機能を有し、
前記インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、前記インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
前記鍵書込処理を実行する際には、その前に、当該鍵書込処理によって格納される暗号鍵を利用する処理機能が実行可能な機能であるか否かを判定し、実行可能な機能であった場合には、前記鍵書込処理を実行し、実行可能な機能でなかった場合には、前記鍵書込処理を拒絶し、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記アプリケーションプログラムのために、情報格納部の論理的な鍵空間上に暗号鍵を格納するための鍵テーブルを構築し、
鍵書込処理を実行する際に、前記論理的な空間上に構築された鍵テーブルの所定箇所に対応するメモリ上の実空間上に、暗号鍵のデータを書き込み、
暗号鍵を利用する特定の処理機能と前記暗号鍵を格納するための鍵テーブル上の格納場所とを対応づける対応情報が情報格納部に格納されており、
鍵書込コマンドが与えられたときに、前記対応情報を参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所に対応づけられている特定の処理機能を判定対象と認識し、当該判定対象が実行可能な機能であった場合には、前記鍵書込コマンドを実行し、実行可能な機能でなかった場合には、前記鍵書込コマンドを拒絶することを特徴とする情報処理装置。
An information processing device that has various processing functions using an encryption key.
An information storage unit that stores the program and the data used by the program,
A program execution unit that executes a program stored in the information storage unit, and
With
A program load process that loads a package of an application program that has multiple processing functions that use an encryption key and stores it in the information storage unit according to a load command given from an external device.
In response to the installation command given from the external device, the package loaded by the program load process is expanded to the information storage unit, and the application program is installed.
A key writing process for storing the encryption key used by the installed application program in the information storage unit according to the key writing command given from the external device, and
Has the ability to execute
When executing the installation process, it is possible to execute the specified function specified by the function specification information included in the installation command among the multiple processing functions that use the encryption key for the installed application program. To be
Before executing the key writing process, it is determined whether or not the processing function using the encryption key stored by the key writing process is an executable function, and the executable function is executed. If, the key writing process is executed, and if it is not an executable function, the key writing process is rejected .
When executing the installation process for a specific application program, a key table for storing the encryption key is constructed in the logical key space of the information storage unit for the application program.
When executing the key writing process, the encryption key data is written in the real space on the memory corresponding to the predetermined location of the key table constructed in the logical space.
Correspondence information that associates a specific processing function using an encryption key with a storage location on a key table for storing the encryption key is stored in the information storage unit.
When the key write command is given, the storage location specified by the write location specification information included in the given key write command is associated with the corresponding information. A specific processing function is recognized as a judgment target, and if the judgment target is an executable function, the key writing command is executed, and if the judgment target is not an executable function, the key writing is performed. An information processing device characterized by rejecting a command.
請求項1に記載の情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記アプリケーションプログラムが実行可能な機能を特定する情報を含む実行可能リストを作成し、これを情報格納部に格納し、鍵書込処理を実行する前に、前記実行可能リストを参照することにより、判定対象となる処理機能が実行可能な機能であるか否かを判断することを特徴とする情報処理装置。
In the information processing apparatus according to claim 1,
When executing the installation process for a specific application program, an executable list containing information that identifies the functions that can be executed by the application program is created, stored in the information storage unit, and the key writing process is executed. An information processing apparatus for determining whether or not a processing function to be determined is an executable function by referring to the executable list.
請求項1又は請求項2に記載の情報処理装置において、
鍵テーブルが、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなり、
鍵書込コマンドが与えられたときに、当該鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号に基づいて、暗号鍵の格納場所を特定することを特徴とする情報処理装置。
In the information processing apparatus according to claim 1 or 2.
The key table consists of a collection of two-dimensional matrix-like cells that can identify one cell by the combination of the key version number and the key ID.
An information processing device characterized in that when a key writing command is given, the storage location of the encryption key is specified based on the key version number included as the writing location designation information in the key writing command. ..
請求項1に記載の情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記格納場所一覧テーブルを参照することにより、前記アプリケーションプログラムが実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、前記機能テーブルを参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、前記機能テーブルに含まれているか否かを判定し、含まれていた場合には、前記鍵書込コマンドを実行し、含まれていなかった場合には、前記鍵書込コマンドを拒絶することを特徴とする情報処理装置。
In the information processing apparatus according to claim 1,
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, the function that can be executed by the application program and the storage location of the encryption key used for the function can be determined. Create a function table to be associated, store it in the information storage unit, and store it.
When the key write command is given, by referring to the function table, the storage location specified by the write location specification information included in the given key write command is added to the function table. Information characterized by determining whether or not it is included, executing the key writing command if it is included, and rejecting the key writing command if it is not included. Processing equipment.
請求項1に記載の情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記アプリケーションプログラムが実行可能な機能を列挙した機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、当該鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、前記機能テーブルに列挙されている実行可能な機能に対して前記格納場所一覧テーブルにおいて対応づけられている格納場所であるか否かを判定し、肯定的な判定結果が得られた場合には、前記鍵書込コマンドを実行し、否定的な判定結果が得られた場合には、前記鍵書込コマンドを拒絶することを特徴とする情報処理装置。
In the information processing apparatus according to claim 1,
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
When executing the installation process for a specific application program, a function table listing the functions that can be executed by the application program is created, and this is stored in the information storage unit.
When a key write command is given, the storage location specified by the write location specification information included in the key write command is for the executable functions listed in the function table. It is determined whether or not the storage location is associated with the storage location list table, and if a positive determination result is obtained, the key writing command is executed and a negative determination result is obtained. An information processing apparatus characterized in that, when obtained, the key writing command is rejected.
請求項1に記載の情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記格納場所一覧テーブルを参照することにより、前記アプリケーションプログラムが実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、前記機能テーブルを参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、前記機能テーブルに含まれているか否かを判定し、含まれていた場合には、前記鍵書込コマンドを実行し、含まれていなかった場合には、前記鍵書込コマンドを拒絶することを特徴とする情報処理装置。
In the information processing apparatus according to claim 1,
The information storage unit stores a storage location list table that associates various processing functions that use the encryption key with the storage location of the encryption key used for each of these functions.
By referring to the storage location list table when executing the installation process for a specific application program, a function table listing the storage locations of the encryption keys used for the functions that can be executed by the application program is created. , Store this in the information storage
When the key write command is given, by referring to the function table, the storage location specified by the write location specification information included in the given key write command is added to the function table. Information characterized by determining whether or not it is included, executing the key writing command if it is included, and rejecting the key writing command if it is not included. Processing equipment.
請求項1〜のいずれかに記載の情報処理装置において、
外部装置との間に所定の暗号化プロトコルを用いて暗号通信路を開設する処理機能を有するアプリケーションプログラムをインストールする機能を有し、鍵書込処理において、前記暗号通信路の開設に利用する暗号鍵の書き込みを行うことを特徴とする情報処理装置。
In the information processing apparatus according to any one of claims 1 to 6.
It has a function to install an application program having a processing function of opening an encrypted communication path with an external device using a predetermined encryption protocol, and is used to open the encrypted communication path in the key writing process. An information processing device characterized by writing a key.
請求項1〜のいずれかに記載の情報処理装置において、
情報格納部には、アプリケーションプログラムとして、少なくとも1つの管理プログラムが格納されており、
前記管理プログラムは、新たなアプリケーションプログラムを自己の管理下におくために、当該新たなアプリケーションプログラムについてのプログラムロード処理と、インストール処理と、鍵書込処理と、を実行する機能を有することを特徴とする情報処理装置。
In the information processing apparatus according to any one of claims 1 to 6.
At least one management program is stored as an application program in the information storage unit.
The management program is characterized by having a function of executing a program loading process, an installation process, and a key writing process for the new application program in order to keep the new application program under its own control. Information processing device.
請求項に記載の情報処理装置において、
新たなアプリケーションプログラムについてのプログラムロード処理およびインストール処理が完了した後に、外部装置から鍵書込コマンドが与えられたとき、当該鍵書込コマンドに応じた鍵書込処理を前記新たなアプリケーションプログラムが実行することを特徴とする情報処理装置。
In the information processing apparatus according to claim 8,
When a key write command is given from an external device after the program load process and installation process for the new application program are completed, the new application program executes the key write process according to the key write command. An information processing device characterized by
請求項またはに記載の情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随する特権パラメータ「privilege」を機能指定情報と解釈して、指定機能のみが実行可能となるようなインストール処理を実行することを特徴とする情報処理装置。
In the information processing device according to claim 8 or 9.
The management program interprets the privilege parameter "privilege" attached to the installation command specified in the GlobalPlatform (registered trademark) specifications as function specification information, and executes the installation process so that only the specified function can be executed. An information processing device characterized by.
請求項またはに記載の情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随するSCP種別パラメータを機能指定情報と解釈して、指定されたSCP種別で示される暗号化プロトコルに応じた暗号通信路開設処理が実行可能となるようなインストール処理を実行することを特徴とする情報処理装置。
In the information processing device according to claim 8 or 9.
The management program interprets the SCP type parameter attached to the installation command specified in the Global Platform (registered trademark) specification as function specification information, and opens an encrypted communication path according to the encryption protocol indicated by the specified SCP type. An information processing device characterized by executing an installation process that enables the process to be executed.
請求項1〜11のいずれかに記載の情報処理装置としてコンピュータを機能させるプログラム。 A program that causes a computer to function as the information processing device according to any one of claims 1 to 11.
JP2016205138A 2016-10-19 2016-10-19 Information processing device Active JP6950164B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016205138A JP6950164B2 (en) 2016-10-19 2016-10-19 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016205138A JP6950164B2 (en) 2016-10-19 2016-10-19 Information processing device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2021001063A Division JP7136237B2 (en) 2021-01-06 2021-01-06 Information processing device and program

Publications (2)

Publication Number Publication Date
JP2018067795A JP2018067795A (en) 2018-04-26
JP6950164B2 true JP6950164B2 (en) 2021-10-13

Family

ID=62086376

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016205138A Active JP6950164B2 (en) 2016-10-19 2016-10-19 Information processing device

Country Status (1)

Country Link
JP (1) JP6950164B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007971A (en) * 2000-06-23 2002-01-11 Dainippon Printing Co Ltd Issuing process controlling system for ic card
EP2048594A1 (en) * 2007-10-09 2009-04-15 Vodafone Holding GmbH Method for communication, communication device and secure processor

Also Published As

Publication number Publication date
JP2018067795A (en) 2018-04-26

Similar Documents

Publication Publication Date Title
US8196131B1 (en) Payment application lifecycle management in a contactless smart card
JP4578119B2 (en) Information processing apparatus and security ensuring method in information processing apparatus
US8959340B2 (en) Method for accessing and transferring data linked to an application installed on a security module associated with a mobile terminal, and associated security module, management server and system
US8321923B2 (en) Secure sharing of resources between applications in independent execution environments in a retrievable token (e.g. smart card)
US20150029003A1 (en) Mifare push
RU2573211C2 (en) Execution method and universal electronic card and smart card system
CN104380652A (en) Multi-issuer secure element partition architecture for NFC enabled devices
JP2007004522A (en) Storage device
US9250930B2 (en) Configuration method for an electronic entity
CN101086718A (en) Memory system
CN104025544A (en) Sensitive information leakage prevention system, sensitive information leakage prevention method, and computer-readable recording medium
JP5150116B2 (en) IC card and read / write device
CN108199834A (en) A kind of method and device of intelligent cipher key equipment work
JP4338989B2 (en) Memory device
JP6950164B2 (en) Information processing device
JP7136237B2 (en) Information processing device and program
CN101674301B (en) Method for storing certificate
JP4853462B2 (en) Authority delegation system, ID management server, authority delegation method, and authority delegation program
CN102184370B (en) Document security system based on microfiltration drive model
JP6642060B2 (en) Information processing device
JP6701719B2 (en) Information processing equipment
JP6947208B2 (en) Computer program
JP6720558B2 (en) Information processing system and encryption communication method
JP6737020B2 (en) Information processing equipment
JP7275963B2 (en) Communication system and communication method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20190621

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190829

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20191030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200722

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201110

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210106

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20210427

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210720

C60 Trial request (containing other claim documents, opposition documents)

Free format text: JAPANESE INTERMEDIATE CODE: C60

Effective date: 20210720

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20210730

C21 Notice of transfer of a case for reconsideration by examiners before appeal proceedings

Free format text: JAPANESE INTERMEDIATE CODE: C21

Effective date: 20210803

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210906

R150 Certificate of patent or registration of utility model

Ref document number: 6950164

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150