JP7136237B2 - Information processing device and program - Google Patents

Information processing device and program Download PDF

Info

Publication number
JP7136237B2
JP7136237B2 JP2021001063A JP2021001063A JP7136237B2 JP 7136237 B2 JP7136237 B2 JP 7136237B2 JP 2021001063 A JP2021001063 A JP 2021001063A JP 2021001063 A JP2021001063 A JP 2021001063A JP 7136237 B2 JP7136237 B2 JP 7136237B2
Authority
JP
Japan
Prior art keywords
key
function
processing
program
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021001063A
Other languages
Japanese (ja)
Other versions
JP2021072636A (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 JP2021001063A priority Critical patent/JP7136237B2/en
Publication of JP2021072636A publication Critical patent/JP2021072636A/en
Application granted granted Critical
Publication of JP7136237B2 publication Critical patent/JP7136237B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、情報処理装置及びプログラムに関し、特に、外部装置との間に暗号通信路を開設して暗号通信を行う機能や、暗号鍵を利用したその他の処理を行う機能を備えた情報処理装置及びプログラムに関する。 The present invention relates to an information processing apparatus and a program, and more particularly, an information processing apparatus 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. and program.

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

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

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

一方、特許文献4には、サーバ装置側に、ICカードと1対1に対応するICカード対応領域を設け、このICカード対応領域と利用者端末装置との間にセキュアな通信路を設定してサーバ装置とICカードとを一体化する技術が開示されている。 On the other hand, in Japanese Unexamined Patent Application Publication No. 2002-100000, an IC card compatible area corresponding to an IC card on a one-to-one basis is provided on the server device side, and a secure communication path is set between this 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号公報JP-A-2002-217895 特開2006-190222号公報JP 2006-190222 A 特開2010-073188号公報JP 2010-073188 A

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

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

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

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

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

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

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

(2) 本発明の第2の態様は、上述した第1の態様に係る情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、当該アプリケーションプログラムが実行可能な機能を特定する情報を含む実行可能リストを作成し、これを情報格納部に格納し、鍵書込処理を実行する前に、実行可能リストを参照することにより、判定対象となる処理機能が実行可能な機能であるか否かを判断するようにしたものである。
(2) A second aspect of the present invention is the information processing device according to the first aspect described above,
When executing installation processing for a specific application program, create an executable list including information specifying functions executable by the application program, store this in the information storage unit, and execute key writing processing. 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,
constructing a key table for storing an encryption key in a logical key space of an information storage unit when executing an installation process for a specific 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 on the logical space.

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

(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 cells in a two-dimensional matrix that can identify one cell by a combination of a key version number and a 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 as write location specifying information in the key write command.

(6) 本発明の第6の態様は、上述した第1の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルを作成し、これを情報格納部に格納し、
鍵書込コマンドが与えられたときに、機能テーブルを参照することにより、与えられた鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルに含まれているか否かを判定し、含まれていた場合には、鍵書込コマンドを実行し、含まれていなかった場合には、鍵書込コマンドを拒絶するようにしたものである。
(6) A sixth 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 encryption keys with storage locations of encryption keys that are used for these functions,
When executing the installation process for a specific application program, by referring to the storage location list table, the functions that can be executed by the application program correspond to the storage location of the encryption key used for that function. Create a function table to attach to, store this in the information storage unit,
When a 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 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 encryption keys with storage locations of encryption keys that are used for these functions,
creating a function table listing functions that can be executed by the application program when executing the installation process for a specific application program, and storing the table in an 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 stored for the executable functions listed in the function table. It is determined whether or not it is a storage location that is associated in the location list table, and if a positive determination result is obtained, the key write command is executed, and a negative determination 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 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 encryption keys with storage locations of encryption keys that are used for these functions,
creating a function table listing storage locations of encryption keys used for functions executable by the application program by referring to the storage location list table when executing installation processing for a specific application program; Store this in the information storage unit,
When a 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 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 device having various processing functions using an encryption key,
an information storage unit for storing programs and data used by the programs;
a program execution unit that executes the program stored in the information storage unit;
provided,
a program load process of loading an application program package having a plurality of processing functions each using an encryption key in response to a load command given from an external device and storing the package in an information storage unit;
installation processing for expanding the package loaded by the program load processing into an information storage unit and installing the application program in response to an installation command given from an external device;
a key writing process for storing an encryption key used by an installed application program in an information storage unit in response to a key writing command given from an external device;
an executable function change process for changing a process function executable by an already installed application program according to an executable function change process command given from an external device;
with the ability to execute
When executing the installation process, for the installed application program, among the multiple processing functions that use the encryption key, the designated function designated by the function designation information included in the installation command can be executed. west,
When executing the executable function change processing, if there is a processing function that has been changed from executable to non-executable by the change processing, the encryption key used for the processing function that has been changed to non-executable is A key deletion process for deleting the key from the storage unit is also executed.

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

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

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

(13) 本発明の第13の態様は、上述した第12の態様に係る情報処理装置において、
鍵テーブルが、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなり、
キーバージョン番号に基づいて、書込対象もしくは削除対象となる暗号鍵の格納場所を特定するようにしたものである。
(13) A thirteenth aspect of the present invention is the information processing device according to the above-described twelfth aspect,
The key table consists of a collection of cells in a two-dimensional matrix that can identify one cell by a combination of a key version number and a 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 device according to the above-described ninth aspect,
The information storage unit stores a storage location list table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions,
When executing the installation process for a specific application program, by referring to the storage location list table, the functions that can be executed by the application program correspond to the storage location of the encryption key used for that function. Create a function table to attach to, store this 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 identified, and stored in the identified storage location. In this case, a key deletion process is executed to delete the encryption key that has been encrypted.

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

(16) 本発明の第16の態様は、上述した第9の態様に係る情報処理装置において、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、格納場所一覧テーブルを参照することにより、当該アプリケーションプログラムが実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、格納場所一覧テーブルを参照することにより機能テーブルに対する書き換えを行い、機能テーブルから削除されることになった格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行するようにしたものである。
(16) A sixteenth aspect of the present invention is the information processing device according to the above-described ninth aspect,
The information storage unit stores a storage location list table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions,
creating a function table listing storage locations of encryption keys used for functions executable by the application program by referring to the storage location list table when executing installation processing for a specific application program; Store this in the information storage unit,
When the executable function change process is executed, 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 A 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 device according to the first to sixteenth aspects described above,
It has a function to install an application program that has a processing function to open an encrypted communication path with an external device using a predetermined encryption protocol. It is designed for writing.

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

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

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

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

(22) 本発明の第22の態様は、上述した第1~第21の態様に係る情報処理装置としてコンピュータを機能させるプログラムを単独で提供できるようにしたものである。 (22) A twenty-second aspect of the present invention is to independently provide a program that causes a computer to function as the information processing apparatus according to the first to twenty-first aspects.

本発明の第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 executable. The actual write is done only if it was a possible function. Therefore, it is possible to avoid a situation in which a useless encryption key that is never used is written. Therefore, in an information processing device having various processing functions that use encryption keys, it is possible to maintain a state in which only the minimum necessary encryption keys are stored, save the storage capacity of the encryption key storage location, and improve security. problem can be reduced.

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

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

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

<<<§1.ICカードに対する従来の一般的な通信形態>>>
本発明は、外部装置との間で暗号通信を行う機能を有する情報処理装置への利用に適した発明であり、特に、ICカードからなる情報処理装置への利用に適した技術に関する。そこで、ここでは、まず、ICカードに対する従来の一般的な通信形態を簡単に説明しておく。
<<<§1. Conventional general communication form for IC card >>>
The present invention is an invention suitable for use in an information processing apparatus having a function of performing encrypted communication with an external device, and particularly relates to a technique suitable for use in an information processing apparatus comprising an IC card. Therefore, here, first, a conventional general communication form with respect to the 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 how information is communicated between a general smartphone 10, SIM card 11, and external server 20. As shown in FIG. Normally, the smartphone 10 is used with the SIM card 11 installed inside, and communicates with the external server 20 via a predetermined communication path (Internet or telephone line) as necessary. Here, the SIM card 11 (also called UIM card) is an IC card conforming to de facto standard international specifications such as Java Card (trademark) and GlobalPlatform (registered trademark). 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 only shows a communication path between the smartphone 10 and the external server 20, in reality, communication paths between the SIM card 11 and the smartphone 10 and between the SIM card 11 and the external server 20 are also shown. A communication path is formed. 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. An example of establishing a communication path between and communicating with each other is shown. As described above, the present invention is a technology that is particularly suitable for application to IC cards. Therefore, here, the information processing device 100 is the SIM card 11 attached to the smartphone 10, and the external device 200 is the smartphone 10. (or the external server 20 may be used) will be described below.

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 apparatus 100 (SIM card 11) in FIG. 2 shows a state in which two sets of general application programs AP1 and AP2 are installed. Also, an IC card usually incorporates at least one management program SD (Security Domain program). Although this management program SD is classified as a kind of application program, it cooperates with the OS program to play a role of managing the operation of the entire IC card and other application programs under its control. Therefore, in the present application, among the application programs incorporated in the information processing apparatus 100 (SIM card 11), the Security Domain program is called a "management program", and the other application programs are called a "general application program (abbreviation: general application)". 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 has a load function, an install function, a delete function, an issue data write function (for example, an encryption key write function), an encryption channel Various functions such as opening function are provided. The management program SD shown in FIG. 2 incorporates an encrypted communication path opening routine R1 and a key table T1, which are elements for realizing the encrypted communication path opening function. In the case of the information processing device 100 made up of an IC card, a secure encrypted communication path is normally established between the information processing device 100 and the external device 200 based on a predetermined encryption protocol called "SCP: Secure Channel Protocol" to enable encrypted communication. done. In order to implement such a function, the management program SD incorporates an encrypted communication path opening routine R1 and a key table T1.

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

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

ICカードに対する暗号通信に利用される暗号化プロトコルとしては、SCP01,SCP02などのプロトコルが古くから利用されてきている。ただ、これらのプロトコルで用いられている「Triple-DES」という暗号アルゴリズムには危殆化の問題が指摘されており、近年は、AES(Advanced Encryption Standard)なる規格に基づく暗号アルゴリズムを利用したSCP03なるプロトコルも、GlobalPlatform (登録商標)に準拠した仕様として普及し始めている。また、3GPP/ETSIなどの標準化団体を中心に策定されたSCP80,SCP81などのプロトコルの利用も普及してきている。 Protocols such as SCP01 and SCP02 have long been used as encryption protocols used for encrypted communication with IC cards. However, the encryption algorithm "Triple-DES" used in these protocols has been pointed out to be compromised, and in recent years, SCP03, which uses an encryption algorithm based on the AES (Advanced Encryption Standard) standard Protocols are also beginning to spread as specifications conforming to GlobalPlatform (registered trademark). In addition, the use of protocols such as SCP80 and SCP81 developed mainly by standardization organizations 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, specifications using a key space as illustrated in FIG. 3 have become common. The illustrated key table T is composed of a two-dimensional matrix defining key version numbers in the vertical direction and key IDs in the horizontal direction. An address space within the range is allocated, and an address space within the range of 0x00 to 0x7F is allocated 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 is stored in one of the cells of this key table T, and is specified by a combination of a key version number and a key ID. For example, the combination of the key version number "0x01" and the key ID "0x01" identifies the encryption key KeyA. The figure shows a state in which KeyA to KeyR are stored in specific cells as an example of storage of individual encryption keys. Of course, it is not necessary to store encryption keys in all cells, and it is sufficient if necessary encryption keys are stored in predetermined cells.

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

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

一方、図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. 4(a) is a diagram showing the general data structure of the encryption keys KeyA to KeyR stored in individual cells of the key table T shown in FIG. The illustrated data structure of the encryption key key shows the standard format of the encryption key defined as the international standard specifications for the above-mentioned IC card. A key length (L) and key value data (Key value) V are arranged. Here, the type information (key type) A is information including the type of encryption algorithm adopted by the encryption protocol that is supposed to use the encryption key Key, such as "AES", "DES", and "RSA". , and the key length L is information indicating the data length (byte) of the subsequent key value data (key value) V, and the last key value data (key value) V is used for the encryption operation. It is the key value data itself that is used.

また、図4(b) は、暗号通信路開設コマンドCMDのデータ構造の概要を示す図である。実際のコマンドは、ISOなどの規格(たとえば、ISO7816-4)に準拠した、より複雑なデータ構造を有するものになるが、便宜上、図4(b) には、説明に必要な情報のみを抽出した概念的なデータ構造を示すことにする。図示の例は、上述した暗号化プロトコルSCP01,SCP02,SCP03を採用する場合に用いられている暗号通信路の開設コマンドを示しており、暗号通信路の開設を指示する文字列「INITIALIZE UPDATE」なるコマンド文字列情報(実際には、コマンド「INITIALIZE UPDATE」を意味するインストラクションバイト情報であるが、以下、便宜上、「INITIALIZE UPDATE」なる文字列として説明する)と、特定の暗号鍵の格納場所を示す格納場所指定情報(実際には、特定のキーバージョン番号)と、所定の乱数とによって構成されている。 FIG. 4(b) is a diagram showing an overview of the data structure of the encrypted communication channel opening command CMD. Actual commands have a more complicated data structure that complies with ISO standards (e.g., ISO7816-4). I will show a conceptual data structure that The illustrated example shows the cryptographic communication channel opening command used when the above-described encryption protocols SCP01, SCP02, and SCP03 are adopted. Indicates command string information (actually, it is instruction byte information that means the command "INITIALIZE UPDATE", but for the sake of convenience, it will be explained as a string "INITIALIZE UPDATE") and the storage location of a specific encryption key. It consists of storage location designation 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 establishing an encrypted communication channel using the three encryption keys KeyD, KeyE, and KeyF stored in the key table T shown in FIG. followed by a predetermined random number is given to the IC card. The random number added to the end of this encrypted communication channel opening command CMD is used by the external device to authenticate the IC card as a legitimate communication partner. In other words, the encrypted communication path opening command CMD serves as an instruction command for executing the encryption communication path opening process to the IC card, as well as an authentication command requesting the IC card to return an authentication code corresponding to a predetermined random number. also serves as a

図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 data exchanged 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). FIG. 10 is a diagram showing specific examples of commands and responses thereto; FIG. As shown in steps S1 to S6, the smartphone 10 side transmits a predetermined command to the SIM card 11 side, and a response to the command is sent back from the SIM card 11 side to the smartphone 10 side. , information is exchanged between them. In this example, the exchange of information from steps S1 to S4 is carried out through a normal unencrypted communication channel, but the exchange of information at steps S5 and S6 is carried out through an encrypted communication channel established by the management program SD. It is done via a communication channel.

まず、ステップ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" should be called an "application selection command", and is a command for designating a specific channel number and selecting a specific application program (in this case, management program SD) on the SIM card 11 side. is. On the SIM card 11 side, the channel number and the management program SD are associated with each other, and thereafter, when a command having the same channel number is given, it will be processed by the management program SD. When the "SELECT command" is normally received, 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側へと返信する。 The following step S2 is a process of transmitting a "GET DATA command". The commands in step S2 and subsequent steps are given the same channel number as 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 specified data from the memory in the SIM card 11 according to the command, and returns it to the smartphone 10 side as a response to the command.

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

続く、ステップS3,S4は、暗号通信路の開設準備を行うプロセスである。まず、ステップS3では、「INITIALIZE UPDATEコマンド」の送信が行われる。このコマンドは、図4(b) に示すデータ構造をもつ「暗号通信路開設コマンド」であり、前述したとおり、「INITIALIZE UPDATE」なるコマンド文字列情報に、キーバージョン番号および乱数を付加した形態をもつ。このコマンドは、スマートフォン10(外部装置200)が、SIMカード11(情報処理装置100)を正規の交信相手として認証するための認証コマンドとしての役割も果たす。 The following steps S3 and S4 are processes for preparing to open an encrypted communication path. First, in step S3, an "INITIALIZE UPDATE command" is transmitted. This command is an "encrypted communication channel opening command" having the data structure shown in Fig. 4(b). 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" retrieves the encryption key corresponding to the specified key version number from the key table T1, prepares for encryption processing, and A calculation based on a predetermined algorithm is performed on the received random number, and the result of the calculation is returned as a response to the command. On the other hand, the application program AP3 in the smartphone 10 verifies whether the returned calculation result is a correct calculation result for the given random number, and if the calculation result is correct, the SIM card currently in communication 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 subsequent step S4, an "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 as a response in step S<b>3 , adds the operation result to command character string information “EXTERNAL AUTHENTICATE”, and transmits the result to the SIM card 11 . The SIM card 11 (management program SD) verifies whether or not the calculation result sent by the "EXTERNAL AUTHENTICATE command" is a correct calculation result, and if it is a correct calculation result, the smartphone currently in communication is verified. 10 as a legitimate contact.

このステップS3,S4による相互認証の具体的なプロセスは、一般に利用されている公知の技術であるため、ここでは詳しい説明は省略する。こうして、SIMカード11とスマートフォン10との間での相互認証が完了すると、両者間に暗号通信路が開設される。図の破線より下に示されたステップS5以降のコマンドは、この暗号通信路を介して与えられることになる。すなわち、ステップS5以降のコマンドの実質的な内容部分は、所定の暗号化プロトコルに基づいて暗号化され、「SCP:Secure Channel Protocol」により保護されたコマンドとして送信される。 Since the specific process of mutual authentication in steps S3 and S4 is a commonly used known technique, detailed description is omitted here. Thus, when the mutual authentication between the SIM card 11 and the smartphone 10 is completed, an encrypted communication path is established between them. Commands after step S5 shown below the dashed line in the figure are given via this encrypted communication path. That is, the substantial contents of the command after step S5 are 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による保護を行わず、平文のまま通常の通信路を介して返信するようにしているが、必要があれば、これらの応答についても、暗号通信路を介して返信するようにしてもよい。 According to the current standard, it is possible to set the SCP level when an encrypted communication channel is opened (when an "EXTERNAL AUTHENTICATE command" is processed). Specifically, "Level 1: Addition of check code for detecting command tampering" and "Level 2: Addition of check code for detecting command tampering + Encryption of command data field" are defined. 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 field of the command after step S5 is encrypted only when level 2 is set. In the example of steps S5 and S6, the response to the command is not protected by SCP and is returned in plaintext via a normal communication channel. may also be returned via an encrypted communication channel.

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

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

前述したように、先頭の「コマンド文字列情報(INITIALIZE UPDATE)」は、当該コマンドが暗号通信路を開設するコマンドであることを示すための文字列である。続く「格納場所指定情報」は、暗号通信路の開設に用いる特定の暗号鍵を指定するための暗号鍵指定情報であり、図3に示すような鍵テーブルTを用いて暗号鍵を格納する場合は「キーバージョン番号」によって構成される。最後の「乱数」は、前述したとおり、スマートフォン10がSIMカード11を正規の交信相手として認証するために利用されるデータである。 As described above, the "command character string information (INITIALIZE UPDATE)" at the beginning is a character string indicating that the command is a command for opening an encrypted communication channel. The following "storage location designation information" is encryption key designation information for designating a specific encryption key used to establish an encrypted communication path. consists of a "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 cryptographic channel opening command CMD illustrated in FIGS. 6(a) and 6(b) is defined as encryption protocols SCP01, SCP02, and SCP03 in international specifications such as GlobalPlatform (registered trademark) and 3GPP/ETSI. It is what is done. The specification also defines specifications for several encryption protocols, and the data structure of the encrypted communication channel opening command CMD has a different data structure depending on each specification. For example, for the encryption protocol SCP80, as shown in FIG. 6(c), an encrypted communication path opening command CMD with a character string "ENVELOPE" at the beginning is defined. As shown in (d), a cryptographic channel opening command CMD is defined with a character string "MANAGE SECURITY ENVIRONMENT" at the beginning. As described above, the data structure of each command CMD is a conceptual data structure in which only a part of information is extracted for convenience of explanation, and does not represent the actual data structure itself.

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

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

また、同じ暗号アルゴリズムを採用していたとしても、暗号化プロトコルの仕様によってセキュリティ強度に差が生じる。たとえば、図7に示す例の場合、暗号化プロトコルSCP01とSCP02は、いずれもTriple-DESを暗号アルゴリズムとして用いているが、暗号化プロトコルSCP02の方がSCP01よりもセキュリティ強度が高いとされている。 Moreover, even if the same encryption algorithm is used, the security strength differs depending on the specifications of the encryption protocol. For example, in the case of the example shown in FIG. 7, the encryption protocols SCP01 and SCP02 both use Triple-DES as an encryption algorithm, but the encryption protocol SCP02 is said to have a 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 between external devices is controlled by this management program SD. is opened. Management program SD is configured to support any one or more of a variety of encryption protocols as shown in the table of FIG. Therefore, when a plurality of management programs SD are installed in the same information processing apparatus 100, it is not uncommon for each management program SD to employ a different encryption protocol. For example, the first management program SD employs only the encryption protocol SCP81, while the second management program SD employs both the encryption protocols SCP01 and SCP02.

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

図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. 8(a) is a diagram showing a hierarchical structure of application programs constructed in the SIM card 11 (information processing apparatus 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 written into the SIM card 11 when it is shipped from the factory. In the illustrated example, programs SSD1, SSD2, AP01 and AP02 are arranged below the ISD, AP11 and AP12 are arranged below the SSD1, and SSD3, AP21, AP22 and AP23 are arranged below the SSD2. are arranged, and AP31 and AP32 are arranged below SSD3.

この図8(a) にブロックで示されている各プログラムは、いずれもSIMカード11(情報処理装置100)内に組み込まれているアプリケーションプログラムである。ここで、SSD1,SSD2,SSD3(Supplemental Security Domain)は、ISDと同様に管理プログラムであるが、ISDが、工場出荷時に書込まれる最上位の管理プログラムであるのに対して、SSD1,SSD2,SSD3は、ISDもしくは別なSSDの下位に配置されるプログラムになる。 Each program indicated by a block in FIG. 8(a) is an application program installed in the SIM card 11 (information processing apparatus 100). Here, SSD1, SSD2, and SSD3 (Supplemental Security Domain) are management programs like the ISD. SSD3 will be a program placed under the 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 also one of the application programs. ) can be placed and placed under control. Therefore, in the illustrated example, only two sets of general application programs AP11 and AP12 are arranged below the management program SSD1, but one set of separate management programs is arranged below the management program SSD2. SSD3 and three sets of general application programs AP21, AP22, AP23 are arranged, and two sets of general application programs AP31, 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 apparatus 100) and a function of managing lower application programs. Specifically, a general SD program has the following functions. A list of these functions is also provided in FIG. 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> Deleting application programs and instances <Function 7> Writing issued data for applications <Function 8> Reading data <Function 9> Securing a secure communication path

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

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

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

