JP6248518B2 - Information storage medium, information writing method, and writing processing program - Google Patents

Information storage medium, information writing method, and writing processing program Download PDF

Info

Publication number
JP6248518B2
JP6248518B2 JP2013206718A JP2013206718A JP6248518B2 JP 6248518 B2 JP6248518 B2 JP 6248518B2 JP 2013206718 A JP2013206718 A JP 2013206718A JP 2013206718 A JP2013206718 A JP 2013206718A JP 6248518 B2 JP6248518 B2 JP 6248518B2
Authority
JP
Japan
Prior art keywords
identification information
execution
memory
changed
writing
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
JP2013206718A
Other languages
Japanese (ja)
Other versions
JP2015072520A (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 JP2013206718A priority Critical patent/JP6248518B2/en
Publication of JP2015072520A publication Critical patent/JP2015072520A/en
Application granted granted Critical
Publication of JP6248518B2 publication Critical patent/JP6248518B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、所定のプログラムを構成する複数の実行コードを実行可能なICチップ等の情報記憶媒体が備えるメモリに前記プログラムを書き込ませる装置等の技術に関する。   The present invention relates to a technique such as an apparatus for writing a program in a memory provided in an information storage medium such as an IC chip capable of executing a plurality of execution codes constituting a predetermined program.

従来から、例えばICカードに搭載されるICチップでは、Java(登録商標)Cardに対応しているものが多い。Java(登録商標)といったプログラム言語は、ハードウェアの依存性を吸収するために、C言語のようにコンパイルによってソースコードからネイティブコード(機械語)に変換されるものと異なり、コンパイラによって中間言語と呼ばれる実行形式である中間コード(バイトコード)に変換される。中間コードとは、算術や分岐といった命令を含んだデータ列である。この中間コードは、仮想マシン(Virtual Machine)により解釈及び実行される。このような仮想マシンを備えるICチップでは、仮想マシンの命令解釈部を、各命令(中間コード)の実装(実行コード)の先頭番地(つまり、メモリにおける先頭アドレス)の配列で実現していることが多い。また、現存するICチップの多くがプログラム(命令解釈部を含む実行コード)をROMに記録している(半導体製造工程中に実行コードの配置が確定する)が、最近では、ROM容量を減らし、フラッシュメモリ等の不揮発性メモリを大容量化したICチップも多く、前述のようなプログラムを不揮発メモリに記録するICチップが増えている(半導体ベンダから出荷された後に実行コードとその配置が確定する)。   Conventionally, for example, many IC chips mounted on an IC card are compatible with Java (registered trademark) Card. A programming language such as Java (registered trademark) is different from a language that is converted from source code to native code (machine language) by compiling, such as C language, in order to absorb hardware dependency. It is converted into an intermediate code (byte code) which is an execution format called. The intermediate code is a data string including instructions such as arithmetic and branch. This intermediate code is interpreted and executed by a virtual machine. In an IC chip having such a virtual machine, the instruction interpreting unit of the virtual machine is realized by an array of the start address (that is, the start address in the memory) of the implementation (execution code) of each instruction (intermediate code). There are many. In addition, many existing IC chips record programs (executable codes including instruction interpreting units) in ROM (the arrangement of executable codes is determined during the semiconductor manufacturing process). Recently, however, the ROM capacity has been reduced, Many IC chips have a large capacity nonvolatile memory such as a flash memory, and an increasing number of IC chips record the above-described programs in the nonvolatile memory (the execution code and its arrangement are determined after shipping from a semiconductor vendor). ).

ところで、ICチップの消費電力や放射電磁界などの変化を解析することで、ICチップ内部の処理や内部にしかない秘密情報を推測する攻撃手法として、SCA(Side Channel Analysis)が広く知られている。中でも、入手しやすいサンプルカードのサイドチャネル情報を解析してその特徴を事前に学習しておき、同じICチップを採用した流通カード(例えば、クレジットカード)などから秘密情報を類推する攻撃手法が注目されている。これは、学習(攻撃準備)に用いたサンプルカードと流通カードのそれぞれから得られるサイドチャネル情報が酷似していることに起因する。このようなSCAの対策に関連する技術として、暗号処理動作の間に予測不能な電力量を計算することで電力消費の測定にノイズを導入する暗号処理装置が知られている(例えば、特許文献1参照)。   By the way, SCA (Side Channel Analysis) is widely known as an attack technique for inferring secret information that is only inside the IC chip by analyzing changes in the power consumption and radiated electromagnetic field of the IC chip. . Of particular note is an attack method that analyzes side channel information of readily available sample cards, learns their characteristics in advance, and infers secret information from distribution cards (for example, credit cards) that use the same IC chip. Has been. This is because the side channel information obtained from each of the sample card and the distribution card used for learning (attack preparation) is very similar. As a technique related to such SCA countermeasures, there is known a cryptographic processing apparatus that introduces noise in power consumption measurement by calculating an unpredictable amount of power during cryptographic processing operations (for example, Patent Documents). 1).

さらに、動作中のICチップに外乱を加えることでICチップの誤動作を促し、ICチップに誤った演算結果を応答させたり、ICチップが意図しない情報を外部に出力させる攻撃手法(FA:Fault Analysis)も知られている。ここで、外乱とは、電源、接地、クロックへのパルスの注入、ICチップ表面または裏面への強い光の照射、ICチップ近傍での強い磁界の発生などが挙げられる。   Furthermore, an attack technique (FA: Fault Analysis) that causes malfunction of the IC chip by applying disturbance to the IC chip in operation, causes the IC chip to respond with an incorrect calculation result, or outputs information unintended by the IC chip to the outside. ) Is also known. Here, the disturbance includes power supply, grounding, pulse injection to a clock, irradiation of strong light to the front or back surface of the IC chip, generation of a strong magnetic field in the vicinity of the IC chip, and the like.

米国特許第7599488号明細書US Pat. No. 7,599,488

しかしながら、特許文献1に記載された暗号処理装置では、処理が複雑化し、回路規模が増大してしまうという問題があり、また、SCAの対策に対して、ICチップ等の情報記憶媒体に書き込まれるプログラム自体の保護に着目されていない。また、一般的な暗号処理装置では、暗号処理に使用される鍵などのデータが乱数でマスクした状態で記録されることで万が一の流出に備えているが、上述した中間コードには策を講じていない。そのため、外乱による攻撃により中間コードが流出した場合、プログラムの構造上の弱点を解析されてしまう可能性が残る。   However, the cryptographic processing device described in Patent Document 1 has a problem that processing becomes complicated and the circuit scale increases, and is written in an information storage medium such as an IC chip as a countermeasure against SCA. There is no focus on protecting the program itself. Also, in general cryptographic processing devices, data such as keys used for cryptographic processing is recorded in a state where it is masked with random numbers, so that it is possible to prepare for an emergency leak. Not. Therefore, if the intermediate code is leaked due to an attack due to disturbance, there is a possibility that the weak points in the structure of the program will be analyzed.

本発明は、ICチップ等の情報記憶媒体に書き込まれるプログラムの保護を、処理が複雑化しない構成で効率良く行うことが可能な情報記憶媒体、情報書き込み方法、及び書き込み処理プログラムを提供することを課題とする。   The present invention provides an information storage medium, an information writing method, and a writing processing program that can efficiently protect a program written in an information storage medium such as an IC chip with a configuration that does not complicate the processing. Let it be an issue.

上記課題を解決するために、請求項1に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体であって、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段と、を備え、前記変更手段は、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする。 In order to solve the above-mentioned problem, an invention according to claim 1 is an information storage comprising a memory for storing a plurality of execution codes and an execution means for interpreting the identification information of the execution codes and executing the execution codes. The medium is the first identification information of the execution code and the second identification information different from the first identification information, and the second identification information is changed. Storage means for acquiring or generating a change table indicating the correspondence relationship with the identification information for each of the first identification information, and storing the identification information constituting the predetermined program in the memory And when the identification information constituting the predetermined program is written into the memory, the first identification information of the execution code is changed to the first identification information based on the change table. Change means for changing to the second identification information corresponding to the identification information, the second identification information changed by the change means, and the execution code corresponding to the second identification information. A reference table showing a correspondence relationship with address information indicating an address in the stored memory for each execution code, the reference table referred to when the execution code stored in the memory is executed Second writing means for writing to a memory , wherein the changing means is configured to change the first identification information of at least any one of the plurality of execution codes to at least two different second One of the identification information is changed to the second identification information .

請求項に記載の発明は、請求項に記載の情報記憶媒体において、前記変更手段は、前記複数の実行コードに少なくとも2つの同一機能の実行コードが含まれる場合、当該同一機能の実行コードのうち一方の実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更し、前記同一機能の実行コードのうち他方の実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち他方の当該第2の前記識別情報に変更することを特徴とする。 The invention according to claim 2, in the information storage medium of claim 1, wherein the changing means, if it contains at least two execution codes of the same function to the plurality of execution codes, executable code of the same function The first identification information of one of the execution codes is changed to any one of the second identification information of at least two different second identification information, and the execution code of the same function The first identification information of the other execution code is changed to the second identification information of the other of the at least two different second identification information.

