JP2007172526A - Information processing system and information processing method - Google Patents

Information processing system and information processing method Download PDF

Info

Publication number
JP2007172526A
JP2007172526A JP2005372736A JP2005372736A JP2007172526A JP 2007172526 A JP2007172526 A JP 2007172526A JP 2005372736 A JP2005372736 A JP 2005372736A JP 2005372736 A JP2005372736 A JP 2005372736A JP 2007172526 A JP2007172526 A JP 2007172526A
Authority
JP
Japan
Prior art keywords
intermediate code
encrypted
program
code
executing
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.)
Pending
Application number
JP2005372736A
Other languages
Japanese (ja)
Inventor
Touzo Tanaka
統蔵 田中
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.)
NIPPON COMP CO Ltd
NIPPON COMPUTER CO Ltd
Original Assignee
NIPPON COMP CO Ltd
NIPPON COMPUTER 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 NIPPON COMP CO Ltd, NIPPON COMPUTER CO Ltd filed Critical NIPPON COMP CO Ltd
Priority to JP2005372736A priority Critical patent/JP2007172526A/en
Publication of JP2007172526A publication Critical patent/JP2007172526A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program execution method allowing execution of a program in a state where an intermediate code is encrypted when executing the program by use of a virtual machine that is execution environment for executing the intermediate code such as a Java bytecode. <P>SOLUTION: This program execution method has: a step wherein a control means acquires the intermediate code of an execution target, and decides whether the intermediate code is encrypted or not; a step for interpreting and executing the intermediate code according to a fixed intermediate code interpretation method when it is decided that the intermediate code is not encrypted; and a step for interpreting and executing the intermediate code according to the fixed intermediate code interpretation method after performing decryption processing of the intermediate code when it is decided that the intermediate code is encrypted. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、プログラムを実行するための情報処理システム及び情報処理方法に関し、特に、中間コードのプログラムを実行する情報処理技術に関する。   The present invention relates to an information processing system and an information processing method for executing a program, and more particularly to an information processing technique for executing an intermediate code program.

プログラムを実行する形態によって、プログラム言語は大きく以下の2つに分けられる。すなわち、実行するプラットフォーム(OS、環境、設定等)に対応したネイティブコードの状態で配布・実行する形態の言語と、プラットフォームに依存しない中間コードの状態で配布・実行する形態の言語である。   Depending on the form of executing the program, the program language is roughly divided into the following two. That is, a language that is distributed and executed in a native code state corresponding to a platform to be executed (OS, environment, setting, etc.), and a language that is distributed and executed in an intermediate code state independent of the platform.

前者の代表例はVBやC言語である。VB等のプログラム言語の場合、ソースコードをコンパイルすると、コンパイラ内部で使用される中間コードを経て、バイナリ形式のネイティブコード(オブジェクトコード)に変換される。最終的な配布物は、1ステップ単位のCPU命令を羅列したバイナリ(マシン語)であるため、ソースコードに復元することはほぼ不可能であり、ソースコード盗用のおそれは小さい。   Typical examples of the former are VB and C language. In the case of a programming language such as VB, when a source code is compiled, it is converted into a binary native code (object code) through an intermediate code used in the compiler. Since the final distribution is binary (machine language) that enumerates CPU instructions in units of steps, it is almost impossible to restore the source code, and the possibility of source code theft is small.

後者の代表例はJava(登録商標)である。Javaで記述されたソースコードは、コンパイル時にJavaバイトコードと呼ばれる中間コードに変換される。ソフトウェアは中間コードの状態で配布される。そして、実行時に、Java仮想マシンと呼ばれるソフトウェアによって、実行するプラットフォームに対応したネイティブコードに変換され、実行される。プラットフォーム間の違いはJava仮想マシンが吸収するため、仮想マシン上で動作するJavaプログラム(中間コード)は、プラットフォームの違いを意識しなくてもよいという特徴がある。   A typical example of the latter is Java (registered trademark). Source code written in Java is converted into intermediate code called Java bytecode during compilation. Software is distributed in the form of intermediate code. At the time of execution, it is converted into native code corresponding to the platform to be executed by software called a Java virtual machine and executed. Since differences between platforms are absorbed by the Java virtual machine, a Java program (intermediate code) that operates on the virtual machine is characterized in that it does not have to be aware of the difference between platforms.

しかし、Javaコンパイラで生成した中間コードはバイナリ形式であるが、OSに依存したマシン語のバイナリ(ネイティブコード)には変換されない。最終的な配布物である中間コードは、ソースコードとほぼ一対一のデータ構造であるため、逆コンパイルによって容易にソースコードを復元することができる。そのため、開発資産であるソースコードを盗用されるおそれがある。   However, the intermediate code generated by the Java compiler is in a binary format, but is not converted into machine language binary (native code) depending on the OS. Since the intermediate code, which is the final distribution, has a one-to-one data structure with the source code, the source code can be easily restored by decompilation. As a result, the source code that is a development asset may be stolen.

そこで、中間コードの逆コンパイルによるソースコードの流出を防止したい場合、ProGuard等の難読化ツールや、JLicenser等の暗号化ツールを使用する手法が知られている(非特許文献1,2)。難読化ツールとは、変数名や関数名をランダムな文字列に置き換えたり、実行されない不正な命令を混入したりすることによって、逆コンパイラをハングアップさせるものである。暗号化ツールとは、中間コードを暗号化した状態で配布することにより、逆コンパイルを不可能とするものである。
「ProGuard」、[online]、[平成17年12月26日検索]、インターネット<URL:http://proguard.sourceforge.net/> 「大金システム設計事務所」、[online]、[平成17年12月26日検索]、インターネット<URL:http://www.ogane.com/>
Therefore, a method using an obfuscation tool such as ProGuard or an encryption tool such as JLicenser is known (Non-Patent Documents 1 and 2) when it is desired to prevent the source code from leaking due to the reverse compilation of the intermediate code. The obfuscation tool hangs the decompiler by replacing variable names and function names with random character strings or by mixing illegal instructions that are not executed. An encryption tool is one in which decompilation is impossible by distributing an intermediate code in an encrypted state.
“ProGuard”, [online], [searched on December 26, 2005], Internet <URL: http://proguard.sourceforge.net/> “Daikin System Design Office”, [online], [Search on December 26, 2005], Internet <URL: http://www.ogane.com/>

しかし、難読化ツールは中間コードを読みづらくするものにすぎず、ロジック自体に変更はないため、中間コードを解析することは可能である。また、暗号化ツールを用いて中間コードを暗号化する場合であっても、プログラムの実行に必要な全ての中間コードをプログラム実行前に予め復号化しておく必要があるため、プログラムを実行している最中であれば、復号化された中間コードに対する逆コンパイルが可能であり、逆コンパイルを完全に防止することは困難であった。また、暗号化した中間コードを配布して、実行前に事前に復号化するため、システムの実行には専用の付属ソフトウェアが必要となる。   However, the obfuscation tool only makes it difficult to read the intermediate code, and there is no change in the logic itself, so it is possible to analyze the intermediate code. Even if the intermediate code is encrypted using an encryption tool, it is necessary to decrypt all intermediate codes necessary for program execution before executing the program. In the middle of this, it is possible to decompile the decrypted intermediate code, and it is difficult to completely prevent the decompilation. In addition, since the encrypted intermediate code is distributed and decrypted in advance before execution, dedicated attached software is required to execute the system.