そして、機能7「アプリケーション向け発行データの書込み」の処理は、当該アプリケーションプログラムの実行に必要なデータ(発行データ)をメモリ上に格納する処理である。たとえば、クレジット決済機能をもったアプリケーションプログラムの場合、プログラムを実行可能にするためには、クレジットカード番号やユーザの個人情報などを発行データとして書き込む処理を行う必要がある。また、管理プログラムSDの場合、プログラムを実行可能にするためには、暗号通信路の開設に必要な鍵情報を発行データとして書き込む処理(鍵テーブルTへの暗号鍵の書込処理)を行う必要がある。 The processing of the function 7 "write application issue data" is a process of storing data (issue data) necessary for executing the application program in the memory. For example, in the case of an application program with a credit settlement function, it is necessary to write the credit card number, the user's personal information, etc. as issue data in order to make the program executable. In addition, 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 establishing an encrypted communication path as issue data (a process 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「アプリケーション向け発行データの書込み」によって書込まれることになる。
The processing of the final function 9 "Securing a secure communication channel" is, as described in Section 1, based on a predetermined encryption protocol called "SCP: Secure Channel Protocol". This is a function to establish a secure encrypted communication path and perform encrypted communication. In order to implement such a function, as shown in FIG. 2, the management program SD incorporates an encrypted communication path opening routine R1 and a key table T1. The cryptographic channel opening routine R1 is incorporated by function 5 "Generate application program instance", and the contents of the key table T1 are written by function 7 "Write issued data for application". Become.

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

