JP2002132364A - Method for protecting program from internal analysis, computer readable recording medium and program distribution method - Google Patents

Method for protecting program from internal analysis, computer readable recording medium and program distribution method

Info

Publication number
JP2002132364A
JP2002132364A JP2000319723A JP2000319723A JP2002132364A JP 2002132364 A JP2002132364 A JP 2002132364A JP 2000319723 A JP2000319723 A JP 2000319723A JP 2000319723 A JP2000319723 A JP 2000319723A JP 2002132364 A JP2002132364 A JP 2002132364A
Authority
JP
Japan
Prior art keywords
code
program
virtual
encrypted
object code
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
JP2000319723A
Other languages
Japanese (ja)
Inventor
Yutaka Iizuka
豊 飯塚
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP2000319723A priority Critical patent/JP2002132364A/en
Publication of JP2002132364A publication Critical patent/JP2002132364A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide technique for protecting a program from an internal analysis. SOLUTION: This technique consists of a step in which a code for mounting a virtual machine for performing a virtual operation code is generated, a step in which the source code of the program is converted into a virtual object code composed of the virtual operation code, a step in which the virtual object code is enciphered and a step in which a code for decoding the enciphered virtual object code is generated.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムを内部
解析から保護する方法、コンピュータ読み取り可能な記
録媒体及びプログラムの配布方法に関するものである。
The present invention relates to a method for protecting a program from internal analysis, a computer-readable recording medium, and a method for distributing a program.

【0002】[0002]

【従来の技術】現在までに発売されているソフトウェア
のほとんどは、脆弱な保護技術しか実装しておらず、シ
ステムアナライズ攻撃にとても弱い。クラッカーによっ
て簡単に解析され、ユーザ認証部分を回避され、あるい
はアルゴリズムの解析によりユーザ認証のキーを生成す
るキーメーカーが開発され、インターネット上で流通し
ているのが実状だ。特別なアルゴリズムが競合他社によ
りリバースエンジニアリングにかけられることも多い。
また、サーバに外部から進入された場合には、データは
もちろんプログラム内部で行っている処理も解析されて
しまう可能性が高い。
2. Description of the Related Art Most of the software released to date has implemented only weak protection technology, and is very vulnerable to a system analysis attack. A key maker that can be easily analyzed by crackers to bypass the user authentication part, or to generate a user authentication key by analyzing an algorithm, has been developed and distributed on the Internet. Special algorithms are often reverse engineered by competitors.
Also, when the server enters the server from the outside, it is highly possible that not only the data but also the processing performed inside the program is analyzed.

【0003】とくに暗号を生成するソフトウェアの場合
は、いかに暗号が強固でも、プログラムが解析され鍵を
取り出されてしまっては全く意味がなくなってしまう。
データの暗号化に用いているアルゴリズムも万難を排し
て隠蔽しておくべきである。特に電子商取引に関しては
この安全性が要求される。
[0003] In particular, in the case of software for generating encryption, no matter how strong the encryption is, if the program is analyzed and the key is taken out, it becomes completely meaningless.
The algorithm used to encrypt the data should also be concealed without any hassle. In particular, this security is required for electronic commerce.

【0004】このソフトウェアに対して、内部解析や改
変に対する耐性を備える技術がタンパ・レジスタント・
ソフトウェア技術(tamper resistant software)であ
る。タンパ・レジスタントとは、機密プログラム部分そ
のものを暗号化してしまう技術である。もちろん、一般
のアプリケーションソフトウェアの機密部分を暗号化す
ることも可能である。
[0004] A technology that is resistant to internal analysis and alteration of this software is a tamper-resistant technology.
Software technology (tamper resistant software). Tamper resistant is a technique for encrypting a confidential program part itself. Of course, it is also possible to encrypt a confidential part of general application software.

【0005】[0005]

【発明が解決しようとする課題】現状では、タンパ・レ
ジスタント・ソフトウェア技術、即ち、プログラムの不
正な解析を防止する技術に関する研究は進んでおらず、
ソフトウェア会社はおおむね以下のような方法で自己防
衛を行っている。
At present, research on tamper resistant software technology, that is, technology for preventing unauthorized analysis of programs, has not been advanced.
Software companies generally defend themselves in the following ways:

【0006】先ず、ターゲットプログラム内の秘密要素
を隠すという方法がある。即ち、プログラムの重要な要
素の部分を、細かく分割してプログラム内に分散してそ
の存在を発見しにくくする方法である。又、プログラム
だけでなくシステムメモリについても同様に分散化す
る。この場合、既存の開発言語だけで、個々のプログラ
マが容易に実装できるという利点がある。
First, there is a method of hiding a secret element in a target program. In other words, this is a method in which an important element portion of a program is finely divided and dispersed in the program to make it difficult to find its existence. Further, not only programs but also system memories are similarly distributed. In this case, there is an advantage that each programmer can easily implement the program using only the existing development language.

【0007】しかし、リバースエンジニアリング用のソ
フトウェアやソフトウェアICE(プログラムの内部動作
を解析するためのソフトウェア)により、隠匿していた
プログラム部分が表に出やすい。事実、流通しているほ
とんどのパッケージソフトウェアは解析されている。こ
の方法では、十分な保護はできない。
However, the concealed program portion is likely to be exposed by software for reverse engineering or software ICE (software for analyzing the internal operation of the program). In fact, most package software on the market has been analyzed. This method does not provide sufficient protection.

【0008】次に、ターゲットプログラム内の処理をわ
かりにくくするという方法がある。即ち、プログラムだ
けでは実行順序が決定しないように工夫してソフトウェ
アを構築する。
Next, there is a method of making the processing in the target program difficult to understand. That is, the software is constructed so that the execution order is not determined only by the program.

【0009】たとえば、実行時にコンピュータの時計機
能を利用して、その時間によって動作アルゴリズムを変
更するなどの方法がある。また、自己改造機能(Self M
odifying)あるいは自己暗号解読機能(Self Decryptin
g)による方法も取られる。これはプログラム自身を実
行時に書き換えながら動作させる仕組みである。特に後
者は暗号化されたプログラムを解読しながら自己を書き
換えて実行を行うため、きわめて解析が困難である。従
って、複雑な暗号化コードを施せば解析が極めて困難と
なる。
For example, there is a method of utilizing a clock function of a computer at the time of execution and changing an operation algorithm according to the time. In addition, self-modification function (Self M
odifying) or self-decryption function (Self Decryptin)
The method according to g) is also taken. This is a mechanism that operates while rewriting the program itself at the time of execution. In particular, the latter is extremely difficult to analyze because it rewrites itself and executes it while decrypting the encrypted program. Therefore, if a complicated encryption code is applied, the analysis becomes extremely difficult.

【0010】しかし、一般的な実装方法が提供されてい
ないため、プログラマが時間をかけて個別に対応してい
る。特に自己暗号解読機能を持ったソフトウェアは、構
築が難しく、そのために多大の労力を要する。実際に流
通しているソフトウェアで、この方法によって保護を行
っている例は極めて少ない。また、全体を暗号化してし
まうと実行速度の問題が発生するという問題もある。
[0010] However, since a general mounting method is not provided, a programmer individually takes time to cope. In particular, software having a self-decryption function is difficult to construct, and therefore requires a great deal of labor. There are very few examples of software that is actually distributed that uses this method for protection. There is also a problem that if the whole is encrypted, a problem of execution speed occurs.

【0011】更に、自己診断機能を持たせることによっ
て保護を行うというもある。即ち、自己プログラムの正
当性を常にチェックし、プログラムが改変されていた場
合には実行を行わないという処理を実装する。これは、
実装が簡単である。
Further, there is a case where protection is provided by providing a self-diagnosis function. That is, a process of always checking the validity of the self program and not executing the program if the program has been modified is implemented. this is,
Easy to implement.