本発明は、かかる実情に鑑み、Javaバイトコード等の中間コードを実行する実行環境である仮想マシンを用いてプログラムを実行する場合において、中間コードを暗号化した状態でプログラムの実行を可能にするプログラム実行方法を実現することを目的とするものである。   In view of such circumstances, the present invention enables execution of a program with the intermediate code encrypted when the program is executed using a virtual machine which is an execution environment for executing intermediate code such as Java bytecode. The object is to realize a program execution method.

上記課題を解決するため、本発明のプログラム実行方法は、制御手段において所定のプログラム言語で記述されたソースコードを変換した中間コードのプログラムを解釈実行するプログラム実行方法であって、制御手段が、実行対象の中間コードを取得し、中間コードが暗号化されているか否かを判断するステップと、中間コードが暗号化されていないと判断したとき、既定の中間コード解釈方式に従って中間コードを解釈実行するステップと、中間コードが暗号化されていると判断したとき、中間コードの復号化処理をおこなった上で、既定の中間コード解釈方式に従って中間コードを解釈実行するステップと、を備える。   In order to solve the above problem, a program execution method of the present invention is a program execution method for interpreting and executing an intermediate code program obtained by converting a source code described in a predetermined program language in a control means, the control means comprising: Get the intermediate code to be executed, determine whether the intermediate code is encrypted, and interpret the intermediate code according to the default intermediate code interpretation method when it is determined that the intermediate code is not encrypted And, when it is determined that the intermediate code is encrypted, the intermediate code is decrypted and the intermediate code is interpreted and executed in accordance with a predetermined intermediate code interpretation method.

このとき、制御手段は、制御手段が直接読み書きする主記憶手段上で、復号化処理を行うものであると好ましい。   At this time, it is preferable that the control means performs a decoding process on the main storage means directly read / written by the control means.

また、制御手段は、取得した中間コードが暗号化されていることを示すデータが、当該中間コード内に含まれるか否かによって、中間コードが暗号化されているか否かを判断するものであると好ましい。   The control means determines whether or not the intermediate code is encrypted based on whether or not the data indicating that the acquired intermediate code is encrypted is included in the intermediate code. And preferred.

さらに好適には、制御手段は、取得する中間コードの暗号化方式に応じて、復号化処理を行う際の復号化方式を切り替える。   More preferably, the control means switches the decryption method used when performing the decryption process according to the encryption method of the acquired intermediate code.

また、本発明のプログラム実行システムは、所定のプログラム言語で記述されたソースコードを変換した中間コードを取得する取得手段と、取得された中間コード内に、当該中間コードが暗号化されていることを示すデータが含まれるか否かを判断する暗号化判断手段と、暗号化判断手段によって中間コードが暗号化されていると判断されたとき、中間コードを主記憶装置上で復号化する復号化手段と、中間コード又は復号化された中間コードを解釈実行する処理手段と、を備える。なお、本発明において「システム」とは、実体的な装置及び仮想的な装置を含む。   The program execution system according to the present invention includes an acquisition means for acquiring an intermediate code obtained by converting a source code described in a predetermined program language, and the intermediate code is encrypted in the acquired intermediate code. Encryption determining means for determining whether or not the data indicating is included, and decryption for decrypting the intermediate code on the main storage device when the encryption determining means determines that the intermediate code is encrypted Means and processing means for interpreting and executing the intermediate code or the decoded intermediate code. In the present invention, the “system” includes a substantial device and a virtual device.

上記プログラム実行システムは、復号化手段の復号化方式を切り替える切替手段と、をさらに備えるものであると好ましい。好適には、切替手段は、復号化方式毎に個別に定められた復号化処理を実行するためのクラスをロードすることによって、復号化手段の復号化方式を切り替える。   The program execution system preferably further includes switching means for switching the decoding method of the decoding means. Preferably, the switching unit switches the decoding method of the decoding unit by loading a class for executing a decoding process individually determined for each decoding method.

本発明のプログラムは、所定のプログラム言語で記述されたソースコードを変換した中間コードを解釈実行するための仮想マシン(仮想機械)を備えるコンピュータに、仮想マシンが取得する中間コードが暗号化されているか否かを検出するステップと、取得した中間コードが暗号化されていないと検出されたとき、取得した中間コードを仮想マシンに渡すステップと、取得した中間コードが暗号化されていると検出されたとき、取得した中間コードを復号化し、当該復号化されたものを仮想マシンに渡すステップと、を実行させる。   In the program of the present invention, an intermediate code acquired by a virtual machine is encrypted in a computer including a virtual machine (virtual machine) for interpreting and executing an intermediate code converted from a source code described in a predetermined programming language. A step of detecting whether or not the acquired intermediate code is not encrypted, a step of passing the acquired intermediate code to the virtual machine, and a detection that the acquired intermediate code is encrypted. Then, the obtained intermediate code is decrypted and the decrypted one is passed to the virtual machine.

また、本発明のプログラムは、本発明のプログラム実行方法の各ステップをコンピュータに実行させることを特徴とする。本発明のプログラムは、CD−ROM等の光学ディスク、磁気ディスク、半導体メモリなどの各種の記録媒体を通じて、又は通信ネットワークなどを介してダウンロードすることにより、コンピュータにインストール又はロードすることができる。   Moreover, the program of this invention makes a computer perform each step of the program execution method of this invention, It is characterized by the above-mentioned. The program of the present invention can be installed or loaded on a computer through various recording media such as an optical disk such as a CD-ROM, a magnetic disk, or a semiconductor memory, or via a communication network.

なお、発明において、「手段」とは、単に物理的手段を意味するものではなく、その手段が有する機能をソフトウェアによって実現する場合も含む。また、1つの手段が有する機能が2つ以上の物理的手段により実現されても、2つ以上の手段の機能が1つの物理的手段により実現されてもよい。   In the invention, “means” does not simply mean a physical means, but includes a case where the function of the means is realized by software. Further, the function of one means may be realized by two or more physical means, or the functions of two or more means may be realized by one physical means.

本発明では、特に指示しない限り、「中間コード」とは、特定のプラットフォーム(OS、環境、設定等)に依存しないバイナリ形式の実行用コードであり、仮想マシンによってネイティブコードに変換されてから実行されるものである。具体的には、例えば、Javaのコンパイラが生成する実行用コードであるJavaバイトコードが該当する。   In the present invention, unless otherwise specified, the “intermediate code” is binary-format execution code that does not depend on a specific platform (OS, environment, settings, etc.), and is executed after being converted into native code by a virtual machine. It is what is done. Specifically, for example, a Java byte code that is an execution code generated by a Java compiler is applicable.

