Patent ID: 8341426

Claim:
A method of encrypting a set of compiled computer code instructions so as to obtain an encrypted set of compiled computer code instructions intended to be decrypted instruction by instruction during execution, the set of compiled computer code instructions comprising a plurality of branch instructions and a label instruction, wherein execution of the set of compiled computer code instructions may continue from each of the plurality of branch instructions directly to the label instruction, the method comprising the steps at a device of: encrypting the label instruction using a chained encryption function so that the encrypted label instruction depends on at least the values of the label instruction and the value of a chosen one of the plurality of branch instructions; and associating each of the at least one branch instruction other than the chosen one of the plurality of branch instructions with a compensator value to be used to adjust decryption of the encrypted label instruction so that it yields the same result during execution regardless of which of the plurality of branch instructions is executed immediately before the label instruction.