Secure Non-Volatile Memory

The method of loading security parameters with error correcting codes and implementing countermeasures addresses the inadequacies in existing data protection methods, enhancing the security of non-volatile memory data transfer and circuit operation.

FR3132365B1Active Publication Date: 2024-12-06STMICROELECTRONICS (ALPS) SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2022000857
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-31
Publication Date
2024-12-06
Estimated Expiration
2042-01-31

AI Technical Summary

Technical Problem

Existing methods for protecting sensitive data in non-volatile memories, such as encryption keys, during startup sequences are inadequate, as they do not sufficiently secure the data transfer from non-volatile memory to other circuits.

Method used

A method involving loading a security parameter and its error correcting code into a calculation circuit, verifying the parameter for errors, and implementing countermeasures if errors are detected, including loading default values or transmitting signals to control circuits to secure the circuit operation.

Benefits of technology

Enhances the security of non-volatile memory data by detecting and responding to potential attacks, ensuring secure operation and protecting sensitive data through countermeasures such as secure mode activation or encryption key replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000015_0000
    Figure 00000015_0000
  • Figure 00000016_0000
    Figure 00000016_0000
  • Figure 00000017_0000
    Figure 00000017_0000
Patent Text Reader

Abstract

Secure Non-Volatile Memory This description relates to a method comprising: - loading, from a non-volatile memory (104) of a circuit (102) into a computing circuit (130), a first security parameter of the circuit and a first error-correcting code stored in association with the first security parameter; - checking, by the computing circuit (130), the first security parameter and the first error-correcting code to determine if one or more of the bits of the security parameter are erroneous; and - if it is determined that two bits of the security parameter are erroneous, loading a default value of the first parameter into a register (132). Figure for the abstract: Fig. 1
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Secure non-volatile memory Technical field

[0001] The present description relates to the field of methods and circuits for the security of electronic circuits, and in particular a method and a circuit for protecting an electronic circuit comprising a non-volatile memory. Prior art

[0002] Non-volatile memories, such as FLASH type memories, can store sensitive data in terms of confidentiality and security such as for example encryption keys or security parameters. The startup sequence of an electronic circuit is a sensitive step in terms of security, because it generally involves the processing of this sensitive data.

[0003] Although solutions exist to make sensitive data immutable, it would be desirable to further protect this data when it is loaded from non-volatile memory to other memories. Summary of the invention

[0004] There is a need to improve methods for protecting the confidentiality and / or security of the contents of a non-volatile memory of an electronic device.

[0005] One embodiment overcomes all or part of the drawbacks of known protection methods.

[0006] One embodiment provides a method comprising: - loading, from a non-volatile memory of a circuit to a computing circuit, a first security parameter of the circuit and a first error correcting code stored in association with the first security parameter; - the verification, by the calculation circuit, of the first security parameter and the first error-correcting code in order to determine whether one or more of the bits of the security parameter are erroneous; and - if it is determined that two bits of the security parameter are in error, loading a default value of the first parameter into a register.

[0007] According to one embodiment, the default value corresponds to a value imposing a secure operating state on the circuit.

[0008] According to one embodiment, the above method comprises, if it is determined that two bits of the security parameter are erroneous, transmitting an output signal from an interface of the non-volatile memory to a control circuit of the circuit, and carrying out one or more countermeasures by the control circuit.

[0009] According to one embodiment, the control circuit is configured to increment a counter following receipt of the output signal, and to reset the circuit when a threshold value is reached by the counter.

[0010] According to one embodiment, the above method comprises, if it is determined that two bits of the security parameter are erroneous, the implementation by the memory interface of one or more countermeasures.

[0011] According to one embodiment, the above method comprises: - receiving, via the non-volatile memory interface, a first control signal, the first control signal being composed of m bits, capable of taking 2W different values, only # values ​​among these values ​​being authorized, each of these 9 values ​​being different from the others by at least two bit values, where m is greater than or equal to 2 and 9 is less than or equal to 2^ / 2; - comparing the value of the first control signal, via the non-volatile memory interface, with each of the q authorized values; and - if the value of the first control signal does not correspond to any of the q authorized values, carrying out one or more countermeasures, including for example the transmission of the output signal via the memory interface to the circuit control circuit.