請求項に記載の発明は、請求項またはに記載の情報記憶媒体において、前記変更手段は、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報を乱数により選択し当該選択した当該第2の前記識別情報に変更することを特徴とする。 According to a third aspect of the present invention, in the information storage medium according to the first or second aspect , the changing means includes the second identification of one of the at least two different identification information. The information is selected by a random number and is changed to the selected second identification information.

請求項に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体であって、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段と、を備え、前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、前記第2書き込み手段は、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする。 The invention according to claim 4 is an information storage medium comprising a memory for storing a plurality of execution codes, and execution means for interpreting identification information of the execution codes and executing the execution codes. Correspondence relationship between the first identification information and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating and storing a change table for each of the first identification information, first writing means for writing the identification information constituting a predetermined program into the memory, and the predetermined program When the identification information to be configured is written to the memory, the first identification information of the execution code is associated with the first identification information based on the change table. Change means for changing to the identification information of 2; the second identification information changed by the change means; and an address in the memory in which the execution code corresponding to the second identification information is stored. A second writing means for writing, into the memory, a reference table that indicates a correspondence relationship with the address information indicated for each of the execution codes, the reference table being referred to when the execution code stored in the memory is executed; The plurality of execution codes in which at least one execution code of the plurality of execution codes is duplicated is stored in the memory, and the second writing means stores the at least duplex The executable execution code corresponds to the first identification information of any one execution code selected from these execution codes. Said second of said identification information that, and writes a reference table showing the correspondence between the address information indicating an address in the memory where the execution code is written into the memory.

請求項に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータにより実行される情報書き込み方法であって、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成するステップと、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込みステップと、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更ステップと、前記変更ステップにより変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込みステップと、を含み、前記変更ステップにおいては、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする。請求項6に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータにより実行される情報書き込み方法であって、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成するステップと、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込みステップと、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更ステップと、前記変更ステップにより変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込みステップと、を含み、前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、前記第2書き込みステップにおいては、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする。 The invention according to claim 5 is information executed by a computer in an information storage medium comprising a memory for storing a plurality of execution codes and execution means for interpreting identification information of the execution codes and executing the execution codes. A writing method, wherein the first identification information of the execution code is the second identification information different from the first identification information, and the first identification information is changed. A step of acquiring or generating a change table indicating a correspondence relationship with the identification information of 2 for each of the first identification information; a first writing step of writing the identification information constituting a predetermined program into the memory; When the identification information constituting the predetermined program is written to the memory, based on the change table, the first front of the execution code A change step of changing identification information to the second identification information corresponding to the first identification information, the second identification information changed by the change step, and the second identification information A reference table for each execution code showing a correspondence relationship with address information indicating an address in the memory in which the execution code corresponding to is stored, and when the execution code stored in the memory is executed a second write step of writing the reference table that is referred to the memory, only contains, in the changing step, the first of said identification information of at least one of the execution code of the plurality of execution codes, One of the at least two different pieces of the second identification information is changed to the second identification information . The invention according to claim 6 is information executed by a computer in an information storage medium comprising a memory for storing a plurality of execution codes, and execution means for interpreting the identification information of the execution codes and executing the execution codes. A writing method, wherein the first identification information of the execution code is the second identification information different from the first identification information, and the first identification information is changed. A step of acquiring or generating a change table indicating a correspondence relationship with the identification information of 2 for each of the first identification information; a first writing step of writing the identification information constituting a predetermined program into the memory; When the identification information constituting the predetermined program is written to the memory, based on the change table, the first front of the execution code A change step of changing identification information to the second identification information corresponding to the first identification information, the second identification information changed by the change step, and the second identification information A reference table for each execution code showing a correspondence relationship with address information indicating an address in the memory in which the execution code corresponding to is stored, and when the execution code stored in the memory is executed A second writing step of writing a reference table to be referenced to the memory, wherein the plurality of execution codes in which at least any one of the plurality of execution codes is duplicated in the memory. In the second writing step, the execution code for the at least duplexed execution code is stored in the execution code. Correspondence relationship between the second identification information corresponding to the first identification information of any one execution code selected from among the address and address information indicating an address in the memory in which the execution code is written Is written in the memory.

請求項7に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータを、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段として機能させる書き込み処理プログラムであって、前記変更手段は、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする。請求項8に記載の発明は、複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータを、前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段として機能させる書き込み処理プログラムであって、前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、前記第2書き込み手段は、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする。 According to a seventh aspect of the present invention, there is provided a computer in an information storage medium comprising a memory for storing a plurality of execution codes and execution means for interpreting identification information of the execution codes and executing the execution codes. Correspondence relationship between the first identification information and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating and storing a change table for each of the first identification information, first writing means for writing the identification information constituting a predetermined program into the memory, and the predetermined program When the identification information constituting is written into the memory, the first identification information of the execution code is changed to the first identification information based on the change table. The changing means for changing to the corresponding second identification information, the second identification information changed by the changing means, and the execution code corresponding to the second identification information are stored. A reference table showing a correspondence relationship with address information indicating an address in a memory for each of the execution codes, wherein a reference table referred to when the execution code stored in the memory is executed is written to the memory. A writing processing program that functions as two writing means , wherein the changing means converts the first identification information of at least one of the plurality of execution codes into at least two different second codes. One of the identification information is changed to the second identification information . According to an eighth aspect of the present invention, there is provided a computer in an information storage medium comprising a memory for storing a plurality of execution codes and execution means for interpreting identification information of the execution codes and executing the execution codes. Correspondence relationship between the first identification information and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating and storing a change table for each of the first identification information, first writing means for writing the identification information constituting a predetermined program into the memory, and the predetermined program When the identification information constituting is written into the memory, the first identification information of the execution code is changed to the first identification information based on the change table. The changing means for changing to the corresponding second identification information, the second identification information changed by the changing means, and the execution code corresponding to the second identification information are stored. A reference table showing a correspondence relationship with address information indicating an address in a memory for each of the execution codes, wherein a reference table referred to when the execution code stored in the memory is executed is written to the memory. A plurality of execution codes in which at least any one execution code of the plurality of execution codes is duplicated; The two writing means is selected from these execution codes for the at least duplicated execution code. A reference table indicating a correspondence relationship between the second identification information corresponding to the first identification information of any one execution code and address information indicating an address in the memory in which the execution code is written; It is characterized by writing in.

本発明によれば、ICチップ等の情報記憶媒体に書き込まれるプログラムの保護を、処理が複雑化しない構成で効率良く行うことができる。   According to the present invention, it is possible to efficiently protect a program written in an information storage medium such as an IC chip with a configuration that does not complicate the processing.

ICカード発行システムSの概要構成例を示す図である。It is a figure showing an example of outline composition of IC card issue system S. (A)は、中間コードと、実行コードと、変更中間コードとの対応関係を示す図である。(B)は、ICチップ1aにおける処理例を示すフローチャートである。(C)は、(B)のステップS1における処理の詳細を示すフローチャートである。(D)は、(B)のステップS2における処理の詳細を示すフローチャートである。(A) is a figure which shows the correspondence of an intermediate code, an execution code, and a change intermediate code. (B) is a flowchart showing an example of processing in the IC chip 1a. (C) is a flowchart showing details of the processing in step S1 of (B). (D) is a flowchart showing details of the process in step S2 of (B). (A)は、本来の中間コードと実装との割り付けの一例を示し、(B)は、変更中間コードと実装との割り付けの一例を示す図である。(C)は、本来の中間コードと実装との割り付けの別の例を示し、(D)は、変更中間コードと実装との割り付けの別の例を示す図である。(A) shows an example of assignment of original intermediate code and implementation, and (B) is a diagram showing an example of assignment of changed intermediate code and implementation. (C) shows another example of allocation between the original intermediate code and the implementation, and (D) is a diagram showing another example of allocation between the changed intermediate code and the implementation. (A)は、アプリケーションプログラムを構成する中間コードを変更中間コードに変更する例を示す図であり、(B)は、(A)の場合における中間コードの出現頻度と変更中間コードの出現頻度の関係を示す図である。(A) is a figure which shows the example which changes the intermediate code which comprises an application program into a change intermediate code, (B) is the appearance frequency of the intermediate code in the case of (A), and the appearance frequency of a change intermediate code It is a figure which shows a relationship. (A)は、サンプルカードと、ICカード1の参照テーブル及び実装配列を示す図であり、(B)は、サンプルカードと、ICカード1の参照テーブル及び実装配列を示す図であり、(C)は、2重化された実行コード“ADD”(01と02)の内容の一例を示す図である。(A) is a figure which shows the reference table and mounting arrangement | sequence of a sample card and IC card 1, (B) is a figure which shows the reference table and mounting arrangement | sequence of a sample card and IC card 1, (C ) Is a diagram showing an example of the contents of the duplicated execution code “ADD” (01 and 02).

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、ICカード発行システムに対して本発明を適用した場合の実施の形態である。なお、本明細書で「発行」とは、ICチップ等の情報記憶媒体に所定の情報(プログラムやデータなど)を書き込むことを意味する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment when the present invention is applied to an IC card issuing system. In this specification, “issue” means writing predetermined information (program, data, etc.) in an information storage medium such as an IC chip.

