摘要 |
Self-modifying software code comprising a number of modules that each may be modified to be in a plurality of states during execution. In order to verify the integrity of such code, the different states of the code are calculated. For each state a checksum, e.g. a hash value, is generated for at least part of the code. During execution the state of the code is changed, modifying a module, and an integrity check is performed using the checksum for the state of the code. The checksum may be stored in a look-up table or it may be embedded in the integrity verification function. A state variable indicating the state of the modules may be used to look-up the checksum in the table. Possible states of a module is encrypted and decrypted. Also provided is an apparatus for generating protected software code.
|