Systems and methods are disclosed for protecting a computer program from
unauthorized analysis and modification. Obfuscation transformations can
be applied to the computer program's local structure, control graph,
and/or data structure to render the program more difficult to understand
and/or modify. Tamper-resistance mechanisms can be incorporated into the
computer program to detect attempts to tamper with the program's
operation. Once an attempt to tamper with the computer program is
detected, the computer program reports it to an external agent, ceases
normal operation, and/or reverses any modifications made by the attempted
tampering. The computer program can also be watermarked to facilitate
identification of its owner. The obfuscation, tamper-resistance, and
watermarking transformations can be applied to the computer program's
source code, object code, or executable image.