また、本発明において「仮想マシン」とは、中間コードをそのプラットフォームのネイティブコードに変換して実行するソフトウェアである。中間コードは、配布時にはプラットフォームから独立した独自の形式になっており、そのままでは実行することができない。そのため、そのプラットフォーム固有の形式(ネイティブコード)に変換するソフトウェアを用意して、変換しながら実行する。この変換と実行を行うものが仮想マシンである。具体的には、例えば、Javaバイトコードをそのプラットフォームのネイティブコードに変換して実行するJava仮想マシンが該当する。   In the present invention, the “virtual machine” is software that converts an intermediate code into a native code of the platform and executes it. The intermediate code is in a unique format independent of the platform when distributed, and cannot be executed as it is. For this reason, software for converting to a platform-specific format (native code) is prepared and executed while converting. It is the virtual machine that performs this conversion and execution. Specifically, for example, it corresponds to a Java virtual machine that executes a Java bytecode by converting it into a native code of the platform.

「プラットフォーム」とは、アプリケーションソフトを動作させる際の基盤となるOSの種類や環境、設定、ハードウェアの種類などのことである。「Java」とは、プログラミング言語である。   “Platform” refers to the type, environment, settings, hardware type, and the like of the OS that is the basis for operating application software. “Java” is a programming language.

本発明によれば、中間コードを暗号化した状態でプログラムを実行可能なプログラム実行方法を実現することができる。中間コードを暗号化した形で配布することができ、かつ、実行前に事前に復号化しなくてもよいので、逆コンパイルによるソースコードの流出を防ぐことができる。また、本発明に係るプログラム実行方法は、中間コードを実行する仮想マシン以外に特別なアプリケーションを必要としないので、従来の暗号化ツールに比べて汎用性が高い。さらに、プログラム実行中に復号化方式を適宜変えることができるので、中間コード毎に任意の暗号化を施すことが可能となる。従来の暗号化ツールでは、復号化に必要なライセンスキーが分かれば全ての中間コードを復号化可能であったが、本発明によれば、中間コード毎に異なる暗号化方式を採用することができるので、中間コードが復号化され、逆コンパイルによりソースコードが流出するリスクを、単一の暗号化方式を利用する場合以上に抑えることができるという効果がある。   According to the present invention, it is possible to realize a program execution method capable of executing a program with the intermediate code encrypted. Since the intermediate code can be distributed in an encrypted form and does not have to be decrypted in advance before execution, it is possible to prevent the source code from leaking due to decompilation. In addition, the program execution method according to the present invention does not require a special application other than the virtual machine that executes the intermediate code, and thus is more versatile than the conventional encryption tool. Furthermore, since the decryption method can be changed as appropriate during program execution, it is possible to perform arbitrary encryption for each intermediate code. In the conventional encryption tool, all intermediate codes can be decrypted if the license key necessary for decryption is known. However, according to the present invention, different encryption methods can be employed for each intermediate code. Therefore, there is an effect that the risk that the intermediate code is decrypted and the source code is leaked by decompilation can be suppressed more than when a single encryption method is used.

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

図1は本発明に係るプログラム実行方法を実装する処理装置10の構成を示す制御ブロック図の一例である。処理装置10は、プログラムの実行に関して処理装置10全体の処理及び動作を統括制御する制御手段12、制御手段12の作業領域として一時的に情報を記憶する主記憶手段14、制御手段12の処理及び動作に必要な各種情報を予め記憶する読出用記憶手段16、プログラムの実行に関して処理装置10の外部から各種情報を入出力(通信を含む)する入出力手段18を備える。主記憶手段14は、制御手段12によって直接読み書きされるものである。   FIG. 1 is an example of a control block diagram showing a configuration of a processing apparatus 10 that implements a program execution method according to the present invention. The processing device 10 includes a control unit 12 that performs overall control of processing and operations of the entire processing device 10 with respect to program execution, a main storage unit 14 that temporarily stores information as a work area of the control unit 12, and processing of the control unit 12 A storage unit 16 for reading that stores various information necessary for operation in advance, and an input / output unit 18 that inputs and outputs various types of information (including communication) from the outside of the processing apparatus 10 regarding the execution of the program are provided. The main storage means 14 is read / written directly by the control means 12.

処理装置10の具体例として、専用又は汎用のコンピュータやマイクロコンピュータ等が挙げられる。例えば、汎用のパーソナルコンピュータは、制御手段12としてのCPU、主記憶手段14としてのRAM等の主記憶装置、読出用記憶手段16としてのROM、入出力手段18としての入出力(I/O)インタフェースを備え、これらがバスにより接続される。   Specific examples of the processing apparatus 10 include a dedicated or general-purpose computer or a microcomputer. For example, a general-purpose personal computer has a CPU as the control means 12, a main storage device such as a RAM as the main storage means 14, a ROM as the read storage means 16, and an input / output (I / O) as the input / output means 18. An interface is provided, and these are connected by a bus.

なお、処理装置10は、単一のコンピュータより構成されるものであっても、ネットワーク上に分散した複数のコンピュータより構成されるものであってもよい。制御手段12としてのCPUは、RAM等の主記憶手段14に記憶される所定のプログラム、ROM等の読出用記憶手段16に記憶される所定のプログラム、又は入出力手段18を介して外部(外部記憶装置、ネットワーク上のコンピュータ等)から読み出される所定のプログラムを実行することにより、各種機能実現手段として処理装置10を機能させる。   The processing device 10 may be configured by a single computer or may be configured by a plurality of computers distributed on a network. The CPU as the control means 12 is a predetermined program stored in the main storage means 14 such as a RAM, a predetermined program stored in the reading storage means 16 such as a ROM, or the external (external) via the input / output means 18. By executing a predetermined program read from a storage device, a computer on a network, etc., the processing device 10 is caused to function as various function realizing means.

図2は制御手段12及び主記憶手段14の主な機能構成を示す機能ブロック図の一例である。制御手段12は、中間コード処理手段20と、中間コード取得手段22と、暗号化判断手段24と、復号化手段26と、復号化方式切替手段28とを含んで構成され、仮想マシンとして機能する。主記憶手段14は、実行中間コード格納領域30と、復号化作業領域32とを含んで構成される。なお、中間コード処理手段20及び中間コード取得手段22は、仮想マシンが本来備える機能手段である。   FIG. 2 is an example of a functional block diagram showing main functional configurations of the control means 12 and the main storage means 14. The control means 12 includes an intermediate code processing means 20, an intermediate code acquisition means 22, an encryption determination means 24, a decryption means 26, and a decryption method switching means 28, and functions as a virtual machine. . The main storage unit 14 includes an execution intermediate code storage area 30 and a decryption work area 32. The intermediate code processing unit 20 and the intermediate code acquisition unit 22 are functional units that are originally provided in the virtual machine.

中間コード処理手段20は、中間コードをそのプラットフォームのネイティブコードに変換して実行する機能を備え、主記憶手段14の実行中間コード格納領域30に格納された中間コードを解釈し、当該中間コードに記述された所定の処理を実行する。   The intermediate code processing means 20 has a function of converting the intermediate code into the native code of the platform and executing it. The intermediate code processing means 20 interprets the intermediate code stored in the execution intermediate code storage area 30 of the main storage means 14 and converts it into the intermediate code. The predetermined process described is executed.