[0012] According to one embodiment, the above method further comprises receiving by the non-volatile memory interface, from the circuit control circuit, a warning input signal indicating the detection of a suspicious event, and carrying out by the interface one or more countermeasures.

[0013] According to one embodiment, the one or more countermeasures comprise prohibiting access to a first area of ​​the non-volatile memory following receipt of the warning input signal.

[0014] According to one embodiment, the first area of ​​the non-volatile memory contains at least one encryption key.

[0015] According to one embodiment, the one or more countermeasures comprise replacing the value of an encryption key, stored in the non-volatile memory, with a dummy value.

[0016] According to one embodiment, the loading into the register of the first security parameter of the circuit is carried out before the end of a circuit startup sequence.

[0017] According to one embodiment, the non-volatile memory is a FLASH type memory.

[0018] One embodiment provides a circuit comprising: - a non-volatile memory storing a first security parameter, and a first error-correcting code, stored in association with the first parameter in the non-volatile memory; and - a calculation circuit configured for: checking the first security parameter and the first error-correcting code to determine whether one or more of the bits of the security parameter are in error; and if it is determined that two bits of the security parameter are in error, loading a default value of the first security parameter into a register.

[0019] According to one embodiment, the above circuit comprises a non-volatile memory interface configured to, when it is determined that two bits of the security parameter are in error, transmit an output signal to a control circuit of the circuit configured to perform one or more countermeasures. Brief description of the drawings

[0020] These characteristics and advantages, as well as others, will be explained in detail in the following description of particular embodiments given without limitation in relation to the attached figures among which:

[0021] [Fig.l] represents very schematically and in the form of blocks, an embodiment of an electronic device according to an embodiment of the present description;

[0022] [Fig.2] is a flowchart representing operations of a method for protecting a circuit according to an exemplary embodiment of the present description;

[0023] [Fig. 3] is a flowchart representing operations of a method for protecting a circuit according to another exemplary embodiment of the present description; and

[0024] [Fig. 4] is a flowchart showing operations of a method for protecting a circuit according to another exemplary embodiment of the present description. Description of the embodiments

[0025] The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties.

[0026] For the sake of clarity, only the steps and elements useful for understanding the described embodiments have been shown and are detailed. In particular, the design of processing devices is well known to those skilled in the art and certain elements have not been detailed in the following description.

[0027] Unless otherwise specified, when referring to two elements connected to each other, this means directly connected without intermediate elements other than conductors, and when referring to two elements connected (in English "coupled") to each other, this means that these two elements can be connected or be connected by means of one or more other elements.

[0028] In the following description, when referring to position qualifiers absolute, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or relative, such as the terms "above", "below", "upper", "lower", etc., or orientation qualifiers, such as the terms "horizontal", "vertical", etc., are referred to unless otherwise specified to the orientation of the figures.

[0029] Unless otherwise specified, the expressions "about", "approximately", "substantially", and "of the order of" mean to within 10%, preferably to within 5%.

[0030] In the present description, the term "suspicious event" is used to designate an alteration of the value of one or more signals transmitted in an integrated circuit, or of one or more data stored in a volatile or non-volatile memory of an integrated circuit, of unknown origin. This alteration is for example caused by an attack against the integrated circuit, for example by a fault injection attack, or is caused by another source of error, such as the environment of the circuit, for example by the radiation effect.

[0031] [Fig.l] represents, very schematically and in the form of blocks, an electronic device 100 comprising an integrated circuit 102 according to an embodiment of the present description.

[0032] The electronic device 100 is for example an electronic card such as a microcircuit card, hardware for computer use, a microprocessor circuit, etc.