【0012】しかし、この方法は、内部アルゴリズムの
隠匿に使用することはできない。従って、一旦、自己診
断機能の実装部分を解析されてしまうと、自己診断を行
っているルーチンを回避することによって、容易に、本
体部分を普通に実行させることができる。
However, this method cannot be used to conceal internal algorithms. Therefore, once the implementation of the self-diagnosis function is analyzed, the main body can be easily executed normally by avoiding the routine for performing the self-diagnosis.

【0013】最後に、ネットワークなどを通じてパッケ
ージソフトウェアを配布する手段として、プログラムの
含まれているアーカイブファイルそのものを暗号化する
手段が講じられる。ライセンスを持ったユーザしかアー
カイブを解いてプログラムを実行できない仕組みだが、
これには大きな問題がある。アーカイブを解いた状態で
は、通常のプログラムと変わりが無く、プログラムの内
部解析が自由に行えるということである。またさらに言
えば、アーカイブを解いた状態で配布すれば、ライセン
スがなくても実行できることとなる。
Finally, as means for distributing package software through a network or the like, means for encrypting the archive file itself containing the program is taken. It is a mechanism that only a licensed user can open the archive and execute the program,
This has a major problem. When the archive is unlocked, there is no difference from a normal program, and the internal analysis of the program can be freely performed. Furthermore, if the archive is distributed in an unpacked state, it can be executed without a license.

【0014】これを一歩発展させて、プログラム本体を
まるごと暗号化し、スタートアップルーチンで復号化を
行ってから実行する方法も考案されている。この場合
は、パッケージをまるごと暗号化する方法よりは安全性
が高いが、復号化を終わった段階でメモリ上に実行形式
が常駐してしまうため、ICE などの解析に対しては防衛
ができない。
A method has been devised which takes this one step further and encrypts the entire program body, decrypts it in a startup routine, and then executes it. In this case, although the security is higher than the method of encrypting the whole package, the executable is resident in the memory after the decryption is completed, so that it cannot defend against analysis such as ICE.

【0015】実際のパッケージソフトウェアは、ターゲ
ットプログラム内の秘密要素を隠すという最初の方法を
取っているものがほとんどである。発明者が過去に作成
したソフトウェア「AirCraft」は3万人以上のユーザを
持ち、22万ステップSという比較的大規模なプログラム
であったが、秘匿動作をその端々に分散させ、その部品
をマルチスレッド実行により協調動作を行いながら実行
するように開発をした。にもかかわらず、初期の版では
解析されてしまったのである。
[0015] Most of the actual package software takes the first method of hiding the secret element in the target program. The software "AirCraft" created in the past by the inventor was a relatively large program with more than 30,000 users and 220,000 steps S. Developed to execute while performing cooperative operation by thread execution. Nevertheless, it was parsed in earlier versions.

【0016】いかに細かく処理を分割しようとも、逆ア
センブルなどのリバースエンジニアリングに対抗するこ
とは不可能であることが分かった。そのほか、大量のパ
ッケージソフトウェアのクラック手法やパスワードがイ
ンターネット上に流れていることは、あらためて言うま
でもない。
It has been found that no matter how finely dividing the processing, it is impossible to counter reverse engineering such as disassembly. In addition, it goes without saying that a lot of cracking methods and passwords of package software are flowing on the Internet.

【0017】従って、本発明は、上述の如き従来の問題
点を解決するためになされたもので、その目的は、プロ
グラムを内部解析から保護する方法、コンピュータ読み
取り可能な記録媒体及び内部解析の困難なプログラムの
配布方法を提供することである。
Accordingly, the present invention has been made to solve the above-mentioned conventional problems, and has as its object to protect a program from internal analysis, a computer-readable recording medium, and difficulties in internal analysis. Is to provide a simple distribution method of the program.

【0018】[0018]

【課題を解決するための手段】本発明の請求項1は、仮
想オペレーションコードを実行する仮想機械を実装する
ためのコードを生成する段階と、プログラムのソースコ
ードを、前記仮想オペレーションコードからなる仮想オ
ブジェクトコードに変換する段階と、前記仮想オブジェ
クトコードを暗号化する段階と、前記暗号化仮想オブジ
ェクトコードを復号するコードを生成する段階とからな
るプログラムを内部解析から保護する方法を提供する。
A first aspect of the present invention is a step of generating code for implementing a virtual machine for executing a virtual operation code, and converting a source code of a program into a virtual operation code comprising the virtual operation code. A method is provided for protecting a program from internal analysis, comprising the steps of: converting an object code into an object code; encrypting the virtual object code; and generating a code for decrypting the encrypted virtual object code.

【0019】本発明の請求項2は、上記請求項1におい
て、前記プログラムは、高級言語で作成されていること
を特徴とするプログラムを内部解析から保護する方法を
提供する。
A second aspect of the present invention provides a method according to the first aspect, wherein the program is created in a high-level language, and the program is protected from internal analysis.

【0020】本発明の請求項3は、上記請求項2におい
て、暗号化された前記仮想オブジェクトコードは、前記
仮想機械を実装するためのコード及び前記暗号化仮想オ
ブジェクトコードを復号するコードと、実オブジェクト
コードとして静的にリンクされることを特徴とするプロ
グラムを内部解析から保護する方法を提供する。
According to a third aspect of the present invention, in the second aspect, the encrypted virtual object code includes a code for mounting the virtual machine and a code for decrypting the encrypted virtual object code. A method is provided for protecting a program that is statically linked as object code from internal analysis.

【0021】本発明の請求項4は、上記請求項2におい
て、前記仮想オペレーションコードからなる仮想オブジ
ェクトコードに変換されるソースコードとは別のソース
コードを、暗号化されていない非暗号化オブジェクトコ
ードに変換する段階と、前記暗号化仮想オブジェクトコ
ードと前記非暗号化オブジェクトコードをリンクする段
階を更に含むことを特徴とするプログラムを内部解析か
ら保護する方法を提供する。
According to a fourth aspect of the present invention, in the second aspect, a non-encrypted non-encrypted object code is used as a source code different from a source code to be converted into a virtual object code comprising the virtual operation code. And protecting the program from internal analysis, further comprising the steps of: linking the encrypted virtual object code and the non-encrypted object code.

【0022】本発明の請求項5は、上記請求項2におい
て、前記非暗号化オブジェクトコードは、ネイティブコ
ードからなることを特徴とするプログラムを内部解析か
ら保護する方法を提供する。
According to a fifth aspect of the present invention, there is provided a method for protecting a program from internal analysis, wherein the non-encrypted object code comprises a native code.

【0023】本発明の請求項6は、上記請求項2におい
て、前記暗号化仮想オブジェクトコードを復号するコー
ドは、前記仮想オペレーションコードによって実装され
ていることを特徴とするプログラムを内部解析から保護
する方法を提供する。
According to a sixth aspect of the present invention, in the second aspect, the code for decrypting the encrypted virtual object code protects a program characterized by being implemented by the virtual operation code from internal analysis. Provide a way.

【0024】本発明の請求項7は、仮想オペレーション
コードを実行する仮想機械を実装するためのコードと、
前記仮想オペレーションコードからなる仮想オブジェク
トコードを暗号化した暗号化仮想オブジェクトコード
と、前記暗号化仮想オブジェクトコードを復号するコー
ドからなる内部解析から保護されたプログラムを格納す
るコンピュータ読み取り可能な記録媒体を提供する。
According to a seventh aspect of the present invention, there is provided a code for implementing a virtual machine for executing a virtual operation code,
Provided is a computer-readable recording medium for storing an encrypted virtual object code obtained by encrypting a virtual object code composed of the virtual operation code, and a program protected from internal analysis composed of a code for decrypting the encrypted virtual object code. I do.