図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 aspect of information communication between information processing device 100 (SIM card 11) and external device 200 (smartphone 10 or external server 20) at factory shipment. In the illustrated example, the information processing apparatus 100 stores an OS program, an ISD (issuer SD: management program in the highest hierarchy), and two sets of application programs AP01 and AP02 when shipped from the factory. It is ready for operation. Here, the management program ISD incorporates an encrypted communication path opening routine R00 and a key table T00, which can be used to open an encrypted communication path 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, let us consider a case where an external device 200 (smartphone 10 or external server 20) as shown in FIG. 9 is prepared. The application program AP (ISD) provided 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. Like the management program ISD, the application program AP (ISD) is used for encrypted communication. A path opening routine R00 and a key table T00 are incorporated. On the other hand, the illustrated external device 200 is also provided with an application program AP (SSD1). This program AP (SSD1) is a program for opening an encrypted communication path between it and a management program SSD1 that will be installed later in the information processing apparatus 100, and includes an encrypted communication path opening routine R10 and a key table T10. is

ここで、図9に示す工場出荷時の情報処理装置100には、管理プログラムISDは組み込まれているが、管理プログラムSSD1はまだ組み込まれていない。すなわち、この図9に示す情報処理装置100の階層構造は、図8の階層構造図におけるISD,AP01,AP02のブロックのみが存在している状態ということができる。図8の階層構造図は、図9に示す情報処理装置100を入手した利用者が、様々なアプリケーションプログラムを組み込む作業を行った後の状態ということになる。 Here, in the information processing apparatus 100 shown in FIG. 9 at the time of shipment from the factory, the management program ISD is installed, but the management program SSD1 is not yet installed. That is, it can be said that the hierarchical structure of the information processing apparatus 100 shown in FIG. 9 is in a state where only the blocks of ISD, AP01 and AP02 in the hierarchical structure diagram of FIG. 8 exist. The hierarchical structure diagram of FIG. 8 shows the state after the user who acquired the information processing apparatus 100 shown in FIG. 9 has installed 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 a mode of information communication between information processing device 100 (SIM card 11) and external device 200 (smartphone 10 or external server 20) at the start of use. The management program SSD1 is newly stored in the information processing apparatus 100 shown in FIG. 10, and is in an operable state. The illustrated management program SSD1 incorporates an encrypted communication path opening routine R10 and a key table T10. It is possible to establish an encrypted communication path and perform encrypted communication.

なお、GlobalPlatform (登録商標)の仕様では、SIMカード11内に複数の管理プログラムSDを組み込む際には、各管理プログラムSDが利用する鍵テーブルTはそれぞれ別個のテーブルとして格納される。したがって、図10に示す例の場合、鍵テーブルT00と鍵テーブルT10とは別個の独立した鍵テーブルになっている。 According to the GlobalPlatform (registered trademark) specification, when a plurality of management programs SD are installed in the SIM card 11, the key tables T used by each management program SD are stored as separate tables. Therefore, in 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 carrying out 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. Tables T00 and T10 may be configured as a partial area of this key table T. FIG. For example, if the key table T00 is composed of a row area of key version "0x20" and the key table T10 is composed of a row area of key version "0x21", the encryption key recorded in the key table T00 is KeyD, KeyE, and KeyF, and the encryption keys recorded in 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 bring the information processing apparatus 100 from the state shown in FIG. 9 to the state shown in FIG. It is necessary to perform processing to incorporate the program SSD1. For this purpose, first, an encrypted communication channel opening command is given from the external device 200 to the management program ISD of the information processing device 100, and the communication between the two devices is performed by the function 9 "Secure communication channel" processing of the management program ISD. After opening an encrypted communication path to the client, the following commands can be given via this encrypted 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 cause the management program ISD to execute function 4 "load application program". By this processing, the binary data of the program package that constitutes the new management program SSD1 is stored in the memory within the information processing apparatus 100. FIG. This program package is a pre-installed program, and is not ready for execution by the CPU.

続いて、外部装置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 cause the management program ISD to execute the process of function 5 "generate application program instance". By this process, the program package stored in the memory is expanded on the memory, and an application instance that configures the management program SSD1 is generated. Although this application instance is a routine that can be executed by the CPU, it still lacks issue data (in this case, encryption key) to operate as the management program SSD1. In other words, at this point, the cryptographic channel opening routine R10 depicted in the block of SSD1 in FIG. ) is not yet stored in 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 management program ISD performs function 7 "write issued data for application" processing (key write processing). ). Through this processing, the issued data (encryption key) required for the operation of the management program SSD1 is written in the memory. That is, the encryption key, which is the contents of the key table T10 shown in FIG. 10, is written in the memory as issued data. As a result, the new management program SSD1 is incorporated in an operable state under the management of the management program ISD. Therefore, the management program SSD1 can use the encrypted communication path establishment routine R10 and the key table T10 to execute function 9 "secure communication path" as 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. 8(a) is also installed in an operable state under the control of the management program ISD by a similar procedure. Then, after having the management program SSD1 establish an encrypted communication path, the application programs AP11 and AP12 can be incorporated under its management in an operable state by the same procedure. Also, after opening an encrypted communication path to the management program SSD2, the application programs AP21 to AP23 and the management program SSD3 can be installed in an operable state under the same procedure. Furthermore, after opening an encrypted communication path to the management program SSD3, the application programs AP31 and AP32 can be installed in an operable state under its management.

このような手順が行われることに留意すると、結局、ある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 installed under its management, function 9 "secure communication" of the designated management program is performed. Securing a path" to open an encrypted communication path, and via the encrypted communication path, to the designated management program, function 4 "load application program", function 5 "create application program instance (install) , and the function 7, 'write issue data for application'. In short, when a new application program is embedded in the lower hierarchy of a certain management program, a command to instruct loading, installation, and issuing 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 format example of a specific command given to an IC card conforming to GlobalPlatform (registered trademark) specifications. Of course, various other commands are used as IC card commands, but the commands shown in FIGS. Commands associated with specific embodiments described below. The format of each of these commands and the content of processing executed by the IC card according to the command will be briefly described below. The data structure of each command format shown in FIG. 11 is, like the data structure of the command format shown in FIG. not shown.

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

チャネル番号#nは、外部装置200から情報処理装置100に対してコマンドを与える際に、当該コマンドがどのアプリケーションプログラム宛のコマンドであるかを識別させるために用いられる。情報処理装置100には、複数のアプリケーションプログラムが格納されているため、外部装置から与えるコマンドのそれぞれにチャネル番号#nを付加して識別できるようにする必要がある。「アプリケーション選択コマンド」は、特定のアプリケーションプログラムに特定のチャネル番号#nを対応づけるための初期設定を行う役割を果たす。 Channel number #n is used to identify which application program the command is addressed to when a command is given from external device 200 to information processing device 100 . Since a plurality of application programs are stored in the information processing apparatus 100, it is necessary to add a channel number #n to each command given from an external device so that it can be identified. The "application selection command" plays a role of 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 an application selection command "SELECT (#3)+ISD" is given to information processing apparatus 100, management program ISD is associated with channel number #3. Specifically, the OS program in the information processing apparatus 100 that received the command records that the management program ISD is associated with the channel number #3. From then on, all commands assigned channel number #3 are treated as commands addressed to the management program ISD and are 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. 11(b) will be described. This command is a command for executing function 4 of the SD program shown in FIG. 8(b), and is executed as the first step when installing a new application program under the control of a specific management program SD. is a command. Actually, as shown, it consists of two commands.

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

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

