JP2014215979A - Information storage medium and bytecode execution method - Google Patents

Information storage medium and bytecode execution method Download PDF

Info

Publication number
JP2014215979A
JP2014215979A JP2013095632A JP2013095632A JP2014215979A JP 2014215979 A JP2014215979 A JP 2014215979A JP 2013095632 A JP2013095632 A JP 2013095632A JP 2013095632 A JP2013095632 A JP 2013095632A JP 2014215979 A JP2014215979 A JP 2014215979A
Authority
JP
Japan
Prior art keywords
value
bytecode
program counter
information storage
storage medium
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.)
Granted
Application number
JP2013095632A
Other languages
Japanese (ja)
Other versions
JP6175882B2 (en
JP2014215979A5 (en
Inventor
歩 小林
Ayumi Kobayashi
歩 小林
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 JP2013095632A priority Critical patent/JP6175882B2/en
Publication of JP2014215979A publication Critical patent/JP2014215979A/en
Publication of JP2014215979A5 publication Critical patent/JP2014215979A5/en
Application granted granted Critical
Publication of JP6175882B2 publication Critical patent/JP6175882B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an information storage medium and a bytecode execution method capable of effectively coping an attack to cause an illegal operation, while maintaining processing performance.SOLUTION: In an IC card 1, when a value of a program counter indicates a value which corresponds to a bytecode indicating NOP in execution of the bytecode, the value of the program counter is returned to the value before jump after jumping to NOP processing, a value corresponding to the bytecode is acquired from the value of the program counter returned to the value before the jump, and operation of the IC card 1 is stopped when the acquired value corresponding to the bytecode does not indicate NOP.

Description

本発明は、バイトコードを実行する仮想マシンを備えるICカードの技術に関する。   The present invention relates to an IC card technology including a virtual machine that executes bytecode.

近年のICカードでは、Java(登録商標)Cardに対応しているものが多い。Java(登録商標)といったプログラム言語は、ハードウェアの依存性を吸収するために、C言語のようにコンパイルによってソースコードからネイティブコード(機械語)に変換されるものと異なり、コンパイラによって中間言語と呼ばれる実行形式であるバイトコードに変換される。バイトコードとは、算術や分岐といった命令を含んだデータ列である。このバイトコードは、仮想マシン(Virtual Machine)により実行される。このような仮想マシンを備えるICカードでは、当該仮想マシンやメモリへの外部からの攻撃(アタック)によってメモリ上のデータが改ざんされるといった脅威が問題となる。セキュアマイコンにおける仮想マシンやJava(登録商標)Cardのセキュリティに関する既往の技術には、特許文献1及び2に開示された技術がある。特許文献1の技術は、1つのプロセッサに複数の仮想マシンを搭載することにより、セキュリティを向上させる技術である。一方、特許文献2の技術は、通信途中に暗号化したアプリケーションを入れ、内部で復号化し、さらにHashを用いて、改ざん検査を所定のタイミングで実施することによって悪意のあるプログラムを防ぐ技術である。   Many recent IC cards 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 byte code which is called executable format. The byte code is a data string including instructions such as arithmetic and branch. This bytecode is executed by a virtual machine. In an IC card including such a virtual machine, a threat that data on the memory is falsified by an external attack (attack) on the virtual machine or the memory becomes a problem. There are technologies disclosed in Patent Documents 1 and 2 as existing technologies related to the security of virtual machines and Java (registered trademark) cards in secure microcomputers. The technique of Patent Document 1 is a technique for improving security by mounting a plurality of virtual machines on one processor. On the other hand, the technique of Patent Document 2 is a technique for preventing a malicious program by inserting an encrypted application in the middle of communication, decrypting the application internally, and further performing a falsification inspection at a predetermined timing using Hash. .

特表2006−522968号公報JP-T-2006-522968 特開2007−226277号公報JP 2007-226277 A

ところで、Java(登録商標)では、プログラム言語仕様上、バイトコードの命令(ニーモニック)において、NOP(No operation)が定義されている。NOPは何もしない命令であり、当該命令に応じたNOP処理では、何もせずにプログラムカウンタのインクリメントのみが行われる。NOPの命令は、ICカードにインストールされる通常のアプリケーションを動作させる上で使用されないが、上述した言語仕様に準拠する限り、ICカードでは、NOPの命令を実行できる環境を提供する必要がある。   By the way, in Java (registered trademark), NOP (No operation) is defined in a byte code instruction (mnemonic) in accordance with a program language specification. NOP is an instruction that does nothing, and in the NOP processing corresponding to the instruction, nothing is done and only the program counter is incremented. The NOP instruction is not used for operating a normal application installed in the IC card. However, as long as it conforms to the language specification described above, the IC card needs to provide an environment in which the NOP instruction can be executed.

しかしながら、悪意のある攻撃者が、レーザーアタック等によってバイトコードを意図的にNOPに変更することにより、特定の処理(分岐、演算)をスキップし、アプリケーションに意図しない動作をさせる問題がある。この問題に対し、特許文献1の技術は、ICカードといった非力でリソースが少ない環境においては、現実的ではない。一方、特許文献2の技術は、悪意のあるプログラムが動作することを防ぐことはできるが、上述した言語仕様に即した攻撃によって不正な動作を発生させる攻撃には有効ではない。また、仮想マシンが搭載されるICカードにおいてセキュリティを向上させると、その分、処理が重くなりパフォーマンスが低下してしまう。   However, there is a problem that a malicious attacker intentionally changes the byte code to NOP by laser attack or the like, thereby skipping a specific process (branch, calculation) and causing the application to perform an unintended operation. With respect to this problem, the technique of Patent Document 1 is not practical in an environment such as an IC card where power is low and resources are small. On the other hand, although the technique of Patent Document 2 can prevent a malicious program from operating, it is not effective for an attack in which an illegal operation is generated by an attack based on the language specification described above. Further, when security is improved in an IC card on which a virtual machine is mounted, the processing becomes heavier and performance is degraded accordingly.

本発明は、処理のパフォーマンスを保ちつつ、不正な動作を発生させる攻撃に対して有効に対処することが可能な情報記憶媒体及びバイトコード実行方法を提供することを課題とする。   An object of the present invention is to provide an information storage medium and a bytecode execution method that can effectively cope with an attack that generates an illegal operation while maintaining processing performance.

上記課題を解決するために、請求項1に記載の発明は、不揮発性メモリに記憶された複数のバイトコードであって、何もしない命令を示すバイトコードを含む複数のバイトコードを実行可能な仮想マシンを備える情報記憶媒体であって、前記バイトコードの実行において、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、当該バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得する取得手段と、前記取得手段により取得された前記バイトコードに対応する値が、前記何もしない命令を示していない場合、前記情報記憶媒体の動作を停止する停止手段と、を備えることを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 is capable of executing a plurality of byte codes stored in a non-volatile memory, including a byte code indicating an instruction that does nothing. An information storage medium comprising a virtual machine, and in the execution of the bytecode, when the value of the program counter indicates a value corresponding to the bytecode indicating the instruction that does nothing, after shifting to the processing of the bytecode The program counter value is returned before the transition, the acquisition means for acquiring the value corresponding to the byte code from the value of the program counter returned before the transition, and the byte code acquired by the acquisition means Stop means for stopping the operation of the information storage medium when the value does not indicate the instruction to do nothing. To.

請求項2に記載の発明は、請求項1に記載の情報記憶媒体において、前記不揮発性メモリには、前記複数のバイトコードの誤り検出に用いられる誤り検出符号が格納されており、前記取得手段は、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、前記誤り検出符号を用いて前記複数のバイトコードの誤りの有無を判定し当該誤りが有ると判定した場合に限り、前記バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得することを特徴とする。   According to a second aspect of the present invention, in the information storage medium according to the first aspect, the nonvolatile memory stores an error detection code used for error detection of the plurality of byte codes, and the acquisition unit When the value of the program counter indicates a value corresponding to a byte code indicating an instruction that does nothing, the error detection code is used to determine whether there is an error in the plurality of byte codes and to determine that there is an error. In this case, after shifting to the processing of the byte code, the value of the program counter is returned before the transition, and a value corresponding to the byte code is obtained from the value of the program counter returned before the transition. And

請求項3に記載の発明は、不揮発性メモリに記憶された複数のバイトコードであって、何もしない命令を示すバイトコードを含む複数のバイトコードを実行可能な仮想マシンを備える情報記憶媒体におけるバイトコード実行方法であって、前記バイトコードの実行において、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、当該バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得するステップと、前記取得された前記バイトコードに対応する値が、前記何もしない命令を示していない場合、前記情報記憶媒体の動作を停止するステップと、を含むことを特徴とする。   The invention according to claim 3 is an information storage medium comprising a virtual machine capable of executing a plurality of byte codes stored in a nonvolatile memory and including a byte code indicating an instruction that does nothing In the bytecode execution method, in the execution of the bytecode, when the value of the program counter indicates a value corresponding to the bytecode indicating the instruction that does nothing, the program is transferred to the bytecode and then the program Returning the value of the counter before the transition, obtaining a value corresponding to the byte code from the value of the program counter returned before the transition, and the value corresponding to the acquired byte code do nothing And a step of stopping the operation of the information storage medium when no command is indicated.

本発明によれば、処理のパフォーマンスを保ちつつ、バイトコードを意図的に何もしない命令に変更するといった不正な動作を発生させる攻撃に対して有効に対処することができる。   According to the present invention, it is possible to effectively cope with an attack that causes an illegal operation such as changing the bytecode to an instruction that does nothing intentionally while maintaining processing performance.

(A)は、ICカード1のハードウェア構成例を示す図であり、(B)は、ICカード1の機能ブロック例を示す図である。(A) is a figure which shows the hardware structural example of IC card 1, (B) is a figure which shows the functional block example of IC card 1. FIG. NOP処理例を示すフローチャートである。It is a flowchart which shows a NOP process example.

以下、図面を参照して本発明の実施形態について詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

先ず、図1等を参照して、ICカード1の概要構成及び機能について説明する。図1(A)は、ICカード1のハードウェア構成例を示す図であり、図1(B)は、ICカード1の機能ブロック例を示す図である。なお、ICカード1は、キャッシュカード、クレージットカード、社員カード等として使用される。或いは、ICカード1は、スマートフォンや携帯電話機等の通信機器に組み込まれる。ICカード1は本発明における情報記憶媒体を構成するが、このICカード1は通信機器の回路基板上に直接組み込んで構成するようにしてもよい。   First, the schematic configuration and functions of the IC card 1 will be described with reference to FIG. FIG. 1A is a diagram illustrating a hardware configuration example of the IC card 1, and FIG. 1B is a diagram illustrating a functional block example of the IC card 1. The IC card 1 is used as a cash card, a credit card, an 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 card 1 constitutes an information storage medium in the present invention. However, the IC card 1 may be directly incorporated on a circuit board of a communication device.

図1(A)に示すように、ICカード1には、ICチップ1aが搭載されている。ICチップ1aは、CPU(Central Processing Unit)10、不揮発性メモリであるROM(Read Only Memory)11、揮発性メモリであるRAM(Random Access Memory)12、不揮発性メモリであるフラッシュメモリ13、及びI/O回路14を備えて構成される。なお、フラッシュメモリの代わりにEEPROMであっても構わない。ICチップ1aは、I/O回路14を介して、ICリーダ・ライタを備える外部端末2との間で接触または非接触で通信を行う。I/O回路14は、外部端末2とのインターフェイスを担う。I/O回路14には、例えばISO/IEC7816によって定められたC1〜C8の8個の端子が設けられている。例えば、C1端子は電源端子、C2端子はリセット端子、C3端子はクロック端子、C5端子はグランド端子、C7端子は外部端末2とのデータ通信を行う端子である。外部端末2の例としてはATM、改札機、認証用ゲート等が挙げられる。或いは、ICカード1が通信機器に組み込まれる場合、外部端末2には通信機器の機能を担うコントローラが該当する。   As shown in FIG. 1A, an IC chip 1a is mounted on the IC card 1. The IC chip 1a includes a CPU (Central Processing Unit) 10, a ROM (Read Only Memory) 11 that is a nonvolatile memory, a RAM (Random Access Memory) 12 that is a volatile memory, a flash memory 13 that is a nonvolatile memory, and an I / O circuit 14 is provided. Note that an EEPROM may be used instead of the flash memory. The IC chip 1a communicates with or without contact with the external terminal 2 including the IC reader / writer via the I / O circuit 14. The I / O circuit 14 serves as an interface with the external terminal 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 the external terminal 2. Examples of the external terminal 2 include an ATM, a ticket gate, and an authentication gate. Alternatively, when the IC card 1 is incorporated in a communication device, the external terminal 2 corresponds to a controller responsible for the function of the communication device.

CPU10は、ROM11またはフラッシュメモリ13に記憶された各種プログラムを実行する演算装置である。各種プログラムには、OS(Operating System)、仮想マシン、Java(登録商標)等のプログラム言語(バイトコードの命令(ニーモニック)においてNOPが定義されているプログラム言語)で記述されるアプリケーションプログラムが含まれる。図1(B)に示すように、OS上で動作する仮想マシンは、ソースコードとネイティブコードとの間の中間言語であるバイトコードを解釈、実行する。また、仮想マシンは、フラッシュメモリ13に記憶された複数のバイトコードのうち、次に実行するべきバイトコードに対応する値(例えば、バイトコードのアドレス、当該バイトコードを表すオフセット、又は当該バイトコードのラベル値)を指し示すプログラムカウンタを保持している。このようなバイトコードは、例えば、アプリケーションプログラムのインストール時に、当該アプリケーションプログラムをコンパイルすることで得られ、フラッシュメモリ13に格納される。   The CPU 10 is an arithmetic device that executes various programs stored in the ROM 11 or the flash memory 13. The various programs include application programs described in a program language (program language in which NOP is defined in bytecode instructions (mnemonics)) such as an OS (Operating System), a virtual machine, and Java (registered trademark). . As shown in FIG. 1B, the virtual machine operating on the OS interprets and executes bytecode that is an intermediate language between the source code and the native code. The virtual machine also has a value corresponding to a byte code to be executed next (for example, an address of the byte code, an offset indicating the byte code, or the byte code) among the plurality of byte codes stored in the flash memory 13. A program counter indicating (label value). Such a bytecode is obtained by compiling the application program at the time of installation of the application program and stored in the flash memory 13, for example.

更に、フラッシュメモリ13には、アプリケーションプログラムに対応する全バイトコードの誤り検出(言い換えれば、当該アプリケーションプログラムの誤り検出)に用いられる誤り検出符号としてCRC(Cyclic Redundancy Check)が格納される。CRCの代わりに、チェックコード、又はチェックサム等を用いても良い。このCRCは、例えばアプリケーションプログラムのインストール時に演算されて格納され、当該アプリケーションプログラムと対応付けられる。   Further, the flash memory 13 stores a CRC (Cyclic Redundancy Check) as an error detection code used for error detection of all byte codes corresponding to the application program (in other words, error detection of the application program). Instead of CRC, a check code or a checksum may be used. This CRC is calculated and stored when the application program is installed, for example, and is associated with the application program.

仮想マシンは、本発明の取得手段として機能することで、上記バイトコードの実行において、プログラムカウンタの値が、何もしない命令であるNOPを示すバイトコードに対応する値(NOPのニーモニックの値(例えばニーモニックの種別となる値))を指し示す場合に、NOP処理にジャンプ(移行)した後、当該プログラムカウンタの値を当該ジャンプ前に戻し、ジャンプ前に戻したプログラムカウンタの値からバイトコードに対応する値を取得する。そして、仮想マシンは、本発明の停止手段として機能することで、上記取得されたバイトコードに対応する値が、NOPを示していない場合、ICカード1の動作を停止する。なお、仮想マシンは、プログラムカウンタの値が、NOPを示すバイトコードに対応する値を指し示す場合に、CRCを用いてアプリケーションプログラムに対応する複数のバイトコードの誤りの有無を判定(CRCのチェックによる)し当該誤りが有ると判定した場合に限り、NOP処理にジャンプする(当該ジャンプ後は、上記と同様)ように構成するとよい。   The virtual machine functions as an acquisition unit of the present invention, so that the value of the program counter corresponds to a byte code indicating NOP that is an instruction to do nothing (NOP mnemonic value ( For example, when pointing to a mnemonic type)), after jumping (transitioning) to NOP processing, the program counter value is returned before the jump, and the program counter value returned before the jump corresponds to the byte code. Get the value to be. The virtual machine functions as a stopping unit of the present invention, and stops the operation of the IC card 1 when the value corresponding to the acquired bytecode does not indicate NOP. When the value of the program counter indicates the value corresponding to the byte code indicating NOP, the virtual machine determines whether or not there are errors in a plurality of byte codes corresponding to the application program using CRC (by checking CRC) Only when it is determined that there is an error, it may be configured to jump to the NOP process (after the jump, the same as above).

次に、図2を参照して、NOP処理の詳細について説明する。図2は、NOP処理例を示すフローチャートである。   Next, details of the NOP process will be described with reference to FIG. FIG. 2 is a flowchart showing an example of NOP processing.

図2に示すNOP処理は、例えば仮想マシンの起動後、プログラムカウンタの値が、NOPを示すバイトコードに対応する値を指し示した場合に、当該NOPを示すバイトコードへジャンプすることで開始される。図2に示すNOP処理が開始されると、仮想マシンは、CRCを用いてアプリケーションプログラムに対応する複数のバイトコードに誤りが有るか否か(つまり、当該CRCが不正であるか否か)を判定する(ステップS1)。例えばアプリケーションプログラムに対応する全バイトコードを入力値として所定の関数に代入することにより得られた固定長の値と、フラッシュメモリ13に格納されているCRCとが一致していない場合、CRCが不正であると判定され(ステップS1:YES)、ICカード1の動作が停止される(ステップS2)。一方、上記CRCとが一致している場合、CRCが不正でないと判定され(ステップS1:NO)、ステップS3へ進む。   The NOP process shown in FIG. 2 is started by jumping to the byte code indicating the NOP when the value of the program counter indicates a value corresponding to the byte code indicating the NOP after the virtual machine is started, for example. . When the NOP process shown in FIG. 2 is started, the virtual machine uses the CRC to determine whether or not there are errors in a plurality of bytecodes corresponding to the application program (that is, whether or not the CRC is invalid). Determine (step S1). For example, if the fixed-length value obtained by substituting all byte codes corresponding to the application program as input values into a predetermined function does not match the CRC stored in the flash memory 13, the CRC is invalid. (Step S1: YES), the operation of the IC card 1 is stopped (Step S2). On the other hand, if the CRC matches, it is determined that the CRC is not invalid (step S1: NO), and the process proceeds to step S3.

ステップS3では、仮想マシンは、プログラムカウンタの値をNOP処理へのジャンプ前に戻す(例えば、プログラムカウンタの値を減算する)。なお、後述するステップS7でプログラムカウンタの値を元に戻すため、NOP処理前の当該値をバックアップに保持しておいてもよい。   In step S3, the virtual machine returns the value of the program counter before the jump to the NOP process (for example, subtracts the value of the program counter). Note that, since the value of the program counter is returned to the original value in step S7, which will be described later, the value before the NOP processing may be held in a backup.

次いで、仮想マシンは、NOP処理のジャンプ前に戻したプログラムカウンタの値から、バイトコードに対応する値を取得する(ステップS4)。次いで、仮想マシンは、ステップS4で取得した、バイトコードに対応する値がNOPを示しているか否かを判定する(ステップS5)。そして、バイトコードに対応する値がNOPを示している場合(ステップS5:YES)、仮想マシンは、プログラムカウンタの値を元(つまり、NOP処理前に戻す前の値)に戻し(ステップS6)、NOP処理を終了する。なお、上記ステップS3で減算した値をインクリメント(加算)することで元に戻してもよいし、バックアップに保持した値を使って元に戻しても良い。一方、バイトコードに対応する値がNOPを示していない場合(ステップS5:NO)、プログラムカウンタが改竄された(つまり、外部からの攻撃によりバイトコードが意図的にNOPに変更された)とみなし、仮想マシンは、ICカード1の動作を停止する(ステップS7)。   Next, the virtual machine acquires a value corresponding to the byte code from the value of the program counter returned before the jump of the NOP process (step S4). Next, the virtual machine determines whether or not the value corresponding to the bytecode acquired in step S4 indicates NOP (step S5). If the value corresponding to the byte code indicates NOP (step S5: YES), the virtual machine returns the value of the program counter to the original value (that is, the value before returning to NOP processing) (step S6). , NOP processing ends. The value subtracted in step S3 may be returned to the original value by incrementing (adding), or may be returned using the value stored in the backup. On the other hand, if the value corresponding to the bytecode does not indicate NOP (step S5: NO), it is considered that the program counter has been tampered with (that is, the bytecode has been intentionally changed to NOP by an external attack). The virtual machine stops the operation of the IC card 1 (step S7).

以上説明したように、上記実施形態によれば、ICカード1では、バイトコードの実行において、プログラムカウンタの値がNOPを示すバイトコードに対応する値を指し示す場合に、NOP処理にジャンプした後、当該プログラムカウンタの値を当該ジャンプ前に戻し、ジャンプ前に戻したプログラムカウンタの値からバイトコードに対応する値を取得し、当該取得されたバイトコードに対応する値が、NOPを示していない場合、ICカード1の動作を停止するように構成したので、処理のパフォーマンスを保ちつつ、バイトコードを意図的にNOPに変更するといった不正な動作を発生させる攻撃に対して有効に対処することができる。仮に、例えばニーモニックの処理毎にバイトコードのCRCをチェックしていては処理速度が低下する問題につながるが、本実施形態では、CRCのチェックは、アプリケーションプログラムの動作中に通常使われないNOPのみに対して行うため、アプリケーション動作速度の低下につながらず、そのため、処理のパフォーマンスを保つことができる。   As described above, according to the above embodiment, in the IC card 1, in the execution of the byte code, when the value of the program counter indicates the value corresponding to the byte code indicating NOP, after jumping to the NOP process, When the value of the program counter is returned before the jump, the value corresponding to the byte code is acquired from the value of the program counter returned before the jump, and the value corresponding to the acquired byte code does not indicate NOP Since the operation of the IC card 1 is stopped, it is possible to effectively cope with an attack that causes an illegal operation such as intentionally changing the byte code to NOP while maintaining the processing performance. . For example, checking the CRC of the bytecode for each mnemonic process leads to a problem that the processing speed decreases, but in this embodiment, the CRC check is performed only for NOPs that are not normally used during the operation of the application program. Therefore, the application operation speed is not lowered, and therefore the processing performance can be maintained.

1 ICカード
2 外部端末
1a ICチップ
10 CPU
11 ROM
12 RAM
13 フラッシュメモリ
14 I/O回路
1 IC Card 2 External Terminal 1a IC Chip 10 CPU
11 ROM
12 RAM
13 Flash memory 14 I / O circuit

Claims (3)

不揮発性メモリに記憶された複数のバイトコードであって、何もしない命令を示すバイトコードを含む複数のバイトコードを実行可能な仮想マシンを備える情報記憶媒体であって、
前記バイトコードの実行において、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、当該バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得する取得手段と、
前記取得手段により取得された前記バイトコードに対応する値が、前記何もしない命令を示していない場合、前記情報記憶媒体の動作を停止する停止手段と、
を備えることを特徴とする情報記憶媒体。
An information storage medium comprising a virtual machine capable of executing a plurality of byte codes stored in a non-volatile memory and including a byte code indicating an instruction that does nothing.
In execution of the bytecode, when the value of the program counter indicates a value corresponding to the bytecode indicating the instruction that does nothing, after the transition to the processing of the bytecode, the value of the program counter is changed to the value before the transition. Return means for acquiring a value corresponding to a bytecode from the value of the program counter returned before the transition;
Stop means for stopping the operation of the information storage medium when the value corresponding to the bytecode acquired by the acquisition means does not indicate the instruction to do nothing;
An information storage medium comprising:
前記不揮発性メモリには、前記複数のバイトコードの誤り検出に用いられる誤り検出符号が格納されており、
前記取得手段は、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、前記誤り検出符号を用いて前記複数のバイトコードの誤りの有無を判定し当該誤りが有ると判定した場合に限り、前記バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得することを特徴とする請求項1に記載の情報記憶媒体。
The nonvolatile memory stores an error detection code used for error detection of the plurality of byte codes,
When the value of the program counter indicates a value corresponding to a byte code indicating an instruction that does nothing, the acquisition unit determines whether or not there is an error in the plurality of byte codes using the error detection code. Only when it is determined that there is, after shifting to the processing of the byte code, the value of the program counter is returned before the shifting, and the value corresponding to the byte code is obtained from the value of the program counter returned before the shifting. The information storage medium according to claim 1.
不揮発性メモリに記憶された複数のバイトコードであって、何もしない命令を示すバイトコードを含む複数のバイトコードを実行可能な仮想マシンを備える情報記憶媒体におけるバイトコード実行方法であって、
前記バイトコードの実行において、プログラムカウンタの値が前記何もしない命令を示すバイトコードに対応する値を指し示す場合に、当該バイトコードの処理に移行した後、当該プログラムカウンタの値を当該移行前に戻し、移行前に戻した前記プログラムカウンタの値からバイトコードに対応する値を取得するステップと、
前記取得された前記バイトコードに対応する値が、前記何もしない命令を示していない場合、前記情報記憶媒体の動作を停止するステップと、
を含むことを特徴とするバイトコード実行方法。
A bytecode execution method in an information storage medium comprising a virtual machine capable of executing a plurality of bytecodes stored in a non-volatile memory and including a bytecode indicating an instruction that does nothing.
In execution of the bytecode, when the value of the program counter indicates a value corresponding to the bytecode indicating the instruction that does nothing, after the transition to the processing of the bytecode, the value of the program counter is changed to the value before the transition. Returning, obtaining a value corresponding to the bytecode from the value of the program counter returned before the transition;
Stopping the operation of the information storage medium if the value corresponding to the acquired bytecode does not indicate the instruction to do nothing;
A bytecode execution method comprising:
JP2013095632A 2013-04-30 2013-04-30 Information storage medium, IC card, and bytecode execution method Active JP6175882B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013095632A JP6175882B2 (en) 2013-04-30 2013-04-30 Information storage medium, IC card, and bytecode execution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013095632A JP6175882B2 (en) 2013-04-30 2013-04-30 Information storage medium, IC card, and bytecode execution method

Publications (3)

Publication Number Publication Date
JP2014215979A true JP2014215979A (en) 2014-11-17
JP2014215979A5 JP2014215979A5 (en) 2016-09-23
JP6175882B2 JP6175882B2 (en) 2017-08-09

Family

ID=51941638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013095632A Active JP6175882B2 (en) 2013-04-30 2013-04-30 Information storage medium, IC card, and bytecode execution method

Country Status (1)

Country Link
JP (1) JP6175882B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008209990A (en) * 2007-02-23 2008-09-11 Fuji Xerox Co Ltd Invalid process detection apparatus
JP2008287449A (en) * 2007-05-17 2008-11-27 Renesas Technology Corp Data processor
US20090113546A1 (en) * 2007-10-30 2009-04-30 Samsung Electronics Co., Ltd. Memory system for sensing attack
JP2009288908A (en) * 2008-05-28 2009-12-10 Dainippon Printing Co Ltd Method of detecting failure attack for alterating content of memory, security device, and computer program
US20110197179A1 (en) * 2010-02-08 2011-08-11 Jan Kratochvil Simulating a line of source code in a debugging tool

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008209990A (en) * 2007-02-23 2008-09-11 Fuji Xerox Co Ltd Invalid process detection apparatus
JP2008287449A (en) * 2007-05-17 2008-11-27 Renesas Technology Corp Data processor
US20090113546A1 (en) * 2007-10-30 2009-04-30 Samsung Electronics Co., Ltd. Memory system for sensing attack
JP2009288908A (en) * 2008-05-28 2009-12-10 Dainippon Printing Co Ltd Method of detecting failure attack for alterating content of memory, security device, and computer program
US20110197179A1 (en) * 2010-02-08 2011-08-11 Jan Kratochvil Simulating a line of source code in a debugging tool

Also Published As

Publication number Publication date
JP6175882B2 (en) 2017-08-09

Similar Documents

Publication Publication Date Title
EP2519908B1 (en) Jcvm bytecode execution protection against fault attacks
JP5200664B2 (en) Fault attack detection method, security device, and computer program for falsifying memory contents
EP2364481B1 (en) Method for securing java bytecode.
US10509568B2 (en) Efficient secure boot carried out in information processing apparatus
JP5945313B2 (en) Method of generating structure and corresponding structure
JP2008537240A (en) Method for verifying pseudo code loaded on embedded systems, especially smart cards
JP2007004456A (en) Portable electronic device and data output device of portable electronic device
US11030306B2 (en) Method for executing a program intended to be interpreted by a virtual machine protected against fault injection attacks
JP5050893B2 (en) IC card attack detection method, IC card and IC card program
JP6798157B2 (en) Electronic information storage medium, anomaly detection method, and anomaly detection program
JP6175882B2 (en) Information storage medium, IC card, and bytecode execution method
JP6424633B2 (en) Electronic information storage medium, abnormality detection method, and program
JP6769265B2 (en) Electronic information storage medium, IC card, data abnormality confirmation method, and data abnormality confirmation program
JP6136541B2 (en) Information storage medium and bytecode execution method
EP2782006B1 (en) Process and system for verifying computer program on a smart card
JP2006338311A (en) Computer system for processing device loaded with multiple applications, device and computer program
JP7247638B2 (en) Electronic information storage medium, IC card, falsification check method, and program
JP2015041349A (en) Information storage medium, byte code execution method, and program for information storage medium
JP6119345B2 (en) IC chip, IC card, verification processing method, and verification processing program
JP2018163446A (en) Electronic information storage medium, ic card, tampering check method, and tampering check program
KR100609679B1 (en) Efficient executable code verification method and apparatus using the same
JP2009015434A (en) Portable information processor and information processing program
JP2015032201A (en) Information storage medium, byte code execution processing program, and byte code execution method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160401

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160808

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170315

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170404

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170530

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170626

R150 Certificate of patent or registration of utility model

Ref document number: 6175882

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150