[0033] The integrated circuit 102 comprises for example a non-volatile memory 104 (NV MEM), for example a FLASH memory. The memory 104 is connected to a memory interface 106 (INTERFACE) itself connected to a control circuit 108 (TAMPER CONTROLLER) of the integrated circuit 102, as well as to a circuit 110 (SBS) of the integrated circuit 102. By way of example, the circuit 110 is a circuit for configuring the boot and security of the integrated circuit 102 (in English "System configuration, Boot and Security"). The circuit 110 is for example configured to transmit one or more SIG signals to the interface 106. For example, the signals are control signals transmitted by the circuit 110, for example during the booting of the device 100, in order to inform the non-volatile memory 104 of the functionalities and / or resources of the circuit 102 being accessible during the current step of the booting.

[0034] The circuit 102 further comprises, for example, a volatile memory 112 (RAM), a counter 114 (COUNT) such as for example a monotonic counter, and a generic processor 116 (CPU). The processor 116, the volatile memory 112 and the counter 114 are for example connected to the memory interface 106, to the control circuit 108 and to the circuit 110 by a bus 118, comprising for example a data bus.

[0035] The non-volatile memory 104 further comprises an area 122 storing an encryption key (HW KEY), an area 124 storing other encryption keys such as Option Bytes Keys (OBK), and an area 126 storing configuration data. (USER OPTIONS) such as for example security parameters of the circuit 102 chosen by the user to be used during a startup sequence of the device 100. The zone 126 further comprises, for at least some of the data values ​​it contains, an error correcting code (ECC - in English "Error-Correcting Code"). Each error-correcting code is stored in area 126 in association with one of the corresponding data values. The combination of each data value with the associated error-correcting code forms a data encoding including redundancy in the encoding and then makes it possible to detect, and in certain cases to correct, one or more errors in the data value occurring during or after its recording. For example, the error-correcting code makes it possible to detect and / or correct one or more errors occurring during a transmission of the data, between the non-volatile memory 104 and the control circuit 108.

[0036] An area 128 of the non-volatile memory 104 stores, for example, codes and / or data 128 (CODE / DATA). For example, area 128 stores startup codes and / or application codes.

[0037] The memory interface 106 further comprises a calculation circuit 130 (ECC CALCULATOR) configured to calculate, from a data value stored in the area 126, a verification code and to compare this verification code with the error correcting code associated with the data value. By way of example, the memory interface 106 further comprises at least one buffer memory 131 (BUFFER) into which the data value and its associated error correcting code are loaded from the area 126. The calculation circuit 130 is then, for example, configured to perform the calculation of the verification code of the data value from the buffer memory 131 and to compare the verification code with the error correcting code contained in the buffer memory 131.

[0038] When the calculated verification code corresponds to the error correction code, the data value is treated as being intact, and is for example loaded into one of several registers 132 (REGISTERS), included for example in the memory interface 106. This data value represents one or more security parameters which modify for example the behavior of the generic processor 116. For example, these security parameters define rules for accessing the data stored in the non-volatile memory 104, such as the authorization or prohibition of reading and / or modifying this data. In another example, these parameters make it possible to define one or more areas of the non-volatile memory 104 accessible only in reading, and / or one or more areas of the non-volatile memory 104 accessible in a secure mode.In yet another example, these parameters allow one or more cryptographic circuits (not shown) of the circuit to be enabled or disabled. integrated 102.

[0039] When the calculated verification code differs from the error-correcting code, this indicates that an alteration of at least one bit of the data value has occurred. Depending on the coding used to generate the error-correcting code and the size of this code relative to the size of the data value, it is also possible to identify the number of erroneous bits up to a certain limit, and to correct one or more erroneous bits of the data value. In an exemplary embodiment, it is possible to detect and correct one erroneous bit in the data value, or to detect the presence of at least two erroneous bits in the data value without being able to correct them.

[0040] In the applications covered by the present description, when at least two bits of the data value are determined by the calculation circuit 130 to be erroneous, it is considered that a suspicious event, such as an attack on the non-volatile memory 104, has taken place. In the case of detection of a suspicious event and in the embodiments described, provision is made to trigger countermeasures aimed at securing the integrated circuit 102. For example, in order to secure the integrated circuit 102, a default value is then stored in at least one of the registers 132 to replace the erroneous data value. The default value corresponds for example to a value of a security parameter imposing a secure mode on the circuit 102, such as a secure boot.