上記2段階からなるアプリケーションロードコマンドには、いずれもチャネル番号「#3」が付与されたコマンドなので、「#3」への対応づけがなされている上位管理プログラムISDによって処理されることになる。上位管理プログラムISDは、第2段階のロードコマンドに含まれていた「バイナリデータ」の部分をそのままメモリの所定箇所に格納し、当該「バイナリデータ」が「PackSSD1」なるパッケージ名であるかの確認を行う。ここで、「バイナリデータ」の実体は、新たに組み込まれる下位管理プログラムSSD1用のプログラムデータである。 Since the application load commands in the above two stages are all commands assigned with the channel number "#3", they are processed by the host management program ISD associated with "#3". The upper management program ISD stores the "binary data" part included in the load command in 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 entity of "binary data" is program data for the newly installed lower-level management program SSD1.

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

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

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

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

アプリケーションロードコマンドによってロードされた「バイナリデータ」には、元来、様々な処理機能を実行するためのプログラムルーチンが含まれており、インストールされたアプリケーションプログラム自体は、様々な処理機能を有している。ただ、インストール処理が完了した時点では、これらの処理機能のうち、機能指定情報で指定された機能だけが実行可能な状態になる。このように、指定機能だけが実行可能となるようにするのは、セキュリティ上の配慮のためである。すなわち、インストール対象となるアプリケーションプログラムに与えるべき権限に応じて、必要な処理機能だけが実行可能となるようなインストール処理が行われることになる。 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 designated by the function designation information are ready for execution. The reason why only specified functions are allowed to be executed in this manner is for security considerations. That is, according to the authority to be given to the application program to be installed, the installation process is performed so that only necessary processing functions can be executed.