中間コード取得手段22は、プログラムを実行する際に、中間コードを取得して主記憶手段14の実行中間コード格納領域30に格納する機能を備える。このとき、プログラムの実行に必要な個々の中間コードを、プログラム実行中に必要なものだけを順次読み込む。中間コードはメインプログラムに関するものと、プログラムの実行に必要な個々の機能がファイル単位に分割されたものがある。中間コード取得手段22は、ROM等の読出用記憶手段16に記憶された中間コードまたは処理装置10の外部に記憶された中間コードを必要に応じて順次取得する。処理装置10の外部から中間コードを取得する場合は、外部記憶装置またはネットワーク上のコンピュータ等から入出力手段18を介して取得する。   The intermediate code acquisition unit 22 has a function of acquiring an intermediate code and storing it in the execution intermediate code storage area 30 of the main storage unit 14 when executing the program. At this time, individual intermediate codes necessary for program execution are sequentially read only for those necessary during program execution. There are intermediate codes related to the main program and individual codes necessary for program execution divided into file units. The intermediate code acquisition unit 22 sequentially acquires the intermediate code stored in the reading storage unit 16 such as a ROM or the intermediate code stored outside the processing apparatus 10 as necessary. When acquiring an intermediate code from the outside of the processing apparatus 10, the intermediate code is acquired via an input / output unit 18 from an external storage device or a computer on a network.

暗号化判断手段24は、中間コード処理手段20が実行中間コード格納領域30に格納された中間コードを実行する際に、当該中間コードが暗号化されているか否かを判断する機能を備える。好ましくは、暗号化された中間コードの先頭に、当該中間コードが暗号化されたものであることを示す所定のタグ(識別子)を付与しておき、中間コード処理手段20が主記憶手段14の実行中間コード格納領域30に格納された中間コードを解釈実行する最初の段階で、当該実行しようとする中間コードの先頭に所定のタグが付加されているか否かを確認し、所定のタグが付加されているとき、当該中間コードは暗号化されていると判断し、所定のタグが付加されていないとき、当該中間コードは暗号化されていない通常の中間コードであると判断する。また、中間コード取得手段22が中間コードを取得した後、中間コード処理手段20が当該中間コードの解釈実行を始めるまでの間に、当該中間コードが暗号化されているか否かを暗号化判断手段24が判断するものであってもよい。   The encryption determination unit 24 has a function of determining whether or not the intermediate code is encrypted when the intermediate code processing unit 20 executes the intermediate code stored in the execution intermediate code storage area 30. Preferably, a predetermined tag (identifier) indicating that the intermediate code is encrypted is attached to the head of the encrypted intermediate code, and the intermediate code processing means 20 is stored in the main storage means 14. At the first stage of interpreting and executing the intermediate code stored in the execution intermediate code storage area 30, it is confirmed whether or not a predetermined tag is added to the head of the intermediate code to be executed, and the predetermined tag is added. When it is determined that the intermediate code is encrypted, it is determined that the intermediate code is an unencrypted normal intermediate code when a predetermined tag is not added. Further, after the intermediate code acquisition unit 22 acquires the intermediate code, the intermediate code processing unit 20 determines whether or not the intermediate code is encrypted before the intermediate code processing unit 20 starts interpreting and executing the intermediate code. 24 may judge.

復号化手段26は、暗号化判断手段24において、実行中間コード格納領域30に格納された中間コード(解釈実行しようとする中間コード)が暗号化されていると判断されたとき、当該暗号化された中間コード(以下、「暗号化中間コード」という)を、中間コード処理手段20が処理可能な通常の中間コードに所定の方式で復号化する機能を備える。好ましくは、復号化手段26は、主記憶手段14の復号化作業領域32を用いて中間コードの復号化処理を行い、実行中間コード格納領域30に格納されている暗号化中間コードを、復号化された通常形式の中間コードに置き換える。また、暗号化中間コードの復号化処理が完了した後、中間コード処理手段20が復号化作業領域32に格納された中間コードを解釈実行するように制御されてもよい。   When the encryption determination unit 24 determines that the intermediate code stored in the execution intermediate code storage area 30 is encrypted, the decryption unit 26 encrypts the intermediate code. The intermediate code (hereinafter referred to as “encrypted intermediate code”) is decrypted into a normal intermediate code that can be processed by the intermediate code processing means 20 by a predetermined method. Preferably, the decryption means 26 performs decryption processing of the intermediate code using the decryption work area 32 of the main storage means 14 and decrypts the encrypted intermediate code stored in the execution intermediate code storage area 30. Replace with the normal form of intermediate code. Further, after the decryption process of the encrypted intermediate code is completed, the intermediate code processing means 20 may be controlled to interpret and execute the intermediate code stored in the decryption work area 32.

復号化方式切替手段28は、復号化手段26の復号化処理の方式を切り替える機能を備える。本発明では、中間コードの暗号化及び復号化を行う方式として、ビット反転方式、ビットシフト方式、公開鍵暗号方式、共通鍵暗号方式、その他任意の方式を適用可能である。そのため、復号化手段26は、暗号化中間コードの暗号化方式に応じた復号化処理を行う必要がある。そこで、実行しようとする暗号化中間コードの暗号化方式に応じて、復号化方式切替手段28は、復号化手段26の復号化方式を事前に切り替えることが好ましい。   The decoding method switching unit 28 has a function of switching the decoding processing method of the decoding unit 26. In the present invention, a bit inversion method, a bit shift method, a public key encryption method, a common key encryption method, and other arbitrary methods can be applied as a method for encrypting and decrypting an intermediate code. Therefore, the decryption means 26 needs to perform a decryption process according to the encryption method of the encrypted intermediate code. Therefore, it is preferable that the decryption method switching unit 28 switches the decryption method of the decryption unit 26 in advance according to the encryption method of the encryption intermediate code to be executed.

例えば、Javaの場合、復号化方式の切り替えは、Javaが標準的に備えるクラスローダを利用して実現することが好ましい。クラスローダとは、クラスをメモリ(主記憶手段14)にロード(load)するためのオブジェクトであり、プログラムの実行中に必要なクラス(モジュール)を動的にロード及び/又はリンクすることができる機能である。本発明においては、制御手段12を暗号化判断手段24及び復号化手段26として機能させるためのクラスを、各暗号化方式毎に予め用意しておく。そして、暗号化中間コードを取得する前に、当該暗号化方式に対応するクラスをクラスローダによりロードして、復号化方式(復号化手段26)を切り替える。   For example, in the case of Java, the switching of the decoding method is preferably realized by using a class loader provided as standard in Java. The class loader is an object for loading a class into a memory (main storage means 14), and a necessary class (module) can be dynamically loaded and / or linked during execution of a program. It is a function. In the present invention, classes for causing the control unit 12 to function as the encryption determination unit 24 and the decryption unit 26 are prepared in advance for each encryption method. Then, before acquiring the encryption intermediate code, the class corresponding to the encryption method is loaded by the class loader, and the decryption method (decryption means 26) is switched.