【0025】本発明の請求項8は、内部解析から保護可
能な状態でプログラムを配布する方法であって、前記プ
ログラムは、仮想機械によって実行可能な仮想オペレー
ションコードからなる仮想オブジェクトコードを暗号化
した暗号化仮想オブジェクトコードで構成されているこ
とを特徴とするプログラムの配布方法を提供する。
[0025] The present invention relates to a method for distributing a program in a state capable of being protected from internal analysis, wherein the program is obtained by encrypting a virtual object code consisting of a virtual operation code executable by a virtual machine. A method for distributing a program characterized by comprising encrypted virtual object code is provided.

【0026】1つの様相によれば、本発明による暗号化
コード開発環境は、データではなく処理内容そのものを
暗号化するものといえる。このような技術や研究は、現
在のところまだほとんど手付かずの、いわば未踏分野で
ある。そして、実際の暗号化の典型的な手順の一例は以
下の通りである。
According to one aspect, the encryption code development environment according to the present invention can be said to encrypt not the data but the processing content itself. Such techniques and research are still largely untouched, so to speak, unexplored fields. An example of a typical procedure of actual encryption is as follows.

【0027】(i)暗号化したい処理をポータブルな言
語、例えば、ANSI C言語準拠で記述する。これは、プロ
グラムの全体でもよいし一部分だけでもよい。
(I) A process to be encrypted is described in a portable language, for example, an ANSI C language. This may be the whole program or only a part.

【0028】(ii)仮想Cコンパイラでコンパイルし、
仮想オペレーションコードによる仮想オブジェクトコー
ドを得る。
(Ii) Compiling with a virtual C compiler,
Obtain a virtual object code by a virtual operation code.

【0029】(iii)エンクリプタを用い、仮想オペレ
ーションコードを暗号化する。
(Iii) Encrypt the virtual operation code using the encryptor.

【0030】(iv)暗号化コードと暗号化コード実行環
境(仮想機械ライブラリ)を、仮想オブジェクトコード
ジェネレータを使って、目的のプラットホーム対応の仮
想オブジェクトコードに変換する。
(Iv) The encrypted code and the encrypted code execution environment (virtual machine library) are converted into virtual object code corresponding to the target platform by using a virtual object code generator.

【0031】(v)ほかのネイティブなプログラム部分
と一緒に仮想オブジェクトコードを目的のプラットホー
ムで使えるリンクエディタを使ってリンクし実行イメー
ジを得る。
(V) Link the virtual object code with other native program parts using a link editor that can be used on the target platform to obtain an execution image.

【0032】[0032]

【発明の実施の形態】先ず、本発明の実施例に係わるソ
フトウェア解析保護方法で保護されたソフトウェアを作
成するには、仮想機械を作成する必要がある。特に、こ
の仮想機械は、基本的に機種非依存に作成される。仮想
機械としては、Java仮想機械が良く知られている。これ
は、「バイト・コード」と呼ぶ中間コードからなる(Ja
va言語で作成した)プログラムを解釈して実行する仮想
的なコンピュータである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, to create software protected by the software analysis protection method according to the embodiment of the present invention, it is necessary to create a virtual machine. In particular, this virtual machine is basically created independent of the model. As the virtual machine, a Java virtual machine is well known. It consists of an intermediate code called "byte code" (Ja
A virtual computer that interprets and executes programs (created in va language).

【0033】本発明の仮想機械のコードを、より一般的
な用語として仮想オペレーションコードと呼ぶことにす
る。普通のコンピュータと仮想的なコンピュータの違い
の1つとして、機種非依存の仮想機械のオペレーション
セットが、機種依存部分に対応するOSの基本機能等の
ネイティブコードとリンクを行うための標準手続きを行
うためのオペレーションを含んでいる点がある。
The virtual machine code of the present invention will be referred to in more general terms as a virtual operation code. One of the differences between an ordinary computer and a virtual computer is that an operation set of a model-independent virtual machine performs a standard procedure for linking with a native code such as an OS basic function corresponding to the model-dependent part. There are points that include operations for.

【0034】Java仮想機械の場合には、仮想機械の命令
セット・アーキテクチャが公開されている上に、リバー
スエンジニアリングを考慮していない構成となってい
る。従って、そのままでは容易に解析が可能であり、実
際、逆コンパイラのような解析ユーティリティも開発さ
れている。本発明の好適な実施形態では、異なる仮想機
械が夫々の実行ファイルに含まれており、仮想機械自体
を非公開とすることにより、解析を困難としている。し
かし、仮想機械そのものは、従来の方法によって実装し
たものでも基本的に利用でき、発明の最も本質的な特徴
を構成するものではないので、その詳細を省略する。仮
想機械の実装の具体例の参考書としては、例えば、「Ti
m Lindholm and Frank Yellin, "The Java Virtual Mac
hine Specification," ADDISON-WESLEY (1996), ISBN 0
-201-63452-X」がある。
In the case of the Java virtual machine, the instruction set architecture of the virtual machine is disclosed, and the configuration does not consider reverse engineering. Therefore, analysis can be easily performed as it is, and in fact, analysis utilities such as decompilers have been developed. In a preferred embodiment of the present invention, different virtual machines are included in respective execution files, and the analysis is difficult by keeping the virtual machines themselves private. However, the virtual machine itself can be basically used even if it is mounted by a conventional method, and does not constitute the most essential feature of the present invention, so that the details are omitted. As a reference book of a specific example of the implementation of the virtual machine, for example, “Ti
m Lindholm and Frank Yellin, "The Java Virtual Mac
hine Specification, "ADDISON-WESLEY (1996), ISBN 0
-201-63452-X ".

【0035】尚、本件発明者が実装した仮想機械の仮想
オペレーションコードの一例を図2に示す。これは、Pa
scal P4 処理系を参考として定義され、一般的なスタッ
ク型のバイトコードオペレータに対応したものものであ
る。しかし、更にリバースエンジニアリングを考慮し
て、解析の困難な仮想オペレーションコードのセットを
作成すれば、よりリバースエンジニアリングに強いシス
テムが実現する。尚、これ仮想オペレーションコード
は、言語と独立に設計されるので、C/C++やBAS
ICなどの各言語の対応コンパイラを用意することが可
能である。本件発明者は、仮想Cコンパイラ・アセンブ
ラ・リンカを開発済みである。
FIG. 2 shows an example of the virtual operation code of the virtual machine implemented by the present inventor. This is Pa
It is defined with reference to the scal P4 processor, and corresponds to the general stack type bytecode operator. However, if a set of virtual operation codes that are difficult to analyze is created in consideration of reverse engineering, a system that is more resistant to reverse engineering is realized. Since the virtual operation code is designed independently of the language, C / C ++ or BAS
It is possible to prepare a compiler for each language such as an IC. The present inventor has already developed a virtual C compiler, assembler and linker.

【0036】本発明の仮想機械の仮想オペレーションコ
ードが、一般的な仮想オペレーションコードと大きく異
なる点は、それが1回限りのものでもかまわないという
点である。つまり、Java 仮想機械のように、多くのコ
ンパイラが開発、販売され、利用されている状況では、
仮想機械の仮想オペレーションコードを変更することは
混乱を招く。むしろ、不変であることが、多くのプラッ
トホームで、広く普及する要因となっている。
The virtual operation code of the virtual machine of the present invention is greatly different from a general virtual operation code in that the virtual operation code may be a one-time operation code. In other words, in situations where many compilers are developed, sold, and used, such as the Java Virtual Machine,
Changing the virtual operation code of a virtual machine is confusing. Rather, immutability is a prevalent factor on many platforms.

【0037】本発明では、仮想オペレーションコードを
変更してかまわない。むしろ、常に変えることが、機密
性において好ましい。具体的には、仮想オペレーション
と仮想オペレーションコードとの対応を、定義しなおす
だけでもよい。その場合、仮想機械を、再定義された仮
想オペレーションコードと共にコンパイルしなおせばよ
い。又、複数の仮想機械を作成しておき、コピー毎に、
別の仮想機械を利用してもよい。これにより、コードを
逆アセンブルするツールが現れても、被害は非常に限ら
れることになるし、逆アセンブルの意欲を抑えることに
もなる。
In the present invention, the virtual operation code may be changed. Rather, constantly changing is preferable in terms of confidentiality. Specifically, the correspondence between the virtual operation and the virtual operation code may be simply redefined. In that case, the virtual machine may be recompiled with the redefined virtual operation code. Also, create multiple virtual machines, and for each copy,
Another virtual machine may be used. Even if a tool for disassembling the code appears, the damage will be very limited and the willingness to disassemble will be suppressed.

【0038】つまり、あるバージョンでは 12h という
コードが足し算を意味するものであったとしても、別な
バージョンではジャンプ命令に変わっているといった形
である。その為には、仮想機械の実装を、仮想オペレー
ションコードの定義自体を簡単に入れ替えられるように
すればよい。又、後述する仮想オペレーションコードの
暗号を解読する部分の実装も、暗号キー部分を柔軟に再
定義可能な形とするとよい。
In other words, even if the code 12h means addition in one version, it is changed to a jump instruction in another version. For that purpose, the definition of the virtual operation code may be easily replaced in the implementation of the virtual machine. Also, the implementation of a portion for decrypting the encryption of the virtual operation code, which will be described later, may be such that the encryption key portion can be flexibly redefined.

【0039】以下、図面を用いて本発明の実施例をより
具体的に説明する。図1は、本発明の一実施例に係わる
ソフトウェア解析保護方法を説明するブロック図であ
る。尚、予め仮想機械及びその仮想機械上で実行可能な
ファイルを作成する為のパーサ、プリプロセッサ、コン
パイラ(仮想コンパイラ)、仮想リンクエディタといっ
た処理系は実装されているものとする。
Hereinafter, embodiments of the present invention will be described more specifically with reference to the drawings. FIG. 1 is a block diagram illustrating a software analysis protection method according to an embodiment of the present invention. It is assumed that a processing system such as a parser, a preprocessor, a compiler (virtual compiler), and a virtual link editor for creating a virtual machine and a file executable on the virtual machine is implemented in advance.

【0040】先ず、高級言語でソースコード1を作成す
る。高級言語としては、ポータブルなもの一般が利用可
能であるが、本件発明者はC言語の為の処理系(仮想C
コンパイラ、仮想アセンブラ等)の実装を行っている。
又、低級言語でソースコード1を作成することも可能で
ある。この場合は、仮想アセンブラのみを用いる。
First, source code 1 is created in a high-level language. As a high-level language, a general portable language can be used, but the present inventor has proposed a processing system (virtual C language) for C language.
Compiler, virtual assembler, etc.).
It is also possible to create the source code 1 in a low-level language. In this case, only the virtual assembler is used.