先ず、図1を参照して、本実施形態に係るICカード発行システムの構成及び機能概要について説明する。図1は、ICカード発行システムSの概要構成例を示す図である。図1に示すように、ICカード発行システムSは、発行対象のICカード1と、ICカード発行機2とを備える。   First, with reference to FIG. 1, the configuration and functional overview of an IC card issuing system according to the present embodiment will be described. FIG. 1 is a diagram showing a schematic configuration example of the IC card issuing system S. As shown in FIG. 1, the IC card issuing system S includes an IC card 1 to be issued and an IC card issuing machine 2.

ICカード1には、図1に示すように、ICチップ1aが搭載されている。なお、ICカード1は、キャッシュカード、クレジットカード、社員カード等として使用される。或いは、ICカード1は、スマートフォンや携帯電話機等の通信機器に組み込まれる。ICチップ1aは本発明における情報記憶媒体を構成するが、このICチップ1aは通信機器の回路基板上に直接組み込んで構成するようにしてもよい。   An IC chip 1a is mounted on the IC card 1 as shown in FIG. The IC card 1 is used as a cash card, credit card, employee card or the like. Alternatively, the IC card 1 is incorporated into a communication device such as a smartphone or a mobile phone. The IC chip 1a constitutes the information storage medium in the present invention. However, the IC chip 1a may be directly incorporated on the circuit board of the communication device.

ICチップ1aは、CPU(Central Processing Unit)10、RAM(Random Access Memory)11、ROM(Read Only Memory)12、不揮発性メモリ13、及びI/O回路14を備えて構成される。不揮発性メモリ13には、例えばフラッシュメモリが適用される。なお、不揮発性メモリ13は、「Electrically Erasable Programmable Read-Only Memory」であっても構わない。I/O回路14は、ICカード発行機2とのインターフェイスを担う。I/O回路14には、例えばISO/IEC7816によって定められたC1〜C8の8個の端子が設けられている。例えば、C1端子は電源端子、C2端子はリセット端子、C3端子はクロック端子、C5端子はグランド端子、C7端子はICカード発行機2などの外部端末とのデータ通信を行う端子である。   The IC chip 1a includes a CPU (Central Processing Unit) 10, a RAM (Random Access Memory) 11, a ROM (Read Only Memory) 12, a nonvolatile memory 13, and an I / O circuit 14. For example, a flash memory is applied to the nonvolatile memory 13. The nonvolatile memory 13 may be “Electrically Erasable Programmable Read-Only Memory”. The I / O circuit 14 serves as an interface with the IC card issuer 2. The I / O circuit 14 is provided with eight terminals C1 to C8 defined by, for example, ISO / IEC7816. For example, the C1 terminal is a power supply terminal, the C2 terminal is a reset terminal, the C3 terminal is a clock terminal, the C5 terminal is a ground terminal, and the C7 terminal is a terminal that performs data communication with an external terminal such as the IC card issuer 2.

CPU10は、RAM11、ROM12、または不揮発性メモリ13に記憶されているプログラムを実行する演算装置である。プログラムには、OS(Operating System)、本発明の書き込み処理プログラム、仮想マシン、Java(登録商標)等のプログラム言語で記述されるアプリケーションプログラムが含まれる。なお、OS、本発明の書き込み処理プログラム、及び仮想マシンは、複数の実行コード(実行コード群)で記述される。OSは、ICチップ1aの動作を直接コントロールするソフトウェアである。CPU10は、本発明の書き込み処理プログラムを実行することにより、本発明の記憶手段、第1書き込み手段、変更手段、及び第2書き込み手段として機能する。本実施形態のアプリケーションプログラムは、ソースコードと実行コードとの間の中間言語である中間コードで記述されている。中間コードは、これに対応する実行コードの第1の識別情報(インデックス)である。中間コードの実装(実行コード)は、ICチップ1aの製造時にROM12に予め焼かれているか、もしくはICカード1の発行処理時に不揮発性メモリ13における所定のアドレスに書き込まれる。そして、アプリケーションプログラムを構成する複数の中間コード(中間コード群)は、例えば、ICカード1の発行処理後にICチップ1aにインストールされることで不揮発性メモリ13における所定のアドレスに書き込まれる。OS上で動作する仮想マシンは、中間コードを解釈してその実行コードを実行する。中間コードは、例えばアプリケーションプログラムのインストール時に、当該アプリケーションプログラムをコンパイルすることで得られる。例えば、中間コード“03”は、実行コード“MOV”(データ書き込み)を示す。また、中間コード“04”は、“ADD”(加算)を示す。また、中間コード“05”は、実行コード“SUB”(減算)を示す。なお、“MOV”、“ADD”、及び“SUB”は、実行コードの意味を示す。仮想マシンは、中間コードの解釈及び実行コードの実行にあたり、プログラムを構成する中間コードと、実行コードが記憶されたROM12または不揮発性メモリ13におけるアドレス(例えば、実行コードの先頭アドレス)を示すアドレス情報との対応関係を実行コードごとに示す参照テーブルを参照する。つまり、この参照テーブルは、ROM12または不揮発性メモリ13に記憶された実行コードが実行される際に参照される。これにより特定されたアドレスに記憶されている実行コードがCPU10により実行されることになる。この参照テーブルは、ICカード発行機2が生成する場合と、ICチップ1aが生成する場合とがある。   The CPU 10 is an arithmetic device that executes a program stored in the RAM 11, the ROM 12, or the nonvolatile memory 13. The program includes an OS (Operating System), a write processing program of the present invention, a virtual machine, and an application program described in a program language such as Java (registered trademark). The OS, the write processing program of the present invention, and the virtual machine are described by a plurality of execution codes (execution code groups). The OS is software that directly controls the operation of the IC chip 1a. The CPU 10 functions as a storage unit, a first writing unit, a changing unit, and a second writing unit of the present invention by executing the writing processing program of the present invention. The application program of the present embodiment is described in an intermediate code that is an intermediate language between the source code and the execution code. The intermediate code is first identification information (index) of the execution code corresponding to the intermediate code. The implementation (execution code) of the intermediate code is burned in the ROM 12 in advance when the IC chip 1a is manufactured, or is written to a predetermined address in the nonvolatile memory 13 during the issuance processing of the IC card 1. Then, a plurality of intermediate codes (intermediate code groups) constituting the application program are written to a predetermined address in the nonvolatile memory 13 by being installed in the IC chip 1a after the issuing process of the IC card 1, for example. The virtual machine operating on the OS interprets the intermediate code and executes the execution code. The intermediate code is obtained, for example, by compiling the application program when the application program is installed. For example, the intermediate code “03” indicates an execution code “MOV” (data write). The intermediate code “04” indicates “ADD” (addition). The intermediate code “05” indicates the execution code “SUB” (subtraction). “MOV”, “ADD”, and “SUB” indicate the meaning of the execution code. The virtual machine interprets the intermediate code and executes the execution code, and the address information indicating the intermediate code constituting the program and the address (for example, the start address of the execution code) in the ROM 12 or the nonvolatile memory 13 in which the execution code is stored. Refer to the reference table that shows the corresponding relationship for each execution code. That is, this reference table is referred to when the execution code stored in the ROM 12 or the nonvolatile memory 13 is executed. As a result, the CPU 10 executes the execution code stored at the specified address. This reference table may be generated by the IC card issuer 2 or may be generated by the IC chip 1a.

ICカード発行機2は、CPU、RAM、及び不揮発性メモリ等から構成される制御部21、ハードディスクドライブ等から構成される記憶部22、及びICカード1との間でリーダライタを介して通信を行うための通信部23等を備えて構成される。記憶部22には、OS、発行処理プログラムが記憶される。制御部21は、上述した複数の実行コードのROM12または不揮発性メモリ13における配列であってデフォルト設定された配列(実装配列)で、ICチップ1aへ送信し、当該複数の実行コードを不揮発性メモリ13に書き込ませる。また、制御部21は、当該プログラムを構成する中間コードと、その実行コードが記憶されたROM12または不揮発性メモリ13におけるアドレス(番地)を示すアドレス情報との対応関係を実行コードごとに示す参照テーブルを生成して、これをICチップ1aへ送信する。なお、参照テーブルは、ICチップ1aにより生成されてもよい。更に、制御部21は、当該プログラムを構成する中間コードと、当該中間コードとは異なるコード(第2の識別情報)であって上記中間コードが変更された変更中間コードとの対応関係を中間コードごとに示す変更テーブルを生成して、これをICチップ1aへ送信する。なお、変更テーブルは、ICチップ1aにより生成されてもよい。   The IC card issuer 2 communicates with the control unit 21 including a CPU, RAM, and nonvolatile memory, the storage unit 22 including a hard disk drive, and the IC card 1 via a reader / writer. The communication unit 23 is configured to be performed. The storage unit 22 stores an OS and an issue processing program. The control unit 21 transmits the plurality of execution codes to the IC chip 1a in the default arrangement (mounting arrangement) in the ROM 12 or the non-volatile memory 13 of the plurality of execution codes described above, and the non-volatile memory. 13 is written. The control unit 21 also has a reference table that shows the correspondence between the intermediate code constituting the program and the address information indicating the address (address) in the ROM 12 or the nonvolatile memory 13 in which the execution code is stored for each execution code. Is transmitted to the IC chip 1a. Note that the reference table may be generated by the IC chip 1a. Furthermore, the control unit 21 determines the correspondence between the intermediate code constituting the program and the changed intermediate code that is different from the intermediate code (second identification information) and has the intermediate code changed. The change table shown for each is generated and transmitted to the IC chip 1a. The change table may be generated by the IC chip 1a.

