Andrew Huntwork
(ash@cs.arizona.edu)
Xiangyu Zhang
(xyzhang@cs.arizona.edu)
This algorithm embeds the watermark into the case values of a switch statement.
Embedding
To embed the watermark we insert a lookup switch at the beginning of the
instruction stream for a randomly chosen method.
Recognition
During recognition we find the switch we inserted, and decode its 'case'
statements.
For example, the following code is inserted somewhere:
switch (sm$switch) { case 'h' : {...} case 'e' : {...} case 'l' : {...} case 'l' : {...} case 'o' : {...} }
The watermark of "hello" is embedded into the class file.
The duplicated 'l' in the example will fail the verifier. We have some
encoding scheme to distinguish duplicated charaters.
SWM_SWITCH_ID
:
This property is the identifier of the switch variable. The default
value is sm$switch.
None