前述したコマンド書式例(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) above, the case where the lower management program SSD1 is newly installed under the control of the upper management program ISD is taken as an example, and "INSTALL for load (#3) + PackSSD1" and "LOAD (# 3) The procedure for loading the package "PackSSD1" into the memory of the information processing apparatus 100 by the application load command "+binary data" has been described. Here, as a continuation of that, specific processing when an application program installation command such as "INSTALL for install (#3)+PackSSD1+SSD1+parameter" is given will be described. Since this command is also given the channel number "#3", it is processed by the host management program ISD associated with "#3".

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

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

たとえば、「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, let us assume that the package "PackSSD1" contains encryption channel opening routines for two encryption protocols "SCP01 (Triple-DES)" and "SCP02 (Triple-DES)". In this case, if "SCP01 (Triple-DES)" is specified in the parameter (function specifying information) of the installation command of the application program, the cryptographic channel opening routine for "SCP01 (Triple-DES)" will be installed. , the management program SSD1 opens an encrypted communication channel using the encryption protocol "SCP01 (Triple-DES)". On the other hand, if "SCP02 (Triple-DES)" is specified in the parameter (function specifying information), an encrypted communication channel opening routine for "SCP02 (Triple-DES)" is installed, and thereafter the management program SSD1 An encrypted communication path is established using the encryption protocol "SCP02 (Triple-DES)".

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

既に述べたとおり、管理プログラムを含めて、多くのアプリケーションプログラムは、インストールしただけでは正常な動作を行うことができず、実行に必要なデータ(発行データ)をメモリ上に格納する発行処理を行う必要がある。たとえば、クレジット決済機能をもったアプリケーションプログラムの場合、プログラムを実行可能にするためには、クレジットカード番号やユーザの個人情報などを発行データとして書き込む発行処理を行う必要がある。同様に、管理プログラムSDの場合は、プログラムを実行可能にするためには、暗号通信路の開設に必要な暗号鍵を発行データとして書き込む発行処理を行う必要がある。 As already mentioned, many application programs, including the management program, cannot operate normally just by installing them, and perform the issuing process to store the data necessary for execution (issue data) in memory. There is a need. For example, in the case of an application program with a credit settlement function, in order to make the program executable, it is necessary to perform an issuing process in which the credit card number, the user's personal information, etc. are written as issuing data. Similarly, in the case of the management program SD, in order to make the program executable, it is necessary to perform an issue process of writing an encryption key required for establishing an encrypted communication path as issue 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. Write command 1 is a general-purpose write command for writing issue data, has a data structure of "STORE DATA (#n) + issue data", designates channel number #n, and executes "issue It is a command that transmits an instruction to write the data in the "data" portion as the 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 settlement function, credit card numbers, user's personal information, key data used for settlement processing, etc. can be written as "issuance data". Also, if it is given to the management program SD, it is possible to write key data necessary for establishing an encrypted communication path as "issue data". The contents of the key table T illustrated in FIG. 3 can also be written as "issuance data".

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

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

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

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

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

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

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

すなわち、この暗号通信路開設コマンドは、図示のとおり、「INITIALIZE UPDATE (#n)+パラメータ」というデータ構造を有し、チャネル番号#nで指定される管理プログラムSDに対して、暗号通信路を開設する指示を与えるとともに、外部装置200が、情報処理装置100を正規の交信相手として認証するために用いるレスポンスを要求するコマンドである。 That is, as shown in the diagram, this encrypted communication path opening command has a data structure of "INITIALIZE UPDATE (#n) + parameter", and opens the encrypted communication path 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 is used by the external device 200 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 attached to the command from the key table T shown in FIG. Then, the random number added to the command is calculated based on a predetermined algorithm, and the result of the calculation is returned as a response to the command.

<3-6.外部認証コマンド>
続いて、図11(f) に示す「外部認証コマンド」について説明する。このコマンドは、チャネル番号#nで指定される管理プログラムSDが、現在通信を行っている外部装置200を正規の交信相手として認証するためのコマンドであり、既に、図5のダイアグラムのステップS4で説明を行ったものである。
<3-6. External authentication command>
Next, 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 with which communication is currently being performed as a regular communication partner. I have explained.

§3-5で述べたとおり、暗号通信路開設コマンド「INITIALIZE UPDATE (#n)+パラメータ」は、暗号通信路を開設する指示を与えるとともに、外部装置200が、情報処理装置100を正規の交信相手として認証するために用いるレスポンスを要求するコマンドである。外部装置200は、当該レスポンスが正当なものであれば、情報処理装置100を正規の交信相手と判断する。 As described in §3-5, the encrypted communication path opening command "INITIALIZE UPDATE (#n) + parameter" gives an instruction to open an encrypted communication path and allows the external device 200 to perform regular communication with the information processing device 100. This command requests a response to be used for authenticating the other party. 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を正規の交信相手と判断する。 The external authentication command described here has a data structure of "EXTERNAL AUTHENTICATE (#n) + host authentication code" as shown in the figure, designates the channel number #n, and designates the external device 200 as a regular communication partner. A host authentication code is added for authentication. The information processing device 100 determines that the external device 200 is a legitimate communication partner if the host authentication code is valid.

このように、外部認証コマンド「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 path opening command "INITIALIZE UPDATE (#n) + parameter". Mutual authentication is performed between the device 100 and the external device 200 .

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

この管理プログラム変更コマンドは、図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) + name of new management program + name of application to be moved". It is a command to specify a program SD and transmit an instruction to the management program SD to move the application program to be moved, which is currently under its own control, to be under 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 under the management of the management program SSD2 to under the management of the management program SSD1. In this case, a 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 processing to move the lower management program SSD3 to be moved under the control of the new upper management program SSD1 to be the destination. 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 migration is often performed when the load function and the install function are restricted for the management program SSD1. In this case, the management program SSD1 cannot directly install the management program SSD3 under itself, so for the time being, the management program SSD2 having the installation function is installed under itself and moved under the management program SSD1. After that, the issuing data (encrypted data) is written. That is, the write processing of the issued data for the management program SSD3 is performed via the encrypted communication path established by the destination management program SSD1.

結局、この管理プログラム変更コマンドの実体は、インストールコマンドと同様に、上位の管理プログラムの管理下に下位の管理プログラムを配置するためのコマンドということになる。そこで、本願における「インストールコマンド」には、§3-3で述べたアプリケーションプログラムのインストールコマンド(コマンド(c) )だけでなく、ここで述べた管理プログラム変更コマンド(コマンド(g) )も含まれるものとする。 Ultimately, the substance of this management program change command is, like the install command, a command for placing a lower management program under the management of a higher management program. 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. shall be

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

この発行データ書込対象指定コマンドは、図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 the channel number #n indicates a specific management program SD. is designated as a command for designating the application program designated as the "application name to be issued" to the management program SD as a write target of the issuance data.

ここでも、上位管理プログラムISDの管理下に、新たに下位管理プログラムSSD1を組み込む場合を例にとって以下の説明を行うことにする。前述したとおり、上位管理プログラムISDの下位階層に管理プログラムSSD1をロードし、インストールする段階までが完了すれば、あとは最終段階として、下位管理プログラムSSD1について鍵データの書込みを行うだけである。このとき、図11(d) に示す書込コマンドその1を用いて鍵データの書込みを行うには、下位管理プログラムSSD1に対して「STORE DATA (#n)+鍵データ」なる発行データの書込コマンドを与え、下位管理プログラムSSD1に鍵データの書込処理を実行させる必要がある。 Here again, the following description will be given by taking as an example the case where the lower management program SSD1 is newly installed under the control of the higher management program ISD. As described above, once the steps up to loading and installing the management program SSD1 in the lower hierarchy of the upper management program ISD are completed, all that remains is to write the key data for the lower management program SSD1 as the final step. At this time, in order to write the key data using the write command 1 shown in FIG. It is necessary to give a write command to cause the lower management program SSD1 to execute the key data write 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 designation command is used, while the issue data write command "STORE DATA (#n) + key data" is given to the upper management program ISD, the write command is delivered to the lower management program SSD1 and executed by the lower management program SSD1. For this purpose, before giving the upper management program ISD a command to write the issue data "STORE DATA (#n) + key data", "INSTALL for personalization (#n) + SSD1 , 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, §1 to §3 explained the basic configuration of a general IC card conforming to the GlobalPlatform (registered trademark) specifications and the basic functions of the management program. 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 the basic configuration of the information processing apparatus 100 according to the present invention and the mode of information communication between the external apparatus 200 and the external apparatus 200. As shown in FIG. Here, as in the descriptions in §1 to §3, it is assumed that the information processing device 100 is the SIM card 11 attached to 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 encrypted communication with the external device 200, and includes an information storage unit 110 and a program execution unit 120 as shown. In this embodiment, the information storage unit 110 is configured by a non-volatile memory and plays a role of storing programs and data used by the programs. More specifically, the information storage unit 110 includes a program storage unit 111 for storing programs 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 programs 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. Run the program that is 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 to the external device 200 as a response.

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

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

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

また、管理プログラムISD,SSD1は、いずれも自己の管理下に新たなアプリケーションプログラム(一般アプリケーションプログラムであるか、管理プログラムであるかを問わない)を組み込む機能も有している。具体的には、§2で説明したとおり、新たなアプリケーションプログラムのためのロード処理、インストール処理、発行処理を実行することになる。 Both of the management programs ISD and SSD1 also 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 described in §2, load processing, installation processing, and issuing processing for a new application program are 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 a key table T as shown in FIG. 3. In the illustrated example, the key table T (ISD) for the management program ISD is stored as part of the ISD data. , the key table T(SSD1) for the management program SSD1 is stored as 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. A 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 keeps the key table stored as a part of the ISD data or SSD1 data in a state in which only the minimum necessary encryption keys are always stored, thereby saving the storage capacity and improving security. 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) installed in the lower hierarchy of the management program ISD is usually an incidental program installed as necessary 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 installed after the information processing apparatus 100 is shipped from the factory. It will be executed by the upper management program ISD. That is, by giving the application load command shown in FIG. 11(b) to the management program ISD, the load processing for loading the program package to be the management program SSD1 is executed. 11(d) to the management program ISD. A key write process for writing the encryption key to be used is executed. As described in §3, this key writing process can be executed by the management program SSD1 that has just been installed. An example in which a write process is performed will be described.

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

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

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

また、不要な暗号鍵が格納されていると、万一、外部に漏洩した場合には、セキュリティ上の問題も生じる。すなわち、たとえ特定の情報処理装置100にとっては不要な暗号鍵であったとしても、外部に漏洩した場合は、外部装置200や別な情報処理装置も含めたシステム全体のセキュリティを脅かす要因になる。したがって、不要な暗号鍵を鍵テーブルT(SSD1)に格納しておくことは、セキュリティ上、決して好ましくはない。 Moreover, if unnecessary encryption keys are stored, security problems will arise in the event that they are leaked to the outside. That is, even if the encryption key is unnecessary for a specific information processing apparatus 100, if it is leaked to the outside, the security of the entire system including the external apparatus 200 and other information processing apparatuses is threatened. 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, there is no need to bother to write unnecessary encryption keys, so normally only necessary encryption keys should be written in the key table T (SSD1). However, in practice, it is often the case that an encryption key that is not originally required is written to the key table T (SSD1) after the above write processing is executed. This is because the write process is uniquely executed based on the write command (FIG. 11(d)) given from the external device 200. FIG.

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

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

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

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

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

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

ここで、「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 a function to open an encrypted communication path), and the management program to be installed is , the information that identifies the cryptographic protocols to support after installation. Specifically, at present, various encryption protocols (SCP types) as exemplified in FIG. 7 are generally used, but as the SCP type parameter shown in FIG. In this case, the management program to be installed will support 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, "privilege parameters (privilege)" are parameters for specifying various functions of the application program to be installed. is defined. Specifically, this "privilege parameter (privilege)" consists of a total of 3 bytes (24 bits). , are defined as shown in FIG. 14(b). Here, in each column of the table of FIG. 14(a), "1" indicates that the relevant bit is "1", "0" indicates that the relevant bit is "0", and "-" indicates that the value of the relevant bit is irrelevant. 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, a bit pattern #0 in which bit b8 of the first byte is "1" indicates that the application program to be installed is a management program (Security Domain program). Therefore, when the first byte bit b8 of the "privilege parameter (privilege)" is "1", the installation command parameters include not only the "privilege parameter (privilege)" but also the "SCP type parameters” 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, bit pattern #1 in which bit b7 of the first byte is "1" and 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". showing. The reason why bit b8 of the first byte of bit patterns #1 and #7 is "1" is that these processing functions are provided 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 most of the bits in each bit pattern are "-", it is actually possible to specify a combination of multiple bit patterns. For example, a “privilege parameter” of “11100000 00100000 010000000” indicates that 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. 14(b) is a table showing privilege names corresponding to bit patterns #0 to #20 of the "privilege parameters" and outlines (meanings) thereof. Here, a privilege whose column of privilege name is indicated by a bold frame indicates that a processing function using an encryption key is granted. Therefore, if the privilege indicated by the thick frame is specified as the function specifying information, the encryption key writing process will be performed following the installation process.

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

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

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

このため、実際には、利用されることのない無駄な暗号鍵が多数格納されることになり、貴重な記憶容量の無駄遣いが行われるとともに、セキュリティを低下させる問題も発生することになる。本発明は、このような問題を解決するための新たな手段を提案するものである。以下、その具体的な手法を、第1の実施形態(§5)および第2の実施形態(§6)について詳述する。 As a result, a large number of useless cryptographic keys that are not actually used will be stored, resulting in wasted storage capacity and lower security. The present invention proposes new means for solving such problems. The specific method will be described below 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のみが格納されていたものとしよう。
<5.1 Configuration of Information Processing Apparatus According to First Embodiment>
As shown in FIG. 12, the information processing apparatus 100 according to the first embodiment of the present invention has a function of performing encrypted communication with an external apparatus 200, and stores programs and data used by the programs. and a program execution unit 120 for executing the program stored in the information storage unit 110 . 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 already mentioned, the management program ISD loads an application program package having a plurality of processing functions each using an encryption key in response to a load command (FIG. 11(b)) given from the external device 200, It has a function of executing program load processing to be stored in the information storage unit 110 . Here, consider a case where the application program to be loaded is the management program SSD1 in the lower hierarchy. In this case, the original package of the management program SSD1 is loaded.

また、管理プログラムISDは、外部装置200から与えられるインストールコマンド(図11(c) )に応じて、プログラムロード処理によってロードされたパッケージを情報格納部110に展開して、当該アプリケーションプログラム(管理プログラムSSD1)をインストールするインストール処理を実行する機能を有している。すなわち、ロード済みのアプリケーションプログラムのパッケージを展開して、アプリケーションインスタンスを生成する処理が行われる。インストールされたアプリケーションプログラムの実行は、このインスタンス化されたプログラムコードを実行する処理ということになる。 In addition, the management program ISD develops the package loaded by the program loading process in the information storage unit 110 according to the installation command (FIG. 11(c)) given from the external device 200, and the application program (management program It has a function to execute an installation process for installing SSD1). That is, a process of expanding the package of the loaded application program and generating an application instance is performed. Execution of 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 specifying information included in the parameter of the install command as shown in FIG. 13 can be executed. For example, if the processing function "Token Verification" is specified by the "privilege parameter" that constitutes the function specifying information, and "SCP02" is specified by the "SCP type parameter", the processing function "Token Verification" is specified. , and a routine necessary for establishing an encrypted communication path using an encryption protocol corresponding to "SCP02" are instantiated so that they can be executed. According to the GlobalPlatform (registered trademark) specification, processing functions not specified are disabled.

すなわち、管理プログラムISDがインストール処理を実行する際には、インストールされたアプリケーションプログラム(管理プログラムSSD1)について、暗号鍵を利用する複数の処理機能のうち、インストールコマンドに含まれている機能指定情報によって指定された指定機能(上例の場合、「Token Verification」なる処理機能と「SCP02」に対応する暗号化プロトコルを用いた暗号通信路開設機能)だけが実行可能となるような処理が行われる。 That is, when the management program ISD executes the installation process, the installed application program (management program SSD1) is selected by the function designation 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 function (in the case of 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に示すような二次元マトリックス状の鍵空間であっても、実メモリが無駄に消費されることはない。 Note that the management program ISD stores an encryption key in the logical key space of the information storage unit 110 for the application program as necessary when executing the installation process for a specific application program. A process of building a key table T for In the case of the above example, the application program to be installed is the management program SSD1, so processing for constructing the key table T (SSD1) is performed. As described above, the key space constructed here is a logical space, so even if the key space is a two-dimensional matrix like the one shown in FIG. do not have.

続いて、鍵書込処理が実行される。管理プログラムISDは、外部装置200から与えられる鍵書込コマンド(図11(d) )に応じて、インストールされたアプリケーションプログラム(管理プログラムSSD1)が利用する暗号鍵を情報格納部110に格納する鍵書込処理を実行する機能を有している。この鍵書込処理では、論理空間上に構築された鍵テーブルT(SSD1)の所定箇所に対応するメモリ上の実空間上に、暗号鍵のデータの書き込みが行われることになるので、実メモリの記憶容量が実際に消費されることになる。もっとも、「どのような暗号鍵を鍵テーブルT(SSD1)上のどの格納場所に書き込むか」という指示は、外部装置200から与えられる鍵書込コマンドの指示に従うことになる。 Subsequently, key write processing is executed. The management program ISD stores the encryption key used by the installed application program (management program SSD1) in the information storage unit 110 according to the key write command (FIG. 11(d)) given from 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 on the logical space. storage capacity is actually consumed. Of course, the instruction “what kind of encryption key to write in which storage location on the key table T (SSD1)” follows the instruction of the key write 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. A "write command 2" dedicated to key writing given as key data may be used. In this case, the key write 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 row by row in a two-dimensional matrix 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 two-dimensional matrix-like cells that can identify one cell by a combination of a key version number and a key ID. The key write command contains a key version number as write location specification information (omitted in FIG. 11(d)). The storage location of the encryption key is specified based on the version number, and the actual data of the encryption key included as issue data or key data in the write command shown in FIG. 11(d) is written to the specified storage location. process.

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

たとえば、上例のように、管理プログラムSSD1について、「Token Verification」なる処理機能と「SCP02」なる暗号化プロトコルを用いた暗号通信路開設機能だけが実行可能となるようなインストール処理が行われた場合、これに後続する鍵書込処理では、これらの機能に必要な暗号鍵のみの書込みを行うのが好ましいが、実際には前述したとおり、不要な暗号鍵の書込みを指示する書込コマンドが与えられる場合も少なくない。 For example, as shown in the above example, for the management program SSD1, the installation processing was performed so that only the processing function "Token Verification" and the encrypted communication path opening function using the encryption protocol "SCP02" can be executed. In this case, in the subsequent key write processing, it is preferable to write only the encryption keys required for these functions. 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 if the management program ISD or the management program SSD1 receives a key write command (FIG. 11(d)) from the external device 200 in the situation described above, , when the received write command is a command instructing to write an unnecessary encryption key, the command is rejected so as not to be executed. That is, before executing the key writing process, the management program according to the first embodiment of the present invention determines whether the processing function using the encryption key stored by the key writing process is executable. If the function is executable, the key writing process is executed. If the function is not executable, 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 into the key table T in units of rows, and one key version number is specified in the key write command given from the external device 200. and the actual data of the encryption key to be written in the line corresponding to the key version number. Therefore, in the case of the above example, when a key write command specifying one key version number is given, the management program ISD determines whether or not the encryption key to be stored in the row corresponding to the key version number is necessary. However, if it is an unnecessary encryption key, a process of rejecting the key write command is performed. In other words, among the key write commands given from the external device 200, only the commands instructing the writing of necessary encryption keys are executed, and the commands instructing the writing of unnecessary encryption keys are rejected.

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

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

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

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

<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 correspondence information described above, it is sufficient to associate each specific storage location with each processing function that uses an encryption key in advance. FIG. 15 is a diagram showing a specific example of the storage location list table G showing such associations. In this storage location list table G, a specific key version number range is associated with each of a total of 11 sets of functions. Here, the five sets of functions in the first half are processing functions specified by "privilege parameters" shown in FIG. These are processing functions (processing functions requiring an encryption key) corresponding to the privileges of #10, #16, and #17. On the other hand, the latter six functions are processing functions specified by the "SCP type parameter" shown in FIG. It corresponds to the communication path opening function.

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

この図15に示すような格納場所一覧テーブルGを情報処理装置100側に用意しておけば、実行可能な特定の処理機能と当該処理機能に用いる暗号鍵を格納する格納場所とを対応づける対応情報を作成することができる。ここでは、このような対応情報を示すテーブルを機能テーブルFと呼ぶことにする。 By preparing a storage location list table G as shown in FIG. Information can be created. A table showing such correspondence information is called a function table F here.

図16は、管理プログラムSSD1のインストール時に作成された機能テーブルF(SSD1)の一例であり、当該管理プログラムSSD1が、インストール後に、「Token Verification」なる処理機能(トークンを用いた検証処理)と「SCP02」なる処理機能(暗号化プロトコル「SCP02」を用いた暗号通信路開設処理機能)とを実行可能であることが示されている。また、「Token Verification」なる処理機能に利用する暗号鍵の格納場所が、キーバージョン番号「0x30~0x3F」の範囲であることが示され、「SCP02」なる処理機能に利用する暗号鍵の格納場所が、キーバージョン番号「0x70~0x7F」の範囲であることが示されている。 FIG. 16 shows an example of the function table F (SSD1) created when the management program SSD1 was installed. SCP02" (encryption communication path opening processing function using the encryption protocol "SCP02") can be executed. In addition, it indicates 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 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 in which the upper management program ISD incorporates the management program SSD1 into its lower hierarchy, 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 an accompanying parameter (function specifying information). and an "SCP type parameter" of "SCP02" are included, the management program ISD creates a 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 specifying functions executable by a specific application program (management program SSD1). 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 this function table F (SSD1) can be obtained from parameters (function designation information) attached to the install 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 execution of the installation command by the management program ISD, as shown in FIG. is stored, and the key table T (SSD1) used by the lower management program SSD1 itself is stored as data for SSD1. At this point, however, the key table T (SSD1) is a virtual table built on a logical key space, and does not store real data of encryption keys.

そこで、続いて、外部装置200から、鍵テーブルT(SSD1)に暗号鍵の実データを書き込むための鍵書込コマンドが与えられることになる。管理プログラムISDは、この鍵書込コマンドを受信したときに、当該鍵書込コマンドに含まれている書込場所指定情報によって指定されている格納場所が、機能テーブルF(SSD1)に含まれているか否かを判定し、含まれていた場合には、当該鍵書込コマンドを実行し、含まれていなかった場合には、当該鍵書込コマンドを拒絶することができる。 Therefore, subsequently, a key write command is given from the external device 200 to write the actual data of the encryption key in 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 not included in the function table F (SSD1). If it is included, the key write command is executed, and if it is not included, the key write command is rejected.

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

結局、ここで述べた第1の実施形態を実施する上では、まず、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 After all, when implementing the first embodiment described here, first, a 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 correspondence information table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions. 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 installation processing for a specific application program (for example, lower management program SSD1), the application program (SSDI) can be executed by referring to this storage location list table G. A function table F (SSD1) that associates each function with the storage location of the encryption key used for that function is created and 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 this function table F (SSD1) is stored in the data storage unit 112 as ISD data. If 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, it refers to the function table F (SSD1) to obtain the write location specification information (key version number) included in the received key write command. ) is included in the function table F (SSD1), and if it is included, the key write command is executed, and if it is not included In this case, a process of rejecting the key write 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 First Embodiment>
Here, some modifications of the first embodiment described so far will be described. A first modified example is an example in which a function table F' (SSD1) shown in FIG. 18(a) 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 relationship between the processing functions that can be executed by the management program SSD1 after the installation processing and the storage locations of the encryption keys used for the processing functions. Therefore, the function table F' (SSD1) shown in FIG. 18(a) is simply a table listing the processing functions that can be executed by the management program SSD1 after the installation process.

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

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

続いて、管理プログラム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. a) Determining whether or not the executable functions listed in the function table F' (SSD1) shown in FIG. If a positive determination result is obtained, the key write command is executed, and if a negative determination result is obtained, the key write command is rejected.