図2(A)は、中間コードと、実行コードと、変更中間コードとの対応関係を示す図である。図2(A)の例では、中間コード“03”は、変更中間コード“04”及び“06”に対応しており、中間コード“04”は、変更中間コード“05”に対応しており、中間コード“05”は、変更中間コード“03”に対応している。この例では、変更中間コードは、実際に使用される中間コードの中から例えば所定の基準に従って(例えば、乱数によりランダムで)選択された中間コードになっている。なお、変更中間コードは、実際に使用される中間コードを所定の関数に従って変換されたコードであってもよい。このような変更中間コードは、実際の実行コードとは異なる意味に解釈させることができるため、暗号化された中間コードともいうことができる。また、中間コードと、変更中間コードとの対応関係は、1対1であってもよいが、図2(A)に示す実行コード“MOV”のように、1対N(Nは、2以上の自然数。この例では、1対2)であるように構成することが望ましい。また、変更中間コードは、ICチップ1aの製造工程中の発行処理時に、例えば、同一の用途に利用される(同一のプログラムを含むデータが書き込まれる)ICチップ1aごとに個別化されることが望ましい。この場合、例えば、あるICチップ1aに書き込まれる実行コードに対応する変更中間コードは“04”とされる一方、別のICチップ1aに書き込まれる実行コードに対応する変更中間コードは“06”とされる。つまり、この場合、上述した変更テーブルにおける中間コードと変更中間コードとの対応関係は、ICチップ1aごとに異なり、個別の対応付けとなる。   FIG. 2A is a diagram illustrating a correspondence relationship between the intermediate code, the execution code, and the changed intermediate code. In the example of FIG. 2A, the intermediate code “03” corresponds to the changed intermediate codes “04” and “06”, and the intermediate code “04” corresponds to the changed intermediate code “05”. The intermediate code “05” corresponds to the changed intermediate code “03”. In this example, the changed intermediate code is an intermediate code selected from among the actually used intermediate codes, for example, according to a predetermined standard (for example, randomly by a random number). The changed intermediate code may be a code obtained by converting an actually used intermediate code according to a predetermined function. Since such a modified intermediate code can be interpreted in a different meaning from the actual execution code, it can also be referred to as an encrypted intermediate code. Further, the correspondence between the intermediate code and the changed intermediate code may be 1: 1, but as in the execution code “MOV” shown in FIG. In this example, it is desirable that the number is 1 to 2). In addition, the changed intermediate code may be individualized for each IC chip 1a used for the same application (data including the same program is written), for example, at the time of issuing processing during the manufacturing process of the IC chip 1a. desirable. In this case, for example, the change intermediate code corresponding to the execution code written to one IC chip 1a is “04”, while the change intermediate code corresponding to the execution code written to another IC chip 1a is “06”. Is done. That is, in this case, the correspondence relationship between the intermediate code and the changed intermediate code in the change table described above is different for each IC chip 1a and is individually associated.

次に、図2(B)を参照して、本実施形態に係るICチップ1aにおける処理について説明する。図2(B)は、ICチップ1aにおける処理例を示すフローチャートである。   Next, processing in the IC chip 1a according to the present embodiment will be described with reference to FIG. FIG. 2B is a flowchart showing an example of processing in the IC chip 1a.

図2(B)において、ICチップ1aは、初期化(ステップS1)、アプリケーションプログラムをロード(ステップS2)、ICカードの利用者に関係する個人情報の書き込み(ステップS3)という順序で処理を行う。なお、上記初期化(ステップS1)は、カードベンダにより実施される。一方、アプリケーションプログラムをロード(ステップS2)、及び個人情報の書き込み(ステップS3)は、カードベンダにより実施される場合と、市場に出荷された後に実施される場合とがある。   In FIG. 2B, the IC chip 1a performs processing in the order of initialization (step S1), loading of an application program (step S2), and writing of personal information related to the IC card user (step S3). . The initialization (step S1) is performed by a card vendor. On the other hand, loading an application program (step S2) and writing personal information (step S3) may be performed by a card vendor or performed after being shipped to the market.

図2(C)は、図2(B)のステップS1における処理の詳細を示すフローチャートである。図2(C)において、ICチップ1aは、ICカード発行機2から送信された上記変更テーブルを取得する(ステップS11)。次いで、ICチップ1aは、取得した変更テーブルを不揮発性メモリ13に書き込む(ステップS12)。次いで、ICチップ1aは、ICカード発行機2から送信された上記参照テーブルを取得する(ステップS13)。次いで、ICチップ1aは、取得した参照テーブルを不揮発性メモリ13に書き込む(ステップS14)。   FIG. 2C is a flowchart showing details of the process in step S1 of FIG. 2C, the IC chip 1a acquires the change table transmitted from the IC card issuer 2 (step S11). Next, the IC chip 1a writes the acquired change table in the nonvolatile memory 13 (step S12). Next, the IC chip 1a acquires the reference table transmitted from the IC card issuer 2 (step S13). Next, the IC chip 1a writes the acquired reference table in the nonvolatile memory 13 (step S14).

なお、ICチップ1aは自ら、上記参照テーブル及び上記変更テーブルを生成し、生成した参照テーブル及び変更テーブルを不揮発性メモリ13に書き込んでもよい。   The IC chip 1 a itself may generate the reference table and the change table, and write the generated reference table and change table in the nonvolatile memory 13.

図2(D)は、図2(B)のステップS2における処理の詳細を示すフローチャートである。図2(D)において、ICチップ1aは、ICカード発行機2から送信された、アプリケーションプログラムを構成する中間コード群を取得する(ステップS21)。次いで、ICチップ1aは、取得された中間コード群が不揮発性メモリ13に書き込まれる際に、上記変更テーブルに基づいて、上記参照テーブルにおける本来の中間コードを当該中間コードに対応する変更中間コードに変更する(ステップS22)。言い換えれば、ICチップ1aは、ステップS22で変更された変更中間コードと、当該変更中間コードに対応する実行コードが記憶されたROM12または不揮発性メモリ13におけるアドレスを示すアドレス情報との対応関係を実行コードごとに示す参照テーブルを不揮発性メモリ13に書き込む。そして、ICチップ1aは、変更後の変更中間コード群を不揮発性メモリ13に書き込む(ステップS23)。つまり、ステップS21で取得された中間コード群の代わりに、変更中間コード群が書き込まれる。   FIG. 2D is a flowchart showing details of the process in step S2 of FIG. In FIG. 2 (D), the IC chip 1a acquires the intermediate code group constituting the application program transmitted from the IC card issuing machine 2 (step S21). Next, when the obtained intermediate code group is written into the nonvolatile memory 13, the IC chip 1a converts the original intermediate code in the reference table into a changed intermediate code corresponding to the intermediate code based on the change table. Change (step S22). In other words, the IC chip 1a executes the correspondence between the changed intermediate code changed in step S22 and the address information indicating the address in the ROM 12 or the nonvolatile memory 13 in which the execution code corresponding to the changed intermediate code is stored. A reference table for each code is written in the nonvolatile memory 13. Then, the IC chip 1a writes the changed intermediate code group after the change in the nonvolatile memory 13 (step S23). That is, the changed intermediate code group is written instead of the intermediate code group acquired in step S21.

以上のように不揮発性メモリ13に書き込まれた変更テーブル及び参照テーブルは、ROM12または不揮発性メモリ13に記憶された実行コードが実行される際に参照される。つまり、仮想マシンは、実行対象の中間コードに対応付けられた変更中間コードを変更テーブルから特定し、特定した変更中間コードに対応付けられたアドレス情報を参照テーブルから特定することになる。   As described above, the change table and the reference table written in the nonvolatile memory 13 are referred to when the execution code stored in the ROM 12 or the nonvolatile memory 13 is executed. That is, the virtual machine specifies the changed intermediate code associated with the intermediate code to be executed from the change table, and specifies the address information associated with the specified changed intermediate code from the reference table.