【0041】又、ここでのソースコード1は、全体のプ
ログラムを構成する要素(関数、ルーチンなど)の中
で、特に秘匿性の要求の高い部分、或いは全体のプログ
ラムを解析の上で要の部分のみをいう。具体的には、パ
スワード認証ルーチンなどがある。もちろん、プログラ
ムの規模や、将来の可能性としては、ソースコード全体
を扱うことも可能である。又、プログラムを構成する残
りの要素に関しては、後に説明するステップS4で扱わ
れるが、従来の開発手法によってコンパイルしておく。
この部分は、基本的に機種非依存である。
The source code 1 is a part of the entire program (functions, routines, etc.) which is required to be highly confidential or the whole program is analyzed. Refers only to the part. Specifically, there is a password authentication routine and the like. Of course, depending on the size of the program and its potential in the future, it is possible to handle the entire source code. The remaining elements constituting the program are handled in step S4 described later, but are compiled by a conventional development method.
This part is basically model independent.

【0042】そして、ステップS1では、このソースコ
ードを仮想コンパイラによってコンパイルして、仮想機
械の仮想オブジェクトコード、即ち仮想機械の仮想オペ
レーションコードからなる実行コード3を得る。この明
細書では、これを仮想オブジェクトコードと呼ぶ。これ
に対して、実際のコンピュータのオペレーションコード
からなるオブジェクトコードを、この明細書では、実オ
ブジェクトコードと呼ぶ。ステップS1も、基本的に機
種非依存である。
In step S1, the source code is compiled by a virtual compiler to obtain an execution code 3 including a virtual object code of the virtual machine, that is, a virtual operation code of the virtual machine. In this specification, this is called a virtual object code. On the other hand, an object code including an actual computer operation code is referred to as a real object code in this specification. Step S1 is also basically model-independent.

【0043】次に、ステップS2では、この仮想オブジ
ェクトコード3をエンクリプタで暗号化して、暗号化仮
想オブジェクトコード5を得る。このエンクリプタは、
一般的な暗号アルゴリズムによって実装されたものでよ
い。例えばDESやFEALといった秘密鍵暗号方式
や、素因数分解やだ円曲線等を利用した公開鍵暗号法、
或いは両者を組み合わせて利用してもよい。この部分
も、基本的に機種非依存である。
Next, in step S2, the virtual object code 3 is encrypted with an encryptor to obtain an encrypted virtual object code 5. This encryptor
It may be implemented by a general encryption algorithm. For example, a secret key cryptosystem such as DES or FEAL, a public key cryptosystem using prime factorization or an elliptic curve,
Alternatively, both may be used in combination. This part is also basically model independent.

【0044】尚、コンパイラとエンクリプタを統合し
て、ステップS1とステップS2を同時に行うことも可
能である。しかし、コンパイラとエンクリプタを分離す
ることで、暗号化手法のバージョンアップが容易とな
る。また、フロントエンドのコンパイラも、BASIC
コンパイラなど多言語への対応が迅速に行える。
Steps S1 and S2 can be performed simultaneously by integrating the compiler and the encryptor. However, separating the compiler and the encryptor makes it easy to upgrade the encryption method. Also, the front end compiler is BASIC
Quick support for multiple languages such as compilers

【0045】ここで、ステップS2は、処理系の中でポ
ストオプティマイザの位置に、バックエンドとして用意
されたエンクリプタによって行われるので、プログラマ
は、特に暗号化を意識する必要が無い。
Here, step S2 is performed by an encryptor prepared as a back end at the position of the post-optimizer in the processing system, so that the programmer does not need to be particularly conscious of encryption.

【0046】次に、ステップS3では、この暗号化仮想
オブジェクトコード5を、仮想機械ライブラリ(VMラ
イブラリ)及び復号ルーチン・ライブラリ7とリンクし
て、暗号化仮想オブジェクトコードを含んだ実オブジェ
クトコード9を得る。ここで、復号ルーチン・ライブラ
リは、前述のエンクリプタと対を成すもので、エンクリ
プタで暗号化したものを復号するためのユーティリティ
・ライブラリである。又、ここでの実オブジェクトコー
ド9とは、暗号化仮想オブジェクトコード5を含み、ネ
イティブな環境で実行でき、それによって仮想機械を構
築すると共に復号し、その仮想機械上で暗号化仮想オブ
ジェクトコード5を実行するものである。この部分は、
一般に機種依存である。
Next, in step S3, the encrypted virtual object code 5 is linked with the virtual machine library (VM library) and the decryption routine library 7, and the real object code 9 including the encrypted virtual object code is linked. obtain. Here, the decryption routine library forms a pair with the above-described encryptor, and is a utility library for decrypting the content encrypted by the encryptor. The real object code 9 includes the encrypted virtual object code 5 and can be executed in a native environment, thereby constructing and decrypting a virtual machine, and executing the encrypted virtual object code 5 on the virtual machine. Is to execute. This part
Generally, it depends on the model.