たとえば、鍵書込コマンドに書込場所指定情報として含まれているキーバージョン番号が「0x30」であった場合を考えてみよう。ここで、図18(a) に示す機能テーブルF′(SSD1)に列挙されている実行可能な処理機能は、「Token Verification」および「SCP02」であるから、図15に示す格納場所一覧テーブルGを参照すれば、キーバージョン番号「0x30」なる格納場所は、実行可能な処理機能「Token Verification」および「SCP02」に対応づけられている格納場所になる。したがって、この場合、肯定的な判定結果が得られ、当該鍵書込コマンドは実行されることになる。 For example, let us consider a case where the key version number included as the write location specification information in the key write command is "0x30". Here, since the executable processing functions listed in the function table F' (SSD1) shown in FIG. 18(a) are "Token Verification" and "SCP02", the storage location list table G shown in FIG. , the storage location with 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 write 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 of using a function table F'' (SSD1) shown in FIG. 18(b) 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 relationship between the processing functions that can be executed by the management program SSD1 after the installation processing and the storage locations of the encryption keys used for the processing functions. The function table F'' (SSD1) shown in FIG. 18(b) is a table listing the storage locations of the encryption keys used for the processing functions that make the management program SSD1 executable after the installation process.

この第2の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 In carrying out this second modification, the data storage unit 112 also stores a storage location list table G as shown in FIG. This storage location list table G is a correspondence information table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions. 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, lower-level management program SSD1), it refers to the storage location list table G shown in FIG. 3, a function table F'' (SSD1) listing the storage locations of encryption keys used for functions executable by the application program (SSDI) is created and stored in the data storage unit 112. make sure to

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

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

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

したがって、下位管理プログラムSSD1のための発行データ(暗号鍵)の書込処理は、上位管理プログラムISDによって行うこともできるし、下位管理プログラムSSD1自身によって行うこともできる。また、図11(d) に示す書込コマンドその2「PUT KEY (#n)+鍵データ」は、任意の管理プログラムに対して、自分自身が利用する暗号鍵の書込処理を自分自身で実行させるコマンドである。したがって、この書込コマンドその2が与えられた場合には、下位管理プログラムSSD1自身によって、鍵書込コマンドの実行が行われることになる。 Therefore, the process of writing the issue 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. Also, the write command 2 "PUT KEY (#n) + key data" shown in FIG. This is the command to run. Therefore, when this 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 First Embodiment>
Finally, in the first embodiment, a processing procedure when a management program installs a new application program under its own management 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, an 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, an 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 program load processing has already been described as the command processing shown in FIG. 11(b).

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

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

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

<<<§6.本発明の第2の実施形態>>>
続いて、本発明の第2の実施形態について詳述する。
<<<§6. Second embodiment of the present invention >>>
Next, a second embodiment of the 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 apparatus according to the second embodiment of the present invention is the same as the basic configuration of the information processing apparatus 100 according to the first embodiment described in Section 5, and is 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 installing a new application program in the information processing apparatus 100. Specifically, It adopts a method of rejecting a key write command for an encryption key used for an unexecutable processing function when the command is given.

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

たとえば、前述の§5では、第1の実施形態として、上位管理プログラムISDが、新たなアプリケーションプログラムとして、下位管理プログラムSSD1を組み込む実施例を述べた。この実施例の場合、インストールコマンドのパラメータに含まれる機能指定情報によって、「Token Verification」および「SCP02」という2つの処理機能が指定されていたため、図16に示すような機能テーブルF(SSD1)が作成される。そして、下位管理プログラムSSD1は、「Token Verification」なる処理機能と「SCP02」なる処理機能とが実行可能になるような形態でインストールされることになる。 For example, in the above §5, 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, the two processing functions "Token Verification" and "SCP02" are specified by the function specifying information included in the parameter of the install command, so the function table F (SSD1) as shown in FIG. created. The low-level management program SSD1 is installed in such a manner that 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 low-level management program SSD1 loaded into 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). , and program routines for executing cryptographic channel opening functions corresponding to various cryptographic protocols indicated as SCP types in FIG. In the above example, the installed lower management program SSD1 can only execute two processing functions, "Token Verification" and "SCP02", which were not specified by the installation process by the upper management program ISD. This is because settings are made to restrict 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 designation information included in the parameter of the install command). The above operation can be performed by setting an executable flag only for the processing function) and restricting the execution of the processing function for which the non-executable flag is set.

したがって、実際には、アプリケーションプログラムをインストールした後においても、必要があれば、個々の処理機能について実行可能/実行不能の状態を変更することができる。すなわち、インストール時には実行不能に設定されていた処理機能を後で実行可能に変更したり、逆に、インストール時には実行可能に設定されていた処理機能を後で実行不能に変更したりすることができる。前者の場合は、該当する処理機能のフラグを実行不能から実行可能に変更すればよく、後者の場合は、該当する処理機能のフラグを実行可能から実行不能に変更すればよい。 Therefore, actually, even after the application program is installed, the executable/non-executable status of individual processing functions 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 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 should be changed from non-executable to executable, and in the latter case, the flag of the corresponding processing function should be changed from executable to non-executable.

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