図3(A)は、本来の中間コードと実装との割り付けの一例を示し、図3(B)は、変更中間コードと実装との割り付けの一例を示す図である。図3(B)に示す参照テーブルでは、図3(A)に示す中間コード“03”が変更中間コード“04”に変更されており、図3(A)に示す中間コード“04”が変更中間コード“05”に変更されており、図3(A)に示す中間コード“05”が変更中間コード“03”に変更されている。これにより、例えば、外乱による攻撃を受けて変更中間コード群が出力された場合であっても、この変更中間コードが本来のコード(値)を示していないため、攻撃者に対して容易に解読できないようにすることができる。また、上述したように変更テーブルにおける中間コードと変更中間コードとの対応関係がICチップ1aごとに個別化(つまり、変更テーブルが個別化)される場合、学習に使用されたサンプルカードと流通カードのそれぞれのサイドチャネル情報の相関を減らすことができ、より一層、攻撃者に対して容易に解読できないようにすることができる。例えば、あるICチップ1は変更中間コード“04”を実行コード“MOV”と解釈、実行し、他のICチップ1aは変更中間コード“06”を“MOV”と解釈、実行するため、中間コードのハミング重み(二進数で1を示すビットの数)が異なる。そのため、データバスに起因する消費電力に差が生じる。つまり、同じMOV命令が実行されているにもかかわらず、ICチップ1aごとに消費電力値が異なる。このように、中間コードが不揮発性メモリ13から読み出されるときの消費電力の出方を変えさせることで、攻撃者に対して容易に解読できないようにすることができる。   FIG. 3A shows an example of allocation between the original intermediate code and the implementation, and FIG. 3B shows an example of allocation between the changed intermediate code and the implementation. In the reference table shown in FIG. 3B, the intermediate code “03” shown in FIG. 3A is changed to the changed intermediate code “04”, and the intermediate code “04” shown in FIG. 3A is changed. The intermediate code “05” is changed, and the intermediate code “05” shown in FIG. 3A is changed to the changed intermediate code “03”. Thus, for example, even when a changed intermediate code group is output in response to an attack by disturbance, the changed intermediate code does not indicate the original code (value), so it can be easily decoded by an attacker. You can make it impossible. As described above, when the correspondence between the intermediate code and the changed intermediate code in the change table is individualized for each IC chip 1a (that is, the change table is individualized), the sample card and the distribution card used for learning Thus, the correlation of the respective side channel information can be reduced, and it can be further prevented from being easily deciphered by an attacker. For example, an IC chip 1 interprets and executes the changed intermediate code “04” as an execution code “MOV”, and the other IC chip 1a interprets and executes the changed intermediate code “06” as “MOV”. Have different hamming weights (the number of bits representing 1 in binary). Therefore, a difference occurs in power consumption caused by the data bus. That is, although the same MOV instruction is executed, the power consumption value differs for each IC chip 1a. In this way, by changing the manner in which power is consumed when the intermediate code is read from the nonvolatile memory 13, it is possible to prevent the attacker from easily deciphering.

また、図3(A)の例では、ICチップ1aは、複数の実行コードのうち少なくも何れか一つの実行コードの中間コード(この例では、“03”)を、少なくとも2つの異なる変更中間コード(この例では、“04”,“06”)のうち何れか一方の変更中間コード(この例では、“04”)に変更するようになっている。例えば、ICチップ1aは、少なくとも2つの異なる変更中間コードのうち何れか一方の変更中間コードを乱数により選択し当該選択した変更中間コードに変更する。これにより、同一の用途に利用される(同一のプログラムを含むデータが書き込まれる)ICチップ1a間で共通の変更テーブルであっても、ICチップ1aごとに個別化することができる。そのため、実行コードが不揮発性メモリ13から読み出されるときの消費電力の出方をICチップ1aごとに変えさせることができ、より一層、攻撃者に対して容易に解読できないようにすることができる。図3(A)の例では、中間コード“03”が、変更中間コード“04”に変更されているが、例えば乱数を用いてランダムに選択されることで、中間コード“03”が、変更中間コード“06”に選択(変更)される場合もある。さらに、同一のICチップ1aにインストールされるアプリケーションプログラムを構成する複数の中間コードの中に同一の複数の中間コード“03”が含まれているときに、一方の中間コード“03”が変更中間コード“04”にランダムに選択され、他方の中間コード“03”が変更中間コード“06”にランダムに選択される場合もある。これにより、変更中間コード群が流出した場合に、出現頻度の傾向から変更中間コードから中間コードを、より一層推測させ難くすることができ、中間コードの解析の難易度をさらに高めることができる。   In the example of FIG. 3A, the IC chip 1a uses at least two different modified intermediate codes as intermediate codes (in this example, “03”) of at least one of the multiple executable codes. One of the codes (“04” and “06” in this example) is changed to a change intermediate code (“04” in this example). For example, the IC chip 1a selects one of the at least two different changed intermediate codes by a random number and changes the selected changed intermediate code to the selected changed intermediate code. Thereby, even if the change table is common among the IC chips 1a used for the same purpose (data including the same program is written), it can be individualized for each IC chip 1a. For this reason, it is possible to change the way in which power is consumed when the execution code is read from the nonvolatile memory 13 for each IC chip 1a, and it is possible to further prevent the attacker from easily deciphering. In the example of FIG. 3A, the intermediate code “03” is changed to the changed intermediate code “04”, but the intermediate code “03” is changed by, for example, random selection using a random number. In some cases, the intermediate code is selected (changed) to “06”. Further, when the same plurality of intermediate codes “03” are included in the plurality of intermediate codes constituting the application program installed in the same IC chip 1a, one intermediate code “03” is changed intermediate In some cases, the code “04” is randomly selected, and the other intermediate code “03” is randomly selected as the changed intermediate code “06”. As a result, when the changed intermediate code group is leaked, it is possible to make it more difficult to guess the intermediate code from the changed intermediate code from the tendency of the appearance frequency, and the difficulty of analyzing the intermediate code can be further increased.

また、図3(C)は、本来の中間コードと実装との割り付けの別の例を示し、図3(D)は、変更中間コードと実装との割り付けの別の例を示す図である。図3(D)に示す参照テーブルでは、図3(C)に示す中間コード“03”が変更中間コード“04”及び“06”に変更されている。なお、図3(D)に示す変更中間コード“04”及び“06”には、それぞれ同一のアドレス情報が対応付けられている。   FIG. 3C illustrates another example of allocation between the original intermediate code and the implementation, and FIG. 3D illustrates another example of allocation between the changed intermediate code and the implementation. In the reference table shown in FIG. 3D, the intermediate code “03” shown in FIG. 3C is changed to changed intermediate codes “04” and “06”. Note that the same intermediate address information is associated with the changed intermediate codes “04” and “06” shown in FIG.

また、複数の実行コードに少なくとも2つの同一機能の実行コードが含まれる場合がある。この場合、ICチップ1aは、当該同一機能の実行コードのうち一方の実行コードの中間コードを、少なくとも2つの異なる変更中間コードのうち何れか一方の変更中間コードに変更し、同一機能の実行コードのうち他方の実行コードの中間コードを、少なくとも2つの異なる変更中間コードのうち他方の変更中間コードに変更するように構成すれば、同一のICチップ1aであっても、異なる複数の変更中間コードが同一機能の実行コードに対応付けられ、同一の命令が実行されることになる。そのため、消費電力値の差がより顕著になり、より一層、攻撃者に対して容易に解読できないようにすることができる。   In some cases, the plurality of execution codes include at least two execution codes having the same function. In this case, the IC chip 1a changes the intermediate code of one execution code among the execution codes of the same function to one of the change intermediate codes of at least two different change intermediate codes, and executes the execution code of the same function. If the intermediate code of the other executable code is changed to the other changed intermediate code among at least two different changed intermediate codes, a plurality of different changed intermediate codes can be obtained even in the same IC chip 1a. Are associated with execution codes of the same function, and the same instruction is executed. Therefore, the difference in power consumption value becomes more prominent, and it can be further prevented from being easily deciphered by an attacker.

図4(A)は、アプリケーションプログラムを構成する中間コードを変更中間コードに変更する例を示す図である。図4(A)において、先頭の中間コード“03”が変更中間コード“06”に変更され、次の中間コード“03”が変更中間コード“04”に変更されている。図4(B)は、図4(A)の場合における中間コードの出現頻度と変更中間コードの出現頻度の関係を示す図である。図4(B)に示すように、実行コード“MOV”に対応する中間コード“03”の出現頻度が4回であり、他の実行コードの出現頻度より突出して多いが、これを変更中間コードでは“04”の2回と“06”の2回に分散(つまり、出現頻度を分散)させている。つまり、出現頻度の多い実行コード(命令)には複数の変更中間コードを割り当てることで、変更中間コード群が流出した場合に、出現頻度の傾向から変更中間コードから中間コードを推測させ難くすることができ、中間コードの解析の難易度をさらに高めることができる。   FIG. 4A is a diagram illustrating an example in which the intermediate code constituting the application program is changed to a changed intermediate code. In FIG. 4A, the first intermediate code “03” is changed to the changed intermediate code “06”, and the next intermediate code “03” is changed to the changed intermediate code “04”. FIG. 4B is a diagram showing the relationship between the appearance frequency of the intermediate code and the appearance frequency of the changed intermediate code in the case of FIG. As shown in FIG. 4B, the appearance frequency of the intermediate code “03” corresponding to the execution code “MOV” is four times, which is much higher than the appearance frequency of other execution codes. In this case, it is distributed (that is, the appearance frequency is distributed) twice, “04” twice and “06” twice. In other words, by assigning multiple modified intermediate codes to execution codes (instructions) that frequently appear, it is difficult to guess the intermediate code from the modified intermediate code based on the tendency of appearance frequency when the modified intermediate code group is leaked This makes it possible to further increase the difficulty of analyzing the intermediate code.