実行中間コード格納領域30は、中間コード取得手段22により取得された中間コード及び暗号化中間コードを格納し、中間コード処理手段20が実行する中間コードを格納するための一時的な記憶領域である。実行中間コード格納領域30に格納された中間コードは、当該中間コードに基づいた処理の終了後、削除されることが好ましい。なお、実行中間コード格納領域30は、主記憶手段14上の物理的又は論理的に固定された特定領域を意味するものではなく、単に中間コード処理手段20が解釈実行しようとする中間コードが格納されている領域を指す。   The execution intermediate code storage area 30 is a temporary storage area for storing the intermediate code acquired by the intermediate code acquisition means 22 and the encrypted intermediate code, and for storing the intermediate code executed by the intermediate code processing means 20. . The intermediate code stored in the execution intermediate code storage area 30 is preferably deleted after the processing based on the intermediate code is completed. The execution intermediate code storage area 30 does not mean a specific area that is physically or logically fixed on the main storage means 14, but simply stores intermediate code that the intermediate code processing means 20 intends to interpret and execute. Refers to the area that has been

復号化作業領域32は、復号化手段26が暗号化中間コードの復号化処理を行うときに、処理途中のデータ等を一時的に格納するための作業領域である。なお、復号化作業領域32も、主記憶手段14上の物理的又は論理的に固定された特定領域を意味するものではない。   The decryption work area 32 is a work area for temporarily storing data being processed when the decryption means 26 performs the decryption process of the encrypted intermediate code. The decryption work area 32 does not mean a specific area physically or logically fixed on the main storage unit 14.

次に、処理装置10により実現される、本発明に係るプログラム実行処理について説明する。まず、中間コードを暗号化中間コードに変換する処理について説明し、その後、暗号化中間コードによるプログラム実行処理について説明する。   Next, a program execution process according to the present invention realized by the processing device 10 will be described. First, a process for converting an intermediate code into an encrypted intermediate code will be described, and then a program execution process using the encrypted intermediate code will be described.

図3は、実行対象の中間コードを暗号化中間コードに変換する処理の手順を示すフローチャートである。具体的には、中間コードを読み込み、任意の暗号化処理を施したうえで暗号化された中間コードであることを表す情報を埋め込んで出力する処理を行う。ここでは、例えば、使用する暗号化手法として中間コードの情報をすべてビット単位で反転するという暗号化手法を用いるものとする。   FIG. 3 is a flowchart showing a procedure of processing for converting the intermediate code to be executed into the encrypted intermediate code. Specifically, the intermediate code is read, and after performing an arbitrary encryption process, information indicating that it is an encrypted intermediate code is embedded and output. Here, for example, as an encryption method to be used, an encryption method in which all the information of the intermediate code is inverted in bit units is used.

まず、暗号化すべき入力元の中間コードファイルをオープンし(S50)、続いて、暗号化結果となる出力先の中間コードファイルをオープンする(S52)。次に、中間コードが暗号化されていることを示す情報(以下、「暗号化タグ」という)を出力ファイルに書き込む(S54)。ここで、暗号化タグとは、暗号化中間コードの先頭に付加される情報であり、中間コードの先頭に暗号化タグが付加されている場合には、当該中間コードが暗号化されていることを意味するものである。どのような情報を暗号化タグとして用いるかは、少なくとも暗号化方式毎に予め設定される。   First, the intermediate code file of the input source to be encrypted is opened (S50), and then the intermediate code file of the output destination that is the encryption result is opened (S52). Next, information indicating that the intermediate code is encrypted (hereinafter referred to as “encryption tag”) is written in the output file (S54). Here, the encryption tag is information added to the beginning of the encrypted intermediate code. If the encryption tag is added to the beginning of the intermediate code, the intermediate code must be encrypted. Means. What information is used as an encryption tag is set in advance for each encryption method.

次に、入力元ファイルの最後の中間コードまで処理を終えたかどうかを判定する(S56)。ファイルの最後ではないとき、中間コードの入力を行い(S58)、入力した中間コードのビットを反転し(S60)。出力先ファイルにビット反転した中間コードを書き込む(S62)。入力ファイルの最後までS56からS60の処理を繰り返し、ファイルの中間コード全体に対してビット反転を行う。S56でファイルの最後であると判定したとき、入力元の中間コードファイルをクローズする(S64)。そして、出力先の中間コードファイルをクローズする(S66)。こうして、中間コードが暗号化され、かつ、ファイルの先頭に暗号化タグが付与された、暗号化中間コードが生成される。   Next, it is determined whether or not the processing has been completed up to the last intermediate code of the input source file (S56). If it is not the end of the file, an intermediate code is input (S58), and the input intermediate code bit is inverted (S60). An intermediate code bit-inverted is written in the output destination file (S62). The processing from S56 to S60 is repeated until the end of the input file, and bit inversion is performed on the entire intermediate code of the file. When it is determined in S56 that the file is the last one, the input intermediate code file is closed (S64). Then, the output intermediate code file is closed (S66). In this way, an encrypted intermediate code in which the intermediate code is encrypted and the encryption tag is added to the head of the file is generated.

図4は、暗号化中間コードを復号化し実行する処理の手順を示すフローチャートである。具体的には、入力された中間コードが暗号化中間コードであるかをチェックし、暗号化中間コードであれば復号化処理を実行する。ここでは、例えば、使用する暗号化手法として中間コードの情報をすべてビット単位で反転するという暗号化手法を用いるものとする。   FIG. 4 is a flowchart showing a processing procedure for decrypting and executing the encrypted intermediate code. Specifically, it is checked whether the input intermediate code is an encrypted intermediate code, and if it is an encrypted intermediate code, a decryption process is executed. Here, for example, as an encryption method to be used, an encryption method in which all the information of the intermediate code is inverted in bit units is used.

まず、仮想マシンによってメモリ(実行中間コード格納領域30)に読み込まれた実行対象の中間コードに対し、当該中間コードの先頭に所定の情報、すなわち暗号化タグ、が埋め込まれているかどうかを確認する(S70)。暗号化タグが埋め込まれている場合、当該中間コードは暗号化されていることになるので、復号化処理を行う。復号化処理はまず、復号化処理を行うための作業領域(復号化作業領域32)を初期化し(S72)、実行対象の中間コードの読み込み位置を暗号化タグのサイズ分だけ中間コードの最後方向にずらす(S74)。   First, it is confirmed whether or not predetermined information, that is, an encryption tag, is embedded at the head of the intermediate code that is read into the memory (execution intermediate code storage area 30) by the virtual machine. (S70). When the encryption tag is embedded, the intermediate code is encrypted, so that the decryption process is performed. In the decryption process, first, a work area (decryption work area 32) for performing the decryption process is initialized (S72), and the read direction of the intermediate code to be executed is the last direction of the intermediate code by the size of the encryption tag. (S74).

