A method for execution of a code sequence comprising: starting the execution of instructions comprising the code sequence; and characterized in that while the instructions are executing; generating a signature representative of a physical instruction address sequence for a portion of the code sequence being executed; comparing the signature to a pre-computed signature representative of a physical instruction address sequence for a portion of the code sequence; generating a signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed; comparing the signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed to a pre-computed signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence; and saving, in secure memory, the generated signature representative of a physical instruction address sequence for a portion of the code sequence being executed and the generated signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed in a record mode as a model signature representative of a physical instruction address sequence for a portion of the code sequence being executed and a model signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed respectively. starting the execution of instructions comprising the code sequence; and characterized in that while the instructions are executing; generating a signature representative of a physical instruction address sequence for a portion of the code sequence being executed; comparing the signature to a pre-computed signature representative of a physical instruction address sequence for a portion of the code sequence; generating a signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed; comparing the signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed to a pre-computed signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence; and saving, in secure memory, the generated signature representative of a physical instruction address sequence for a portion of the code sequence being executed and the generated signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed in a record mode as a model signature representative of a physical instruction address sequence for a portion of the code sequence being executed and a model signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed respectively. generating a signature representative of a physical instruction address sequence for a portion of the code sequence being executed; comparing the signature to a pre-computed signature representative of a physical instruction address sequence for a portion of the code sequence; generating a signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed; comparing the signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed to a pre-computed signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence; and saving, in secure memory, the generated signature representative of a physical instruction address sequence for a portion of the code sequence being executed and the generated signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed in a record mode as a model signature representative of a physical instruction address sequence for a portion of the code sequence being executed and a model signature representative of an execution state resulting from the execution of the instructions in the portion of the code sequence being executed respectively.