以上説明したように、上記実施形態によれば、ICチップ1aは、アプリケーションプログラムを構成する中間コード群が不揮発性メモリ13に書き込まれる際に、上記変更テーブルに基づいて、上記参照テーブルにおける本来の中間コードを当該中間コードに対応する変更中間コードに変更し、変更された変更中間コードと、当該変更中間コードに対応する実行コードが書き込まれた不揮発性メモリ13におけるアドレスを示すアドレス情報との対応関係を実行コードごとに示す参照テーブルを不揮発性メモリ13に書き込むように構成したので、SCAやFAによる攻撃者に対して容易に解読できないようにすることが可能となり、ICチップ1aに書き込まれるプログラムの保護を、処理が複雑化しない構成で効率良く行うことができる。   As described above, according to the above-described embodiment, the IC chip 1a is configured so that when the intermediate code group constituting the application program is written in the nonvolatile memory 13, the original code in the reference table is based on the change table. Correspondence between the changed intermediate code changed to the changed intermediate code corresponding to the intermediate code and the address information indicating the address in the nonvolatile memory 13 in which the execution code corresponding to the changed intermediate code is written Since the reference table indicating the relationship for each execution code is written in the nonvolatile memory 13, it is possible to prevent an attacker by SCA or FA from easily deciphering, and the program written in the IC chip 1a Protection can be performed efficiently with a configuration that does not complicate processing. .

(変形例1)
上記実施形態では、上記複数の実行コードのROM12または不揮発性メモリ13における配列であってデフォルト設定された配列で当該複数の実行コードがROM12または不揮発性メモリ13に記憶されるように構成したが、変形例1では、ICチップ1aに記憶される複数の実行コードの配列を並び替えるように構成される(その他の構成は上記実施形態と同様)。これにより、変形例1では、上述した実施形態との相乗効果を得ることができる。なお、変形例1は、ROM12の記憶容量が少なく、不揮発性メモリ13の記憶容量が多いICカード1に適用する場合に有効な実施例である。この場合、制御部21は、上記複数の実行コードのROM12または不揮発性メモリ13における配列であってデフォルト設定された配列を、例えば乱数またはICチップ1aに固有の情報に基づいて並び替える。例えば、ICチップ1aが解釈及び実行するコード(例えば、コンパイラやリンカにより生成された文字や数値の塊で中間コードの実装の境目を識別できる状態)を入力とし、乱数、製造履歴、ICチップ1aの識別情報などを基に中間コードに対応する実行コードの配列が並び替えられる。これにより、製造工程中の発行処理時に、中間コードの実装(実行コード)の配列が、同一の用途に利用されるICチップ1aごとに変更することができる。なお、同一の用途に利用される全てのICチップ1aで個別化できるように、ICチップ1aの識別情報や製造履歴を基に個別化することが望ましいが、サンプルカードと流通カード(市場で使用されるカード)とで2通りだけを区別してもよい。次に、制御部21は、配列が並べ替えられた後の上記対応関係を示す参照テーブルを生成する。つまり、上記並び替えに沿って参照テーブルが生成される。そして、制御部21は、配列が並び替えられた複数の実行コードと、当該並び替えに沿って生成された参照テーブルと、上述した変更テーブルとをICチップ1aへ送信する。
(Modification 1)
In the above-described embodiment, the plurality of execution codes are arranged in the ROM 12 or the nonvolatile memory 13 in the ROM 12 or the nonvolatile memory 13, and the plurality of execution codes are stored in the ROM 12 or the nonvolatile memory 13 in the default arrangement. The first modification is configured to rearrange the arrangement of a plurality of execution codes stored in the IC chip 1a (other configurations are the same as those in the above embodiment). Thereby, in the modification 1, the synergistic effect with embodiment mentioned above can be acquired. Modification 1 is an embodiment effective when applied to the IC card 1 having a small storage capacity of the ROM 12 and a large storage capacity of the nonvolatile memory 13. In this case, the control unit 21 rearranges the array of the plurality of execution codes in the ROM 12 or the non-volatile memory 13 and defaulted based on, for example, random numbers or information unique to the IC chip 1a. For example, a code that is interpreted and executed by the IC chip 1a (for example, a state in which the boundary of implementation of the intermediate code can be identified by a lump of characters or numerical values generated by a compiler or a linker) is input, and random numbers, manufacturing history, IC chip 1a The execution code array corresponding to the intermediate code is rearranged based on the identification information. Thus, during the issuance process during the manufacturing process, the arrangement of the intermediate code implementation (execution code) can be changed for each IC chip 1a used for the same application. It is desirable to individualize based on the identification information and manufacturing history of the IC chip 1a so that it can be individualized for all the IC chips 1a used for the same application. However, sample cards and distribution cards (used in the market) May be distinguished only in two ways. Next, the control part 21 produces | generates the reference table which shows the said correspondence after arrangement | sequence is rearranged. That is, a reference table is generated along the rearrangement. Then, the control unit 21 transmits to the IC chip 1a the plurality of execution codes in which the arrangement is rearranged, the reference table generated along the rearrangement, and the change table described above.

図5(A)は、サンプルカードと、ICカード1の参照テーブル及び実装配列を示す図である。なお、図5(A)の例は、説明の便宜上、上記変更テーブルに基づいて、上記参照テーブルにおける中間コードが当該中間コードに対応する変更中間コードに変更される前の状態を示している。図5(A)に示すように、双方の参照テーブルにおける中間コードの並び順は同一であるが、中間コードに対応付けられているアドレス情報(この例では、実行コードの先頭アドレス)が異なっている。つまり、サンプルカードと、ICカード1とで、ROM12または不揮発性メモリ13に記憶された実行コードの配列が異なっている。これにより、変形例1によれば、参照テーブルが参照されて実行コードがROM12または不揮発性メモリ13から読み出されるときの消費電力の出方を変えることができる。例えば、同じ実行コード“MOV”でも、8000番地と8026番地に配置されている場合では番地のハミング重み(8000は1で8026は4となる)が異なるため、アドレスバスに起因する消費電力に差が生じる。つまり、同じ実行コード“MOV”を実行しているにもかかわらず、ICチップごとに消費電力値を異ならせることができる。そのため、SCAにおいて学習に使われた使ったサンプルカードと、ICカード1のそれぞれのサイドチャネル情報の相関を減らすことができる。   FIG. 5A is a diagram showing a sample card, a reference table of the IC card 1, and a mounting arrangement. 5A shows a state before the intermediate code in the reference table is changed to a changed intermediate code corresponding to the intermediate code based on the change table for convenience of explanation. As shown in FIG. 5A, the arrangement order of the intermediate codes in both reference tables is the same, but the address information associated with the intermediate code (in this example, the start address of the execution code) is different. Yes. That is, the arrangement of the execution codes stored in the ROM 12 or the nonvolatile memory 13 differs between the sample card and the IC card 1. Thereby, according to the modification 1, the way of the power consumption when the execution code is read from the ROM 12 or the nonvolatile memory 13 with reference to the reference table can be changed. For example, even if the same execution code “MOV” is assigned to address 8000 and address 8026, the hamming weight of the address is different (8000 is 1 and 8026 is 4), so there is a difference in power consumption caused by the address bus. Occurs. That is, although the same execution code “MOV” is being executed, the power consumption value can be varied for each IC chip. Therefore, the correlation between the side card information of the sample card used for learning in the SCA and the IC card 1 can be reduced.

なお、変形例1の場合も、上記参照コードの生成は、ICチップ1a側で行われるように構成してもよい。この場合、ICチップ1aは、複数の実行コードの不揮発性メモリ13における配列であってデフォルト設定された配列が、例えば乱数またはICチップ1aに固有の情報に基づいて並び替えられた複数の実行コードをICカード発行機2から取得して不揮発性メモリ13に書き込む。そして、ICチップ1aは、ICカード発行機2により当該実行コードの配列が並び替えられた後の上記対応関係を示す参照テーブルを生成する。また、実行コードの配列の並び替えもICチップ1a側で行われるように構成してもよい。この場合、ICチップ1aは、例えばコンパイル時に確定した順番で実行コードを不揮発性メモリ13の例えばバックアップ領域に書き込む。次いで、ICチップ1aは、不揮発性メモリ13に記憶されている複数の実行コードの当該不揮発性メモリ13における配列を、例えば乱数またはICチップ1aに固有の情報に基づいて並び替える。次いで、ICチップ1aは、配列が並び替えられた複数の実行コードを不揮発性メモリ13の例えばバックアップ領域から正規の領域に並び替えた配列で書き込む(つまり、移し替える)。そして、ICチップ1aは、ICチップ1aにより当該実行コードの配列が並び替えられた後の上記対応関係を示す参照テーブルを生成する。   In the case of the first modification, the reference code may be generated on the IC chip 1a side. In this case, the IC chip 1a includes a plurality of execution codes in which the arrangement of the plurality of execution codes in the nonvolatile memory 13 and the default arrangement is rearranged based on, for example, random numbers or information unique to the IC chip 1a. Is obtained from the IC card issuer 2 and written to the nonvolatile memory 13. Then, the IC chip 1a generates a reference table indicating the correspondence relationship after the arrangement of the execution codes is rearranged by the IC card issuer 2. Further, the rearrangement of the arrangement of the execution codes may be performed on the IC chip 1a side. In this case, the IC chip 1 a writes the execution codes in, for example, the backup area of the nonvolatile memory 13 in the order determined at the time of compilation. Next, the IC chip 1a rearranges the arrangement of the plurality of execution codes stored in the nonvolatile memory 13 in the nonvolatile memory 13 based on, for example, random numbers or information unique to the IC chip 1a. Next, the IC chip 1a writes (that is, transfers) a plurality of execution codes in which the arrangement is rearranged in an arrangement in which the non-volatile memory 13 is rearranged from, for example, a backup area to a normal area. Then, the IC chip 1a generates a reference table indicating the correspondence relationship after the arrangement of the execution code is rearranged by the IC chip 1a.

