Method and apparatus for watermarking binary computer code with modified compiler optimizations
First Claim
Patent Images
1. A computer-implemented method for generating executable computer code that is encoded with a watermark, the method comprising:
- receiving, by a processor, program code that is not compiled;
receiving the watermark that includes a plurality of binary digits;
compiling the program code to generate compiled code that includes a first optimized code segment that includes one or more instructions and is associated with a first binary digit included in the watermark and a second optimized code segment that includes one or more instructions and is associated with a second binary digit included in the watermark;
determining that the first binary digit has a value equal to a first value and, based on the determination, replacing the first optimized code segment with a first non-optimized code segment that includes at least one additional instruction relative to the one or more instructions included in the first optimized code segment;
determining that the second binary digit has a value equal to a second value and, based on the determination, not replacing the second optimized code segment with a second non-optimized code segment;
searching the compiled code for the presence of either the first optimized code segment or the first non-optimized code segment;
upon locating the first non-optimized code segment, setting a first decoded binary digit to have a value equal to the first value;
searching the compiled code for the presence of either the second optimized code segment or the second non-optimized code segment; and
upon locating the second optimized code segment, setting a second decoded binary digit to have a value equal to the second value.
5 Assignments
0 Petitions
Accused Products
Abstract
A system and apparatus for inserting a watermark into a compiled computer program selectively replaces specified optimizations by non-optimized code to encode bit values of the watermark. The watermark is read by decoding the executable code and assigning the decoded bit values, determined by the presence or absence of optimized code, to bit positions in a signature.
-
Citations
15 Claims
-
1. A computer-implemented method for generating executable computer code that is encoded with a watermark, the method comprising:
-
receiving, by a processor, program code that is not compiled; receiving the watermark that includes a plurality of binary digits; compiling the program code to generate compiled code that includes a first optimized code segment that includes one or more instructions and is associated with a first binary digit included in the watermark and a second optimized code segment that includes one or more instructions and is associated with a second binary digit included in the watermark; determining that the first binary digit has a value equal to a first value and, based on the determination, replacing the first optimized code segment with a first non-optimized code segment that includes at least one additional instruction relative to the one or more instructions included in the first optimized code segment; determining that the second binary digit has a value equal to a second value and, based on the determination, not replacing the second optimized code segment with a second non-optimized code segment; searching the compiled code for the presence of either the first optimized code segment or the first non-optimized code segment; upon locating the first non-optimized code segment, setting a first decoded binary digit to have a value equal to the first value; searching the compiled code for the presence of either the second optimized code segment or the second non-optimized code segment; and upon locating the second optimized code segment, setting a second decoded binary digit to have a value equal to the second value. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer-readable storage medium storing instructions that, when executed by a processor, cause a computer system to generate executable computer code that is encoded with a watermark, by performing the steps of:
-
receiving program code that is not compiled; receiving the watermark that includes a plurality of binary digits; compiling the program code to generate compiled code that includes a first optimized code segment that includes one or more instructions and is associated with a first binary digit included in the watermark and a second optimized code segment that includes one or more instructions and is associated with a second binary digit included in the watermark; determining that the first binary digit has a value equal to a first value and, based on the determination, replacing the first optimized code segment with a first non-optimized code segment that includes at least one additional instruction relative to the one or more instructions included in the first optimized code segment; determining that the second binary digit has a value equal to a second value and, based on the determination, not replacing the second optimized code segment with a second non-optimized code segment; searching the compiled code for the presence of either the first optimized code segment or the first non-optimized code segment; upon locating the first non-optimized code segment, setting a first decoded binary digit to have a value equal to the first value; searching the compiled code for the presence of either the second optimized code segment or the second non-optimized code segment; and upon locating the second optimized code segment, setting a second decoded binary digit to have a value equal to the second value. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer system for generating executable computer code that is encoded with a watermark, the system comprising:
-
a processor; and a memory storing instructions configured to; receive program code that is not compiled; receive the watermark that includes a plurality of binary digits; compile the program code to generate compiled code that includes a first optimized code segment that includes one or more instructions and is associated with a first binary digit included in the watermark and a second optimized code segment that includes one or more instructions and is associated with a second binary digit included in the watermark; determine that the first binary digit has a value equal to a first value and, based on the determination, replace the first optimized code segment with a first non-optimized code segment that includes at least one additional instruction relative to the one or more instructions included in the first optimized code segment; and determine that the second binary digit has a value equal to a second value and, based on the determination, not replace the second optimized code segment with a second non-optimized code segment; search the compiled code for the presence of either the first optimized code segment or the first non-optimized code segment; upon locating the first non-optimized code segment, set a first decoded binary digit to have a value equal to the first value; search the compiled code for the presence of either the second optimized code segment or the second non-optimized code segment; and upon locating the second optimized code segment, set a second decoded binary digit to have a value equal to the second value. - View Dependent Claims (12, 13, 14, 15)
-
Specification