[0041] In the described embodiments, the interface 106 of the non-volatile memory 104 is configured to transmit a signal (TAMPER_OUT) to the control circuit 108 in the event of detection of a suspicious event. The control circuit 108 is configured to, for example, following the reception of the TAMPER_OUT signal, trigger other countermeasures. For example, each time the TAMPER_OUT signal is received, the control circuit 108 commands the incrementation of the counter 114 and, as soon as the counter 114 reaches a threshold value, the control circuit 108 is for example configured to reset the circuit 102. For example, the threshold value is between 3 and 10.

[0042] The control circuit 108 is further configured to transmit a warning signal (TAMPER_IN) to the interface 106 of the non-volatile memory 104 when a suspicious event is detected outside the non-volatile memory 104. Following reception of the TAMPER_IN signal, the interface 106 is for example configured to trigger countermeasures aimed at protecting the confidentiality of the content of the memory 104 and in particular of the content of the zones 122 to 128.

[0043] [Fig. 2] is a flowchart representing operations of a method for protecting the integrated circuit 102 of [Fig. 1] according to an exemplary embodiment of the present description. The steps of the method of [Fig. 2] are implemented, for example, by the non-volatile memory 104 and the memory interface 106, under the control of the generic processor 116.

[0044] In a step 200 (DUMP USER OPTION), a data value, for example contained in the area 126 of the non-volatile memory 104 of [Fig. 1], as well as the associated error-correcting code, are for example loaded into the buffer memory 131 of the calculation circuit 130. For example, in the case where there are several data values ​​to be processed in the area 126, these values ​​are for example associated with corresponding index values ​​or memory addresses. The data value and the error-correcting code loaded in step 200 correspond for example to those associated with a current value of the index or the memory address.

[0045] In a step 201 (COMPUTE ECC), the calculation circuit 130 calculates a verification code from the data value. The verification code is for example calculated according to the same algorithm as that used for calculating the error correction code associated with the data value and stored in association with the data value. In particular, before recording the data value in the area 126, the error correction code has for example been calculated, by the circuit 130 or by another circuit, so that the data value and the associated error correction code are recorded at the same time in the area 126. The calculation circuit 130 is further configured to compare the verification code with the error correction code associated with the data value.

[0046] In a step 202 (DBL_ECC ERROR?), the calculation circuit 130 determines, on the basis of the comparison between the verification code and the error correcting code, whether at least two bits of the data value, loaded in step 200, are erroneous.

[0047] In the case where the calculation circuit 130 determines that less than two bits of the data value are erroneous (branch N), the method continues in a step 203 (LOAD USER OPTION IN REGISTER) in which the data value is for example loaded into at least one of the registers 132. In the case where one bit of the data value is erroneous, the calculation circuit 130 is for example configured to correct this bit before loading the data value into at least one of the registers 132. It would also be possible that, instead of loading the data value into at least one of the registers 132, the data value is loaded into at least one storage element of the circuit 102, such as for example the volatile memory 112 or a register distinct from the registers 132 (not illustrated in [Fig.l]).

[0048] In the case where the calculation circuit 130 determines, during step 202, that a double error has occurred (Y branch), i.e. that at least two bits of the data value are erroneous, the method continues in a step 204 (SET DBL_ECC_ERR=1). During step 204, a value, for example the value 1, is assigned to a variable DBL_ECC_ERR, which is for example initially at 0. The variable DBL_ECC_ERR is for example stored in one of the registers 132 and its state indicates whether a value of data loaded during step 200 has been detected as having at least two erroneous bits. For example, when the DBL_ECC_ERR variable has a state of 0, this indicates that no double error has been detected on the previously processed data values. When the DBL_ECC_ERR variable has a state of 1, this indicates that at least one of the data values, loaded in an implementation of step 200, has a double error and, in this case, that a suspicious event has occurred. The values ​​0 and 1 are presented as examples and are of course not limiting.