その後、最後の中間コードまで処理を終えたかどうかを判定する(S76)。中間コードの最後ではないとき、実行対象の中間コード(暗号化中間コード)の入力を行い(S78)、入力した中間コードのビットを反転し(S80)、復号化作業領域にビット反転した中間コードを書き込む(S82)。このように、入力ファイルの最後までS76〜S82の処理を繰り返し、ファイルの中間コード全体に対してビット反転を行なう。   Thereafter, it is determined whether or not the processing has been completed up to the last intermediate code (S76). When it is not the end of the intermediate code, the intermediate code to be executed (encrypted intermediate code) is input (S78), the bit of the input intermediate code is inverted (S80), and the intermediate code is bit-inverted to the decryption work area Is written (S82). In this way, the processing of S76 to S82 is repeated until the end of the input file, and bit inversion is performed on the entire intermediate code of the file.

そして、実行対象の中間コードが最後であると判定したとき、メモリに格納された実行対象の中間コード(暗号化中間コード)を、復号化処理によって得られた中間コードと置き換える(S84)。仮想マシンによって読み込まれた実行対象の中間コードの先頭に暗号化タグを発見できない場合、当該中間コードは暗号化されていない通常の中間コードであると判断できるので、実行対象の中間コードに変更は加えない。こうして、暗号化されていなければ、そのまま中間コードを実行し、暗号化中間コードであれば復号化された通常の中間コードに変換した上で中間コードを実行する。   When it is determined that the intermediate code to be executed is the last, the intermediate code to be executed (encrypted intermediate code) stored in the memory is replaced with the intermediate code obtained by the decryption process (S84). If the encryption tag cannot be found at the beginning of the execution target intermediate code read by the virtual machine, it can be determined that the intermediate code is a normal intermediate code that has not been encrypted. Do not add. Thus, if not encrypted, the intermediate code is executed as it is, and if it is an encrypted intermediate code, the intermediate code is executed after being converted into a decrypted normal intermediate code.

ここで、暗号化中間コードの解釈実行をするとき、既定の解釈方式では実行できない暗号化された中間コードであれば復号化処理を施してから解釈実行する仮想マシンが考えられる。しかし、復号化可能な暗号化方式が一定で変更できない場合、ある暗号化中間コードの暗号が解読されると、他の全ての暗号化中間コードをも解読されてしまうおそれがある。そこで、好適には、任意の形式で暗号化された実行対象の中間コードの先頭に暗号化した中間コードであることを表す情報を埋め込み、該プログラムを実行する仮想マシンにおいて、中間コードの先頭を読み出し、暗号化された中間コードの場合は、該プログラム実行中に登録された任意の中間コード復号化方式を用いて暗号化中間コードの復号化を実行し、復号化された中間コードを既定の中間コード解釈方式で実行することが望ましい。   Here, when interpreting and executing the encrypted intermediate code, a virtual machine that interprets and executes the decryption process after an encrypted intermediate code that cannot be executed by a predetermined interpretation method can be considered. However, if the encryption method that can be decrypted is constant and cannot be changed, if the encryption of a certain encrypted intermediate code is decrypted, all other encrypted intermediate codes may also be decrypted. Therefore, preferably, information indicating that the intermediate code is encrypted is embedded at the beginning of the execution-target intermediate code encrypted in an arbitrary format, and the beginning of the intermediate code is embedded in the virtual machine that executes the program. In the case of the read and encrypted intermediate code, the intermediate code decryption method is executed using any intermediate code decryption method registered during the execution of the program, and the decrypted intermediate code is stored in the default code. It is desirable to execute with an intermediate code interpretation method.

図5及び図6は、仮想マシンがプログラムを実行する処理の手順を示すフローチャートである。   FIG. 5 and FIG. 6 are flowcharts showing a processing procedure for the virtual machine to execute the program.

図5は、仮想マシンがメインプログラムとなる中間コードを実行する処理の手順を示すフローチャートである。まず、中間コード取得手段22が、メインプログラムとなる中間コードをメモリ(実行中間コード格納領域30)上に読み込む(S90)。そして、読み込んだ中間コードを対象として図6の中間コード解釈処理を実行する(S92)。メインプログラムとなる中間コードの解釈処理が終了するとともに仮想マシンによるプログラムの実行も終了する。   FIG. 5 is a flowchart showing a procedure of processing in which the virtual machine executes the intermediate code serving as the main program. First, the intermediate code acquisition means 22 reads the intermediate code as the main program into the memory (execution intermediate code storage area 30) (S90). Then, the intermediate code interpretation processing of FIG. 6 is executed for the read intermediate code (S92). Interpretation processing of the intermediate code serving as the main program ends and execution of the program by the virtual machine also ends.

図6は、仮想マシンが中間コードを解釈し、実行する処理の手順を示すフローチャートである。まず、中間コード処理手段20は、中間コードの最後まで処理を終えたかどうかを判定する(S100)。中間コードの最後ではないとき、解釈中の中間コード命令が中間コード復号化処理の変更命令であるかどうかを判定する(S102)。例えば、所定の復号化方式に対応した復号化処理を行うためのクラスを読み込む必要があるかどうかにより、当該判定処理を実現できる。判定の結果、中間コードの復号化処理変更命令でないとき、解釈中の中間コード命令が外部中間コードの読み込み命令であるかどうかを判定する(S104)。外部中間コードの読み込み命令でないとき、メモリに格納されている中間コードに基づいて、中間コード処理手段20が既定の中間コード実行処理を行なう(S106)。   FIG. 6 is a flowchart illustrating a procedure of processing in which the virtual machine interprets and executes the intermediate code. First, the intermediate code processing means 20 determines whether the processing has been completed up to the end of the intermediate code (S100). When it is not the end of the intermediate code, it is determined whether the intermediate code instruction being interpreted is a change instruction for the intermediate code decoding process (S102). For example, the determination process can be realized depending on whether or not a class for performing a decoding process corresponding to a predetermined decoding method needs to be read. As a result of the determination, if it is not an intermediate code decoding process change instruction, it is determined whether or not the intermediate code instruction being interpreted is an external intermediate code read instruction (S104). If it is not an external intermediate code read instruction, the intermediate code processing means 20 performs a predetermined intermediate code execution process based on the intermediate code stored in the memory (S106).

S102において、解釈中の中間コード命令が中間コードの復号化処理変更命令であると判定されたとき、復号化方式切替手段28は、該仮想マシンが使用する中間コードの復号化方式を、当該変更命令により指定される復号化方式に変更する(S108)。例えば、ビット反転方式からビットシフト方式へ復号化方式を切り替える。この切替処理は、例えば、復号化方式毎に個別に定められた復号化処理を実行するためのクラスを予め用意しておき、取得する中間コードの暗号化方式に応じたクラスをロードすることによって、実現できる。   When it is determined in S102 that the intermediate code instruction being interpreted is an intermediate code decoding process change instruction, the decoding method switching unit 28 changes the intermediate code decoding method used by the virtual machine to the change The decoding method is changed to that specified by the instruction (S108). For example, the decoding method is switched from the bit inversion method to the bit shift method. This switching process is performed by, for example, preparing a class for executing a decryption process individually determined for each decryption method and loading a class according to the encryption method of the intermediate code to be acquired. ,realizable.

