Patent ID: 9081962
Filing Date: 2015-07-14
Classification: G06F,G06Q

Abstract:
1. A method for protecting a program code portion against alteration, said program code portion being stored in a first memory and being divided into a plurality of code segments, said program code portion comprising at least one sequence of code segments comprising a root-code segment and a plurality of sub-code segments; the method being performed by a computer having access to said first memory and comprising: inserting into each of said sub-code segments stored in said first memory an integrity checking portion for checking the integrity of a target code segment of the program code portion, said target code segment of given sub-code segment being the code segment that is sequentially adjacent in a checking direction towards said root-code segment; executing by a computer the integrity checking portion of a given sub-code segment loaded in a second memory, including carrying out a checking procedure on the respective target code segment in the second memory to obtain a runtime result, comparing said runtime result with a reference result comprised in said given sub-code of the second memory, determining that the program code portion has been altered if the runtime result is not related to the reference result, and writing said runtime result into the given sub-code segment in the second memory, such that the integrity checking procedure of a further sub-code segment sequentially adjacent in a checking direction away from said root-code segment carries out the checking procedure on the given sub-code segment in the second memory including the runtime result; computing the reference result of the target code segment of each of said sub-code segments; and writing the computed reference results into said sub-code segments stored in said first memory.