[0049] Following the completion of step 203 or, where appropriate, step 204, the method continues in a step 205 (END?) in which it is determined, for example by the generic processor 116, whether another data value stored in the area 126 is to be loaded, in association with an error-correcting code, into the buffer memory 131. If it is determined that there remains at least one data value to be loaded (branch N), the method continues in a step 206 (INCREMENT USER OPTION INDEX). For example, when performing step 206, the memory address of the new data value to be loaded is determined, for example by the generic processor 116, and is transmitted to the non-volatile memory 104. The method then resumes in step 200. The new data value to be loaded is, for example, determined by incrementing the current index value.

[0050] In the case where, in step 205, it is determined that there is no more data value to load (branch Y), the method continues in a step 207 (DBL_ECC_ERR=1?) in which the state of the variable DBL_ECC_ERR is checked, for example by the generic processor 116. When the state of the variable DBL_ECC_ERR indicates that no double error has been detected (branch N), for example when the variable is equal to 0, the method ends in a step 208 (END). For example, following step 208, the data values ​​are used by the integrated circuit 102 in a startup sequence.

[0051] In the case where, during the performance of step 207, it is determined that a double error has been detected (Y branch), and consequently that a suspicious event has occurred, the method continues in a step 209 (COUNTERMEASURES). Step 209 consists of carrying out one or more countermeasures ensuring the protection of the circuit 102.

[0052] According to one embodiment, a countermeasure carried out in the event of detection of a suspicious event consists of loading default values ​​into at least one of the registers 132 in replacement of the data values. The default values ​​correspond for example to values ​​ensuring a secure start-up and / or operation of the circuit 102. By way of example, the default values ​​make it possible to restrict access to the non-volatile memory 104.

[0053] According to one embodiment, another countermeasure carried out in the event of detection of a suspicious event consists of replacing the value of the HW KEY encryption key stored in zone 122 with a dummy value. The HW KEY encryption key will then be unusable because its value will not allow the decryption of the data concerned.

[0054] According to one embodiment, another countermeasure carried out in the event of detection of a suspicious event consists of blocking all access to the zone 124 storing the OBK encryption keys.

[0055] According to one embodiment, another countermeasure carried out in the event of detection of a suspicious event consists in transmitting, via the interface 106 of the non-volatile memory 104 and to the control circuit 108 of the integrated circuit 102, the signal TAMPER_OUT. For example, the control circuit 108 is configured to control the incrementation of the counter 114 following the reception of the signal TAMPER_OUT. The generic processor 116 is for example configured to trigger a reset of the integrated circuit 102 when the counter reaches a certain threshold value.

[0056] Although, in the example of Figures 1 and 2, the verification code is calculated in the interface 106 of the volatile memory 104, in other embodiments, the data value and the associated error correcting code are loaded into a register outside the memory interface 106 and the non-volatile memory 104, for example in a register (not illustrated in [Fig.l]) included in the processor 116. The calculation of the verification code, as well as the comparison with the error correcting code, are then carried out outside the non-volatile memory 104.

[0057] Although in the example of Figures 1 and 2 the error correcting code is used to detect suspicious events, additionally or alternatively, it would also be possible to detect suspicious events by the volatile memory 104 based on other means. An example, based on SIG control signals, is now described in relation to [Fig.3].

[0058] [Fig. 3] is a flowchart representing operations of a method for protecting the circuit 102 of [Fig. 1] according to another exemplary embodiment of the present description. The steps of the method of [Fig. 3] are implemented, for example, by the non-volatile memory 104 and the memory interface 106, under the control of the generic processor 116.

[0059] In a step 300 (RECEIVE SIGNAL), the circuit 110 sends one of the control signals SIG to the interface 106 of the non-volatile memory 104.

