JP3865347B2 - Watermark insertion method and system for program - Google Patents
Watermark insertion method and system for program Download PDFInfo
- Publication number
- JP3865347B2 JP3865347B2 JP24696298A JP24696298A JP3865347B2 JP 3865347 B2 JP3865347 B2 JP 3865347B2 JP 24696298 A JP24696298 A JP 24696298A JP 24696298 A JP24696298 A JP 24696298A JP 3865347 B2 JP3865347 B2 JP 3865347B2
- Authority
- JP
- Japan
- Prior art keywords
- watermark
- program
- information
- instruction
- command
- 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.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、コンピュータプログラムの不正コピー等による不正行為があった場合に、その不正行為の発生源を特定可能にする透かしの挿入方法及びシステムに関するものである。
【0002】
【従来の技術】
情報化の発展、コンピュータの普及により、コンピュータプログラムの重要性は増加している。コンピュータプログラムの最も特筆すべき特徴は、それ自体がデジタル情報であり、オリジナルと同品質のコピーを高速かつ安価に製造できるという生産性にある。しかしながら、そういった利点がある反面、不正コピー、プログラムコードやアルゴリズムの盗用、改ざんといった不正利用が容易に行われてしまう危険性がある。こういった背景から、作成者でない者によるコンピュータプログラム(ソフトウェア)の不正利用を防止できる環境を作る必要があると考えられる。
【0003】
現在提案されている主なソフトウェア保護手法としては、例えば特開平8−95777号公報「ソフトウェア利用制御装置」に開示れているように、各種のコンテンツをネットワークを通じて有料で流通させる、いわゆる「超流通」などの形態において特別なハードウェア(サーバコンピュータ)を使った方法や、特開平10−27123号公報「コンピュータソフトウェアのコピープロテクト方法」に開示されているように、コピープロテクトをかける方法などが挙げられる。
【0004】
【発明が解決しようとする課題】
しかしながら、「超流通」による方法では、コストが嵩むという問題がある。また、コピープロテクトのように記録媒体を用いる方法では、ネットワークを介してコンピュータプログラムを配布する場合に利用できないという問題がある。作成者にとって安心できる環境を作るためには、低コストで、改ざんや盗用に強い耐タンパな性質をソフトウェア自身に持たせる必要がある。しかし、現実にはコンピュータプログラムはデジタル情報であるため、コピーなどを容易に行うことが可能であり、不正利用自身を防ぐのは難しいと考えられる。
【0005】
本発明の目的は、不正利用自体を防ぐのではなく、不正利用が発覚した際に、その発生源(不正コピー者)を容易に特定できるような仕掛けをコンピュータプログラムに具備させることによって、作成者でない者による不正利用を安価な構成で抑止することができるコンピュータプログラムへの透かし挿入方法及びシステムを提供することにある。
【0006】
【課題を解決するための手段】
前記目的を達成するために、本発明では、現在、画像などの不正利用を防止する技術として使われている電子透かし手法の考え方をコンピュータプログラムに応用する。電子透かし手法とは、例えば特開平9−191394号公報「電子的すかし挿入方法」に示されているように、画像、音声などの著作権を保護する技術の1つであり、画像、音声データの中にID情報を埋め込むことにより画像データの流用、無断転載などの不正利用を防ぐ手法である。
【0007】
前記電子透かし手法の特徴は、
1.IDを埋め込んだことによりデータが劣化しない
2.ユーザが埋め込まれたIDを取り除くとデータが劣化する(ユーザがIDを取り除けない)という点にある。
【0008】
本発明のプログラムへの透かし挿入方法は、透かしを挿入したいプログラムのソースコードから、互いに順序を入れ替えてもプログラムの仕様に影響がない命令文をいくつか選び、その命令文と命令文との間に、ダミー変数に関する計算式を挿入した後、命令文同士をランダムに入れ替え、その入れ替えた命令文の順序を透かし情報として保存することを特徴とする。
【0009】
本発明における「透かし」とは、プログラムの仕様に影響を与えず、かつ作成者にとっては意味があるが、利用者側にとっては無意味または存在すること自体が分からないような情報を挿入することである。本発明では、「透かし」の仕方として、ダミー変数を挿入し、そのダミー変数を挿入した命令文同士をランダムに入れ替えるという方法を採用している。
【0010】
「透かし情報」とは、上記の方法によって挿入した「透かし」の仕方を表わす情報であり、本発明では、入れ替えた命令文の順序の情報を採用している。
【0011】
入替え可能な命令文としては、例えば変数の代入文がある。ダミー変数は、不正なユーザによるプログラムの解析を困難にして、透かしの改ざんを防ぐために用いるものである。
【0012】
また、ダミー変数に関する計算式は、入替え可能な命令文で使われている変数を参照することとする。さらに、不正なユーザによるプログラムの解析をより困難にするために、命令文を入れ替えた後ソースコードをコンパイルした際に、生成されたアセンブラコードに対して難読化を施してもよい。難読化とは、例えば電子情報通信学会論文誌Vol.J80−D−I No.7「ループを含むプログラムを難読化する方法の提案」(門田、高田、鳥居)に示されているように、プログラムの仕様を保ちながらその解析を困難にする変換のことである。
【0013】
上記の手段によって、不正なユーザが「透かし」を改ざんしようとして命令文を入れ替えると、ダミー変数の計算式が入れ替えた命令文で使われている変数を参照していることにより、ダミー変数の計算結果が変わってしまう。よって、不正なユーザにとっては、「透かし」を改ざんすると、プログラムの仕様が保たれているかどうかがわかりにくくなり、プログラム仕様を犠牲にしてまで改ざんしようとする行為を断念せざるを得なくなり、実質的に不正使用を抑制することが可能になる。
【0014】
一方、「透かし」を改ざんし得たとしても、作成者はその改ざん後のプログラムを解析し、作成者側に保存してある透かし情報と照合することによって改ざんされたものであることを直ちに発見することができる。
【0015】
また、前記の「透かし情報」に対し配付先別のユーザIDを付加して保存しておくことにより、不正コピーが多数出回った場合でも、その不正コピーの「透かし情報」を取り出し、その「透かし情報」に対応するユーザIDを調べることにより、不正コピー元を直ちに特定することができる。この結果、作成者でない者によるコンピュータプログラムの不正利用を抑止することが可能になる。
【0016】
【発明の実施の形態】
以下、本発明の一実施形態について図面を用いて説明する。
【0017】
図1は、本発明を適用した透かし挿入システムの一実施形態を示すシステム構成図である。
【0018】
本実施形態の透かし挿入システム110は、入力部111、表示部112、出力部113、中央処理部114、透かし挿入可能領域検出部115、透かし挿入可能領域記憶部116、透かし挿入部117、透かし情報記憶部118、透かし取り出し部119から構成されており、透かし挿入可能領域の検出、透かしの挿入、透かし情報の取り出しなどの処理を行う。
【0019】
入力部111は、透かしを挿入したいプログラムのソースコードなどを入力するためのものである。表示部112は、透かし情報などを表示するためのものである。出力部113は、透かしを挿入した実行形式プログラムなどを出力するためのものである。中央処理部114は、透かし挿入可能領域の検出、透かしの挿入、透かしの取り出しなどの処理を制御する。
【0020】
透かし挿入可能領域検出部115は、プログラムのソースコードから透かしを挿入できる部分を検出する。透かし挿入可能領域記憶部116は、プログラムのソースコードのうち透かしを挿入できる部分を記憶する。透かし挿入部117は、プログラムのソースコードに透かしを挿入し、ソースコードをコンパイルする。透かし情報記憶部118は、挿入した透かしの情報を記憶する。透かし取り出し部119は、実行形式プログラムから透かしを取り出す。
【0021】
本実施形態の透かし挿入システム110は、次に挙げる3つの特徴的な処理を行う。
【0022】
(1)透かし挿入可能領域の検出
(2)透かしの挿入
(3)透かしの取り出し
透かし挿入可能領域の検出処理は、挿入対象のプログラム中に透かしを挿入できる場所を検出するための処理であり、挿入対象のプログラムに透かしを実際に挿入する前に、最初に1回だけ行う。透かしの挿入処理は、配布先のユーザを識別するIDを埋め込むための処理であり、配布対象のプログラムをユーザに配布するたびに作成者の管理化または作成者の委任を受けた管理者の管理下で行う。
【0023】
透かしの取り出し処理は、プログラムの配布先のユーザを特定するための処理であり、プログラムの不正利用を調査するときに行う。プログラムの配布先を特定したい場合の例としては、プログラムの不正コピーが出回っており、不正コピーの出所を突き止めたい場合などがある。以下3つの処理について詳しく説明する。
【0024】
まずはじめに、透かし挿入可能領域の検出処理について図2の透かし挿入可能領域検出フロー図を用いて説明する。
プログラムの作成者は、透かしを挿入したいプログラムのソースコードを入力部111から入力する(ステップ21)。
プログラムのソースコードが入力されると、中央処理部114は、入力されたプログラムに対してプログラムIDを一意に割り当てる(ステップ22)。
プログラムIDを割り当てると、中央処理部114は、ソースコードを透かし挿入可能領域検出部115へ送る。透かし挿入可能領域検出部115は、送られたソースコードを解析して、相互に入れ替えてもプログラムの仕様に影響がないような命令文の組を検出する(ステップ23)。
【0025】
図3は、ステップ23における透かし挿入可能領域検出処理の説明図である。図3において、命令文31、命令文32および命令文33は、それぞれ異なる変数を参照する代入文である。従って、命令文31、命令文32、命令文33を相互に入れ替えてもプログラムの仕様に影響はない。
入替え可能な命令文を検出すると、透かし挿入可能領域検出部115は、命令文の情報を透かし挿入可能領域として中央処理部114へ送る。中央処理部114は、送られた透かし挿入可能領域と、この透かし挿入可能領域を含むプログラムのプログラムIDとを透かし挿入可能領域記憶部116へ送る(ステップ24)。
【0026】
図4は、透かし挿入可能領域記憶部116に記憶する透かし挿入可能領域情報の例である。透かし挿入可能領域情報40は、プログラムを識別するためのプログラムID41、プログラムのオリジナルソースコード42、入替え可能な命令文を表す透かし挿入可能領域43から構成されている。
【0027】
図5は、透かし挿入可能領域43の例を示すものであり、入替え可能な命令文のソースコード中のソース行番号51、入替え可能な命令文52、命令文を識別するためのコードID53から構成されている。なお、この図5の例は図3の命令文に対応している。
なお、図3の例では、透かし挿入可能領域43は1箇所だけであるが、2箇所以上あってもよい。ただし、その場合は、コードID53の表記を工夫して(例、A1、A2、…、B1、B2、…)、どの命令文が相互に入替え可能であるかを識別できるようにしておく必要がある。
【0028】
透かし挿入可能領域情報40を送ると、中央処理部114は、表示部112に割り当てたプログラムIDを表示して(ステップ25)処理を終了する。プログラムIDは、透かしの挿入処理の際、透かし挿入システム110に透かしを挿入したいプログラムを識別させるために、プログラムの作成者が入力する情報である。このため、プログラムの作成者は、表示されたプログラムIDを記録しておく必要がある。
【0029】
次に、透かしの挿入処理について図6の透かし挿入フロー図を用いて説明する。
プログラムの作成者は、透かしを挿入したいプログラムのプログラムIDと、プログラムの配布先のユーザ情報を入力部111から入力する(ステップ61)。
プログラムIDとユーザ情報が入力されると、中央処理部114は、入力されたプログラムIDに基づいて、透かし挿入可能領域記憶部116から透かし挿入可能領域情報40を参照し、その透かし挿入可能領域情報40を透かし情報挿入部117へ送る(ステップ62)。
【0030】
透かし挿入可能領域情報40が送られてくると、透かし挿入部117は、前記透かし挿入可能領域情報40に基づいて入れ替え可能な命令文と命令文の間にダミー変数に関する計算式を挿入する(ステップ63)。ダミー変数は、透かしの改ざん防止のためだけに用いるものである。ダミー変数の計算式は、入れ替える命令文で使われている変数を参照することとする。なお、ダミー変数の計算結果は、プログラムの仕様や、透かし情報自体とは何ら関連性がない。
計算式を挿入すると、透かし挿入部117は、入替え可能な命令文をランダムに入れ替える(ステップ64)。
【0031】
図7は、ステップ63とステップ64における透かし挿入処理の説明図である。命令文71、命令文72および命令文73は透かし挿入可能領域である。ステップ63において、命令文71と命令文72との間に、ダミー変数に関する計算式74が挿入される。また、命令文72と命令文73との間に、ダミー変数に関する計算式75が挿入される。計算式74と計算式75は、命令文71、命令文72および命令文73で使われている変数a、b、およびcを参照している。ステップ64において、命令文71、命令文72および命令文73をランダムに入れ替える。
【0032】
命令文を入れ替えると、透かし挿入部117は、ソースコードをコンパイルする(ステップ65)。
ソースコードをコンパイルすると、透かし挿入部117は、入替えた命令文の順序情報を透かし情報として中央処理部114へ送る。中央処理部114は、送られた透かし情報と、透かし情報に対応するプログラムIDと、入力されたユーザ情報とを透かし情報記憶部118へ送り、記憶させる(ステップ66)。
【0033】
図8は、透かし情報記憶部118に記憶する透かし情報80の例である。透かし情報80は、プログラムを識別するためのプログラムID81、入れ替えた命令文の順序を表す命令文順序情報82、プログラム配布先のユーザを識別するためのユーザID83、および付加的な情報84から構成されている。ユーザID83は、透かし情報記憶部118が透かし情報80を記憶させて保存する際、一意に割り当てる。付加的な情報84の例として、配布先のユーザの氏名、住所、電話番号、メールアドレスなどが挙げられる。
【0034】
図9は、命令文順序情報82の例である。命令文順序情報82は、命令文のコードID91、命令文に対応するアセンブラコード92、アセンブラコードのアセンブラ行番号93から構成されている。
透かし情報80が送られると、透かし情報記憶部118は、透かし情報80におけるプログラムID81と命令文順序情報82が、すでに記憶されている透かし情報80と重複していないかどうかをチェックする(ステップ67)。
重複している場合は、ステップ65に戻って命令文を入れ替え直す。
重複していない場合は、透かし情報記憶部118は、送られた透かし情報80にユーザID83を付加して透かし情報80を記憶して保存する(ステップ68)。
【0035】
この重複チェックの処理により、ユーザID毎に異なる透かしが挿入され、その透かし情報が記憶部118に保存されることになる。
【0036】
透かし情報80が記憶されると、中央処理部114は、出力部113から透かしを挿入した実行形式プログラムを出力して(ステップ69)処理を終了する。このようにして透かしを挿入した実行形式プログラムはユーザに配布される。
【0037】
次に、ユーザに配付した実行形式プログラムから透かしを取り出す処理について図10の透かし取り出しフロー図を用いて説明する。
プログラムの作成者は、透かしを取り出したいプログラムの実行形式ファイルを入力部111から入力する(ステップ101)。さらに、プログラムIDを入力部111から入力する(ステップ102)。
【0038】
実行形式プログラムとプログラムIDが入力されると、中央処理部114は、入力されたプログラムIDに基づいて、透かし情報記憶部118に保存しておいた当該プログラムIDに対応する透かし情報80を取り出し、前記実行形式プログラムと共に透かし取り出し部119へ送る(ステップ103)。この場合、同じプログラムIDのプログラムを複数のユーザに配付した場合には、そのプログラムIDを持つ全ての透かし情報80が取り出されて透かし取り出し部119へ送られる。
【0039】
実行形式プログラムと透かし情報80が送られてくると、透かし取り出し部119は、実行形式プログラムを逆アセンブルした後、透かしに用いた命令文の順序を解析し、命令文順序情報82を生成する。この場合、透かしに用いた命令文の範囲は、透かし情報記憶部118から取り出した透かし情報80内の命令文順序情報82におけるアセンブラ行番号93の範囲によって分かる。
【0040】
命令文順序情報82を生成したならば、透かし取り出し部119は、生成した命令文順序情報82と透かし情報記憶部118から取り出した透かし情報80内の命令文順序情報82とを照合し、両者が一致する(または同じ意味を持つ)命令文順序情報82を持つ透かし情報80を選択抽出し、その選択抽出した透かし情報80を中央処理部114へ送る(ステップ104)。
【0041】
図11は、ステップ103とステップ104における透かし取り出し処理の説明図である。実行形式プログラムが逆アセンブルされると、命令文の順序が解析されて、命令文順序情報82が生成される。そして、生成された命令文順序情報82と透かし情報記憶部118から取り出した透かし情報80内の命令文順序情報82とが照合され、両者が一致する(または同じ意味を持つ)命令文順序情報82を持つ透かし情報80が選択抽出され、その選択抽出された透かし情報80内のユーザID83や付加的な情報84が取り出される。
【0042】
中央処理部114は、取り出されたユーザID83や付加的な情報84を表示部112に表示して(ステップ105)処理を終了する。
【0043】
このように本実施形態では、命令文の順序を透かしとしてプログラムに挿入している。従って、不正なユーザが、プログラムの仕様を変えずに透かしを改ざんするためには、透かし挿入可能領域の命令文を入れ替える必要がある。ところが、透かし挿入可能領域の命令文を入れ替えると、ダミー変数の計算結果が変わってしまう。図7の例では、命令文入れ替え前はダミー変数dの計算結果は「2」であるが、命令文入れ替え後はダミー変数dの計算結果は「−4」となる。このため、不正なユーザが透かし挿入可能領域の命令文を入れ替えたとしても、不正なユーザにとっては命令文入れ替え後もプログラムの仕様が保たれているかどうかがわかりにくくなり、プログラム仕様を犠牲にしてまで改ざんしようとする行為を断念せざるを得なくなり、実質的に不正使用を抑制することが可能になる。
【0044】
一方、「透かし」を改ざんし得たとしても、作成者はその改ざん後のプログラムを解析し、作成者側に保存してある透かし情報と照合することによって改ざんされたものであることを直ちに発見することができる。
また、「透かし情報」に対し配付先別のユーザIDを付加して保存しておくことにより、不正コピーが多数出回った場合でも、その不正コピーの「透かし」を取り出し、その「透かし」に対応するユーザIDを調べることにより、不正コピー元を直ちに特定することができる。この結果、作成者でない者によるコンピュータプログラムの不正利用を抑止することが可能になる。
また、透かし挿入後に難読化を施せば、不正なユーザがプログラムを解析することがより一層困難になり、不正利用を抑制する上でさらに効果的である。
なお、上記実施形態において、透かし挿入システム110における透かし挿入可能領域検出機能、透かし挿入可能領域記憶機能、透かし挿入機能、透かし情報記憶機能、透かし取り出し機能は、中央処理部114で実行可能なコンピュータプログラムで構成されるものであるが、これらの機能を構成するプログラムの全部または一部をCD−ROM等の記憶媒体に記録し、あるいはインターネット等の通信媒体を介して有料でプログラム作成者に提供することができる。上記機能をプログラム作成者のコンピュータで実行することにより、それぞれのプログラム作成者が作成したコンピュータプログラムに対し独自の「透かし」を挿入し、不正利用を抑止し、著作権の保護に貢献することができる。
【0045】
【発明の効果】
以上説明したように、本発明の透かし挿入方法を用いれば、プログラム仕様を犠牲にしてまで改ざんしようとする行為を断念せざるを得なくなり、不正使用を安価な構成で抑制することが可能になる。
また、「透かし」を改ざんし得たとしても、作成者はその改ざん後のプログラムを解析し、作成者側に保存してある「透かし情報」と照合することによって改ざんされたものであることを直ちに発見することができる。
さらに、「透かし情報」に対し配付先別のユーザIDを付加して保存しておくことにより、不正コピーが多数出回った場合でも、その不正コピーの「透かし」を取り出し、その「透かし」に対応するユーザIDを調べることにより、不正コピー元を直ちに特定することができる。この結果、作成者でない者によるコンピュータプログラムの不正利用を抑止することが可能になる。
また、透かし挿入後に難読化を施せば、不正なユーザがプログラムを解析することがより一層困難になり、不正利用を抑制する上でさらに効果的である。
【図面の簡単な説明】
【図1】本発明の実施形態を示すシステム構成図である。
【図2】図1の実施形態における透かし挿入可能領域検出フロー図である。
【図3】図1の実施形態における透かし挿入可能領域検出処理の説明図である。
【図4】図1の実施形態における透かし挿入可能領域情報を示す図である。
【図5】図1の実施形態における透かし挿入可能領域を示す図である。
【図6】図1の実施形態における透かし挿入フロー図である。
【図7】図1の実施形態における透かし挿入処理の説明図である。
【図8】図1の実施形態における透かし情報を示す図である。
【図9】図1の実施形態における命令文順序を示す図である。
【図10】図1の実施形態における透かし取り出しフロー図である。
【図11】図1の実施形態における透かし取り出し処理の説明図である。
【符号の説明】
80…透かし情報、82…命令文順序情報、83…ユーザID、110…透かし挿入システム、111…入力部、112…表示部、113…出力部、114…中央処理部、115…透かし挿入可能領域検出部、116…透かし挿入可能領域記憶部、117…透かし挿入部、118…透かし情報記憶部、119…透かし取り出し部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a watermark insertion method and system that can identify the source of fraud when there is fraud due to illegal copying of a computer program.
[0002]
[Prior art]
With the development of computerization and the spread of computers, the importance of computer programs is increasing. The most notable feature of a computer program is its digital information itself, which is the productivity that makes it possible to produce copies of the same quality as the original at high speed and at low cost. However, while having such advantages, there is a risk that unauthorized use such as unauthorized copying, theft of program codes and algorithms, and alteration are easily performed. From this background, it is considered necessary to create an environment that can prevent unauthorized use of computer programs (software) by non-creators.
[0003]
As a main software protection method currently proposed, for example, as disclosed in Japanese Patent Application Laid-Open No. 8-95777 “Software Usage Control Device”, various contents are distributed for a fee through a network, so-called “super distribution” And a method using special hardware (server computer), and a method of applying copy protection as disclosed in Japanese Patent Application Laid-Open No. 10-27123 “Copy protection method of computer software”. It is done.
[0004]
[Problems to be solved by the invention]
However, the “super-distribution” method has a problem that costs increase. Also, a method using a recording medium such as copy protection has a problem that it cannot be used when distributing a computer program via a network. In order to create an environment that can be reassured by the creator, it is necessary to provide the software itself with a tamper-resistant property that is low-cost and resistant to tampering and theft. However, in reality, since a computer program is digital information, it can be easily copied and it is considered difficult to prevent unauthorized use.
[0005]
The object of the present invention is not to prevent unauthorized use itself, but by providing a mechanism that allows a computer program to easily identify the source (unauthorized copy person) when unauthorized use is detected. An object of the present invention is to provide a method and system for inserting a watermark into a computer program that can prevent unauthorized use by non-persons with an inexpensive configuration.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention, the idea of a digital watermark technique that is currently used as a technique for preventing unauthorized use of images and the like is applied to a computer program. The digital watermark method is one of technologies for protecting copyrights such as images and sounds as disclosed in, for example, Japanese Patent Application Laid-Open No. 9-191394 “Electronic watermark insertion method”. This is a technique for preventing unauthorized use such as diversion of image data and unauthorized reproduction by embedding ID information in the data.
[0007]
The digital watermark technique has the following features:
1. 1. Data is not degraded by embedding ID When the user removes the embedded ID, the data deteriorates (the user cannot remove the ID).
[0008]
The watermark insertion method for a program according to the present invention selects several instruction sentences that do not affect the specifications of the program from the source code of the program into which the watermark is to be inserted, and does not affect the specifications of the program. In addition, after inserting the calculation formula for the dummy variable, the command statements are randomly exchanged, and the order of the exchanged command statements is stored as watermark information.
[0009]
The “watermark” in the present invention inserts information that does not affect the specification of the program and is meaningful to the creator, but meaningless to the user side or does not know that it exists. It is. In the present invention, as a method of “watermark”, a method is adopted in which a dummy variable is inserted, and the command statements in which the dummy variable is inserted are randomly replaced.
[0010]
The “watermark information” is information representing the method of the “watermark” inserted by the above method, and in the present invention, information on the order of the exchanged command statements is employed.
[0011]
An example of a replaceable command statement is a variable assignment statement. The dummy variable is used to make it difficult for an unauthorized user to analyze the program and to prevent falsification of the watermark.
[0012]
The calculation formula for the dummy variable refers to a variable used in a replaceable command statement. Furthermore, in order to make it more difficult for an unauthorized user to analyze the program, the generated assembler code may be obfuscated when the source code is compiled after replacing the statement. Obfuscation refers to, for example, IEICE Transactions Vol. J80-D-I No. 7 “Proposal of a method to obfuscate a program containing a loop” (Kadota, Takada, Torii) This is a transformation that makes the analysis difficult while maintaining the program specifications.
[0013]
By the above means, when an unauthorized user replaces a command statement in an attempt to tamper with the “watermark”, the dummy variable calculation formula refers to the variable used in the command statement in which the dummy variable calculation formula is replaced. The result will change. Therefore, for unauthorized users, if the “watermark” is tampered with, it becomes difficult to know whether or not the program specification is maintained, and the act of tampering even at the expense of the program specification must be abandoned. It is possible to suppress unauthorized use.
[0014]
On the other hand, even if the “watermark” can be tampered with, the creator immediately discovers that it has been tampered with by analyzing the altered program and comparing it with the watermark information stored on the creator's side. can do.
[0015]
Further, by adding a user ID for each distribution destination to the “watermark information” and storing it, even if a large number of illegal copies are circulated, the “watermark information” of the illegal copies is taken out, and the “watermark” By examining the user ID corresponding to “information”, the unauthorized copy source can be immediately identified. As a result, unauthorized use of a computer program by a person who is not the creator can be suppressed.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0017]
FIG. 1 is a system configuration diagram showing an embodiment of a watermark insertion system to which the present invention is applied.
[0018]
The watermark insertion system 110 of this embodiment includes an input unit 111, a
[0019]
The input unit 111 is for inputting a source code of a program into which a watermark is to be inserted. The
[0020]
The watermark insertable area detection unit 115 detects a portion where a watermark can be inserted from the source code of the program. The watermark insertable
[0021]
The watermark insertion system 110 of the present embodiment performs the following three characteristic processes.
[0022]
(1) Detection of watermark insertable area (2) Watermark insertion (3) Extraction of watermark The watermark insertable area detection process is a process for detecting a place where a watermark can be inserted in a program to be inserted, Before the watermark is actually inserted into the program to be inserted, it is performed only once at the beginning. The watermark insertion process is a process for embedding an ID for identifying a distribution-destination user. Each time a program to be distributed is distributed to the user, management of the creator or management of the administrator who has been delegated by the creator is performed. Do it below.
[0023]
The watermark extraction process is a process for specifying the user to whom the program is distributed, and is performed when investigating unauthorized use of the program. An example of a case where it is desired to specify a distribution destination of a program is a case where an illegal copy of the program is circulated and the source of the illegal copy is to be determined. The three processes will be described in detail below.
[0024]
First, the watermark insertable area detection process will be described with reference to the watermark insertable area detection flowchart of FIG.
The program creator inputs the source code of the program into which the watermark is to be inserted from the input unit 111 (step 21).
When the source code of the program is input, the central processing unit 114 uniquely assigns a program ID to the input program (step 22).
When the program ID is assigned, the central processing unit 114 sends the source code to the watermark insertable area detecting unit 115. The watermark insertable area detection unit 115 analyzes the sent source code and detects a set of command statements that do not affect the program specifications even if they are replaced with each other (step 23).
[0025]
FIG. 3 is an explanatory diagram of the watermark insertable area detection process in
When a replaceable command sentence is detected, the watermark insertable area detection unit 115 sends the information of the command sentence to the central processing unit 114 as a watermark insertable area. The central processing unit 114 sends the sent watermark insertable area and the program ID of the program including the watermark insertable area to the watermark insertable area storage unit 116 (step 24).
[0026]
FIG. 4 is an example of watermark insertable area information stored in the watermark insertable
[0027]
FIG. 5 shows an example of the watermark insertable area 43, which is composed of a source line number 51 in the source code of a replaceable command statement, a replaceable command statement 52, and a code ID 53 for identifying the command statement. Has been. The example of FIG. 5 corresponds to the command statement of FIG.
In the example of FIG. 3, there is only one watermark insertable area 43, but there may be two or more. However, in that case, it is necessary to devise the notation of the code ID 53 (eg, A1, A2,..., B1, B2,...) So that it is possible to identify which command statements can be interchanged. is there.
[0028]
When the watermark insertable area information 40 is sent, the central processing unit 114 displays the program ID assigned to the display unit 112 (step 25) and ends the process. The program ID is information input by the program creator so that the watermark insertion system 110 can identify the program into which the watermark is to be inserted during the watermark insertion process. Therefore, the program creator needs to record the displayed program ID.
[0029]
Next, watermark insertion processing will be described with reference to the watermark insertion flowchart of FIG.
The program creator inputs the program ID of the program into which the watermark is to be inserted and the user information of the program distribution destination from the input unit 111 (step 61).
When the program ID and the user information are input, the central processing unit 114 refers to the watermark insertable region information 40 from the watermark insertable
[0030]
When the watermark insertable area information 40 is sent, the
When the calculation formula is inserted, the
[0031]
FIG. 7 is an explanatory diagram of the watermark insertion process in step 63 and
[0032]
When the statements are replaced, the
When the source code is compiled, the
[0033]
FIG. 8 is an example of the watermark information 80 stored in the watermark information storage unit 118. The watermark information 80 is composed of a program ID 81 for identifying a program, command statement order information 82 indicating the order of replaced command statements, a user ID 83 for identifying a program distribution destination user, and additional information 84. ing. The user ID 83 is uniquely assigned when the watermark information storage unit 118 stores and saves the watermark information 80. Examples of the additional information 84 include the name, address, telephone number, and mail address of the distribution destination user.
[0034]
FIG. 9 is an example of the command statement order information 82. The command statement order information 82 includes a code ID 91 of the command statement, an assembler code 92 corresponding to the command statement, and an assembler line number 93 of the assembler code.
When the watermark information 80 is sent, the watermark information storage unit 118 checks whether the program ID 81 and the command statement order information 82 in the watermark information 80 overlap with the already stored watermark information 80 (step 67). ).
If it is duplicated, the process returns to step 65 to replace the statement.
If there is no overlap, the watermark information storage unit 118 adds the user ID 83 to the sent watermark information 80 and stores and saves the watermark information 80 (step 68).
[0035]
By this duplication check process, a different watermark is inserted for each user ID, and the watermark information is stored in the storage unit 118.
[0036]
When the watermark information 80 is stored, the central processing unit 114 outputs the executable program into which the watermark is inserted from the output unit 113 (step 69), and the process is terminated. The executable program inserted with the watermark in this way is distributed to the user.
[0037]
Next, processing for extracting a watermark from an executable program distributed to a user will be described with reference to the watermark extraction flowchart of FIG.
The creator of the program inputs from the input unit 111 an executable file of the program whose watermark is to be extracted (step 101). Further, the program ID is input from the input unit 111 (step 102).
[0038]
When the executable program and the program ID are input, the central processing unit 114 takes out the watermark information 80 corresponding to the program ID stored in the watermark information storage unit 118 based on the input program ID, It is sent to the
[0039]
When the executable format program and watermark information 80 are sent, the
[0040]
If the command statement order information 82 is generated, the
[0041]
FIG. 11 is an explanatory diagram of the watermark extraction process in
[0042]
The central processing unit 114 displays the extracted user ID 83 and additional information 84 on the display unit 112 (step 105), and ends the process.
[0043]
As described above, in this embodiment, the order of the statements is inserted into the program as a watermark. Therefore, in order for an unauthorized user to alter the watermark without changing the program specifications, it is necessary to replace the command statement in the watermark insertable area. However, if the command statement in the watermark insertable area is replaced, the calculation result of the dummy variable changes. In the example of FIG. 7, the calculation result of the dummy variable d is “2” before the command statement replacement, but the calculation result of the dummy variable d is “−4” after the command statement replacement. For this reason, even if an unauthorized user replaces the instruction text in the watermark insertable area, it becomes difficult for an unauthorized user to know whether the program specifications are maintained after the instruction replacement, and at the expense of the program specifications. Therefore, it is necessary to give up the act of tampering until it is possible to substantially prevent unauthorized use.
[0044]
On the other hand, even if the “watermark” can be tampered with, the creator immediately discovers that it has been tampered with by analyzing the altered program and comparing it with the watermark information stored on the creator's side. can do.
In addition, by adding a user ID for each distribution destination to the “watermark information” and storing it, even if a large number of illegal copies are available, the “watermark” of the illegal copy is taken out and the “watermark” is supported. By checking the user ID to be used, the unauthorized copy source can be immediately identified. As a result, unauthorized use of a computer program by a person who is not the creator can be suppressed.
Further, if obfuscation is performed after watermark insertion, it becomes even more difficult for an unauthorized user to analyze the program, which is more effective in suppressing unauthorized use.
In the above embodiment, a computer program executable by the central processing unit 114 is a watermark insertable area detection function, a watermark insertable area storage function, a watermark insertion function, a watermark information storage function, and a watermark extraction function in the watermark insertion system 110. However, it is possible to record all or part of the programs constituting these functions on a storage medium such as a CD-ROM or to provide the program creator for a fee via a communication medium such as the Internet. be able to. By executing the above functions on the program creator's computer, it is possible to insert a unique “watermark” into the computer program created by each program creator to prevent unauthorized use and contribute to copyright protection. it can.
[0045]
【The invention's effect】
As described above, if the watermark insertion method of the present invention is used, it is necessary to give up the act of tampering even at the expense of the program specifications, and it becomes possible to suppress unauthorized use with an inexpensive configuration. .
Even if the “watermark” can be tampered with, the creator analyzes the altered program and confirms that it has been tampered with by checking the “watermark information” stored on the creator side. It can be discovered immediately.
Furthermore, by adding a user ID for each distribution destination to the “watermark information” and storing it, even if a large number of illegal copies are available, the “watermark” of the illegal copy is taken out and the “watermark” is supported. By checking the user ID to be used, the unauthorized copy source can be immediately identified. As a result, unauthorized use of a computer program by a person who is not the creator can be suppressed.
Further, if obfuscation is performed after watermark insertion, it becomes even more difficult for an unauthorized user to analyze the program, which is more effective in suppressing unauthorized use.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram showing an embodiment of the present invention.
FIG. 2 is a watermark insertion possible area detection flowchart in the embodiment of FIG. 1;
FIG. 3 is an explanatory diagram of a watermark insertable area detection process in the embodiment of FIG. 1;
FIG. 4 is a diagram showing watermark insertable area information in the embodiment of FIG. 1;
FIG. 5 is a diagram showing a watermark insertable area in the embodiment of FIG. 1;
FIG. 6 is a watermark insertion flowchart in the embodiment of FIG. 1;
FIG. 7 is an explanatory diagram of watermark insertion processing in the embodiment of FIG. 1;
FIG. 8 is a diagram showing watermark information in the embodiment of FIG. 1;
FIG. 9 is a diagram showing a command statement order in the embodiment of FIG. 1;
FIG. 10 is a watermark extraction flowchart in the embodiment of FIG. 1;
FIG. 11 is an explanatory diagram of watermark extraction processing in the embodiment of FIG. 1;
[Explanation of symbols]
80 ... watermark information, 82 ... command sequence information, 83 ... user ID, 110 ... watermark insertion system, 111 ... input unit, 112 ... display unit, 113 ... output unit, 114 ... central processing unit, 115 ... watermark insertable
Claims (5)
コンピュータに実装した透かし挿入手段が、前記第1の記憶手段に記憶された透かし挿入可能領域内の命令文と命令文との間に、ダミー変数に関する計算式を挿入し、命令文同士をランダムに入れ替え、入れ替えた命令文の順序情報と命令文を入れ替えたソースコードをコンパイルした実行形式プログラムの配付先別の識別情報とを透かし情報として第2の記憶手段に保存する第2のステップと
を備えることを特徴とするプログラムへの透かしの挿入方法。 Watermarking area detector mounted on the computer accepts the source code of the watermark insertion target program from the source code, takes out a plurality of instruction statement has no effect on the design of the programs even out of sequence, the statement A first step of storing the description line in the first storage means as a watermark insertable area;
The watermark insertion means implemented in the computer inserts a calculation formula related to the dummy variable between the instruction sentence and the instruction sentence in the watermark insertable area stored in the first storage means, and randomly inserts the instruction sentences. A second step of storing in the second storage means as the watermark information, the order information of the exchanged instruction sentence and the identification information for each distribution destination of the executable program compiled from the source code with the exchanged instruction sentence;
A method for inserting a watermark into a program.
前記第1の記憶手段に記憶された透かし挿入可能領域内の命令文と命令文との間に、ダミー変数に関する計算式を挿入し、命令文同士をランダムに入れ替え、入れ替えた命令文の順序情報と命令文を入れ替えたソースコードをコンパイルした実行形式プログラムの配付先別の識別情報とを透かし情報として第2の記憶手段に保存する透かし挿入手段と
を備えることを特徴とするプログラムへの透かしの挿入システム。A source code of a watermark insertion target program is received, a plurality of instruction statements that do not affect the program specifications even if the order is changed are extracted from the source code, and a description insertion line of the instruction statement is used as a watermark insertion possible area. Watermark insertable area detection means for storing in the storage means;
A calculation formula related to a dummy variable is inserted between a command sentence and a command sentence in the watermark insertable area stored in the first storage means, the command sentences are exchanged at random, and the order information of the exchanged command sentences And watermark insertion means for storing, in the second storage means, identification information for each distribution destination of the executable program obtained by compiling the source code in which the instruction statement is replaced, and watermark information to the program. Insertion system.
透かし挿入対象のプログラムのソースコードを受け付け、当該ソースコードから、順序を入れ替えてもプログラムの仕様に影響がない命令文を複数個取り出し、当該命令文の記述行を透かし挿入可能領域として第1の記憶手段に記憶する第1のステップと、
前記第1の記憶手段に記憶された透かし挿入可能領域内の命令文と命令文との間に、ダミー変数に関する計算式を挿入し、命令文同士をランダムに入れ替え、入れ替えた命令文の順序情報と命令文を入れ替えたソースコードをコンパイルした実行形式プログラムの配付先別の識別情報とを透かし情報として第2の記憶手段に保存する第2のステップと、
前記実行形式プログラムを入力とし、その入力された前記実行形式プログラムを逆アセンブルした後、命令文の順序を解析し、その解析結果の命令文の順序情報と前記第2の記憶手段に保存された透かし情報中の入れ替え命令文の順序情報とを照合し、前記入力された実行形式プログラムに関する透かし情報を取り出す第3のステップと
をコンピュータに実行させるプログラムを記録した記録媒体。A recording medium recording a watermark insertion program for inserting a watermark into a program,
A source code of a watermark insertion target program is received, a plurality of instruction statements that do not affect the program specifications even if the order is changed are extracted from the source code, and a description insertion line of the instruction statement is used as a watermark insertion possible area. A first step of storing in the storage means;
A calculation formula related to a dummy variable is inserted between a command sentence and a command sentence in the watermark insertable area stored in the first storage means, the command sentences are exchanged at random, and the order information of the exchanged command sentences A second step of storing, in the second storage means, identification information for each distribution destination of the executable program obtained by compiling the source code in which the command statement is replaced, as watermark information;
The execution format program is set as an input, the input execution format program is disassembled, the order of instruction statements is analyzed, and the order information of the analysis result instruction statements and the second storage means are stored. A recording medium on which is recorded a program that causes a computer to execute a third step of collating the order information of the replacement command in the watermark information and extracting the watermark information related to the input executable program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24696298A JP3865347B2 (en) | 1998-09-01 | 1998-09-01 | Watermark insertion method and system for program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24696298A JP3865347B2 (en) | 1998-09-01 | 1998-09-01 | Watermark insertion method and system for program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000076064A JP2000076064A (en) | 2000-03-14 |
JP3865347B2 true JP3865347B2 (en) | 2007-01-10 |
Family
ID=17156323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP24696298A Expired - Fee Related JP3865347B2 (en) | 1998-09-01 | 1998-09-01 | Watermark insertion method and system for program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3865347B2 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004362532A (en) * | 2002-10-25 | 2004-12-24 | Matsushita Electric Ind Co Ltd | Watermark insertion device and watermark extraction device |
GB2405958A (en) * | 2003-08-20 | 2005-03-16 | Macrovision Europ Ltd | Code obfuscation and controlling a processor by emulation |
JP4295684B2 (en) | 2003-08-28 | 2009-07-15 | パナソニック株式会社 | Program production device |
JP4497450B2 (en) * | 2003-12-10 | 2010-07-07 | 独立行政法人科学技術振興機構 | Program authentication system |
JP4514473B2 (en) * | 2004-02-23 | 2010-07-28 | 富士通株式会社 | Computer system, central apparatus, and program execution method |
US20060259900A1 (en) * | 2005-05-12 | 2006-11-16 | Xerox Corporation | Method for creating unique identification for copies of executable code and management thereof |
US20060259903A1 (en) * | 2005-05-12 | 2006-11-16 | Xerox Corporation | Method for creating unique identification for copies of executable code and management thereof |
JP5300294B2 (en) | 2008-03-25 | 2013-09-25 | パナソニック株式会社 | Processing device, obfuscation device, program and integrated circuit |
JP2012032900A (en) * | 2010-07-29 | 2012-02-16 | Kddi Corp | Unauthorized distribution detection device, method and program of software |
JP2012043322A (en) * | 2010-08-23 | 2012-03-01 | Kddi Corp | Software misappropriation detecting device, software misappropriation detecting method, and program |
-
1998
- 1998-09-01 JP JP24696298A patent/JP3865347B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2000076064A (en) | 2000-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7937693B2 (en) | System and method for obfuscation of reverse compiled computer code | |
EP1078312B1 (en) | Apparatus for making and apparatus for reading a digital watermark and method of making and reading a digital watermark | |
EP1075757B1 (en) | Digital authentication with analog documents | |
US5287407A (en) | Computer software protection | |
JP3914430B2 (en) | Method and apparatus for enabling distribution of software objects | |
Nagra et al. | A functional taxonomy for software watermarking | |
US20040202324A1 (en) | Program electronic watermark processing apparatus | |
US20140165210A1 (en) | Software watermarking techniques | |
US7177845B2 (en) | Copy detection for digitally-formatted works | |
JP3865347B2 (en) | Watermark insertion method and system for program | |
JP4568489B2 (en) | Program protection method, program protection program, and program protection apparatus | |
JP5285188B2 (en) | System for controlling the distribution and use of digital work | |
US8661559B2 (en) | Software control flow watermarking | |
US20050289358A1 (en) | Method and system for sensitive information protection in structured documents | |
JP3765145B2 (en) | Electronic information distribution method | |
KR100556304B1 (en) | Method and System for Keeping off Illegal Copy of Digital Contents by using the file system information Data | |
CN116611032A (en) | Method, system and storage medium for embedding and extracting software watermark in JAR package | |
KR20030015742A (en) | System for tracking down illegal copies and distribution of digital contents | |
Mambo et al. | Fingerprints for copyright software protection | |
US20050055312A1 (en) | Software control flow watermarking | |
JP2005135367A (en) | Copyright protection system, and recording medium with its program recorded | |
JP4001407B2 (en) | Information management method | |
EP1739951A1 (en) | Individual rendering of logos to track document leakage | |
Usop et al. | A Review of Digital Watermarking Techniques, Characteristics and Attacks in Text Documents | |
JP2001512867A (en) | Apparatus and method for protecting the output of electronically transmitted and stored documents |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060712 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060911 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20061002 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061002 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121013 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |