Technical Field
The present disclosure relates to the field of fault detection, and in particular to a device and method for executing a computing function protected against fault attacks.
Description of the Related Art
Integrated circuits may comprise circuitry that is considered sensitive in view of the security of the data that it processes, such as authentication keys, signatures, etc., or of the algorithms it uses, such as encryption or decryption algorithms. Such information should not be communicated to or otherwise be detectable by third parties or unauthorized circuits.
A common process for fraudulently discovering information manipulated by an integrated circuit involves detecting, within the circuit, the zones that are used during the processing of that information. For this, the circuit is activated or otherwise placed in a functional environment, and data to be processed by the circuit is introduced at an input. Then, while the data is processed, for example, the surface of integrated circuit is swept by a laser to inject faults in the functioning of the circuit, and in particular to flip the voltage state stored at one or more nodes of the circuit. While analyzing in parallel the outputs of the circuit, the zones that are used to process the data may be determined. Having localized such zones, the pirate can then concentrate the attacks on these zones in order to discover the secret information.
The injection of faults can also be used to bypass security checks or to infer secret information through the modification of the data being processed.
One solution for protecting against faults attacks is to provide two processing devices arranged to operate in parallel on the same input data. By comparing the results generated by these two devices, the injection of a fault can be detected. However, such a solution comes at a relatively high hardware cost.
An alternative solution that avoids the use of two processing devices is to execute the sensitive function twice using the same processing device and with the same input data. However, a drawback of existing implementations of this type of solution is that they are implemented with relatively high memory resources.
It is an aim of embodiments described herein to at least partially address one or more needs in the prior art.
According to one aspect of the present disclosure, there is provided a method implemented by a processing device comprising: performing a first execution by said processing device of a computing function based on one or more initial parameters stored in a first memory device, the execution of said computing function generating one or more modified values of at least one of said initial parameters, wherein during said first execution said one or more initial parameters are read from said first memory device and said one or more modified values are stored in a second memory device; and performing a second execution by said processing device of said computing function based on said one or more initial parameters stored in said first memory device.
According to one embodiment, during said second execution said one or more initial parameters are read from said first memory device and said one or more modified values are stored in said first memory device.
According to another embodiment, before performing said first execution, the method further comprises storing said one or more initial parameters in said first memory device.
According to another embodiment, the method further comprises, during said first execution of said computing function: receiving by said second memory device a write instruction associated with a first address in said first memory device and with a first data value; storing said first data value in said second memory device and storing said first address as an indexing value in said second memory device in association with said first data value; receiving by said second memory device a read instruction associated with said first address; locating said first data value in said second memory device based on said first address; and outputting said first data value from said second memory device.
According to another embodiment, the method further comprises comparing at least one value generated during said first execution of said computing function with at least one value generated during said second execution of said computing function.
According to another embodiment, said comparing operation comprising reading said at least one value generated during said first execution from said second memory device and reading said at least one value generated during said second execution from said first memory device.
According to another embodiment, the method further comprises: computing a first verification value based on a plurality of values generated by said first execution of said computing function; computing a second verification value based on a plurality of values generated by said second execution of said computing function; comparing said first and second verification values.
According to another embodiment, said first verification value comprises the sum of said plurality of values generated by said first execution and said second verification value comprises the sum of said plurality of values generated by said second execution.
According to another embodiment, said first verification value is computed as a cyclic redundancy check based on said plurality of values generated by said first execution, and said second verification value is computed as a cyclic redundancy check based on said plurality of values generated by said second execution.
According to a further aspect of the present disclosure, there is provided a method of detecting the occurrence of a fault attack during the execution of a computing function, comprising the above method.
According to a further aspect of the present disclosure, there is provided a computing device comprising: a processing device configured to perform first and second executions of a computing function based on one or more initial parameters, said computing function generating one or more modified values of at least one of said initial parameters; a first memory device configured to store said at least one initial parameter; and a second memory device coupled to said processing device and to said first memory device; wherein said processing device is configured to read, during said first execution, said one or more initial parameters from said first memory device and to store, during said first execution, said one or more modified values in said second memory device.
According to one embodiment, said processing device is configured to read, during said second execution, said one or more initial parameters from said first memory device and to store, during said second execution, said one or more modified values in said first memory device.
According to another embodiment, said second memory device comprises an enable input coupled to said processing device, and said second memory device is configured to forward, when disabled, all write and read instructions to said first memory device.
According to another embodiment, said second memory device is configured to receive, during said second execution, read instructions from said processing device and to forward said read instructions to said first memory device if they relate to one of said initial parameters.
According to another embodiment, the computing device further comprises a verification block adapted to compare at least one value generated during said first execution of said computing function with at least one value generated during said second execution of said computing function.
Non-limiting and non-exhaustive embodiments are described with reference to the following drawings, wherein like labels refer to like parts throughout the various views unless otherwise specified. The sizes and relative positions of elements in the drawings are not necessarily drawn to scale. For example, the shapes of various elements and angles are not drawn to scale, and some of these elements are enlarged and positioned to improve drawing legibility. Further, the particular shapes of the elements as drawn are not intended to convey any information regarding the actual shape of the particular elements and have been solely selected for ease of recognition in the drawings.
The foregoing and other purposes, features, aspects and advantages of embodiments of the present disclosure will become apparent from the following detailed description of embodiments, given by way of illustration and not limitation with reference to the accompanying drawings, in which:
Throughout the following description, only those aspects useful for an understanding of the embodiments of the present disclosure will be described in detail. Other aspects, such as the particular computing functions executed by the processing device, have not been described in detail, it being apparent to those skilled in the art that the embodiments described herein are applicable to a broad range of computing functions, for cryptographic applications or other types of applications.
One or more inputs/outputs 108 may be provided, such as keyboards or keypads, displays, etc.
In a first operation 201, the memory 106, and in particular the memory area 106A, is initialized. In particular, initial parameters to be used during the execution of the computing function are loaded in the memory area 106A. These parameters may include certain data values used during the computing function, which could be predetermined values, and/or values received on inputs of the computing device 100. They could also include one or more cryptographic keys.
In a subsequent operation 202, the initial state of the execution space 106A is copied to the memory area 106B, including the initial parameters.
In a subsequent operation 204, the computing function is called, which involves loading and executing instructions from the instruction memory 104, and will result in one or more data values being read from and written to the execution space provided by memory area 106A.
In a subsequent operation 206, after the computing function has been executed, the final state present in memory area 106A is stored in the memory area 106C.
The computing function is then executed for a second time. As an initial operation 208 of the second execution, the initial state as stored in memory area 106B is restored in the execution space 106A.
In a subsequent operation 210, the computing function 210 is called again, involving loading and executing the instructions again from the instruction memory 104, and will again result in one or more data values being read from and written to the execution space provided by memory area 106A.
In a subsequent operation 212, the new final state present in the memory area 106A is compared to the final state stored in memory area 106C, and any difference between the data values of these states would indicate the presence of a fault.
A drawback of the process of
Device 300 comprises a processing device 302, which is coupled to an instruction memory 304 storing instructions of a computing function to be executed by the processing device 302. A memory device 306 comprises a memory area 306A, and an intermediate memory device 307 is coupled between the processing device 302 and the memory device 306, and comprises a memory area 307A. In particular, memory device 307 receives address (ADDR) values on lines 308 for read operations, and address and data (DATA) values on line 308 and 310 for write operations, from the processing device 302. Read data is provided on lines 312 to the processing device 302. Furthermore, memory device 307 forwards address values for read operations on lines 314, and address and data values on lines 314 and 316 for write operations. Read data is received by memory device 307 from memory device 306 on lines 318. Memory device 307 for example comprises an enable input receiving an enable signal EN on line 319 from processing device 302.
As with the embodiment of
Operation of the computing device 300 will now be described in more detail with reference to the flow diagram of
In a first operation 401, the memory 306 is initialized. In particular, as described above with reference to operation 201 of
In a subsequent operation 402, the computing function is called with the intermediate memory 307 enabled via line 319. Execution of the computing function involves loading and executing instructions from the instruction memory 304, and will result in the initial parameters stored in memory area 306A being read, and one or more modified values of the parameters being generated.
With the intermediate memory 307 enabled, all memory operations originating from the processing device will be first processed by the intermediate memory 307. Certain write operations, at least those relating to the initial parameters stored in memory area 306A, are not written to memory area 306A but are instead written to the memory area 307A. In particular, the memory 307A is for example an associative memory. An associative memory is one in which the stored data values are each associated with a further indexing value, and this indexing value is used, during a read operation, to locate the stored data value to be read. Thus, if a write operation of a data value D1 targets a memory address ADDR1 in memory area 306A, the data value D1 is for example written to memory area 307A, and the address ADDR1 is also stored in memory area 307A as the indexing value associated with the data value D1. A future read operation relating to address ADDR1 will be directed to memory area 307A, and using address ADDR1 as the indexing value, the data value D1 can be located and read. Thus all read operations relating to data values that have been stored in memory area 307A will be read from memory device 307, whereas read operations directed to any of the initial parameters stored in memory 306A will not be found in memory area 307A, and will instead be forwarded to the memory area 306A.
In a first operation 402A, a read instruction for an address ADDRA of memory area 306A is received by the memory device 307.
In a subsequent operation 402B, the memory device 307 is searched, using the address ADDRA as an indexing value.
In a subsequent operation 402C, it is determined whether or not the indexing value ADDRA generated a hit in memory device 307. If so, the next operation is 402D, in which the data value associated with this indexing value in memory area 307A is provided as the output to the processing device 302. Alternatively, if the indexing value ADDRA was not found, the next operation is 402E, in which the read instruction is forwarded to memory device 306.
Thus the intermediate memory area 307A provides a memory space in which data may be written and read during the first execution of the computing function, while the initial parameters can be read from the memory area 306A but are not overwritten.
Referring again to
In a subsequent operation 406, the results of two executions of the computing function are compared. For example, it is verified that the data value stored at each address in the memory area 307A is identical to the data value of the corresponding address of the memory area 306A. Discrepancies between corresponding data values in the memory areas 306A, 307A could indicate the injection of a fault in one of these memories, in the processing device, or in the instruction memory 304. If the verification indicates the presence of a fault, a countermeasure may be taken, such as resetting the processing device, erasing the memory areas 306A, 307A, and/or incrementing a count value leading to a permanent deactivation of the processing device if a certain number of faults is detected.
Device 500 comprises a verification block 502 coupled to receive the address and data values transmitted on lines 308, 310 and 312 between the processing device 302 and the intermediate memory device 307. Furthermore, the verification block 502 may also receive instruction data from the instruction memory 304 on a line 504, which is coupled to the connection between the instruction memory 304 and the processing device 302. Thus the verification block 502 for example receives a copy of all instructions loaded to the processing device 302 during the execution of the computing functions. The verification block 502 records the data from these various sources by calculating a checksum value, for example equal to the sum of all of the values it receives. For example, assuming that the data values are n-bit values, the sum could be calculated as the sum, modulo n, of the data values and address values. The value of n could for example be between 8 and 64 bits. The verification block 502 for example calculates a first checksum during the first execution of the computing function, and a second checksum during the second execution of the computing function, and compares these checksums to verify that they match. If they do not match, this would imply the injection of a fault in one of the memories 304, 306, 307 or into the processing device 302 during the first or second execution.
A modified operation flow based on the use of the verification block 502 will now be described with reference to the flow diagram of
In a first operation 601, the memory 306 is initialized. In particular, as described above with reference to operation 401 of
Then, in a subsequent step 602, the checksum implemented by the verification block 502 is started, such that from this moment on, all the data signals and the address signals provided on the lines 308 to 312, and optionally the instructions from the instruction memory 304, are summed.
In a subsequent operation 604, in a similar manner to operation 402 of
In subsequent operation 606, the calculation of the checksum by the verification block 502 is stopped, and the value reached is for example stored for future verification.
In a subsequent operation 608, the checksum is activated again in preparation for the second execution of the computing function.
In a subsequent operation 610, the execution of the computing function is repeated by calling it a second time. As with operation 404 of
The calculation by the verification block 502 of the checksum during the second execution of the computing function could be implemented in a number of different ways. One option, assuming that the first checksum calculated during the first execution has been transferred to a separate register/memory, would be to simply reset the register used to accumulate the checksum, and to calculate the second checksum in this register. Alternatively, the verification block 502 may comprise two registers, a first of which is used to accumulate and store the checksum during the first execution of the computing function, and a second of which is used to accumulate and store the checksum during the second execution of the computing function. As a further option, the first checksum could be calculated by an addition of all the data/address/instruction values received, and the result could remain in the same register after the first execution of the computing function. Then, during the second execution of the computing function, the data values received by the verification block 502 could be subtracted from the first checksum such that the value in the checksum register would equal zero by the end of the second execution if no faults are present.
A subsequent operation 612 of
The memory devices 306, 307 could each be implemented by a RAM (Random Access Memory), such as an SRAM (Static RAM) or other type of volatile programmable memory device. Alternatively, the memory device 306 could be implemented by a non-volatile memory, such as for example an E2PROM (electronically erasable programmable read-only memory), as will now be described with reference to
During the first execution of the computing function, for example corresponding to operations 402 and 604 described above, the enable line 706 for example deactivates the non-volatile memory 306, and the intermediate memory 307 performs all read and write operations, unless they concern read operations of the initial parameters. For example, if the intermediate memory 307 receives a read operation request for an initial parameter not stored in its memory area 307A, it activates the memory interface module via line 706 so that the read operation is processed by the non-volatile memory 704 and the corresponding data is read from the array 702.
During the second execution of the computing function, for example corresponding to operations 404 and 610 described above, the enable line 706 for example activates the non-volatile memory 306, and the non-volatile memory performs all read and write operations.
An advantage of the embodiments described herein is that the execution of a computing function may be repeated with the use of relatively low memory resources. In particular, the initial parameters are stored only once during the first execution of the computing function, thereby economizing memory space. Furthermore, the use of a checksum avoids saving the entire final state generated during the first execution of the computing function.
Having thus described a number of embodiments, various alterations, modifications and improvements will readily occur to those skilled in the art.
For example, it will be apparent to those skilled in the art that the particular hardware implementation of the embodiments described herein will depend of the particular application, and could include separate memory devices or a single memory device containing the memory areas 306A, 307A and the instruction memory 304. Furthermore, the particular control of the memory device(s) during read and write operations will depend on the types of memory used.
It will also be apparent to those skilled in the art that various different checksum algorithms could be used to compute the checksums, a simple addition of the values being just one example. Furthermore, the checksum could be implemented by a cyclic redundancy check.
The operations of the various flow diagrams of
Furthermore, the various features described in relation to the various embodiments could, in alternative embodiments, be combined in any combination.
The various embodiments described above can be combined to provide further embodiments. These and other changes can be made to the embodiments in light of the above-detailed description. In general, in the following claims, the terms used should not be construed to limit the claims to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled. Accordingly, the claims are not limited by the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
11 61673 | Dec 2011 | FR | national |
The present application is a divisional of U.S. patent application Ser. No. 13/715,157, filed on Dec. 14, 2012, which claims priority to French Patent Application No. 1161673, filed on Dec. 15, 2011, all of which are hereby incorporated by reference in their entirety.
Number | Name | Date | Kind |
---|---|---|---|
6651148 | Widdup | Nov 2003 | B2 |
7111126 | Biles et al. | Sep 2006 | B2 |
7848515 | Dupaquis et al. | Dec 2010 | B2 |
7856523 | Bittner, Jr. | Dec 2010 | B2 |
8688995 | Teglia | Apr 2014 | B2 |
20010016927 | Poisner | Aug 2001 | A1 |
20050157871 | Komano et al. | Jul 2005 | A1 |
20060045264 | Kocher et al. | Mar 2006 | A1 |
20060212770 | Fischer et al. | Sep 2006 | A1 |
20070019805 | Karpovsky et al. | Jan 2007 | A1 |
20070177720 | Bevan et al. | Aug 2007 | A1 |
20070186036 | Bittner, Jr. | Aug 2007 | A1 |
20070188355 | Baek | Aug 2007 | A1 |
20070286413 | Derouet | Dec 2007 | A1 |
20090044265 | Ghosh et al. | Feb 2009 | A1 |
20090254761 | Thiebeauld De La Crouee et al. | Oct 2009 | A1 |
20090323956 | Tsunoo et al. | Dec 2009 | A1 |
20100310068 | Fischer | Dec 2010 | A1 |
20110041013 | Ingimundarson | Feb 2011 | A1 |
20110072222 | Wagner | Mar 2011 | A1 |
20110119532 | Teglia | May 2011 | A1 |
20110119762 | Teglia | May 2011 | A1 |
20110225432 | Trichina | Sep 2011 | A1 |
20110296198 | Motoyama | Dec 2011 | A1 |
20120060038 | Trimberger | Mar 2012 | A1 |
20130007881 | Liem | Jan 2013 | A1 |
20130103972 | Özer et al. | Apr 2013 | A1 |
20130290594 | Callahan et al. | Oct 2013 | A1 |
20130305098 | Keromytis et al. | Nov 2013 | A1 |
20140301553 | Salgado et al. | Oct 2014 | A1 |
20150130502 | La Rosa | May 2015 | A1 |
20170344310 | Peeters et al. | Nov 2017 | A1 |
Number | Date | Country |
---|---|---|
2 418 015 | Dec 2003 | FR |
2 919 739 | Feb 2009 | FR |
Entry |
---|
Wikipedia segmentation page of date Nov. 5, 2011, retrieved from https://web.archive.org/web/20111105213650/https://en.wikipedia.org/wiki/Segmentation_fault. |
Wikipedia “computing page” of date Nov. 12, 2011, retrieved from https://web.archive.org/web/20111127053222/https://en.wikipedia.org/wiki/Computing. |
Wikipedia “checksum” page of date Oct. 1, 2011, retrieved from https://web.archive.org/web/20111001065510/https://en.wikipedia.org/wiki/Checksum. |
Wikipedia “Augmented assignment” page from date Oct. 17, 2011, retrieved using the WayBackMachine from https://web.archive.org/web/20111017200601/https://en.wikipedia.org/wiki/Augmented_assignment (Year: 2011). |
Wikipedia “Iteration” page from date Oct. 8, 2011, retrieved using the WayBackMachine from https://web.archive.org/web/20111008205614/https://en.wikipedia.org/wiki/Iteration (Year: 2011). |
Bar El et al., “The Sorcerer's Apprentice Guide to Fault Attacks,” Proceedings of the IEEE 94(2):370-382, Feb. 2006. |
Bar-El et al., “The Sorcerer's Apprentice Guide to Fault Attacks,” retrieved from http://web.archive.org/web/20041016071838/eprint.iacr.org/2004/100, Oct. 16, 2004, XP002329915, 13 pages. |
Bertoni et al., “Error Analysis and Detection Procedures for a Hardware Implementation of the Advanced Encryption Standard,” IEEE Transaction on Computers 52(4):492-505, Apr. 2003. |
French Search Report, dated Jul. 13, 2012 for French application No. 1161673, 7 pages. |
Karpovsky et al., “Robust Protection against Fault-Injection Attacks on Smart Cards Implementing the Advanced Encryption Standard,” Proceedings of the 2004 International Conference on Dependable Systems and Networks, Jun. 28-Jul. 1, 2004, Piscataway, NJ, 9 pages. |
Karri et al., “Concurrent Error Detection Schemes for Fault-Based Side-Channel Cryptanalysis of Symmetric Block Ciphers,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 21(12):1509-1517, Dec. 2002. |
Moratelli, Carlos R. et al., “A Cryptography Core Tolerant to DFA Fault Attacks,” Journal Integrated Circuits and Systems 2007; v.2, n. 1, pp. 14-21. |
Wikipedia, “processor register,” retrieved from https://web.archive.org/web/20111107124250/http://en.wikipedia.org/wiki/Processor_register, on Nov. 7, 2011, 3 pages. |
U.S. Appl. No. 15/331,470, filed Oct. 21, 2016, Secured Execution of an Algorithm. |
Bidgoli (ed.), Handbook of Information Security: Threats, Vulnerabilities, Prevention, Detection, and Management, John Wiley & Sons, Inc., Hoboken, New Jersey, USA, 2006, pp. 236-238. (5 pages). |
Kim et al., “Introduction to fault attacks,” BCRYPT course on embedded security and application, May 19, 2009, 92 pages. |
Krzyzanowski, “Memory Management,” Mar. 25, 2012, URL=https://www.cs.rutgers.edu/˜pxk/416/notes/09-memory.html, download date Sep. 4, 2018, 17 pages. |
Lomne, “Countermeasures against Fault Attacks,” TRUDEVICE Training School on Trustworthy Manufacturing and Utilization of Secure Devices, Jul. 14, 2014, Lisbon, Portugal, 60 pages. |
Murray, “Input/Output and Interfacing,” University of Oxford, 2nd Year A2 Microcontroller Systems Course, Lecture 4, 2014, 18 pages. |
Shaffer, Data Structures and Algorithm Analysis, Edition 3.2 (C++ Version), Sep. 15, 2011, Chapter 3, “Algorithm Analysis,” pp. 55-91. (38 pages). |
Number | Date | Country | |
---|---|---|---|
20160124796 A1 | May 2016 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13715157 | Dec 2012 | US |
Child | 14996107 | US |