[0060] By way of example, the transmitted control signal makes it possible to indicate to the non-volatile memory 104 whether certain functionalities of the integrated circuit 102 are activated and / or whether certain resources of the integrated circuit 102 are accessible. In another example, the transmitted control signal SIG indicates to the non-volatile memory 104 which areas memory composing it, for example which areas among areas partitioning the area 128, must be accessible or inaccessible for writing and / or reading. For example, a SIG control signal of this type is transmitted to the non-volatile memory 104 at each step of a startup sequence making it possible to progressively lock and / or unlock the non-volatile memory 104.

[0061] According to an embodiment of the present description, the control signals are encoded on a number m of bits, where m is an integer for example between 4 and 16. In particular, the number m makes it possible to add redundancy in the encoding of a control signal by encoding it on more bits than necessary. More particularly, out of the 2W possible control signal values, only a number Q, less than or equal to 2m / 2- of values ​​correspond to a valid and authorized control signal value. In other words, each valid and authorized control signal value differs from each other valid and authorized control signal value by at least two bits.When a valid and authorized control signal value is modified by a suspicious event, the values ​​of at least two bits among the m bits encoding this signal must therefore be modified so that the modified signal value corresponds to another valid and authorized value of the control signal. For example, the valid and authorized control signal values ​​are stored in a list, or in a table, stored for example in the non-volatile memory 104 or by another memory of the circuit 102.

[0062] In a step 301 (AUTHORIZED SIGNAL VALUE?), the interface 106 checks whether the value of the control signal is valid and authorized, for example by comparing it with the values ​​stored in the list or in the table of valid and authorized signal values. In the case where the value of the control signal received is valid and authorized (branch Y), the method resumes for example at step 300 in which the interface 106 is waiting to receive a new control signal. In the case where the value of the control signal received by the interface 106 does not correspond to a valid and authorized signal value (branch N), a suspicious event, altering the value of the signal, has occurred. The method continues in a step 302 (COUNTERMEASURES) consisting of carrying out one or more countermeasures ensuring the protection of the integrated circuit 102. The countermeasures deployed are for example the countermeasures described in relation to step 209 of [Fig.2].

[0063] [Fig. 4] is a flowchart representing operations of a method for protecting the circuit 102 according to another exemplary embodiment of the present description. The steps of the method of [Fig. 4] are implemented, for example, by the control circuit 108 and by the non-volatile memory 104 and the memory interface 106, under the control of the generic processor 116.

[0064] In a step 400 (SUSPICIOUS EVENT DETECTION), a suspicious event is detected by a detection mechanism outside the non-volatile memory 104. For example, the control circuit 108 of the integrated circuit 102 is configured to detect the occurrence of a suspicious event, for example taking place on the content of the volatile memory 102, on data being transmitted on the bus 118, etc. Mechanisms for detecting suspicious events are known to those skilled in the art, and will not be described here in detail.

[0065] Following the detection of a suspicious event outside the non-volatile memory 104 and the memory interface 106 during step 400, the control circuit 108 is configured to, in a step 401 (ASSERT TAMPER_IN SIGNAL), transmit the warning signal TAMPER_IN to the interface 106 of the non-volatile memory 104. During step 401, the control circuit 108 is for example further configured to trigger the incrementation of the counter 114.

[0066] The interface 106 then triggers, in a step 402 (COUNTERMEASURES IN NV MEM) countermeasures in order to protect the non-volatile memory 104. The countermeasures deployed are for example the countermeasures described in relation to step 209 of [Fig.2] such as: - loading the default values ​​into at least one of the registers 132 to replace the data values ​​coming from the memory area 126; - replacing the value of the HW KEY encryption key stored in zone 122 with a dummy value; and / or - prohibition of access to zone 124 storing the OBK encryption keys.

[0067] Various embodiments and variations have been described. Those skilled in the art will understand that certain features of these various embodiments and variations could be combined, and other variations will occur to those skilled in the art. For example, other countermeasures than those described may be implemented.

[0068] Finally, the practical implementation of the embodiments and variants described is within the reach of those skilled in the art from the functional indications given above.

Claims

Claims