S104において、外部中間コードの読み込み命令であると判定されたとき、当該読み込み命令で指定された中間コードを入出力手段18を介して外部から取得して、メモリ(実行中間コード格納領域30)上に読み込む(S110)。その後、当該外部中間コードが暗号化されているかどうか、すなわち暗号化タグが先頭に付加されているかどうかを暗号化判断手段24が判断する(S112)。暗号化タグが付加されているとき、当該外部中間コードは暗号化されているので、復号化手段26により復号化処理を実行する(S114)。当該復号化処理は図4に例示した処理を実行すればよい。こうして、仮想マシンは、取得した中間コードに対して、必要に応じて所定の復号化処理を行い、仮想マシンで解釈できる形式にした上で、中間コード処理手段20は中間コードを解釈し、実行する(S116)。このように、中間コードの最後までS100〜S106の処理を繰り返し、中間コード全体を解釈し、実行する。   When it is determined in S104 that the instruction is a read instruction for an external intermediate code, the intermediate code designated by the read instruction is acquired from the outside via the input / output means 18 and stored in the memory (execution intermediate code storage area 30). (S110). Thereafter, the encryption determination unit 24 determines whether the external intermediate code is encrypted, that is, whether an encryption tag is added to the head (S112). When the encryption tag is added, since the external intermediate code is encrypted, the decryption means 26 performs decryption processing (S114). The decryption process may be performed as illustrated in FIG. In this way, the virtual machine performs a predetermined decryption process on the acquired intermediate code as necessary to make a format that can be interpreted by the virtual machine, and the intermediate code processing means 20 interprets and executes the intermediate code. (S116). In this way, the processes of S100 to S106 are repeated until the end of the intermediate code, and the entire intermediate code is interpreted and executed.

以上詳述したように、本発明によれば、暗号化された中間コードを含むプログラムを実行するにあたり、プログラムの実行に必要な全ての暗号化中間コードを事前に復号化することなくプログラム実行することができる。暗号化された中間コードは当該中間コードが読み出され実行されるときのみ復号化される。復号化された中間コードは、当該中間コードの実行時に主記憶手段に展開されるのみであり、実行前又は実行後にはメモリ等に展開されないので、第三者が復号化された中間コードを取得することが極めて困難となる。これにより、中間コードの逆コンパイルを防止することが可能となる。   As described above in detail, according to the present invention, when executing a program including an encrypted intermediate code, the program is executed without previously decrypting all the encrypted intermediate codes necessary for executing the program. be able to. The encrypted intermediate code is decrypted only when the intermediate code is read and executed. The decrypted intermediate code is only expanded in the main storage means at the time of execution of the intermediate code, and is not expanded in the memory or the like before or after execution, so a third party obtains the decoded intermediate code It becomes extremely difficult to do. This makes it possible to prevent decompilation of intermediate code.

なお、各ステップは処理内容に矛盾を生じない範囲で任意に順番を変更して又は並列に実行することができる。   Note that the steps can be executed in any order or in parallel as long as the processing contents do not contradict each other.

なお、本発明は、上記した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において、他の様々な形で実施することができる。このため、上記実施形態はあらゆる点で単なる例示にすぎず、限定的に解釈されるものではない。   The present invention is not limited to the above-described embodiment, and can be implemented in various other forms without departing from the gist of the present invention. For this reason, the said embodiment is only a mere illustration in all points, and is not interpreted limitedly.

例えば、本発明に係るプログラム実行方法は、Javaに限定されるものではない。本発明に係るプログラム実行方法は、中間コードを仮想マシンで読取実行するタイプのプログラム言語に対して適用可能である。   For example, the program execution method according to the present invention is not limited to Java. The program execution method according to the present invention can be applied to a type of program language in which an intermediate code is read and executed by a virtual machine.

本発明に係るプログラム実行方法を実装する処理装置10の構成を示す制御ブロック図の一例である。It is an example of the control block diagram which shows the structure of the processing apparatus 10 which implements the program execution method which concerns on this invention. 処理装置10の主な機能構成を示す機能ブロック図の一例である。2 is an example of a functional block diagram illustrating a main functional configuration of a processing device 10. FIG. 中間コードを暗号化中間コードに変換する処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which converts an intermediate code into an encryption intermediate code. 暗号化中間コードを復号化し実行する処理の手順を示すフローチャートであるIt is a flowchart which shows the procedure of the process which decodes and performs an encryption intermediate code. 仮想マシンがメインプログラムとなる中間コードを実行する処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process in which the virtual machine performs the intermediate code used as the main program. 仮想マシンが中間コードを解釈し、実行する処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which a virtual machine interprets and performs an intermediate code.

符号の説明Explanation of symbols

10 処理装置
12 制御手段
14 主記憶手段
16 読出用記憶手段
18 入出力手段

DESCRIPTION OF SYMBOLS 10 Processing apparatus 12 Control means 14 Main memory means 16 Reading memory means 18 Input / output means

Claims (10)