(変形例2)
次に、変形例2は、不揮発性メモリ13の記憶容量が少なく、特に、ICカード発行機2では実装の並びを変えられないROM12に実行コードを記憶するICカード1に適用する場合に有効な実施例である。変形例2で、上述した実施形態との相乗効果を得ることができる。この場合、ICチップ1aのROM12には、複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化(3重化以上であってもよい)された複数の実行コードが記憶されているものとする。変形例2では、制御部21は、上述した参照テーブルにおいて、少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードを識別する中間コードと、当該実行コードが記憶された不揮発性メモリ13におけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを生成する。ここで、少なくとも2重化された実行コードのうち、どの実行コードを選択するかは、例えば乱数によって決められる。そして、制御部21は、生成された参照テーブルと、上述した変更テーブルとをICチップ1aへ送信する。そして、ICチップ1aは、上記取得された変更テーブルに基づいて、上記取得された参照テーブルにおける本来の中間コードを当該中間コードに対応する変更中間コードに変更することになる。
(Modification 2)
Next, the second modification is effective when applied to the IC card 1 in which the nonvolatile memory 13 has a small storage capacity and is stored in the ROM 12 in which the execution code is stored in the ROM 12 that cannot be changed in the IC card issuer 2. This is an example. In the second modification, a synergistic effect with the above-described embodiment can be obtained. In this case, the ROM 12 of the IC chip 1a stores a plurality of execution codes in which at least one of the plurality of execution codes is duplicated (may be triple or more). It shall be. In the second modification, the control unit 21 includes, in the reference table described above, an intermediate code for identifying any one execution code selected from these execution codes for at least a duplicate execution code, A reference table indicating a correspondence relationship with address information indicating an address in the nonvolatile memory 13 in which the execution code is stored is generated. Here, which execution code is selected from at least the duplicated execution code is determined by a random number, for example. Then, the control unit 21 transmits the generated reference table and the change table described above to the IC chip 1a. Then, the IC chip 1a changes the original intermediate code in the acquired reference table to the changed intermediate code corresponding to the intermediate code based on the acquired change table.

図5(B)は、サンプルカードと、ICカード1の参照テーブル及び実装配列を示す図である。なお、図5(B)の例は、説明の便宜上、上記変更テーブルに基づいて、上記参照テーブルにおける中間コードが当該中間コードに対応する変更中間コードに変更される前の状態を示している。図5(B)に示すように、双方の参照テーブルにおける中間コードの並び順は同一であるが、中間コードに対応付けられているアドレス情報(この例では、実行コードの先頭アドレス)が異なっている。つまり、サンプルカードと、ICカード1とで、2重化された実行コードのうち、選択された実行コードが異なっている。これにより、変形例2によれば、参照テーブルが参照されて実行コードが不揮発性メモリ3から読み出されるときの消費電力の出方を変えることができる。また、実装の並びを変えられないROMに実行コードを記憶する場合であっても、実行コードがROMから読み出されるときの消費電力の出方をICカード1ごと変えることができる。   FIG. 5B is a diagram showing a sample card, a reference table of the IC card 1, and a mounting arrangement. 5B shows a state before the intermediate code in the reference table is changed to a changed intermediate code corresponding to the intermediate code based on the change table for convenience of explanation. As shown in FIG. 5B, the arrangement order of the intermediate codes in both reference tables is the same, but the address information associated with the intermediate code (in this example, the start address of the execution code) is different. Yes. That is, the execution code selected from the duplicated execution code is different between the sample card and the IC card 1. As a result, according to the second modification, it is possible to change the manner in which power is consumed when the execution code is read from the nonvolatile memory 3 by referring to the reference table. Further, even when the execution code is stored in the ROM whose arrangement of mounting cannot be changed, the power consumption when the execution code is read from the ROM can be changed for each IC card 1.

なお、変形例2の場合も、上記参照コードの生成は、ICチップ1a側で行われるように構成してもよい。この場合、ICチップ1aは、上述した参照テーブルにおいて、少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードを識別する中間コードと、当該実行コードが記憶された不揮発性メモリ13におけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを生成する。また、このように同じ処理がされる実行コードを少なくとも2重化する場合において、実行コードの順番や利用されるレジスタを変更するように構成してもよい。図5(C)は、2重化された実行コード“ADD”(01と02)の内容の一例を示す図である。図5(C)に示すADD01では、先ず0003番地のデータをレジスタR0に移し、その後に0058番地のデータをレジスタR1に移し、その後に、レジスタR0とR1のデータを加算させる手順になっている。一方、図5(C)に示すADD02では、先ず0058番地のデータをレジスタR1に移し、その後に0003番地のデータをレジスタR0に移し、その後に、レジスタR0とR1のデータを加算させる手順になっている。このようにADD01とADD01の処理結果は同一となるが、アドレスからの読み出し順序を異ならせることで、実行コードが不揮発性メモリ13から読み出されるときの消費電力の出方の傾向を更に変えることができる。   In the second modification, the reference code may be generated on the IC chip 1a side. In this case, the IC chip 1a includes an intermediate code for identifying any one execution code selected from these execution codes in the reference table described above, and the execution code. Is generated, and a reference table indicating a correspondence relationship with the address information indicating the address in the nonvolatile memory 13 is generated. Further, in the case where execution codes that are processed in the same way are at least duplicated, the order of execution codes and the registers used may be changed. FIG. 5C is a diagram showing an example of the contents of the duplicated execution code “ADD” (01 and 02). In ADD01 shown in FIG. 5C, the data at address 0003 is first transferred to register R0, then the data at address 0058 is transferred to register R1, and then the data in registers R0 and R1 are added. . On the other hand, in ADD02 shown in FIG. 5C, first, the data at address 0058 is moved to register R1, the data at address 0003 is moved to register R0, and then the data of registers R0 and R1 are added. ing. As described above, the processing results of ADD01 and ADD01 are the same, but by changing the reading order from the address, the tendency of the power consumption when the execution code is read from the nonvolatile memory 13 can be further changed. it can.

1 ICカード
2 ICカード発行機
1a ICチップ
10 CPU
11 RAM
12 ROM
13 不揮発性メモリ
14 I/O回路
1 IC card 2 IC card issuing machine 1a IC chip 10 CPU
11 RAM
12 ROM
13 Non-volatile memory 14 I / O circuit

Claims (8)