【0047】次に、ステップS4では、プログラムを構
成する残りの要素に関する実オブジェクトコード及びそ
の他の必要なライブラリ11とリンクして、目的のプロ
グラム13を得る。ここで、プログラム13は、一般的
なアプリケーションでもよいが、それ以外にも、リンク
されて実行可能であれば、直接実行できないライブラリ
やその他のプログラム部品でもよい。この部分は、一般
に機種依存であり、既存の開発ツールをそのまま利用で
きる。
Next, in step S4, the target program 13 is obtained by linking with the actual object code relating to the remaining elements constituting the program and other necessary libraries 11. Here, the program 13 may be a general application, but may be a library or another program component that cannot be directly executed if it is linked and executable. This part is generally model-dependent, and existing development tools can be used as they are.

【0048】以上のようにして、プログラムに本発明の
実施例に係わるソフトウェア解析保護方法を実装するこ
とができる。このプログラムは、FDやCD−ROM等
の記録装置に記録された状態で配布される。又は、ネッ
トワークを介して、ユーザーのコンピュータにダウンロ
ードされる。そして、例えば、以下のようにして単独で
実行できる。
As described above, the software analysis protection method according to the embodiment of the present invention can be implemented in a program. This program is distributed while being recorded on a recording device such as an FD or a CD-ROM. Alternatively, it is downloaded to a user's computer via a network. Then, for example, it can be executed alone as follows.

【0049】先ず、OSのローダー等が、通常の実行フ
ァイルとして、上記プログラムをメモリにロードする。
そして、通常のスタートアップルーチンが実行される。
一連の初期化処理などがすむと、本体の実行に移る。実
オブジェクトコードは、通常のプロセスで行われる。暗
号化仮想オブジェクトコードを実行するには、そのエン
トリポイントに移る前に、仮想機械を構築しておくと共
に、復号ルーチンを実行可能に準備しておく必要があ
る。
First, an OS loader or the like loads the above program into a memory as a normal execution file.
Then, a normal startup routine is executed.
After a series of initialization processing and the like, the processing moves to the execution of the main body. The actual object code is performed in a normal process. In order to execute the encrypted virtual object code, it is necessary to construct a virtual machine and prepare a decryption routine to be executable before moving to the entry point.

【0050】そのメモリモデルを図3に示す。先ず、暗
号化仮想オブジェクトコードを実行するには、そのエン
トリポイントを引数として、復号ルーチン・ライブラリ
を呼び出す(11)。復号ルーチンは、エントリポイン
ト以降の暗号化仮想オブジェクトコードを復号して、メ
モリの空いている領域に展開する(13)。展開を終え
ると、今度は、復号された仮想オブジェクトコードのエ
ントリポイントを引数として仮想機械を呼び出す(1
5)。仮想機械は、仮想オブジェクトコードを実行して
から(17)、制御を戻す(19)。ここでは、仮想オ
ブジェクトコードは、常に暗号化されているので、復号
ルーチンを仮想機械の一部と考えることができる。
FIG. 3 shows the memory model. First, to execute the encrypted virtual object code, a decryption routine library is called using the entry point as an argument (11). The decryption routine decrypts the encrypted virtual object code after the entry point and expands it into an empty area of the memory (13). When the development is completed, the virtual machine is called with the entry point of the decrypted virtual object code as an argument (1).
5). After executing the virtual object code (17), the virtual machine returns control (19). Here, since the virtual object code is always encrypted, the decryption routine can be considered as a part of the virtual machine.

【0051】本発明で最も重要なのは仮想オペレーショ
ンコードの暗号化である。通常のコンパイラや CPU コ
ードでは、暗号化には限界がある。それは、復号するプ
ログラムそのものも同じ CPU コードで書かれているた
め、それが解析されるとすべてが解読されてしまうから
である。
The most important thing in the present invention is the encryption of the virtual operation code. With ordinary compilers and CPU code, encryption has its limits. This is because the decryption program itself is also written in the same CPU code, and when it is analyzed, everything is decrypted.

【0052】本発明による保護では、仮想オペレーショ
ンコードをさらに暗号化している。これは、処理系の中
でポストオプティマイザの位置にバックエンドとして用
意されたエンクリプタによって行われるので、プログラ
マは、特に暗号化を意識する必要が無い。
In the protection according to the present invention, the virtual operation code is further encrypted. This is performed by an encryptor prepared as a back end at the position of the post-optimizer in the processing system, so that the programmer does not need to be particularly aware of encryption.

【0053】暗号化の方法は重要である。以下に、暗号
化の具体例を説明する。ここでは、実装の容易な順にレ
ベル1からレベル3まで以下で説明する。先ず、レベル
1から実装し、徐々にレベルを上げてゆくことで巧妙に
なる海賊行為に対処できる。
The method of encryption is important. Hereinafter, a specific example of the encryption will be described. Here, description will be made below from level 1 to level 3 in the order of easy mounting. The first step is to start with level 1 and then gradually increase the level to deal with more sophisticated piracy.

【0054】先ず、レベル1を説明する。ここでは、c
= a + b; という簡単な文の暗号化を例に取る。
First, level 1 will be described. Where c
Take the example of encrypting a simple sentence = a + b;

【0055】 生の状態; -> 暗号化状態 push a; decode 23 push b; dfxdasf add; fdafds2aa store c; dafadf2 生の状態とは、仮想機械のコードそのものである。仮想
オペレーションコードの再定義によって、このままでも
解析は難しくなるが、根気良く調べていけばいずれ解読
が可能である。
Raw state;-> Encrypted state push a; decode 23 push b; dfxdasf add; fdafds2aa store c; dafadf2 The raw state is the code of the virtual machine itself. Although the analysis becomes difficult even as it is by redefining the virtual operation code, it can be deciphered as long as you examine it patiently.

【0056】そこで、仮想機械にdecode という特殊な
オペレーションコードを定義して、ブロック単位で復号
を行いながら実行する方法を考案した。上の例では、de
code23 命令の次には 23 バイトの暗号化されたブロッ
クが続くことを意味する。23バイト先読みして復号化を
行い、実行を行うことになる。復号化されたプログラム
は、暗号化されていないプログラムとは別のメモリ空間
で実行される。
Therefore, a method has been devised in which a special operation code called "decode" is defined in the virtual machine, and the decoding is performed while decoding is performed in block units. In the above example, de
The code23 instruction is followed by a 23-byte encrypted block. 23 bytes are read ahead, decoded, and executed. The decrypted program is executed in a different memory space from the unencrypted program.

【0057】ここで、別のメモリ空間とは、仮想機械上
のメモリ空間であり実際のリニアアドレスとは容易に対
応が取れないアドレスである。これにより、解読が更に
困難となる。したがって jump などで参照される暗号化
されていないプログラムのラベルは、オリジナルのプロ
グラムのメモリ空間での位置を利用することになる。こ
こでの、暗号化アルゴリズムとしては、例えば、単純な
剰余法を用いる。プログラムのヘッダに鍵を埋め込む
か、あるいは実行時に外部から鍵を取得し、それを用い
て剰余法により復号を行う。
Here, another memory space is a memory space on the virtual machine, and is an address that cannot be easily corresponded to an actual linear address. This makes decryption even more difficult. Therefore, the label of an unencrypted program referred to by jump or the like uses the position in the memory space of the original program. Here, as the encryption algorithm, for example, a simple remainder method is used. The key is embedded in the header of the program, or a key is obtained from the outside at the time of execution, and decryption is performed using the key by the remainder method.

【0058】ここでは、復号ルーチンがネイティブな C
PU コードで書かれている。また、メモリ内に復号され
たプログラムが残っているので、これをもとに復号ルー
チンを解析されてしまう可能性が若干あるかもしれな
い。
In this case, the decoding routine is performed in a native C
Written in PU code. In addition, since the decrypted program remains in the memory, there is a possibility that the decryption routine may be analyzed based on the program.

【0059】レベル2の暗号化コードでは、復号ルーチ
ンそのものも仮想オペレーションコードで書くことで解
析をより困難にする。コード出力の段階で、通常のオブ
ジェクトと一緒に復号ルーチンのオブジェクトも出力す
る。この場合、図3では、仮想機械が復号ルーチンを実
行することになる。
In the level 2 encrypted code, the analysis is made more difficult by writing the decryption routine itself as a virtual operation code. At the code output stage, the object of the decoding routine is output together with the normal object. In this case, in FIG. 3, the virtual machine executes the decryption routine.