制御手段において所定のプログラム言語で記述されたソースコードを変換した中間コードのプログラムを解釈実行する方法であって、
前記制御手段が、実行対象の中間コードを取得し、前記中間コードが暗号化されているか否かを判断するステップと、
前記制御手段は、前記中間コードが暗号化されていないと判断したとき、既定の中間コード解釈方式に従って中間コードを解釈実行するステップと、
前記制御手段は、前記中間コードが暗号化されていると判断したとき、中間コードの復号化処理をおこなった上で、既定の中間コード解釈方式に従って中間コードを解釈実行するステップと、
を備えるプログラム実行方法。
A method of interpreting and executing an intermediate code program obtained by converting a source code described in a predetermined program language in a control means,
The control means obtaining an intermediate code to be executed and determining whether the intermediate code is encrypted;
The control means interpreting and executing the intermediate code according to a predetermined intermediate code interpretation method when determining that the intermediate code is not encrypted;
The control means, when it is determined that the intermediate code is encrypted, after performing a decoding process of the intermediate code, interpreting and executing the intermediate code according to a predetermined intermediate code interpretation method;
A program execution method comprising:
前記制御手段は、前記制御手段が直接読み書きする主記憶手段上で、前記復号化処理を行うことを特徴とする請求項1記載のプログラム実行方法。   2. The program execution method according to claim 1, wherein the control means performs the decryption processing on a main storage means directly read / written by the control means. 前記制御手段は、前記取得した中間コードが暗号化されていることを示すデータが、当該中間コード内に含まれるか否かによって、前記中間コードが暗号化されているか否かを判断することを特徴とする請求項1又は2記載のプログラム実行方法。   The control means determines whether the intermediate code is encrypted based on whether data indicating that the acquired intermediate code is encrypted is included in the intermediate code. 3. The program execution method according to claim 1, wherein the program is executed. 前記制御手段は、前記取得する中間コードの暗号化方式に応じて、前記復号化処理を行う際の復号化方式を切り替えることを特徴とする請求項1乃至3のいずれかに記載のプログラム実行方法。   4. The program execution method according to claim 1, wherein the control unit switches a decryption method for performing the decryption process according to an encryption method of the acquired intermediate code. 5. . 所定のプログラム言語で記述されたソースコードを変換した中間コードを取得する取得手段と、
前記取得された中間コード内に、当該中間コードが暗号化されていることを示すデータが含まれるか否かを判断する暗号化判断手段と、
前記暗号化判断手段によって前記中間コードが暗号化されていると判断されたとき、前記中間コードを主記憶装置上で復号化する復号化手段と、
前記中間コード又は前記復号化された中間コードを解釈実行する処理手段と、
を備えるプログラム実行システム。
Obtaining means for obtaining intermediate code obtained by converting source code described in a predetermined programming language;
Encryption determination means for determining whether or not the acquired intermediate code includes data indicating that the intermediate code is encrypted;
Decryption means for decrypting the intermediate code on a main storage device when the encryption determination means determines that the intermediate code is encrypted;
Processing means for interpreting and executing the intermediate code or the decoded intermediate code;
A program execution system comprising:
前記復号化手段の復号化方式を切り替える切替手段と、
をさらに備える請求項5記載のプログラム実行システム。
Switching means for switching the decoding method of the decoding means;
The program execution system according to claim 5, further comprising:
前記切替手段は、復号化方式毎に個別に定められた復号化処理を実行するためのクラスをロードすることによって、前記復号化手段の復号化方式を切り替えることを特徴とする請求項6に記載のプログラム実行システム。   The said switching means switches the decoding system of the said decoding means by loading the class for performing the decoding process defined separately for every decoding system, The decoding system of Claim 6 characterized by the above-mentioned. Program execution system. 所定のプログラム言語で記述されたソースコードを変換した中間コードを解釈実行するための仮想マシンを備えるコンピュータに、
前記仮想マシンが取得する中間コードが暗号化されているか否かを検出するステップと、
前記取得した中間コードが暗号化されていないと検出されたとき、前記取得した中間コードを前記仮想マシンに渡すステップと、
前記取得した中間コードが暗号化されていると検出されたとき、前記取得した中間コードを復号化し、当該復号化されたものを前記仮想マシンに渡すステップと、
を実行させるためのプログラム。
A computer having a virtual machine for interpreting and executing intermediate code obtained by converting source code described in a predetermined programming language;
Detecting whether the intermediate code acquired by the virtual machine is encrypted;
Passing the acquired intermediate code to the virtual machine when it is detected that the acquired intermediate code is not encrypted;
When it is detected that the acquired intermediate code is encrypted, decrypting the acquired intermediate code and passing the decrypted one to the virtual machine;
A program for running
請求項1乃至4のいずれかに記載のプログラム実行方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the program execution method according to claim 1. 請求項1乃至4のいずれかに記載のプログラム実行方法をコンピュータに実行させるためのプログラム又は請求項8に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。

A program for causing a computer to execute the program execution method according to any one of claims 1 to 4, or a computer-readable recording medium on which the program according to claim 8 is recorded.

JP2005372736A 2005-12-26 2005-12-26 Information processing system and information processing method Pending JP2007172526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005372736A JP2007172526A (en) 2005-12-26 2005-12-26 Information processing system and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005372736A JP2007172526A (en) 2005-12-26 2005-12-26 Information processing system and information processing method

Publications (1)

Publication Number Publication Date
JP2007172526A true JP2007172526A (en) 2007-07-05

Family

ID=38298966

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005372736A Pending JP2007172526A (en) 2005-12-26 2005-12-26 Information processing system and information processing method

Country Status (1)

Country Link
JP (1) JP2007172526A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009134351A (en) * 2007-11-28 2009-06-18 Aplix Corp Program installation method, embedded system, mobile terminal, and program
CN102043932A (en) * 2010-12-31 2011-05-04 中国航空工业集团公司第六三一研究所 Method for preventing Java program from being decompiled
JP2018527664A (en) * 2015-08-10 2018-09-20 Line株式会社 System and method for protecting code in an application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08286904A (en) * 1995-02-14 1996-11-01 Fujitsu Ltd Method and system for ciphering/deciphering software
JPH10301772A (en) * 1997-04-30 1998-11-13 Sony Corp Information processor and method therefor and recording medium
JP2000132388A (en) * 1998-10-19 2000-05-12 Internatl Business Mach Corp <Ibm> Method and device for processing and distributing software component
WO2005096120A1 (en) * 2004-04-02 2005-10-13 Matsushita Electric Industrial Co., Ltd. Execution device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08286904A (en) * 1995-02-14 1996-11-01 Fujitsu Ltd Method and system for ciphering/deciphering software
JPH10301772A (en) * 1997-04-30 1998-11-13 Sony Corp Information processor and method therefor and recording medium
JP2000132388A (en) * 1998-10-19 2000-05-12 Internatl Business Mach Corp <Ibm> Method and device for processing and distributing software component
WO2005096120A1 (en) * 2004-04-02 2005-10-13 Matsushita Electric Industrial Co., Ltd. Execution device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009134351A (en) * 2007-11-28 2009-06-18 Aplix Corp Program installation method, embedded system, mobile terminal, and program
CN102043932A (en) * 2010-12-31 2011-05-04 中国航空工业集团公司第六三一研究所 Method for preventing Java program from being decompiled
JP2018527664A (en) * 2015-08-10 2018-09-20 Line株式会社 System and method for protecting code in an application

Similar Documents

Publication Publication Date Title
KR102433011B1 (en) Method of apk file protection, apk file protection system performing the same, and storage medium storing the same
JP5990654B2 (en) Application code obfuscation device and method
RU2620712C2 (en) Virtual machine device with driven key obfuscation and method
JP4850830B2 (en) Computer system and program generation apparatus
KR101216995B1 (en) A code encryption and decryption device against reverse engineering based on indexed table and the method thereof
CN107273723B (en) So file shell adding-based Android platform application software protection method
JP2007148575A (en) Program, method, and device for preparing protected execution program
EP3188063A1 (en) A build system
JP2009512087A (en) Encrypting program executable images
CN109598107B (en) Code conversion method and device based on application installation package file
WO2011134207A1 (en) Method for protecting software
JP2009302887A (en) Information security method and information security device
CN114547558B (en) Authorization method, authorization control device, equipment and medium
CN105095771A (en) Method and apparatus for protecting shared target file
JP4727366B2 (en) Information processing apparatus, information processing system, program, and recording medium
JP2005216027A (en) Encryption device, encryption system therewith, decryption device and semiconductor system therewith
JP6256781B2 (en) Management device for file security to protect the system
JP2007172526A (en) Information processing system and information processing method
KR101667774B1 (en) Apparatus and Method of Providing Security for Script Program
CN111639358B (en) Method and device for encrypting instruction and decrypting encrypted instruction
US6931634B2 (en) Encrypted compiler
JP2006344160A (en) Program conversion device, execution support device, method for them, and computer program for them
JP2011123229A (en) Program code encryption device and program
JP6215468B2 (en) Program protector
KR102177920B1 (en) Apparatus and method for packing original source code

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100906

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100908

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110106