jmark: A lightweight tool for watermarking Java class files

hits since 2002.1.9

Last Update: 2003.10.22
BBS Enter

OVERVIEW

"jmark" aims to easily identify illegal Java programs containing unlicensed class files. jmark provides a practical way for encoding and decoding a digital watermark into/from Java class files. Encoding a program developer's copyright phrase as a watermark ensures the legal ownership of class files.


DOWNLOAD

Below we provide C source code and binary files of the jmark.

The archive contains two tools: "jmark" and "jdecode".
"jmark" injects a watermark into a Java classfile.
"jdecode" decodes a watermark from a Java classfile.
The programs run on a variety of UNIX systems, MS-Windows, MS-DOS, etc.

Licensing conditions:

  1. The authors of the jmark are:
    The authors own copyright for the jmark.
  2. The jmark is provided on an "AS IS" basis, without warranty of any kind. You must use the jmark at your risk.
  3. The author shall not be liable for any damages suffered by you or others as a result of using, modifying or distributing the jmark or its derivatives. One must use the jmark at one's own risk.
  4. This copyright and license agreement shall be governed by the laws of Japan.

EXAMPLE

You should at first add a dummy method into your Java source code manually, and compile it, then use the "jmark" to inject your own watermark into the dummy method (to-be-watermarked method).

Here we have "TEST0.class" to be watermarked. "TEST0.class" contains 12 methods, and, the method No.10 is the dummy (actually never envoked). Below we encode "(C)AKITO MONDEN 2003" (this is the watermark phrase) into the dummy method. This example also specifies a key phrase "MyKey" to determine a bit assignment rule -- a mapping between character sequence (watermark phrase) and bit sequence (in Java byte code). Only the person who knows the key phrase (this case "MyKey") can decode the watermark correctly.

%jmark TEST0.class 10 "(C)AKITO MONDEN 2003" -k"MyKey"     <--- Watermark encoding
#classfile: TEST0.class
#method: 10
#watermark: "(C)AKITO MONDEN 2003"
#key: "MyKey"

%jdecode TEST0.class -k"MyKey"     <--- Watermark decoding
#classfile: TEST0.class
#key: "MyKey"
#begin{watermark}
1       "X(6B5"
2       "))BQBQB88IQB88IQJCJE7EQ QJ"
3       "X(2"
4       "J1RIAR"
5       ""
6       ""
7       "X(P6HXVN"
8       " (H6BX8,"
9       "MB28"
10      "(C)AKITO MONDEN 2003 (C)AK"   <--- Watermark decoded from method no.10
11      "X(P6HXCE"
12      "XR7RIRXRQIBI"
#end{watermark}

Instead of specifying the to-be-watermarked method (dummy method) by its index number, you can also specify the to-be-watermarked method by its name.
%jmark TEST0.class check_std "(C)AKITO MONDEN 2003" -k"MyKey"     <--- "check_std" is the name of the to-be-watermarked method

Algorithm option:
-a0: Default watermarking algorithm
-a1: Redo encoding a character when overwriting operands
-a2: Not using "Replacing opcodes" (Using only "overwriting operands")

Algorithm a2 is more resistant to obfuscation attacks than a0 and a1.


CHANGE LOG

ChangeLog


RELATED PUBLICATIONS

  1. 門田暁人, 松本健一, 飯田元 ,井上 克郎, 鳥居宏次, "Javaクラスファイルに対する電子透かし法", 情報処理学会論文誌, Vol.41, No.11, pp.3001-3009, Nov. 2000. (in Japanese)
  2. Akito Monden, Hajimu Iida, Ken-ichi Matsumoto, Katsuro Inoue and Koji Torii, "A practical method for watermarking Java programs," The 24th Computer Software and Applications Conference (compsac2000), pp. 191-197, Taipei, Taiwan, Oct. 25-27, 2000. (compsac2000.pdf)
  3. Akito Monden, Hajimu Iida, Ken-ichi Matsumoto, Katsuro Inoue and Koji Torii, "Watermarking Java programs," International Symposium on Future Software Technology'99 (ISFST'99), pp.119-124, Nanjing, China, Oct. 1999. (ISFST99.pdf)
  4. 門田暁人, 飯田元, 松本健一, 鳥居宏次: "Javaプログラムを対象とする電子透かし法," 日本ソフトウェア科学会第16回大会論文集, pp.253-256, Sep. 1999. (jssst1999.ps.gz) (in Japanese)
  5. 門田暁人, 飯田元, 松本健一, 鳥居宏次, 一杉裕志, "プログラムに電子透かしを挿入する一手法," 1998年暗号と情報セキュリティシンポジウム, SCIS'98-9.2.A, Jan. 1998. (watermark.ps) (in Japanese)

CONTACT

Akito Monden, Dr. Eng.
Associate Professor
Graduate School of Information Science
Nara Institute of Science and Technology
8916-5 Takayama, Ikoma, Nara, 630-0101, Japan
TEL +81-743-72-5312
FAX +81-743-72-5319
e-mail: akito-m<at>is.naist.jp
URL http://se.naist.jp/~akito-m/