【0060】この方法の利点は、まず復号ルーチンが仮
想オペレーションコードで書かれているため、既存の逆
アセンブラなどにより解析されにくい点である。また、
エンコード・復号が動的に変更すること、即ち、個々の
プログラムごとに組み込む暗号化アルゴリズムを変更す
ることで防御を強めることができる。
The advantage of this method is that the decoding routine is first written in a virtual operation code, so that it is difficult to be analyzed by an existing disassembler or the like. Also,
The protection can be strengthened by dynamically changing the encoding / decoding, that is, by changing the encryption algorithm incorporated in each program.

【0061】この場合、暗号化コード・レベル1に比較
して、動作が遅くなる可能性がある。ただし、基本的に
全プログラムを暗号化するのではなく、機密性の高い処
理のみ暗号化するので、動作の低下よりメリットの方が
大きいと考える。また、コンピュータの処理速度は年々
急ピッチで高速化されているため、デメリットは解消さ
れつつある。
In this case, the operation may be slower than the encryption code level 1. However, basically, not all programs are encrypted, but only highly confidential processes are encrypted. Therefore, it is considered that the merit is greater than the reduction in operation. In addition, since the processing speed of computers is increasing at a rapid pace every year, disadvantages are being resolved.

【0062】レベル2の暗号化コードでも、復号された
コードがメモリに残ってしまうために不都合が発生す
る。そこで、レベル3ではメモリ上に展開されたコード
を随時消去しながら実行する方法を取る。或いは、メモ
リ上に展開されたコードのアドレスを、適宜変換しなが
ら実行する方法を取る。
Even with the encrypted code of level 2, a problem occurs because the decrypted code remains in the memory. Therefore, in level 3, a method of executing the code developed on the memory while erasing it as needed is adopted. Alternatively, a method is used in which the addresses of the code expanded on the memory are executed while being appropriately converted.

【0063】常に一箇所に常駐するブロックは最小限と
し、適宜クリア又はアドレス移動しながら暗号化コード
を実行していくことで、機密性を高める。復号処理につ
いても同様にクリア又はアドレス移動しながら実行する
ことで、さらに機密性が高まる。
The confidentiality is enhanced by minimizing the blocks that always reside in one place and executing the encryption code while clearing or moving the address as appropriate. Similarly, by executing the decryption process while clearing or moving the address, the confidentiality is further enhanced.

【0064】又、本発明の実施例に係わるソフトウェア
解析保護方法において、機密処理の分散を行って、更に
高い機密性を付与することができる。単一のプログラム
進行ではどうしてもセキュリティが甘くなるため、複数
の仮想機械を並列で実行する。それぞれの仮想機械の間
で互いに通信する手段を用意し、並列で暗号化コードを
実行する方法である。
Further, in the software analysis protection method according to the embodiment of the present invention, confidentiality processing can be distributed to provide higher confidentiality. Since a single program progresses inevitably weakens security, multiple virtual machines are executed in parallel. This is a method of preparing means for communicating with each other between the virtual machines and executing the encryption code in parallel.

【0065】ただし並列で処理する場合は、プログラマ
が明示的にプログラムを分割し、それぞれ同期を取るよ
うに開発をする必要がある。従って、プログラマへの負
担が若干増加する。この手法は、レベル3よりも高い機
密性を保持する必要がある場合に用いる。
However, when processing is performed in parallel, it is necessary for the programmer to explicitly divide the program and develop the programs so that they are synchronized. Therefore, the burden on the programmer is slightly increased. This technique is used when confidentiality higher than level 3 needs to be maintained.

【0066】一例を示す。たとえば、 d = (a*127 + b)*(c + 2) という処理を例に取る。この処理を分割し、プログラム
1では a*127+b のみ計算する。プログラム2では、c+2
のみ計算する。プログラム3はプログラム1とプログ
ラム2の終了を待機し、終了後に得られた値で乗算を行
う。プログラム4は、d のアドレスを用意した上でプロ
グラム3の終了を待機し、終了後に d のアドレスへ得
られた値を保存する。
An example will be described. For example, take the processing of d = (a * 127 + b) * (c + 2). This processing is divided, and program 1 calculates only a * 127 + b. In program 2, c + 2
Only calculate. Program 3 waits for the end of program 1 and program 2 and performs multiplication with the value obtained after the end. The program 4 prepares the address of d, waits for the end of the program 3, and stores the obtained value in the address of d after the end.

【0067】この例は単純化しているがが、同期を取る
プログラムをより大規模に展開をし、また関係のない処
理を同時に走らせて(たとえば式を変形して (a*127+b+
e)*(c+2) - e*c - e*2 という形とし、ダミーの e を
挟み込ませるとともに、e を利用した別なプログラムを
同時に走らせて混乱させる)機密性を高める方法でかな
りの効果が期待される。
Although this example is simplified, a program for synchronizing is expanded on a larger scale, and irrelevant processing is executed at the same time (for example, by transforming the expression (a * 127 + b +
e) * (c + 2)-e * c-e * 2, and insert a dummy e, and run another program that uses e at the same time to confuse it.) The effect is expected.

【0068】更に、並列処理をサポートした言語のコー
ド出力の手法を取り入れることにより、機密処理の分散
を自動的に行えば、プログラマへの負担が軽減される。
Further, by introducing a method of outputting a code of a language that supports parallel processing, if the confidential processing is automatically distributed, the burden on the programmer can be reduced.

【0069】以上の実施例では、仮想機械と復号ルーチ
ンは共にプログラムに予め組み込まれている。しかし、
本発明の最も基本的な思想においては、仮想機械と復号
ルーチンの一方又は双方を、ダイナミックとしてもよ
い。
In the above embodiment, both the virtual machine and the decryption routine are incorporated in the program in advance. But,
In the most basic idea of the present invention, one or both of the virtual machine and the decoding routine may be dynamic.

【0070】次に、本発明の実施例に係わるプログラム
配布サーバを説明する。現状では、市販ソフトは、FD
やCD−ROM等のディスクによって有料のパッケージ
ソフトウエアとして配布されるが、年々インターネット
等のオープンなコンピュータネットワークを介して配布
される率が高まっている。そして、限定的な試用を認
め、パスワードによって正規の使用を許可するという形
態をとることが一般的となっている。
Next, a program distribution server according to an embodiment of the present invention will be described. Currently, commercial software is FD
The software is distributed as paid package software on disks such as CD-ROMs and CD-ROMs, but the rate of distribution via open computer networks such as the Internet is increasing year by year. It is common practice to accept limited trial use and to allow regular use with a password.

【0071】この場合の問題点は、誰でも簡単にプログ
ラム本体を入手できるという点である。そして、腕に覚
えのあるものが、気軽に内部解析を行ってしまいネット
ワークでそれを公開してしまう。
The problem in this case is that anyone can easily obtain the program body. Then, those who have the skills to remember will easily perform internal analysis and publish it on the network.

【0072】本発明の実施例に係わるプログラム配布方
法では、配布するプログラムに上記のような内部解析保
護方法を施してから、インターネットに接続したプログ
ラム配布サーバに格納しておく。不特定多数のユーザー
が、インターネットを介して、そのプログラムをダウン
ロードし実行できる。しかし、プログラムの内部解析
は、上記の通り、ほぼ不可能となっている。
In the program distribution method according to the embodiment of the present invention, a program to be distributed is subjected to the above-described internal analysis protection method, and then stored in a program distribution server connected to the Internet. An unspecified number of users can download and execute the program via the Internet. However, internal analysis of a program is almost impossible as described above.