第2の実施形態の特徴は、このように、既にインストール済みの既存のアプリケーションプログラムについての実行可能機能変更処理が行われた際に、実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を削除する鍵削除処理を行う点にある。この鍵削除処理により、もはや不要になった暗号鍵がそのまま格納され続ける事態を避けることができる。したがって、第1の実施形態と同様に、必要最小限の暗号鍵のみが格納された状態を維持し、暗号鍵の格納場所の記憶容量を節約するとともに、セキュリティ上の問題を低減させる、という格別な効果が得られる。 A feature of the second embodiment is that when the executable function change processing is performed for an existing application program that has already been installed, there is a processing function that has been changed from executable to non-executable. The second is to perform key deletion processing for deleting the encryption key used for the processing function that has been changed to be unexecutable. By this key deletion processing, it is possible to avoid a situation in which an encryption key that is no longer needed continues to be stored as it is. Therefore, as in the first embodiment, a state in which only the minimum required encryption key is stored is maintained, the storage capacity of the storage location of the encryption key is saved, and security problems are reduced. effect is 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>
Next, this second embodiment will be described with a more specific example. 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 is in a state where two processing functions, "Token Verification" and "SCP02" can be executed. , and a function table F (SSD1) as shown in FIG. 16 is created. In this state, in order to make the processing function "SCP03" executable, for example, the above-described executable function change processing command is given to the host management program ISD to cause the function change processing to be executed. Specifically, the management program ISD may change the flag of the processing function "SCP03", which was set to "unexecutable" when the lower management program SSD1 was installed, to "executable".

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

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

もちろん、その際には、図16に示す機能テーブルF(SSD1)に収録されている機能「Token Verification」およびキーバージョン番号「0x30~0x3F」を削除する処理を行うようにするのが好ましい。そうすれば、以後、鍵書込コマンドが与えられた場合に、正しい判定を行うことができ、機能「Token Verification」に利用される暗号鍵の書込みを阻止することができる。 Of course, at that time, it is preferable to delete the function "Token Verification" and the key version numbers "0x30 to 0x3F" recorded in the function table F (SSD1) shown in FIG. Then, when a key write command is given thereafter, correct determination can be made, and 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", which 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 high-level management program ISD executes executable function change processing for the low-level management program SSD1, execution is changed from executable to executable by the change processing. When there is a processing function that has been changed to be disabled, a key deletion process is also executed to delete the encryption key used for the processing function that has been changed to be disabled from the information storage unit.

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

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

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

結局、ここで述べた第2の実施形態を実施する上では、まず、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 After all, in carrying out the second embodiment described here, first, a 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 correspondence information table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions. 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 installation processing for a specific application program (for example, lower management program SSD1), the application program (SSDI) can be executed by referring to this storage location list table G. A function table F (SSD1) that associates each function with the storage location of the encryption key used for that function is created and 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 this 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 this function table F (SSD1), and associates it with the processing function to be deleted from the function table F (SSD1). A key deletion process for deleting the encryption key stored in the identified storage location may be executed.

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

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

続いて、管理プログラム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. 18(a) and refers to the storage location list table G shown in FIG. As a result, a key deletion process of identifying the storage location associated with the processing function to be deleted from the function table F' (SSD1) and deleting the encryption key stored in the identified storage location. should be done.

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

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

この第2の変形例を実施する上では、やはり、データ格納部112に、図15に示すような格納場所一覧テーブルGを格納しておくようにする。この格納場所一覧テーブルGは、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける対応情報のテーブルであり、外部装置200側にも同じ対応情報が共有される。 In carrying out this second modification, the data storage unit 112 also stores a storage location list table G as shown in FIG. This storage location list table G is a correspondence information table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions. 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, lower-level management program SSD1), it refers to the storage location list table G shown in FIG. 3, a function table F'' (SSD1) listing the storage locations of encryption keys used for functions executable by the application program (SSDI) is created and stored in the data storage unit 112. make sure to

続いて、管理プログラムISDが、実行可能機能変更処理コマンドを受信したときには、図15に示す格納場所一覧テーブルGを参照することにより、図18(b) に示す機能テーブルF''(SSD1)に対する書き換えを行う。そして、機能テーブルF''(SSD1)から削除されることになった格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を行えばよい。 Subsequently, when the management program ISD receives the executable function change processing command, it refers to the storage location list table G shown in FIG. rewrite. Then, the storage location to be deleted from the function table F'' (SSD1) is specified, and key deletion processing for deleting the encryption key stored in the specified storage location is 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 is given to change the processing function "Token Verification" from executable to non-executable, referring to the storage location list table G shown in FIG. Since it is found 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, key deletion processing is executed to delete all encryption keys stored within the range of the deleted key version number "0x30 to 0x3F".

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

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

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

そして、ステップ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 key writing processing is executed. Specifically, in the function change processing of step S32, if there is a processing function that has been changed from non-executable to executable and that processing function requires an encryption key, a new encryption key is written. It is determined that the loading is necessary, and the processing from step S17 onwards is executed. The contents of processing after this step S17 are as already explained in the first embodiment, and unnecessary writing of the 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: smart phone 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-AP2, AP01- AP32: General application program AP3: AP (ISD), AP (SSD1), application program on the external device side CMD: Encrypted communication path opening command F (ISD), F (SSD1): Function table F' (SSD1), F''(SSD1): function table G: storage location list table ISD: top management program Key, KeyA to KeyR: encryption key L: key length OS: OS program R1, R2, R00, R10: encrypted communication path opening routine SD , SSD1 to SSD3: Management programs S1 to S6: Diagram steps S11 to S35: Flowchart steps T, T1, T2, T00, T10: Key table T (ISD), T (SSD1): Key table V: Key value data

Claims (11)

暗号鍵を利用した様々な処理機能を有する情報処理装置であって、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
前記情報格納部に格納されているプログラムを実行するプログラム実行部と、
を備え、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、前記情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、前記プログラムロード処理によってロードされたパッケージを前記情報格納部に展開して、前記アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を前記情報格納部に格納する鍵書込処理と、
外部装置から与えられる実行可能機能変更処理コマンドに応じて、既にインストール済みのアプリケーションプログラムが実行可能な処理機能を変更する実行可能機能変更処理と、
を実行する機能を有し、
前記インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、前記インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
前記実行可能機能変更処理を実行したときに、当該実行可能機能変更処理によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を、前記情報格納部から削除する鍵削除処理を併せて実行し、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記格納場所一覧テーブルを参照することにより、前記アプリケーションプログラムが実行可能な機能と、当該機能に利用される暗号鍵の格納場所と、をそれぞれ対応づける機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、前記機能テーブルに対する書き換えを行い、
前記機能テーブルから削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行することを特徴とする情報処理装置。
An information processing device having various processing functions using an encryption key,
an information storage unit for storing programs and data used by the programs;
a program execution unit that executes a program stored in the information storage unit;
with
a program load process of loading an application program package having a plurality of processing functions each using an encryption key in response to a load command given from an external device and storing the package in the information storage unit;
an installation process of expanding the package loaded by the program loading process into the information storage unit and installing the application program in response to an installation command given from an external device;
a key writing process of storing an encryption key used by an installed application program in the information storage unit in response to a key writing command given from an external device;
an executable function change process for changing a process function executable by an already installed application program according to an executable function change process command given from an external device;
has the function of executing
When executing the installation process, the installed application program can execute a designated function designated by function designation information included in the installation command, among a plurality of processing functions using an encryption key. so that
When the executable function changing process is executed, if there is a processing function changed from executable to non-executable by the executable function changing process, the encryption used for the processing function changed to be non-executable Also executing key deletion processing for deleting the key from the information storage unit,
The information storage unit stores a storage location list table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions,
When executing the installation process for a specific application program, by referring to the storage location list table, the functions that can be executed by the application program and the storage location of the encryption key used for the function are determined, respectively. Create a function table to be associated, store it in the information storage unit,
When executing the executable function change process, the function table is rewritten,
A storage location associated with the processing function to be deleted from the function table is specified, and a key deletion process is executed to delete the encryption key stored in the specified storage location. information processing equipment.
暗号鍵を利用した様々な処理機能を有する情報処理装置であって、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
前記情報格納部に格納されているプログラムを実行するプログラム実行部と、
を備え、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、前記情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、前記プログラムロード処理によってロードされたパッケージを前記情報格納部に展開して、前記アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を前記情報格納部に格納する鍵書込処理と、
外部装置から与えられる実行可能機能変更処理コマンドに応じて、既にインストール済みのアプリケーションプログラムが実行可能な処理機能を変更する実行可能機能変更処理と、
を実行する機能を有し、
前記インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、前記インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
前記実行可能機能変更処理を実行したときに、当該実行可能機能変更処理によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を、前記情報格納部から削除する鍵削除処理を併せて実行し、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記アプリケーションプログラムが実行可能な機能を列挙した機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、前記機能テーブルに対する書き換えを行い、
前記格納場所一覧テーブルを参照することにより、前記機能テーブルから削除されることになった処理機能に対応づけられていた格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行することを特徴とする情報処理装置。
An information processing device having various processing functions using an encryption key,
an information storage unit for storing programs and data used by the programs;
a program execution unit that executes a program stored in the information storage unit;
with
a program load process of loading an application program package having a plurality of processing functions each using an encryption key in response to a load command given from an external device and storing the package in the information storage unit;
an installation process of expanding the package loaded by the program loading process into the information storage unit and installing the application program in response to an installation command given from an external device;
a key writing process of storing an encryption key used by an installed application program in the information storage unit in response to a key writing command given from an external device;
an executable function change process for changing a process function executable by an already installed application program according to an executable function change process command given from an external device;
has the function of executing
When executing the installation process, the installed application program can execute a designated function designated by function designation information included in the installation command, among a plurality of processing functions using an encryption key. so that
When the executable function changing process is executed, if there is a processing function changed from executable to non-executable by the executable function changing process, the encryption used for the processing function changed to be non-executable Also executing key deletion processing for deleting the key from the information storage unit,
The information storage unit stores a storage location list table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions,
creating a function table listing functions that can be executed by the application program when executing an installation process for a specific application program, and storing the table in an 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 associated with the processing function to be deleted from the function table is specified, and the encryption key stored in the specified storage location is deleted. An information processing apparatus, characterized in that it executes a key deletion process that
暗号鍵を利用した様々な処理機能を有する情報処理装置であって、
プログラムおよび当該プログラムが利用するデータを格納する情報格納部と、
前記情報格納部に格納されているプログラムを実行するプログラム実行部と、
を備え、
外部装置から与えられるロードコマンドに応じて、それぞれ暗号鍵を利用する複数の処理機能を有するアプリケーションプログラムのパッケージをロードして、前記情報格納部に格納するプログラムロード処理と、
外部装置から与えられるインストールコマンドに応じて、前記プログラムロード処理によってロードされたパッケージを前記情報格納部に展開して、前記アプリケーションプログラムをインストールするインストール処理と、
外部装置から与えられる鍵書込コマンドに応じて、インストールされたアプリケーションプログラムが利用する暗号鍵を前記情報格納部に格納する鍵書込処理と、
外部装置から与えられる実行可能機能変更処理コマンドに応じて、既にインストール済みのアプリケーションプログラムが実行可能な処理機能を変更する実行可能機能変更処理と、
を実行する機能を有し、
前記インストール処理を実行する際には、インストールされたアプリケーションプログラムについて、暗号鍵を利用する複数の処理機能のうち、前記インストールコマンドに含まれている機能指定情報によって指定された指定機能が実行可能となるようにし、
前記実行可能機能変更処理を実行したときに、当該実行可能機能変更処理によって実行可能から実行不能に変更された処理機能があった場合には、実行不能に変更された処理機能に利用される暗号鍵を、前記情報格納部から削除する鍵削除処理を併せて実行し、
情報格納部には、暗号鍵を利用する様々な処理機能と、これらの各機能に利用される暗号鍵の格納場所と、を対応づける格納場所一覧テーブルが格納されており、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記格納場所一覧テーブルを参照することにより、前記アプリケーションプログラムが実行可能な機能に利用される暗号鍵の格納場所を列挙した機能テーブルを作成し、これを情報格納部に格納し、
実行可能機能変更処理を実行する際には、前記格納場所一覧テーブルを参照することにより前記機能テーブルに対する書き換えを行い、前記機能テーブルから削除されることになった格納場所を特定し、特定された格納場所に格納されていた暗号鍵を削除する鍵削除処理を実行することを特徴とする情報処理装置。
An information processing device having various processing functions using an encryption key,
an information storage unit for storing programs and data used by the programs;
a program execution unit that executes a program stored in the information storage unit;
with
a program load process of loading an application program package having a plurality of processing functions each using an encryption key in response to a load command given from an external device and storing the package in the information storage unit;
an installation process of expanding the package loaded by the program loading process into the information storage unit and installing the application program in response to an installation command given from an external device;
a key writing process of storing an encryption key used by an installed application program in the information storage unit in response to a key writing command given from an external device;
an executable function change process for changing a process function executable by an already installed application program according to an executable function change process command given from an external device;
has the function of executing
When executing the installation process, the installed application program can execute a designated function designated by function designation information included in the installation command, among a plurality of processing functions using an encryption key. so that
When the executable function changing process is executed, if there is a processing function changed from executable to non-executable by the executable function changing process, the encryption used for the processing function changed to be non-executable Also executing key deletion processing for deleting the key from the information storage unit,
The information storage unit stores a storage location list table that associates various processing functions that use encryption keys with storage locations of encryption keys that are used for these functions,
By referring to the storage location list table when executing installation processing for a specific application program, a function table listing storage locations of encryption keys used for functions executable 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 specified. An information processing apparatus that executes a key deletion process for deleting an encryption key stored in a storage location.
請求項1~のいずれかに記載の情報処理装置において、
特定のアプリケーションプログラムについてのインストール処理を実行する際に、前記アプリケーションプログラムのために、情報格納部の論理的な鍵空間上に暗号鍵を格納するための鍵テーブルを構築し、
鍵書込処理を実行する際に、前記鍵空間上に構築された鍵テーブルの所定箇所に対応するメモリ上の実空間上に暗号鍵のデータを書き込み、
鍵削除処理を実行する際に、前記実空間上に書き込まれていた暗号鍵のデータを削除し、メモリ上の実空間を開放する処理を行うことを特徴とする情報処理装置。
In the information processing device according to any one of claims 1 to 3 ,
constructing a key table for storing an encryption key in a logical key space of an information storage unit for the application program when executing an installation process for a specific application program;
When executing the key writing process, write the data of the encryption key in the real space on the memory corresponding to the predetermined location of the key table constructed on the key space,
1. An information processing apparatus, characterized in that, when executing a key deletion process, the data of the encryption key written in the real space is deleted, and the real space on the memory is released.
請求項に記載の情報処理装置において、
鍵テーブルが、キーバージョン番号とキーIDとの組み合わせによって1つのセルを特定することができる二次元マトリックス状のセルの集合体からなり、
キーバージョン番号に基づいて、書込対象もしくは削除対象となる暗号鍵の格納場所を特定することを特徴とする情報処理装置。
In the information processing device according to claim 4 ,
The key table consists of a collection of cells in a two-dimensional matrix that can identify one cell by a combination of a key version number and a key ID,
1. An information processing apparatus that identifies a storage location of an encryption key to be written or deleted based on a key version number.
請求項1~のいずれかに記載の情報処理装置において、
外部装置との間に所定の暗号化プロトコルを用いて暗号通信路を開設する処理機能を有するアプリケーションプログラムをインストールする機能を有し、鍵書込処理において、前記暗号通信路の開設に利用する暗号鍵の書き込みを行うことを特徴とする情報処理装置。
In the information processing device according to any one of claims 1 to 5 ,
It has a function to install an application program that has a processing function to open an encrypted communication path with an external device using a predetermined encryption protocol, and a cipher 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 device according to any one of claims 1 to 5 ,
The information storage unit stores at least one management program as an application program,
The management program has a function of executing program load processing, installation processing, and key writing processing for the new application program in order to place the new application program under its own control. and information processing equipment.
請求項に記載の情報処理装置において、
新たなアプリケーションプログラムについてのプログラムロード処理およびインストール処理が完了した後に、外部装置から鍵書込コマンドが与えられたとき、当該鍵書込コマンドに応じた鍵書込処理を前記新たなアプリケーションプログラムが実行することを特徴とする情報処理装置。
In the information processing device according to claim 7 ,
After program load processing and installation processing for a new application program are completed, when a key write command is given from an external device, the new application program executes key write processing according to the key write command. An information processing device characterized by:
請求項またはに記載の情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随する特権パラメータ「privilege」を機能指定情報と解釈して、指定機能のみが実行可能となるようなインストール処理を実行することを特徴とする情報処理装置。
The information processing device according to claim 7 or 8 ,
The management program interprets the privilege parameter "privilege" that accompanies the installation command defined in the GlobalPlatform (registered trademark) specifications as function specifying information, and executes the installation process so that only the specified functions can be executed. An information processing device characterized by:
請求項またはに記載の情報処理装置において、
管理プログラムが、GlobalPlatform (登録商標)の仕様で定められたインストールコマンドに付随するSCP種別パラメータを機能指定情報と解釈して、指定されたSCP種別で示される暗号化プロトコルに応じた暗号通信路開設処理が実行可能となるようなインストール処理を実行することを特徴とする情報処理装置。
The information processing device according to claim 7 or 8 ,
The management program interprets the SCP type parameter attached to the installation command defined in the GlobalPlatform (registered trademark) specifications as function designation information, and establishes an encrypted communication path according to the encryption protocol indicated by the designated SCP type. An information processing apparatus that executes an installation process that makes the process executable.
請求項1~10のいずれかに記載の情報処理装置としてコンピュータを機能させるプログラム。 A program that causes a computer to function as the information processing apparatus according to any one of claims 1 to 10 .
JP2021001063A 2021-01-06 2021-01-06 Information processing device and program Active JP7136237B2 (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Related Parent Applications (1)

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

Publications (2)

Publication Number Publication Date
JP2021072636A JP2021072636A (en) 2021-05-06
JP7136237B2 true JP7136237B2 (en) 2022-09-13

Family

ID=75713784

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP7136237B2 (en)

Citations (3)

* 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
JP2012507220A (en) 2008-10-28 2012-03-22 ゼットティーイー コーポレイション Key distribution method and system
WO2013179791A1 (en) 2012-05-31 2013-12-05 ソニー株式会社 Information processing device, information processing method, and program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2048594A1 (en) * 2007-10-09 2009-04-15 Vodafone Holding GmbH Method for communication, communication device and secure processor

Patent Citations (3)

* 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
JP2012507220A (en) 2008-10-28 2012-03-22 ゼットティーイー コーポレイション Key distribution method and system
WO2013179791A1 (en) 2012-05-31 2013-12-05 ソニー株式会社 Information processing device, information processing method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Card Specification V2.3.0,2015年12月,pp. 38-210,https://globalplatform.org/specs-library/

Also Published As

Publication number Publication date
JP2021072636A (en) 2021-05-06

Similar Documents

Publication Publication Date Title
CN1269071C (en) Storage card
US8918633B2 (en) Information processing device, information processing system, and program
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
US20020169960A1 (en) Storage device including a non-volatile memory
US8595813B2 (en) IC card for encryption or decryption process and encrypted communication system and encrypted communication method using the same
KR101019354B1 (en) A method for realizing security storage and algorithm storage by means of semiconductor memory device
RU2573211C2 (en) Execution method and universal electronic card and smart card system
CN104380652A (en) Multi-issuer secure element partition architecture for NFC enabled devices
JP2007526573A (en) Secure resource sharing between applications in independent execution environments within a retrieveable token (eg smart card)
JP4055393B2 (en) Data processing apparatus and method and program thereof
CN103812649A (en) Method and system for safety access control of machine-card interface, and handset terminal
CN101086718A (en) Memory system
JP7136237B2 (en) Information processing device and program
JP6950164B2 (en) Information processing device
CN102184370B (en) Document security system based on microfiltration drive model
JP6642060B2 (en) Information processing device
JPH09265254A (en) Mutual authentication system for information recording medium
JP6540381B2 (en) Information processing system and encryption communication method
JP6947208B2 (en) Computer program
JP6737020B2 (en) Information processing equipment
JP6720558B2 (en) Information processing system and encryption communication method
JP2017118309A (en) Information processing device
JP4052158B2 (en) IC card system and IC card issuing method
JP4021956B2 (en) IC card
JP7275963B2 (en) Communication system and communication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220322

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220726

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220815

R150 Certificate of patent or registration of utility model

Ref document number: 7136237

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150