1. A method comprising: - loading, from a non-volatile memory (104) of a circuit (102) to a computing circuit (130), a first security parameter of the circuit and a first error-correcting code stored in association with the first security parameter; - checking, by the computing circuit (130), the first security parameter and the first error-correcting code to determine whether one or more of the bits of the first security parameter are in error; - if it is determined that no bits of the first security parameter are in error, loading the first security parameter into a register (132); and - if it is determined that two bits of the first security parameter are in error, loading a default value into the register (132), the first security parameter and the default value defining rules for accessing the non-volatile memory.

2. The method of claim 1, wherein access to an area (124, 126) of the non-volatile memory (104) is permitted when the first security parameter is stored in the register (132) and wherein access to the area of ​​the memory is prohibited when the default value is stored in the register.

3. The method of claim 1 or 2, wherein the default value corresponds to a value imposing a safe operating state on the circuit (102).

4. The method of any one of claims 1 to 3, further comprising, if it is determined that two bits of the first security parameter are in error, transmitting an output signal (TAMPER_OUT) from an interface (106) of the non-volatile memory (104) to a control circuit (108) of the circuit (102), and performing one or more countermeasures by the control circuit.

5. The method of claim 4, wherein the control circuit (108) is configured to increment a counter (114) upon receipt of the output signal (TAMPER_OUT), and to reset the circuit (102) when a threshold value is reached by the counter.

6. The method of claim 4 or 5, further comprising, if it is determined that two bits of the first security parameter are in error, performing by the interface (106) of the memory (104) one or more of the following: several countermeasures.

7. Method according to claim 4 or 5, further comprising: - receiving, by the interface (106) of the non-volatile memory (104), a first control signal (SIG), the first control signal being composed of m bits, capable of taking 2m different values, only 9 values ​​among these 2m values ​​being authorized, each of these ? values ​​being different from the others by at least two bit values, where m is greater than or equal to 2 and 9 is less than or equal to 2m / 2; - comparing the value of the first control signal, by the interface of the non-volatile memory, with each of the q authorized values; and - if the value of the first control signal does not correspond to any of the q authorized values, carrying out one or more countermeasures, comprising for example transmitting the output signal (TAMPER_OUT) by the interface of the memory to the control circuit (108) of the circuit (102).

8. The method of claim 4 or 5, further comprising receiving by the interface (106) of the non-volatile memory (104), from the control circuit (108) of the circuit (102), a warning input signal (TAMPER_IN) indicating the detection of a suspicious event, and carrying out by the interface one or more countermeasures.

9. A method according to any one of claims 6 to 8, wherein the one or more countermeasures comprise prohibiting access to a first area (124) of the non-volatile memory (104) following receipt of the warning input signal (TAMPER_IN).

10. The method of claim 9, wherein the first area (124) of the non-volatile memory contains at least one encryption key (OBK).

11. A method according to any one of claims 6 to 10, wherein the one or more countermeasures comprise replacing the value of an encryption key (HW KEY), stored in the non-volatile memory (104), with a dummy value.

12. Method according to any one of claims 1 to 11, in which the loading into the register (132) of the first security parameter of the circuit (102) is carried out before the end of a start-up sequence of the circuit.

13. A method according to any one of claims 1 to 12, wherein the non-volatile memory (104) is a FLASH type memory.

14. Circuit (102) comprising: - a non-volatile memory (104) storing a first security parameter, and a first error correcting code, stored in association with the first parameter in the non-volatile memory; and - a calculation circuit (130) configured to: check the first security parameter and the first error correcting code to determine whether one or more of the bits of the first security parameter are in error; and if it is determined that no bit of the first security parameter is in error, load the first security parameter into a register (132); or If it is determined that two bits of the first security parameter are in error, load a default value into the register, the first security parameter and the default value defining rules for accessing non-volatile memory.

15. The circuit (102) of claim 14, further comprising an interface (106) of the non-volatile memory (104) configured to, when it is determined that two bits of the first security parameter are in error, transmit an output signal (TAMPER_OUT) to a control circuit (108) of the circuit configured to perform one or more countermeasures.