【0073】このようにすることによって、コンピュー
タネットワークから自由にダウンロード可能な状態にプ
ログラム配布サーバを設置しておいても、内部解析から
プログラムを保護することができる。
By doing so, the program can be protected from internal analysis even if the program distribution server is installed in a state where it can be freely downloaded from the computer network.

【0074】以上、本発明を実施例により詳細に説明し
たが、当業者にとっては、本発明が本願中に説明した実
施例に限定されるものではないということは明らかであ
る。本発明の装置は、特許請求の範囲の記載により定ま
る本発明の趣旨及び範囲を逸脱することなく修正及び変
更態様として実施することができる。従って、本願の記
載は、例示説明を目的とするものであり、本発明に対し
て何ら制限的な意味を有するものではない。
Although the present invention has been described in detail with reference to the embodiments, it is apparent to those skilled in the art that the present invention is not limited to the embodiments described in the present application. The device of the present invention can be embodied as modifications and alterations without departing from the spirit and scope of the present invention defined by the claims. Therefore, the description of the present application is intended for illustrative purposes, and has no restrictive meaning to the present invention.

【0075】[0075]

【発明の効果】発明者は過去に開発した「Program of t
he air」の技術をベースとし、仮想Cコンパイラを用い
て秘匿処理(および処理のかなめとなるメイン処理の一
部)を仮想オペレーションコード化し、仮想機械とその
コードを「AirCraft」内に埋め込んで実験を行った。そ
の結果、それ以降クラックされることはなくなった。実
験前はリリース後1ヶ月以内に解読されていたのが、現
在までのところ1年半以上解読されずにいる。
According to the present invention, the inventor has developed "Program of t
Based on the technology of "he air", concealment processing (and part of the main processing that is the key to the processing) is converted to virtual operation code using a virtual C compiler, and the virtual machine and its code are embedded in "AirCraft" and tested. Was done. As a result, it was no longer cracked. Before the experiment, it was decrypted within one month after release, but so far it has not been decrypted for more than one and a half years.

【0076】仮想機械を利用する場合には独自のコード
体系を取れるためにそれだけで解析の危険性から逃れる
ことが可能である。既存の逆アセンブラなどのリバース
エンジニアリング用ソフトウェアは、一般に普及してい
る Intel 製などの CPU のインストラクションセットに
対応したものであり、ユーザが勝手に決めた特殊な仮想
オペレーションコードを逆アセンブルできないからであ
る。
In the case of using a virtual machine, it is possible to avoid the risk of analysis by itself because a unique code system can be obtained. This is because existing reverse-engineering software such as disassembler is compatible with the widely used instruction set of CPUs such as those made by Intel, and cannot disassemble special virtual operation codes determined by the user. .

【0077】しかし、過去に、発明者が非常にシンプル
な仮想オペレーションコードを定義し使用したが、結
局、このコードを解読された経験がある。仮想オペレー
ションコードを解読困難なものとすれば、かなりの効果
があることは明らかであるものの、更なる工夫があれば
より安全である。
However, in the past, the inventor has defined and used a very simple virtual operation code, but in the end, has experienced decoding this code. If it is difficult to decipher the virtual operation code, it is clear that there is a considerable effect, but it is safer if further measures are taken.

【0078】本発明では、プログラムを仮想オペレーシ
ョンコード化した上に、更にこの仮想オペレーションコ
ードを暗号化しているので、解読は極めて困難となるこ
とは明らかである。更に、仮想オペレーションコードを
その都度変更すれば、よほどの時間と労力をかけない限
り、解読はほぼ不可能といってよい。
In the present invention, since the program is converted into a virtual operation code and the virtual operation code is further encrypted, it is clear that decryption becomes extremely difficult. Furthermore, if the virtual operation code is changed each time, it can be said that decryption is almost impossible without much time and effort.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例に係わるソフトウェア解析保
護方法を説明するブロック図である。
FIG. 1 is a block diagram illustrating a software analysis protection method according to an embodiment of the present invention.

【図2】本発明による本発明の実施例に係わるソフトウ
ェア解析保護方法で利用される仮想機械の仮想オペレー
ションコードの一例を示す図である。
FIG. 2 is a diagram illustrating an example of a virtual operation code of a virtual machine used in a software analysis protection method according to an embodiment of the present invention.

【図3】本発明による本発明の実施例に係わるソフトウ
ェア解析保護方法を施したプログラムのメモリモデルを
示す図である。
FIG. 3 is a diagram showing a memory model of a program to which a software analysis protection method according to an embodiment of the present invention is applied.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 仮想オペレーションコードを実行する仮
想機械を実装するためのコードを生成する段階と、プロ
グラムのソースコードを、前記仮想オペレーションコー
ドからなる仮想オブジェクトコードに変換する段階と、
前記仮想オブジェクトコードを暗号化する段階と、前記
暗号化仮想オブジェクトコードを復号するコードを生成
する段階とからなるプログラムを内部解析から保護する
方法。
Generating a code for implementing a virtual machine that executes a virtual operation code; converting a source code of a program into a virtual object code including the virtual operation code;
A method of protecting a program from internal analysis, comprising: encrypting the virtual object code; and generating a code for decrypting the encrypted virtual object code.
【請求項2】 前記プログラムは、高級言語で作成され
ていることを特徴とする請求項1に記載のプログラムを
内部解析から保護する方法。
2. The method according to claim 1, wherein the program is created in a high-level language.
【請求項3】 暗号化された前記仮想オブジェクトコー
ドは、前記仮想機械を実装するためのコード及び前記暗
号化仮想オブジェクトコードを復号するコードと、実オ
ブジェクトコードとして静的にリンクされることを特徴
とする請求項2に記載のプログラムを内部解析から保護
する方法。
3. The encrypted virtual object code is statically linked as a real object code with a code for implementing the virtual machine and a code for decrypting the encrypted virtual object code. A method for protecting a program according to claim 2 from internal analysis.
【請求項4】 前記仮想オペレーションコードからなる
仮想オブジェクトコードに変換されるソースコードとは
別のソースコードを、暗号化されていない非暗号化オブ
ジェクトコードに変換する段階と、前記暗号化仮想オブ
ジェクトコードと前記非暗号化オブジェクトコードをリ
ンクする段階を更に含むことを特徴とする請求項2に記
載のプログラムを内部解析から保護する方法。
4. A step of converting a source code different from a source code to be converted into a virtual object code including the virtual operation code into an unencrypted non-encrypted object code; 3. The method of claim 2, further comprising linking the non-encrypted object code with the non-encrypted object code.
【請求項5】 前記非暗号化オブジェクトコードは、ネ
イティブコードからなることを特徴とする請求項2に記
載のプログラムを内部解析から保護する方法。
5. The method according to claim 2, wherein the non-encrypted object code comprises a native code.
【請求項6】 前記暗号化仮想オブジェクトコードを復
号するコードは、前記仮想オペレーションコードによっ
て実装されていることを特徴とする請求項2に記載のプ
ログラムを内部解析から保護する方法。
6. The method according to claim 2, wherein the code for decrypting the encrypted virtual object code is implemented by the virtual operation code.
【請求項7】 仮想オペレーションコードを実行する仮
想機械を実装するためのコードと、前記仮想オペレーシ
ョンコードからなる仮想オブジェクトコードを暗号化し
た暗号化仮想オブジェクトコードと、前記暗号化仮想オ
ブジェクトコードを復号するコードからなる内部解析か
ら保護されたプログラムを格納するコンピュータ読み取
り可能な記録媒体。
7. A code for implementing a virtual machine that executes a virtual operation code, an encrypted virtual object code obtained by encrypting a virtual object code including the virtual operation code, and a decryption of the encrypted virtual object code. A computer-readable recording medium for storing a program protected from internal analysis consisting of codes.
【請求項8】 内部解析から保護可能な状態でプログラ
ムを配布する方法であって、前記プログラムは、仮想機
械によって実行可能な仮想オペレーションコードからな
る仮想オブジェクトコードを暗号化した暗号化仮想オブ
ジェクトコードで構成されていることを特徴とするプロ
グラムの配布方法。
8. A method for distributing a program in a state that can be protected from internal analysis, wherein the program is an encrypted virtual object code obtained by encrypting a virtual object code composed of a virtual operation code executable by a virtual machine. A method of distributing a program, characterized by being configured.
JP2000319723A 2000-10-19 2000-10-19 Method for protecting program from internal analysis, computer readable recording medium and program distribution method Pending JP2002132364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000319723A JP2002132364A (en) 2000-10-19 2000-10-19 Method for protecting program from internal analysis, computer readable recording medium and program distribution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000319723A JP2002132364A (en) 2000-10-19 2000-10-19 Method for protecting program from internal analysis, computer readable recording medium and program distribution method

