JP6155933B2 - Portable storage media - Google Patents

Portable storage media Download PDF

Info

Publication number
JP6155933B2
JP6155933B2 JP2013151303A JP2013151303A JP6155933B2 JP 6155933 B2 JP6155933 B2 JP 6155933B2 JP 2013151303 A JP2013151303 A JP 2013151303A JP 2013151303 A JP2013151303 A JP 2013151303A JP 6155933 B2 JP6155933 B2 JP 6155933B2
Authority
JP
Japan
Prior art keywords
module
execution
program
multiplexing
portable storage
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
JP2013151303A
Other languages
Japanese (ja)
Other versions
JP2015022608A (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 JP2013151303A priority Critical patent/JP6155933B2/en
Publication of JP2015022608A publication Critical patent/JP2015022608A/en
Application granted granted Critical
Publication of JP6155933B2 publication Critical patent/JP6155933B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は,金融用途で利用されるICカードや移動体通信で利用されるUSIMを代表とする携帯型記憶媒体に関し,更に詳しくは,携帯型記憶媒体の不揮発性メモリに格納されたプログラムの正当性を検証する技術に関する。   The present invention relates to a portable storage medium typified by an IC card used for financial purposes and a USIM used for mobile communication, and more specifically, the validity of a program stored in a nonvolatile memory of the portable storage medium. The present invention relates to a technique for verifying sex.

金融用途で利用されるICカードや移動体通信で利用されるUSIMを代表とする携帯型記憶媒体には、携帯型記憶媒体の不揮発性メモリ(以下,「NVM」と記す。NVMは, Non−Volatile Memoryの略)にプログラムをロードする機能を有するものがあり,その代表として,JAVA(登録商標)等のプラットホーム型オペレーティングシステムを搭載したICカードがある。   A portable storage medium represented by an IC card used for financial purposes or a USIM used for mobile communication is referred to as a non-volatile memory (hereinafter referred to as “NVM”). Some of them have a function of loading a program in the (Volatile Memory), and a representative example is an IC card equipped with a platform type operating system such as JAVA (registered trademark).

携帯型記憶媒体のNVMにロードされたプログラムは実行コードまたは中間コードの形式で携帯型記憶媒体のNVMに書き込まれ,携帯型記憶媒体のCPUは,そのコードを読み出して実行する。   The program loaded in the NVM of the portable storage medium is written into the NVM of the portable storage medium in the form of an execution code or an intermediate code, and the CPU of the portable storage medium reads and executes the code.

この時,携帯型記憶媒体のNVMに発生したメモリエラーや外部からの故障攻撃によって,不揮発性メモリにロードしたプログラムが改竄された状態になると、プログラムを実行した時に携帯型記憶媒体が意図しない動作をし、セキュリティ的に重大な問題を引き起こす危険性がある。   At this time, if the program loaded into the non-volatile memory becomes falsified due to a memory error that has occurred in the NVM of the portable storage medium or a failure attack from the outside, the portable storage medium will not operate when the program is executed. Risking serious security problems.

携帯型記憶媒体のNVMにロードしたプログラムの正当性を検証する発明として,チェックコードを用いる発明が特許文献1で開示されている。   Patent Document 1 discloses an invention that uses a check code as an invention for verifying the validity of a program loaded in an NVM of a portable storage medium.

しかし、チェックコードを用いてプログラムの正当性を検証する場合,チェックコードを検証するタイミング以外でプログラムが改竄されてしまった場合、プログラムが改竄されたことを検知できない問題がある。また,プログラムのプログラム長が長い場合、チェックコードの演算時間が長くなってしまう問題もある。   However, when verifying the legitimacy of a program using a check code, there is a problem that it cannot be detected that the program has been tampered with if the program has been tampered with other than at the timing of verifying the check code. Further, when the program length of the program is long, there is a problem that the calculation time of the check code becomes long.

携帯型記憶媒体のNVMにロードされたプログラムは複数の実行モジュールを含むように構成されるため,携帯型記憶媒体のNVMにロードされたプログラムの実行モジュールを実行した際,この実行モジュールの実行結果の正当性を検証できれば,プログラムの改竄を検知できる。   Since the program loaded in the NVM of the portable storage medium is configured to include a plurality of execution modules, when the execution module of the program loaded in the NVM of the portable storage medium is executed, the execution result of the execution module If the legitimacy can be verified, it is possible to detect program tampering.

実行モジュールの実行結果の正当性を検証する手法として,特許文献2おいて,同一の処理を同一のデータに対して複数回行い,複数の処理結果が一致するか確認する多重化法が記載されており,同一の処理を同一のデータに対して2回行うことを二重化法と呼ぶ時がある。   As a method for verifying the validity of the execution result of the execution module, Patent Document 2 describes a multiplexing method in which the same processing is performed a plurality of times on the same data, and whether or not the plurality of processing results match is described. Therefore, performing the same process twice on the same data is sometimes called a duplexing method.

携帯型記憶媒体のNVMにロードするプログラムに含まれるモジュール全てを多重化できればよいが,全ての実行モジュールを多重化するために必要なメモリ容量は大きくなってしまうため,多重化する実行モジュールは一部の実行モジュールに限定される。   It suffices if all the modules included in the program loaded into the NVM of the portable storage medium can be multiplexed. However, since the memory capacity required for multiplexing all the execution modules becomes large, there is only one execution module to be multiplexed. It is limited to the execution module of the part.

多重化する実行モジュールは設計時に決めることもできるが,携帯型記憶媒体の運用段階において,設計当初は想定していない実行モジュールも多重化したいケースもあるため,携帯型記憶媒体のNVMにプログラムをロードした後であっても,実行モジュールを多重化できることが望ましい。   Execution modules to be multiplexed can be determined at the time of design. However, there are cases where it is desired to multiplex execution modules that were not initially planned at the stage of operation of the portable storage medium, so a program is stored in the NVM of the portable storage medium. It is desirable to be able to multiplex execution modules even after loading.

特開2004−213478号公報JP 2004-213478 A 特開平10−154976号公報JP-A-10-154976

そこで,本発明は,携帯型記憶媒体のNVMにロードするプログラムに含まれるモジュールの実行結果を多重化法によって検証でき,更に,携帯型記憶媒体のNVMにプログラムをロードした後であっても,モジュールを多重化できる携帯型記憶媒体を提供することを目的とする。   Therefore, the present invention can verify the execution result of the module included in the program loaded into the NVM of the portable storage medium by the multiplexing method, and even after loading the program into the NVM of the portable storage medium, An object is to provide a portable storage medium capable of multiplexing modules.

上述した課題を解決する第1の発明は,少なくとも一つの実行モジュールを有するプログラムを記憶した実行ファイルと,多重化する前記実行モジュールを示すメタ情報が付加され,メタ情報で示される前記実行モジュールが用いるデータを引き継いでこの前記実行モジュールと同じ処理を実行する多重化モジュールを記憶した実行ファイルを不揮発性メモリに格納し,前記プログラムが有する一つの前記実行モジュールが実行されると,前記メタ情報を利用して,実行された前記実行モジュールに対応する前記多重化モジュールの実行ファイルが不揮発性メモリに実装されているか確認し,この前記多重化モジュールの実行ファイルが不揮発性メモリに実装されている場合,この前記多重化モジュールを実行し,実行された前記実行モジュールの実行結果と実行した前記多重化モジュールの実行結果が一致するか検証する正当性検証部がオペレーティングシステムに備えられていることを特徴とする携帯型記憶媒体である。   According to a first aspect of the present invention for solving the above-described problem, an execution file storing a program having at least one execution module and meta information indicating the execution module to be multiplexed are added, and the execution module indicated by the meta information includes An execution file storing a multiplexing module that takes over the data to be used and executes the same processing as the execution module is stored in a nonvolatile memory, and when one execution module of the program is executed, the meta information is stored. When the execution file of the multiplexed module corresponding to the executed execution module is mounted on the nonvolatile memory, and the execution file of the multiplexed module is mounted on the nonvolatile memory The multiplexing module is executed, and the executed execution module is executed. Validity verifying unit that verifies whether the execution result of the multiplexing module of executing the execution result of Le match is a portable storage medium, characterized in that provided in the operating system.

更に,第2の発明は,第1の発明に記載した携帯型記憶媒体であって,前記プログラムの実行ファイルと前記多重化ファイルの実行ファイルをNVMにロードできるように,前記プログラムのコードを含むロードコマンドを受信すると,前記プログラムのコードを不揮発性メモリに書き込むことで前記プログラムの実行ファイルを不揮発性メモリに格納し,前記多重化モジュールが対応する前記実行モジュールを示す実行モジュール特定情報と前記メタ情報を含むロードコマンドを受信すると,前記実行モジュール特定情報で示される前記実行モジュールのコードを前記多重化モジュールのコードとして前記不揮発性メモリに書き込み,更に,前記メタ情報を不揮発性メモリに書き込むことで前記多重化モジュールの実行ファイルを不揮発性メモリに格納するロード部を備えたことを特徴とする。   Further, the second invention is the portable storage medium described in the first invention, and includes the code of the program so that the execution file of the program and the execution file of the multiplexed file can be loaded into the NVM. When the load command is received, the program execution file is stored in the nonvolatile memory by writing the program code in the nonvolatile memory, and the execution module specifying information indicating the execution module corresponding to the multiplexing module and the meta data are stored. When a load command including information is received, the code of the execution module indicated by the execution module specifying information is written in the nonvolatile memory as the code of the multiplexing module, and further, the meta information is written in the nonvolatile memory. The executable file of the multiplexing module is non-volatile Characterized by comprising a loading unit to be stored in memory.

更に,第3の発明は,第2の発明に記載した携帯型記憶媒体であって,前記実行モジュール特定情報以外にも対応が取れるように,前記ロード部は,前記多重化モジュールのコードと前記メタ情報を含むロードコマンドを受信すると,前記多重化モジュールのコードと前記メタ情報を前記不揮発性メモリに書き込むことを特徴とする。   Furthermore, a third invention is the portable storage medium described in the second invention, wherein the load unit includes a code of the multiplexing module and the code so as to cope with other than the execution module specifying information. When a load command including meta information is received, the code of the multiplexing module and the meta information are written into the nonvolatile memory.

上述した本発明によれば,携帯型記憶媒体のNVMにロードするプログラムに含まれる実行モジュールを実行した後に,この実行モジュールに対応する多重化モジュールを実行し,実行モジュールの実行結果と多重化モジュールの実行結果を照合することで,実行モジュールの実行結果を多重化法によって検証できる。更に,実行ファイルは,プログラムをロードした後であってもロードできるため,実行ファイルの形式で多重化モジュールを携帯型記憶媒体のNVMに格納することで,プログラムをロードした後であっても,所定の実行モジュールを多重化できるようになる。   According to the present invention described above, after executing the execution module included in the program loaded into the NVM of the portable storage medium, the multiplexing module corresponding to the execution module is executed, and the execution result of the execution module and the multiplexing module are executed. The execution results of the execution modules can be verified by the multiplexing method. Furthermore, since the execution file can be loaded even after the program is loaded, even after the program is loaded by storing the multiplexing module in the NVM of the portable storage medium in the form of the execution file, A predetermined execution module can be multiplexed.

本実施形態にかかる携帯型記憶媒体を説明する図。FIG. 3 is a diagram for explaining a portable storage medium according to the embodiment. 携帯型記憶媒体のメモリの内容を説明する図。The figure explaining the content of the memory of a portable storage medium. 携帯型記憶媒体に実装されるソフトウェアを説明する図。The figure explaining the software mounted in a portable storage medium. 実行モジュールの実行結果の正当性を検証する動作を説明する図。The figure explaining the operation | movement which verifies the correctness of the execution result of an execution module. プログラム実行ファイルと同時に多重化モジュール実行ファイルをNVMにロードする際の動作を説明する図。The figure explaining operation | movement at the time of loading a multiplexing module execution file into NVM simultaneously with a program execution file. プログラム実行ファイルをNVMにロードした後に,多重化モジュール実行ファイルをNVMにロードする際の動作を説明する図。The figure explaining operation | movement at the time of loading a multiplexing module execution file to NVM, after loading a program execution file to NVM.

ここから,本発明の好適な実施形態を記載する。なお,以下の記載は本発明の範囲を束縛するものでなく,理解を助けるために記述するものである。   From here, preferred embodiments of the present invention will be described. The following description is not intended to limit the scope of the present invention, but is provided to aid understanding.

図1は,本実施形態にかかる携帯型記憶媒体1を説明する図で,図2は,携帯型記憶媒体1のメモリの内容を説明する図で,図3は,携帯型記憶媒体1に実装されるソフトウェアを説明する図である。   FIG. 1 is a diagram for explaining a portable storage medium 1 according to the present embodiment, FIG. 2 is a diagram for explaining the contents of a memory of the portable storage medium 1, and FIG. 3 is mounted on the portable storage medium 1. It is a figure explaining the software to be performed.

本実施形態にかかる携帯型記憶媒体1は,中央演算装置であるCPU12,揮発性のメモリであるRAM13,読み出し専用のメモリであるROM11,電気的に書き換え可能なNVM10,外部装置と通信するためのインターフェース回路14が実装された電子媒体で,セキュリティが要求されるホストシステムと協働して動作する。   A portable storage medium 1 according to this embodiment includes a CPU 12 that is a central processing unit, a RAM 13 that is a volatile memory, a ROM 11 that is a read-only memory, an electrically rewritable NVM 10, and an external device. An electronic medium on which the interface circuit 14 is mounted operates in cooperation with a host system that requires security.

図1では,本実施形態にかかる携帯型記憶媒体1を金融用途等で用いられるICカードとして図示しているが,携帯型記憶媒体1の他形態としては,移動体通信端末に装着するSIMやUICC,移動体通信端末に実装されるエンベットSIM等,様々な形態を想定できる。   In FIG. 1, the portable storage medium 1 according to the present embodiment is illustrated as an IC card used for financial purposes, but other forms of the portable storage medium 1 include a SIM mounted on a mobile communication terminal, Various forms such as a UICC and an embed SIM installed in a mobile communication terminal can be assumed.

図2に図示したように,携帯型記憶媒体1のROM11には,プログラム3の実行を管理する機能を有するオペレーティングシステム2が実装され,携帯型記憶媒体1のNVM10には,オペレーティングシステム2上で動作するプログラム3のコードを記憶したプログラム実行ファイル100と,プログラム3が有する実行モジュール30を多重化するための多重化モジュール4のコードを記憶した多重化モジュール実行ファイル101が格納され,多重化モジュール実行ファイル101には,多重化する実行モジュール30を少なくとも示すメタ情報102が付加されている。   As shown in FIG. 2, an operating system 2 having a function of managing execution of the program 3 is mounted on the ROM 11 of the portable storage medium 1, and the NVM 10 of the portable storage medium 1 is installed on the operating system 2. A program execution file 100 storing a code of an operating program 3 and a multiplexing module execution file 101 storing a code of a multiplexing module 4 for multiplexing the execution module 30 included in the program 3 are stored. Meta information 102 indicating at least the execution module 30 to be multiplexed is added to the execution file 101.

図3に図示したように,携帯型記憶媒体1は,ソフトウェアとして,オペレーティングシステム2と,プログラム3と,プログラム3が有する実行モジュール30を多重化するための多重化モジュール4が実装される。   As shown in FIG. 3, the portable storage medium 1 is mounted with an operating system 2, a program 3, and a multiplexing module 4 for multiplexing an execution module 30 included in the program 3 as software.

携帯型記憶媒体1に実装されるプログラム3は複数の実行モジュール30を有する。図3では,プログラム3が有する実行モジュール30として,データ等の選択に用いる選択モジュール30a,データをNVM10等から読み出す読み出しモジュール30b,ユーザ等の認証に用いる認証モジュール30c,データをNVM10に書き込む書き込みモジュール30dおよび認証モジュール30cの実行結果に基づいて携帯型記憶媒体1の状態を遷移させる状態遷移モジュール30eを図示している。   The program 3 installed in the portable storage medium 1 has a plurality of execution modules 30. In FIG. 3, as an execution module 30 included in the program 3, a selection module 30a used for selecting data and the like, a read module 30b for reading data from the NVM 10 and the like, an authentication module 30c used for user authentication and the like, and a writing module for writing data to the NVM 10 A state transition module 30e that transitions the state of the portable storage medium 1 based on the execution results of 30d and the authentication module 30c is illustrated.

携帯型記憶媒体1に実装される多重化モジュール4は,メタ情報102で示される実行モジュール30が用いるデータを引き継いでこの実行モジュール30と同じ処理を実行するモジュールである。多重化モジュール4は,多重化する実行モジュール30毎に実装され,図3では,認証モジュール30aと状態遷移モジュール30eを多重化するため,認証モジュール30aの多重化モジュール4aと状態遷移モジュール30eの多重化モジュール4bが実装されている。   The multiplexing module 4 mounted on the portable storage medium 1 is a module that takes over the data used by the execution module 30 indicated by the meta information 102 and executes the same processing as the execution module 30. The multiplexing module 4 is mounted for each execution module 30 to be multiplexed. In FIG. 3, the multiplexing module 4a of the authentication module 30a and the state transition module 30e are multiplexed in order to multiplex the authentication module 30a and the state transition module 30e. Module 4b is mounted.

多重化する実行モジュール30に対応する多重化モジュール4の数は多重化数に依存する。例えば,認証モジュール30aを二重化する際は,認証モジュール30aに対応する多重化モジュール4aは一つになり,認証モジュール30aを三重化する際は,認証モジュール30aに対応する多重化モジュール4aは二つになる。   The number of multiplexing modules 4 corresponding to the execution module 30 to be multiplexed depends on the number of multiplexing. For example, when duplicating the authentication module 30a, there is only one multiplexing module 4a corresponding to the authentication module 30a, and when multiplexing the authentication module 30a, there are two multiplexing modules 4a corresponding to the authentication module 30a. become.

携帯型記憶媒体1に実装されるオペレーティングシステム2は,携帯型記憶媒体1のリソース(RAM13やNVM10等)にアクセスできる環境をオペレーティングシステム2上で動作するプログラム3に提供し,プログラム3の実行を管理する機能を有し,本実施形態のオペレーティングシステム2は,オペレーティングシステム2上で動作するプログラム3の実行を管理するプログラム実行管理部22と,プログラム3が有する実行モジュール30を実行すると,この実行モジュール30の実行結果の正当性を検証する正当性検証部20と,プログラム3と多重化モジュール4をNVM10にロードするロード部21を有している。   The operating system 2 mounted on the portable storage medium 1 provides the program 3 operating on the operating system 2 with an environment in which resources (RAM 13, NVM 10, etc.) of the portable storage medium 1 can be accessed. The operating system 2 of the present embodiment has a management function. When the program execution management unit 22 that manages the execution of the program 3 operating on the operating system 2 and the execution module 30 included in the program 3 are executed, It has a validity verification unit 20 that verifies the validity of the execution result of the module 30 and a load unit 21 that loads the program 3 and the multiplexing module 4 into the NVM 10.

携帯型記憶媒体1のオペレーティングシステム2が有するプログラム実行管理部22は,オペレーティングシステム2上で起動したプログラム3に携帯型記憶媒体1のリソースを割り当てた後,プログラム実行ファイル100に記述されたコードを順に読み出して実行する手段である。   The program execution management unit 22 included in the operating system 2 of the portable storage medium 1 allocates the resources of the portable storage medium 1 to the program 3 started on the operating system 2, and then executes the code described in the program execution file 100. Means for reading and executing in order.

携帯型記憶媒体1のオペレーティングシステム2が有する正当性検証部20は,プログラム実行管理部22から呼び出されて起動し,プログラム3が有する一つの実行モジュール30が実行されると,この実行モジュール30の実行結果の正当性を検証する動作を行う。   The legitimacy verification unit 20 included in the operating system 2 of the portable storage medium 1 is called by the program execution management unit 22 and started up. When one execution module 30 included in the program 3 is executed, An operation to verify the validity of the execution result is performed.

図4は,実行モジュール30の実行結果の正当性を検証する動作を説明する図である。オペレーティングシステム2のプログラム実行管理部22は,プログラム3から読み出したコードが実行モジュール30を呼び出すコードの場合,このコードで示される実行モジュール30を実行し(S1),実行モジュール30の実行結果をRAM13に格納した後(S2),実行した実行モジュール30を特定する情報を引き渡して正当性検証部20を呼び出す。   FIG. 4 is a diagram for explaining the operation of verifying the validity of the execution result of the execution module 30. When the code read from the program 3 is a code that calls the execution module 30, the program execution management unit 22 of the operating system 2 executes the execution module 30 indicated by this code (S1), and the execution result of the execution module 30 is stored in the RAM 13 (S2), information for specifying the executed execution module 30 is delivered and the validity verification unit 20 is called.

オペレーティングシステム2の正当性検証部20は,プログラム実行管理部22から呼び出されると,多重化モジュール実行ファイル101に付加されているメタ情報102を参照して,プログラム実行管理部22から引き渡された情報に対応する多重化モジュール実行ファイル101,すなわち,プログラム実行管理部22が実行した実行モジュール30に対応する多重化モジュール実行ファイル101がNVM10に実装されているか確認する(S3)。   When called from the program execution management unit 22, the validity verification unit 20 of the operating system 2 refers to the meta information 102 added to the multiplexed module execution file 101 and passes information from the program execution management unit 22. It is confirmed whether or not the multiplexed module execution file 101 corresponding to, ie, the multiplexed module execution file 101 corresponding to the execution module 30 executed by the program execution management unit 22 is installed in the NVM 10 (S3).

プログラム実行管理部22が実行した実行モジュール30に対応する多重化モジュール実行ファイル101がNVM10に実装されていない場合,正当性検証部20は,プログラム実行管理部22に処理を戻して,この手順は終了する。   When the multiplexed module execution file 101 corresponding to the execution module 30 executed by the program execution management unit 22 is not mounted in the NVM 10, the validity verification unit 20 returns the processing to the program execution management unit 22, and this procedure is finish.

また,プログラム実行管理部22が実行した実行モジュール30に対応する多重化モジュール実行ファイル101がNVM10に実装されている場合,正当性検証部20は,この多重化モジュール実行ファイル101に記述されているコードを実行することで,プログラム実行管理部22が実行した実行モジュール30に対応する多重化モジュール4を実行し(S4),プログラム実行管理部22が実行した実行モジュール30の実行結果とはアドレスを変えて,多重化モジュール4の実行結果をRAM13に格納する(S5)。   When the multiplexed module execution file 101 corresponding to the execution module 30 executed by the program execution management unit 22 is mounted on the NVM 10, the validity verification unit 20 is described in the multiplexed module execution file 101. By executing the code, the multiplexing module 4 corresponding to the execution module 30 executed by the program execution management unit 22 is executed (S4), and the execution result of the execution module 30 executed by the program execution management unit 22 is an address. Instead, the execution result of the multiplexing module 4 is stored in the RAM 13 (S5).

なお,オペレーティングシステム2の正当性検証部20が実行する多重化モジュール4の数は,プログラム実行管理部22が実行した実行モジュール30の多重化数に依存する。例えば,この実行モジュール30が二重化されている場合,この実行モジュール30に対応する多重化モジュール4は一つになるため,正当性検証部20が多重化モジュール4を実行する回数は一回になり,多重化モジュール4の実行結果は一つになる。また,この実行モジュール30が三重化されている場合,この実行モジュール30に対応する多重化モジュール4は二つになるため,正当性検証部20が多重化モジュール4を実行する回数は二回になり,多重化モジュール4の実行結果は二つになる。   Note that the number of multiplexed modules 4 executed by the validity verification unit 20 of the operating system 2 depends on the number of multiplexed execution modules 30 executed by the program execution management unit 22. For example, when the execution module 30 is duplicated, the multiplexing module 4 corresponding to the execution module 30 is one, so that the validity verifying unit 20 executes the multiplexing module 4 once. , The execution result of the multiplexing module 4 becomes one. Further, when the execution module 30 is tripled, the number of multiplexing modules 4 corresponding to the execution module 30 is two, so the number of times that the validity verification unit 20 executes the multiplexing module 4 is twice. Thus, the execution result of the multiplexing module 4 is two.

プログラム実行管理部22が実行した実行モジュール30に対応する多重化モジュール4を実行すると,正当性検証部20は,プログラム実行管理部22が実行した実行モジュール30の実行結果と,多重化モジュール4の実行結果が全て一致するか確認する(S6)。   When the multiplexing module 4 corresponding to the execution module 30 executed by the program execution management unit 22 is executed, the validity verification unit 20 executes the execution result of the execution module 30 executed by the program execution management unit 22 and the multiplexing module 4. It is confirmed whether all the execution results match (S6).

実行結果が全て一致する場合,正当性検証部20は,プログラム実行管理部22に処理を戻して,この手順は終了する。また,実行結果が全て一致しない場合,正当性検証部20は,所定のエラー処理を実行し(S7),この手順は終了する。   If all the execution results match, the correctness verification unit 20 returns the processing to the program execution management unit 22 and ends this procedure. If all the execution results do not match, the correctness verification unit 20 executes predetermined error processing (S7), and this procedure ends.

このように,携帯型記憶媒体1のNVM10に,プログラム実行ファイル100とは別に多重化モジュール実行ファイル101を格納させ,プログラム3が有する実行モジュール30を実行した後に,この実行モジュール30に対応する多重化モジュール4を実行し,処理結果が全て同一であるか検証することで,この実行モジュール30の実行結果の正当性を携帯型記憶媒体1側で検証できるようになる。   As described above, the multiplexed module execution file 101 is stored in the NVM 10 of the portable storage medium 1 separately from the program execution file 100, and the execution module 30 included in the program 3 is executed. By executing the conversion module 4 and verifying whether the processing results are all the same, the validity of the execution result of the execution module 30 can be verified on the portable storage medium 1 side.

具体的には,携帯型記憶媒体1のNVM10に発生したメモリエラーや外部からの故障攻撃によって,プログラム3のコードが改竄された状態になったとしても、多重化モジュール4のコードは改竄された状態にならないため,プログラム3が有する実行モジュール30の処理結果と,実行モジュール30に対応する多重化モジュール4の処理結果は同一でなくなるため,何らかの原因でNVM10に異常があると携帯型記憶媒体1側で判断できる。   Specifically, even if the code of the program 3 is falsified due to a memory error occurring in the NVM 10 of the portable storage medium 1 or a failure attack from the outside, the code of the multiplexing module 4 is falsified. Since the processing result of the execution module 30 included in the program 3 and the processing result of the multiplexing module 4 corresponding to the execution module 30 are not the same because the program 3 does not enter the state, if the NVM 10 is abnormal for some reason, the portable storage medium 1 Can be judged by the side.

本実施形態に係る携帯型記憶媒体1のオペレーティングシステム2が有するロード部21は,プログラム実行ファイル100と多重化モジュール実行ファイル101をNVM10にロードする手段である。   The load unit 21 included in the operating system 2 of the portable storage medium 1 according to the present embodiment is means for loading the program execution file 100 and the multiplexed module execution file 101 into the NVM 10.

本実施形態では,プログラム3が有する実行モジュール30を多重化する多重化モジュール4は,実行ファイルの形式でNVM10に実装するため,多重化モジュール実行ファイル101をNVM10にロードするタイミングは,プログラム実行ファイル100のロードと同時でもよく,また,プログラム実行ファイル100をロードした後でもよい。   In the present embodiment, the multiplexing module 4 that multiplexes the execution module 30 included in the program 3 is mounted on the NVM 10 in the form of an execution file. Therefore, the timing for loading the multiplexing module execution file 101 into the NVM 10 is the program execution file. 100 may be simultaneously loaded or after the program execution file 100 is loaded.

ここから,オペレーティングシステム2が有するロード部21の動作について説明する。図5は,プログラム実行ファイル100と同時に多重化モジュール実行ファイル101をNVM10にロードする際の動作を説明する図である。   From here, operation | movement of the load part 21 which the operating system 2 has is demonstrated. FIG. 5 is a diagram for explaining the operation when the multiplexed module execution file 101 is loaded into the NVM 10 simultaneously with the program execution file 100.

プログラム実行ファイル100と同時に多重化モジュール実行ファイル101をNVM10にロードする際、携帯型記憶媒体1と協働するシステムは図外の発行システムになり,発行システムから携帯型記憶媒体1に対して,プログラム実行ファイル100と多重化モジュール実行ファイル101をNVM10にロードするロードコマンドが送信される(S10)。   When the multiplexed module execution file 101 is loaded into the NVM 10 at the same time as the program execution file 100, the system that cooperates with the portable storage medium 1 is an unillustrated issuing system. From the issuing system to the portable storage medium 1, A load command for loading the program execution file 100 and the multiplexed module execution file 101 into the NVM 10 is transmitted (S10).

このロードコマンドには,プログラム実行ファイル100に係るデータとして,プログラム3のコードが含まれる。更に,このロードコマンドには,多重化モジュール実行ファイル101に係るデータとして,メタ情報102に加え,実行モジュール特定情報または多重化モジュール4のコードのいずれかが含まれる。ここで,実行モジュール特定情報とは,多重化モジュール4に対応する実行モジュール30を示す情報で,例えば,実行モジュール30のアドレスや実行モジュール30の名称である。   This load command includes the code of the program 3 as data related to the program execution file 100. Further, the load command includes either the execution module specifying information or the code of the multiplexing module 4 in addition to the meta information 102 as data related to the multiplexing module execution file 101. Here, the execution module specifying information is information indicating the execution module 30 corresponding to the multiplexing module 4, and is, for example, the address of the execution module 30 or the name of the execution module 30.

オペレーティングシステム2のロード部21は,プログラム実行ファイル100と多重化モジュール実行ファイル101をNVM10にロードするロードコマンドを受信すると,まず,このロードコマンドに含まれるプログラム3のコードをNVM10に書き込むことで,プログラム実行ファイル100をNVM10に格納する(S11)。   When the load unit 21 of the operating system 2 receives a load command for loading the program execution file 100 and the multiplexed module execution file 101 into the NVM 10, first, the code of the program 3 included in the load command is written into the NVM 10. The program execution file 100 is stored in the NVM 10 (S11).

次に,オペレーティングシステム2のロード部21は,このロードコマンドに含まれる多重化モジュール実行ファイル101に係るデータを確認し(S12),多重化モジュール実行ファイル101に係るデータが実行モジュール特定情報であれば,実行モジュール特定情報で示される実行モジュール30のコードをプログラム実行ファイル100から特定し,特定した実行モジュール30のコードを多重化モジュール4のコードとしてNVM10に書き込み,更に,メタ情報102をNVM10に書き込むことで,メタ情報102を付加した多重化モジュール実行ファイル101をNVM10に格納して(S13),この手順を終了する。   Next, the load unit 21 of the operating system 2 confirms the data related to the multiplexed module execution file 101 included in this load command (S12), and if the data related to the multiplexed module execution file 101 is execution module specifying information. For example, the code of the execution module 30 indicated by the execution module specifying information is specified from the program execution file 100, the code of the specified execution module 30 is written in the NVM 10 as the code of the multiplexing module 4, and the meta information 102 is further stored in the NVM 10. By writing, the multiplexed module execution file 101 to which the meta information 102 is added is stored in the NVM 10 (S13), and this procedure ends.

また,オペレーティングシステム2のロード部21は,多重化モジュール実行ファイル101に係るデータが多重化モジュール4のコードであれば,多重化モジュール4のコードとメタ情報102をNVM10に書き込むことで,メタ情報102を付加した多重化モジュール実行ファイル101をNVM10に格納して(S13),この手順を終了する。   In addition, if the data related to the multiplexed module execution file 101 is the code of the multiplexed module 4, the load unit 21 of the operating system 2 writes the code of the multiplexed module 4 and the meta information 102 into the NVM 10 so that the meta information The multiplexed module execution file 101 to which 102 is added is stored in the NVM 10 (S13), and this procedure ends.

図6は,プログラム実行ファイル100をNVM10にロードした後に,多重化モジュール実行ファイル101をNVM10にロードする際の動作を説明する図である。   FIG. 6 is a diagram for explaining the operation when loading the multiplexed module execution file 101 into the NVM 10 after loading the program execution file 100 into the NVM 10.

プログラム3をNVM10にロードする際、発行システムから携帯型記憶媒体1に対して,まず,プログラム実行ファイル100をNVM10にロードするためのロードコマンドが送信される(S20)。このロードコマンドには,プログラム3のコードが含まれ,オペレーティングシステム2のロード部21は,プログラム3のコードをNVM10に書き込むことで,プログラム実行ファイル100がNVM10に格納される(S21)。   When loading the program 3 into the NVM 10, first, a load command for loading the program execution file 100 into the NVM 10 is transmitted from the issuing system to the portable storage medium 1 (S20). The load command includes the code of the program 3, and the load unit 21 of the operating system 2 writes the code of the program 3 into the NVM 10 so that the program execution file 100 is stored in the NVM 10 (S21).

次に,ホストシステムから携帯型記憶媒体1に対して,多重化モジュール実行ファイル101をNVM10にロードするためのロードコマンドが送信される(S22)。上述しているように,このロードコマンドには,メタ情報102に加え,実行モジュール特定情報または多重化モジュール4のコードのいずれかが含まれる。   Next, a load command for loading the multiplexed module execution file 101 into the NVM 10 is transmitted from the host system to the portable storage medium 1 (S22). As described above, in addition to the meta information 102, this load command includes either the execution module specifying information or the code of the multiplexing module 4.

そして,オペレーティングシステム2のロード部21は,多重化モジュール実行ファイル101に係るデータを確認し(S23),多重化モジュール4のデータが実行モジュール特定情報であれば,実行モジュール特定情報で示される実行モジュール30のコードをプログラム実行ファイル100から特定し,特定した実行モジュール30のコードを多重化モジュール4のコードとしてNVM10に書き込み,更に,メタ情報102をNVM10に書き込むことで,メタ情報102を付加した多重化モジュール実行ファイル101をNVM10に格納して(S24),この手順を終了する。   Then, the load unit 21 of the operating system 2 checks the data related to the multiplexed module execution file 101 (S23). If the data of the multiplexed module 4 is the execution module specifying information, the execution indicated by the execution module specifying information is executed. The code of the module 30 is specified from the program execution file 100, the code of the specified execution module 30 is written to the NVM 10 as the code of the multiplexing module 4, and the meta information 102 is added to the NVM 10 by adding the meta information 102. The multiplexed module execution file 101 is stored in the NVM 10 (S24), and this procedure is finished.

また,オペレーティングシステム2のロード部21は,ロードコマンドに含まれる多重化モジュール4のデータが多重化モジュール4のコードであれば,多重化モジュール4のコードとメタ情報102をNVM10に書き込むことで,メタ情報102を付加した多重化モジュール実行ファイル101をNVM10に格納して(S25),この手順を終了する。   In addition, if the data of the multiplexing module 4 included in the load command is the code of the multiplexing module 4, the load unit 21 of the operating system 2 writes the code of the multiplexing module 4 and the meta information 102 to the NVM 10. The multiplexed module execution file 101 to which the meta information 102 is added is stored in the NVM 10 (S25), and this procedure ends.

1 携帯型記憶媒体
10 NVM
11 ROM
13 RAM
100 プログラム実行ファイル
101 多重化モジュール実行ファイル
102 メタ情報
2 オペレーティングシステム
20 正当性検証部
21 ロード部
22 プログラム実行管理部
3 プログラム
30 実行モジュール
4 多重化モジュール
1 Portable storage medium 10 NVM
11 ROM
13 RAM
DESCRIPTION OF SYMBOLS 100 Program execution file 101 Multiplex module execution file 102 Meta information 2 Operating system 20 Validity verification part 21 Load part 22 Program execution management part 3 Program 30 Execution module 4 Multiplex module

Claims (3)

少なくとも一つの実行モジュールを有するプログラムを記憶した実行ファイルと,多重化する前記実行モジュールを示すメタ情報が付加され,メタ情報で示される前記実行モジュールが用いるデータを引き継いでこの前記実行モジュールと同じ処理を実行する多重化モジュールを記憶した実行ファイルを不揮発性メモリに格納し,前記プログラムが有する一つの前記実行モジュールが実行されると,前記メタ情報を利用して,実行された前記実行モジュールに対応する前記多重化モジュールの実行ファイルが不揮発性メモリに実装されているか確認し,この前記多重化モジュールの実行ファイルが不揮発性メモリに実装されている場合,この前記多重化モジュールを実行し,実行された前記実行モジュールの実行結果と実行した前記多重化モジュールの実行結果が一致するか検証する正当性検証部がオペレーティングシステムに備えられていることを特徴とする携帯型記憶媒体。   An execution file storing a program having at least one execution module and meta information indicating the execution module to be multiplexed are added, and data used by the execution module indicated by the meta information is inherited to perform the same processing as the execution module The execution file storing the multiplexing module for executing the program is stored in a non-volatile memory, and when one execution module of the program is executed, the meta information is used to correspond to the executed execution module. Confirm that the execution file of the multiplexing module is mounted in a non-volatile memory. If the execution file of the multiplexing module is mounted in a non-volatile memory, the multiplexing module is executed and executed. The execution result of the execution module and the multiplexed module executed Portable storage medium validity verifying unit that the execution result of Yuru to verify whether it matches is equal to or provided in the operating system. 前記プログラムのコードを含むロードコマンドを受信すると,前記プログラムのコードを不揮発性メモリに書き込むことで前記プログラムの実行ファイルを不揮発性メモリに格納し,前記多重化モジュールが対応する前記実行モジュールを示す実行モジュール特定情報と前記メタ情報を含むロードコマンドを受信すると,前記実行モジュール特定情報で示される前記実行モジュールのコードを前記多重化モジュールのコードとして前記不揮発性メモリに書き込み,更に,前記メタ情報を不揮発性メモリに書き込むことで前記多重化モジュールの実行ファイルを不揮発性メモリに格納するロード部を備えたことを特徴とする,請求項1に記載した携帯型記憶媒体。   When the load command including the program code is received, the execution file of the program is stored in the non-volatile memory by writing the program code to the non-volatile memory, and the multiplexing module indicates the corresponding execution module When the load command including the module identification information and the meta information is received, the code of the execution module indicated by the execution module identification information is written in the nonvolatile memory as the code of the multiplexed module, and the meta information is further stored in the nonvolatile memory. The portable storage medium according to claim 1, further comprising a load unit that stores an execution file of the multiplexing module in a nonvolatile memory by writing to the nonvolatile memory. 前記ロード部は,前記多重化モジュールのコードと前記メタ情報を含むロードコマンドを受信すると,前記多重化モジュールのコードと前記メタ情報を前記不揮発性メモリに書き込むことを特徴とする,請求項2に記載した携帯型記憶媒体。
The load unit, when receiving a load command including the code of the multiplexing module and the meta information, writes the code of the multiplexing module and the meta information in the nonvolatile memory. The portable storage medium described.
JP2013151303A 2013-07-22 2013-07-22 Portable storage media Active JP6155933B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013151303A JP6155933B2 (en) 2013-07-22 2013-07-22 Portable storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013151303A JP6155933B2 (en) 2013-07-22 2013-07-22 Portable storage media

Publications (2)

Publication Number Publication Date
JP2015022608A JP2015022608A (en) 2015-02-02
JP6155933B2 true JP6155933B2 (en) 2017-07-05

Family

ID=52486978

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013151303A Active JP6155933B2 (en) 2013-07-22 2013-07-22 Portable storage media

Country Status (1)

Country Link
JP (1) JP6155933B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584405B2 (en) * 2003-12-03 2009-09-01 Hewlett-Packard Development Company, L.P. Fault-detecting computer system
JP4382128B2 (en) * 2005-06-01 2009-12-09 株式会社ルネサステクノロジ Information processing apparatus and error calculation detection method thereof
JP4588751B2 (en) * 2007-11-13 2010-12-01 株式会社コナミデジタルエンタテインメント Storage processing device, storage processing method, and program
JP5371042B2 (en) * 2009-05-19 2013-12-18 Kddi株式会社 Processing device and program

Also Published As

Publication number Publication date
JP2015022608A (en) 2015-02-02

Similar Documents

Publication Publication Date Title
JP6585072B2 (en) Safe reading of data into non-volatile memory or secure elements
EP2503482A1 (en) Electronic device with flash memory component
CN104407888A (en) Method and system for starting embedded type equipment
CN113348110B (en) Electronic control device and security verification method for electronic control device
CN108171041B (en) Method and apparatus for authenticating an application accessing memory
CN103425932A (en) Signature calibration method and terminal device
US20190096489A1 (en) Read-only operation of non-volatile memory module
JP6155933B2 (en) Portable storage media
CN101470666B (en) Data memory method
BRPI0611797A2 (en) itso pvc2 application monitor
CN115454517A (en) Multi-medium secure startup method, system, storage medium, device and chip
JP2016167113A (en) On-vehicle control unit
CN103870745A (en) Electronic equipment and method for safely starting electronic equipment
JP4863472B2 (en) Memory management method
EP3023925B1 (en) Secure element with applications
JP6182940B2 (en) IC card, status word output method, and status word output processing program
CN106484477B (en) The software download and starting method of safety
JP4888862B2 (en) Memory management method
CN110825714A (en) File storage control method and device, file storage device and electronic device
CN111522686A (en) Nonvolatile data reading and writing method and device
JP2005258968A (en) Validity verification method of data written in ic card, and program for ic card
JP5786702B2 (en) Security token, instruction execution method in security token, and computer program
CN104331470A (en) Method and system for processing data based on buffer mechanism
JP2006338311A (en) Computer system for processing device loaded with multiple applications, device and computer program
JP6308074B2 (en) Microcomputer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160530

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170427

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170522

R150 Certificate of patent or registration of utility model

Ref document number: 6155933

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150