複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体であって、
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、
前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段と、
を備え
前記変更手段は、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする情報記憶媒体。
An information storage medium comprising a memory for storing a plurality of execution codes, and execution means for interpreting the identification information of the execution codes and executing the execution codes,
The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating a change table indicating the correspondence relationship for each of the first identification information, and storing the change table;
First writing means for writing the identification information constituting a predetermined program into the memory;
When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing means for changing to the identification information of 2;
A correspondence relationship between the second identification information changed by the changing unit and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A second writing means for writing a reference table to the memory, which is referred to when the execution code stored in the memory is executed,
Equipped with a,
The changing unit may change the first identification information of at least one of the plurality of execution codes, and the second identification information of at least two different second identification information. An information storage medium characterized by changing to the identification information .
前記変更手段は、前記複数の実行コードに少なくとも2つの同一機能の実行コードが含まれる場合、当該同一機能の実行コードのうち一方の実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更し、前記同一機能の実行コードのうち他方の実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち他方の当該第2の前記識別情報に変更することを特徴とする請求項に記載の情報記憶媒体。 When the plurality of execution codes include at least two execution codes having the same function, the changing unit sets the first identification information of one execution code of the execution codes having the same function to at least two different ones. The second identification information is changed to one of the second identification information, and the first identification information of the other execution code among the execution codes of the same function is changed to at least two different The information storage medium according to claim 1 , wherein the second identification information is changed to the other second identification information of the second identification information. 前記変更手段は、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報を乱数により選択し当該選択した当該第2の前記識別情報に変更することを特徴とする請求項またはに記載の情報記憶媒体。 The changing means selects any one of the second different pieces of the second identification information from among at least two different pieces of the second identification information by a random number, and changes the selected second identification information to the selected second identification information. The information storage medium according to claim 1 or 2 . 複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体であって、
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、
前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段と、
を備え、
前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、
前記第2書き込み手段は、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする情報記憶媒体。
An information storage medium comprising a memory for storing a plurality of execution codes, and execution means for interpreting the identification information of the execution codes and executing the execution codes,
The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating a change table indicating the correspondence relationship for each of the first identification information, and storing the change table;
First writing means for writing the identification information constituting a predetermined program into the memory;
When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing means for changing to the identification information of 2;
A correspondence relationship between the second identification information changed by the changing unit and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A second writing means for writing a reference table to the memory, which is referred to when the execution code stored in the memory is executed,
With
The memory stores the plurality of execution codes in which at least any one of the plurality of execution codes is duplicated.
The second writing means, for the at least duplicated execution code, the second identification corresponding to the first identification information of any one execution code selected from these execution codes information and, information storage medium you and writes a reference table showing the correspondence between the address information indicating an address in the memory where the execution code is written into the memory.
複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータにより実行される情報書き込み方法であって、
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成するステップと、
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込みステップと、
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更ステップと、
前記変更ステップにより変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込みステップと、
を含み、
前記変更ステップにおいては、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする情報書き込み方法。
An information writing method executed by a computer in an information storage medium comprising a memory for storing a plurality of execution codes, and an execution means for interpreting identification information of the execution codes and executing the execution codes,
The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Obtaining or generating a change table indicating the correspondence relationship for each of the first identification information;
A first writing step of writing the identification information constituting a predetermined program into the memory;
When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing to the identification information of 2;
A correspondence relationship between the second identification information changed by the changing step and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A second writing step of writing to the memory a reference table that is referred to when the execution code stored in the memory is executed;
Only including,
In the changing step, the first identification information of at least any one of the plurality of execution codes is changed to the second one of at least two different second identification information. An information writing method comprising: changing to the identification information .
複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータにより実行される情報書き込み方法であって、An information writing method executed by a computer in an information storage medium comprising a memory for storing a plurality of execution codes, and an execution means for interpreting identification information of the execution codes and executing the execution codes,
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成するステップと、The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Obtaining or generating a change table indicating the correspondence relationship for each of the first identification information;
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込みステップと、A first writing step of writing the identification information constituting a predetermined program into the memory;
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更ステップと、When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing to the identification information of 2;
前記変更ステップにより変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込みステップと、A correspondence relationship between the second identification information changed by the changing step and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A second writing step of writing to the memory a reference table that is referred to when the execution code stored in the memory is executed;
を含み、Including
前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、The memory stores the plurality of execution codes in which at least any one of the plurality of execution codes is duplicated.
前記第2書き込みステップにおいては、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする情報書き込み方法。In the second writing step, for the at least duplicated execution code, the second execution code corresponding to the first identification information of any one execution code selected from these execution codes An information writing method, wherein a reference table indicating a correspondence relationship between identification information and address information indicating an address in the memory in which the execution code is written is written in the memory.
複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータを、
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、
前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段として機能させる書き込み処理プログラムであって、
前記変更手段は、前記複数の実行コードのうち少なくとも何れか一つの実行コードの前記第1の前記識別情報を、少なくとも2つの異なる前記第2の前記識別情報のうち何れか一方の当該第2の前記識別情報に変更することを特徴とする書き込み処理プログラム。
A computer in an information storage medium comprising a memory for storing a plurality of execution codes and an execution means for interpreting identification information of the execution codes and executing the execution codes;
The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating a change table indicating the correspondence relationship for each of the first identification information, and storing the change table;
First writing means for writing the identification information constituting a predetermined program into the memory;
When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing means for changing to the identification information of 2;
A correspondence relationship between the second identification information changed by the changing unit and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A write processing program for functioning as a second writing means for writing a reference table to the memory, which is referred to when the execution code stored in the memory is executed ,
The changing unit may change the first identification information of at least one of the plurality of execution codes, and the second identification information of at least two different second identification information. A write processing program that changes to the identification information .
複数の実行コードを記憶するメモリと、前記実行コードの識別情報を解釈して当該実行コードを実行する実行手段とを備える情報記憶媒体におけるコンピュータを、A computer in an information storage medium comprising a memory for storing a plurality of execution codes and an execution means for interpreting identification information of the execution codes and executing the execution codes;
前記実行コードの第1の前記識別情報と、当該第1の前記識別情報とは異なる第2の前記識別情報であって当該第1の前記識別情報が変更された当該第2の前記識別情報との対応関係を当該第1の前記識別情報ごとに示す変更テーブルを取得または生成して記憶する記憶手段と、The first identification information of the execution code and the second identification information that is second identification information different from the first identification information and in which the first identification information is changed Storage means for acquiring or generating a change table indicating the correspondence relationship for each of the first identification information, and storing the change table;
所定のプログラムを構成する前記識別情報を前記メモリに書き込む第1書き込み手段と、First writing means for writing the identification information constituting a predetermined program into the memory;
前記所定のプログラムを構成する前記識別情報が前記メモリに書き込まれる際に、前記変更テーブルに基づいて、前記実行コードの前記第1の前記識別情報を当該第1の前記識別情報に対応する前記第2の前記識別情報に変更する変更手段と、When the identification information constituting the predetermined program is written to the memory, the first identification information of the execution code is changed to the first corresponding to the first identification information based on the change table. Changing means for changing to the identification information of 2;
前記変更手段により変更された前記第2の前記識別情報と、当該第2の前記識別情報に対応する前記実行コードが記憶された前記メモリにおけるアドレスを示すアドレス情報との対応関係を前記実行コードごとに示す参照テーブルであって、前記メモリに記憶された前記実行コードが実行される際に参照される参照テーブルを前記メモリに書き込む第2書き込み手段として機能させる書き込み処理プログラムであって、A correspondence relationship between the second identification information changed by the changing unit and address information indicating an address in the memory in which the execution code corresponding to the second identification information is stored is set for each execution code. A write processing program for functioning as a second writing means for writing a reference table to the memory, which is referred to when the execution code stored in the memory is executed,
前記メモリには、前記複数の実行コードのうち少なくとも何れか一つの実行コードが少なくとも2重化された前記複数の実行コードが記憶され、The memory stores the plurality of execution codes in which at least any one of the plurality of execution codes is duplicated.
前記第2書き込み手段は、前記少なくとも2重化された実行コードについてはこれらの実行コードのうちから選択される何れか一つの実行コードの第1の前記識別情報に対応する前記第2の前記識別情報と、当該実行コードが書き込まれる前記メモリにおけるアドレスを示すアドレス情報との対応関係を示す参照テーブルを前記メモリに書き込むことを特徴とする書き込み処理プログラム。The second writing means, for the at least duplicated execution code, the second identification corresponding to the first identification information of any one execution code selected from these execution codes A write processing program, wherein a reference table indicating a correspondence relationship between information and address information indicating an address in the memory in which the execution code is written is written in the memory.
JP2013206718A 2013-10-01 2013-10-01 Information storage medium, information writing method, and writing processing program Active JP6248518B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013206718A JP6248518B2 (en) 2013-10-01 2013-10-01 Information storage medium, information writing method, and writing processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013206718A JP6248518B2 (en) 2013-10-01 2013-10-01 Information storage medium, information writing method, and writing processing program

Publications (2)

Publication Number Publication Date
JP2015072520A JP2015072520A (en) 2015-04-16
JP6248518B2 true JP6248518B2 (en) 2017-12-20

Family

ID=53014860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013206718A Active JP6248518B2 (en) 2013-10-01 2013-10-01 Information storage medium, information writing method, and writing processing program

Country Status (1)

Country Link
JP (1) JP6248518B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003140758A (en) * 2001-11-07 2003-05-16 Hitachi Ltd Program enciphering/deciphering method and its executing method
FR2841997B1 (en) * 2002-07-08 2005-11-11 Gemplus Card Int SECURING APPLICATION DOWNLOADED IN PARTICULAR IN A CHIP CARD

Also Published As

Publication number Publication date
JP2015072520A (en) 2015-04-16

Similar Documents

Publication Publication Date Title
CN102782693B (en) Prevent the Javacard Virtual Machine bytecodes of fault attacks from performing protection
JP5467271B2 (en) Information processing apparatus and program, information processing method, and recording medium
KR20140053754A (en) System and method for dynamic, variably-timed operation paths as a resistance to side channel and repeated invocation attacks
KR20030071461A (en) Memory card
US9563754B2 (en) Method of generating a structure and corresponding structure
US9129137B2 (en) Method, computer program and device for providing security for intermediate programming code for its execution by a virtual machine
CN102623069A (en) Random excitation flash model verification method
US10579791B2 (en) Technologies to defeat secure enclave side-channel attacks using fault-oriented programming
JP2005515542A (en) Apparatus and method for writing to NV memory in a controller architecture together with a corresponding computer program and a corresponding computer-readable storage medium
US10095847B2 (en) Method, system and device for protection against reverse engineering and/or tampering with programs
CN103207824B (en) Not by the emulator of the interference that resets under monitoring mode
JP6248518B2 (en) Information storage medium, information writing method, and writing processing program
JP6428003B2 (en) Writing apparatus, writing method, writing processing program, and information storage medium
EP3574425B1 (en) Method to secure a software code
JP6396119B2 (en) IC module, IC card, and IC card manufacturing method
JP2010250364A (en) Ic chip and data protection method or the like
US9916281B2 (en) Processing system with a secure set of executable instructions and/or addressing scheme
Torr et al. Multos and multos application development
US20230325477A1 (en) Program protection apparatus, program protection method, and program protection program
JP6119345B2 (en) IC chip, IC card, verification processing method, and verification processing program
EP3657319A1 (en) A method for generating an executable file from a parent executable file to produce a derived customer item
Asgari et al. Classification of Smart Card Operating Systems
JP6175882B2 (en) Information storage medium, IC card, and bytecode execution method
JP5492172B2 (en) Portable electronic device, IC card and IC module
CN115544516A (en) Kernel starting method and device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170815

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171010

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171106

R150 Certificate of patent or registration of utility model

Ref document number: 6248518

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150