Protection of a program against a trap

Information

  • Patent Application
  • 20070220612
  • Publication Number
    20070220612
  • Date Filed
    March 13, 2007
    17 years ago
  • Date Published
    September 20, 2007
    16 years ago
Abstract
A method for controlling the execution, by a central processing unit, of a program stored in a memory, a redundancy code stored with first current data at a current address being assigned to second subsequent data of the program and depending at least on the second data.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1, previously described, shows an example of a smart card of the type to which the present invention applies;



FIG. 2, previously described, partially and schematically shows an example of an electronic circuit of the type to which the present invention applies;



FIG. 3, previously described, shows a detail of the circuit of FIG. 2;



FIG. 4 is a schematic block diagram illustrating a portion of an electronic circuit according to an embodiment of the present invention;



FIG. 5 shows an example of the data content stored in the non-volatile memory, illustrating a first embodiment of the present invention;



FIG. 6 is a flowchart illustrating the first embodiment of the present invention;



FIG. 7 shows an example of a partial content of a non-volatile memory illustrating a variation of the present invention; and



FIG. 8 shows a simplified flowchart illustrating another variation of the present invention.


Claims
  • 1. A method for controlling the execution, by a central processing unit, of a program stored in a memory, wherein a redundancy code stored with first current data at a current address is assigned to second subsequent data of the program and depends at least on the second data.
  • 2. The method of claim 1, wherein the redundancy code, assigned to current data and stored with preceding data, depends on the current data and on preceding data.
  • 3. The method of claim 1, wherein a code stored with preceding data is compared with a current code, calculated with the current data.
  • 4. The method of claim 3, wherein the execution of a current instruction is conditioned by the identity between the current code and the code stored on reading of preceding data.
  • 5. The method of claim 1, wherein said code is a CRC-type code.
  • 6. A method for storing a program in a memory, comprising a step of storing at a current address an instruction or an instruction argument, accompanied by a code calculated based on the content of a next address in the program execution.
  • 7. The method of claim 6, wherein the beginning of the program or of a sub-program is an instruction for initializing the redundancy codes.
  • 8. An electronic circuit for executing a program, comprising means for implementing the method of claim 1.
  • 9. A smart card comprising the electronic circuit of claim 8.
Priority Claims (1)
Number Date Country Kind
FR06/50861 Mar 2006 FR national