Publications (1)

Publication Number Publication Date
JP2002132364A true JP2002132364A (en) 2002-05-10

Family

ID=18798133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000319723A Pending JP2002132364A (en) 2000-10-19 2000-10-19 Method for protecting program from internal analysis, computer readable recording medium and program distribution method

Country Status (1)

Country Link
JP (1) JP2002132364A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005071055A (en) * 2003-08-22 2005-03-17 Hyper Tec:Kk Encryption program decryption method and encryption program decryption program
WO2005098570A1 (en) * 2004-04-05 2005-10-20 Matsushita Electric Industrial Co., Ltd. Execution device
JP2007535761A (en) * 2004-04-30 2007-12-06 アップル インコーポレイテッド System and method for generating anti-tamper code
JP2008523480A (en) * 2004-12-06 2008-07-03 ギーゼッケ ウント デフリエント ゲーエムベーハー Generate load format program code and provide executable program code
JP2009271884A (en) * 2008-05-12 2009-11-19 Fuji Xerox Co Ltd Information processor and information processing program
JP2010217975A (en) * 2009-03-13 2010-09-30 Nec System Technologies Ltd Information processor, application program, and method for executing application program
JP2011221922A (en) * 2010-04-13 2011-11-04 Kddi Corp Self-modifying processor, self-modifying processing method and program
JP2013137646A (en) * 2011-12-28 2013-07-11 Nec System Technologies Ltd Program protection device, program protection method, and program
JP2013200831A (en) * 2012-03-26 2013-10-03 Fuji Xerox Co Ltd Program and program protection device
JP2013250739A (en) * 2012-05-31 2013-12-12 Fujitsu Ltd Information processor, information processing method and program
JP2015523635A (en) * 2012-05-25 2015-08-13 コーニンクレッカ フィリップス エヌ ヴェ Method, system and apparatus for protection against reverse engineering and / or tampering of programs
JP2018500679A (en) * 2014-12-16 2018-01-11 キンダイ、インコーポレイテッドKyndi, Inc. Computer instruction set, memory register, and method and apparatus for randomizing pointers

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03171231A (en) * 1989-11-30 1991-07-24 Toshiba Corp Micro computer system
JPH11112490A (en) * 1997-09-30 1999-04-23 Hitachi Software Eng Co Ltd Ciphering method
JPH11353172A (en) * 1998-06-08 1999-12-24 Sumitomo Electric Ind Ltd Recording medium for program described in interpreter language
JP2000132388A (en) * 1998-10-19 2000-05-12 Internatl Business Mach Corp <Ibm> Method and device for processing and distributing software component

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03171231A (en) * 1989-11-30 1991-07-24 Toshiba Corp Micro computer system
JPH11112490A (en) * 1997-09-30 1999-04-23 Hitachi Software Eng Co Ltd Ciphering method
JPH11353172A (en) * 1998-06-08 1999-12-24 Sumitomo Electric Ind Ltd Recording medium for program described in interpreter language
JP2000132388A (en) * 1998-10-19 2000-05-12 Internatl Business Mach Corp <Ibm> Method and device for processing and distributing software component

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4502359B2 (en) * 2003-08-22 2010-07-14 株式会社ハイパーテック Encryption program decryption method and encryption program decryption program
JP2005071055A (en) * 2003-08-22 2005-03-17 Hyper Tec:Kk Encryption program decryption method and encryption program decryption program
WO2005098570A1 (en) * 2004-04-05 2005-10-20 Matsushita Electric Industrial Co., Ltd. Execution device
JP2007535761A (en) * 2004-04-30 2007-12-06 アップル インコーポレイテッド System and method for generating anti-tamper code
JP2013041598A (en) * 2004-12-06 2013-02-28 Giesecke & Devrient Gmbh Program code generation method, program development system, portable data carrier, and program
US8332834B2 (en) 2004-12-06 2012-12-11 Giesecke & Devrient Gmbh Generation of a program code in a load format and provision of an executable program code
JP2008523480A (en) * 2004-12-06 2008-07-03 ギーゼッケ ウント デフリエント ゲーエムベーハー Generate load format program code and provide executable program code
JP2009271884A (en) * 2008-05-12 2009-11-19 Fuji Xerox Co Ltd Information processor and information processing program
JP2010217975A (en) * 2009-03-13 2010-09-30 Nec System Technologies Ltd Information processor, application program, and method for executing application program
JP2011221922A (en) * 2010-04-13 2011-11-04 Kddi Corp Self-modifying processor, self-modifying processing method and program
JP2013137646A (en) * 2011-12-28 2013-07-11 Nec System Technologies Ltd Program protection device, program protection method, and program
JP2013200831A (en) * 2012-03-26 2013-10-03 Fuji Xerox Co Ltd Program and program protection device
JP2015523635A (en) * 2012-05-25 2015-08-13 コーニンクレッカ フィリップス エヌ ヴェ Method, system and apparatus for protection against reverse engineering and / or tampering of programs
JP2013250739A (en) * 2012-05-31 2013-12-12 Fujitsu Ltd Information processor, information processing method and program
JP2018500679A (en) * 2014-12-16 2018-01-11 キンダイ、インコーポレイテッドKyndi, Inc. Computer instruction set, memory register, and method and apparatus for randomizing pointers

Similar Documents

Publication Publication Date Title
US7383443B2 (en) System and method for obfuscating code using instruction replacement scheme
JP5689472B2 (en) System and method for protecting Java bytecode from static and dynamic attacks within a malicious execution environment
US6480959B1 (en) Software system and associated methods for controlling the use of computer programs
US6334189B1 (en) Use of pseudocode to protect software from unauthorized use
US6643775B1 (en) Use of code obfuscation to inhibit generation of non-use-restricted versions of copy protected software applications
US7549147B2 (en) Security framework for protecting rights in computer software
EP1410150B1 (en) Protecting software applications against software piracy
US7685596B1 (en) Deploying and distributing of applications and software components
US7254586B2 (en) Secure and opaque type library providing secure data protection of variables
US8510726B2 (en) System and method for generating white-box implementations of software applications
RU2439669C2 (en) Method to prevent reverse engineering of software, unauthorised modification and data capture during performance
US8307215B2 (en) System and method for an autonomous software protection device
Bauman et al. Sgxelide: enabling enclave code secrecy via self-modification
US7664967B2 (en) Development system with methodology providing information hiding in executable programs
JPH0789345B2 (en) A safety system for remotely launching personal computer software.
CN101872404B (en) Method for protecting Java software program
JP2001134337A (en) Deciphering compiler
CN104268444A (en) Cloud OS Java source code protection method
JP2002132364A (en) Method for protecting program from internal analysis, computer readable recording medium and program distribution method
EP2460068A1 (en) System and method for limiting execution of software to authorized users
Cappaert et al. Self-encrypting code to protect against analysis and tampering
Ertaul et al. JHide-A tool kit for code obfuscation.
Dalpasso et al. Hardware/software IP protection
Lee et al. VODKA: Virtualization obfuscation using dynamic key approach
Togan et al. Virtual machine for encrypted code execution

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071019

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

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110208