Patent ID: 7549147

Claim:
A method for protecting software, source code for the software having a first directive marking an encryption beginning point and a second directive marking an encryption end point, the method comprising the steps of: processing the source code to identify a block of code between the first and second directives; compiling the source code to produce a binary file; generating a random string and establishing a mechanism that allows the software to obtain a valid key from a data flow expected to be received by the software in a manner that the valid key is neither stored within the software, nor located in a remote storage, but instead is obtained from the data flow, wherein the step of establishing the mechanism further comprises the steps of: encrypting the random string with the valid key to obtain a first encrypted value; encrypting a portion of the binary file corresponding to the block of code with the valid key to obtain a second encrypted value; and replacing the portion of the binary file corresponding to the block of code with the second encrypted value and code that can decrypt the second encrypted value during execution of the software, accepting a binary string believed to be the valid key; encrypting the random string with the binary string believed to be the valid key to obtain a third encrypted value; comparing the third encrypted value to the first encrypted value; and decrypting the second encrypted value with the binary string believed to be the valid key if the first encrypted value equals the third encrypted value.