METHOD OF PROTECTING ELECTRONIC CIRCUIT AGAINST EAVESDROPPING BY POWER ANALYSIS AND ELECTRONIC CIRCUIT USING THE SAME
20170214520 ยท 2017-07-27
Assignee
Inventors
Cpc classification
G09C1/00
PHYSICS
H04L9/0618
ELECTRICITY
H04L9/003
ELECTRICITY
International classification
H04L9/00
ELECTRICITY
H04L9/06
ELECTRICITY
Abstract
An electronic circuit with protection against eavesdropping by power analysis is provided. The electronic circuit includes: a storage element for storing a set of bits; a logic unit for processing the stored set of bits and providing a next state set of bits after two or more cycles, wherein in a first cycle, some of the stored set of bits are provided to the logic unit correctly and some are replaced by random values and in a last cycle, all of the stored set of bits are provided to the logic unit correctly; and a random bit generator that generates a random bit for each bit of the stored set of bits to determine which bits of the stored set of bits are to be provided correctly and which bits are to be replaced in each cycle.
Claims
1. An electronic circuit with protection against eavesdropping by power analysis, comprising: a storage element for storing a set of bits corresponding to correct values; a logic unit for processing the stored set of bits and providing a next state set of bits after two or more cycles, wherein in a first cycle, some of the stored set of bits are provided to the logic unit correctly and some are replaced by random values, and in a last cycle all of the stored set of bits are provided to the logic unit correctly; and a random bit generator that generates a random bit for each bit of the stored set of bits to determine which bits of the stored set of bits are to be provided correctly and which bits are to be replaced in each cycle.
2. The electronic circuit according to claim 1, wherein the electronic circuit is driven by two clock signals, and one of the clock signals is with half a frequency of the other.
3. The electronic circuit according to claim 1, further comprising an intermediate storage unit associated with the storage element for storing the correct values of the stored set of bits for use in the last cycle.
4. The electronic circuit according to claim 1, further comprising a selector associated with the storage element and the random bit generator for each bit of the stored set of bits, wherein the selector is controlled by the random bits to select between the correct value and the random value.
5. The electronic circuit according to claim 1, wherein the stored set of bits are stored in the storage element in an encrypted form.
6. The electronic circuit according to claim 5, wherein the stored set of bits are decrypted when provided to the logic unit.
7. The electronic circuit according to claim 1, wherein in a second cycle, the replaced bits corresponding to the random values are further replaced with the corresponding ones of the correct values and provided to the logic unit.
8. The electronic circuit according to claim 1, wherein half of the bits are replaced by the random values in the first cycle.
9. The electronic circuit according to claim 1, wherein a random number of bits are replaced by the random values in the first cycle.
10. The electronic circuit according to claim 1, wherein the bits that are randomly selected to be replaced are set to be opposite values of corresponding ones of the correct values.
11. A method of protecting an electronic circuit against eavesdropping by power analysis, comprising: storing an initial set of bits corresponding to correct values to a storage element; generating a random bit for each bit of the stored set of bits; in a first cycle, providing correctly some of the bits from the storage element to a logic unit and replacing rest of the bits by random values; in a last cycle, providing all of the stored set of bits correctly to the logic unit; and processing all of the stored set of bits in the last cycle to provide a next state set of bits.
12. The method according to claim 11, wherein the electronic circuit is driven by two clock signals, and one of the clock signals is with half a frequency of the other.
13. The method according to claim 11, further comprising storing the correct values of the stored set of bits for use in the last cycle to an intermediate storage unit associated with the storage element.
14. The method according to claim 11, further comprising selecting between the correct value and the random value according to the random bit by a selector for each bit of the stored set of bits.
15. The method according to claim 11, wherein the step of storing an initial set of bits further comprises encrypting the stored set of bits.
16. The method according to claim 15, wherein the step of providing all of the stored set of bits to the logic unit in the last cycle further comprises decrypting the stored set of bits.
17. The method according to claim 11, wherein the step of providing all of the stored set of bits to the logic unit in the last cycle further comprises obtaining the some of the bits from the storage element in the first cycle and replacing the rest of the bits which has been replaced by the random values in the first cycle with the corresponding ones of the correct values.
18. The method according to claim 11, wherein half of the bits are replaced by the random values in the first cycle.
19. The method according to claim 11, wherein a random number of bits are replaced by the random values in the first cycle.
20. The method according to claim 11, wherein the bits that are randomly selected to be replaced are set to be opposite values of corresponding ones of the correct values.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
DESCRIPTION OF THE EMBODIMENTS
[0026] Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
[0027]
[0028] In an exemplary embodiment of the disclosure, a general purpose computer 130 is programed to communicate with the cryptographic device 110, for example to provide instructions to the cryptographic device 110 and receive unencrypted transaction information. Optionally, during use, the cryptographic device 110 reads encrypted information e.g. from a smartcard 120 and provides unencrypted information to the computer 130 to perform a transaction. In an exemplary embodiment of the disclosure, the oscilloscope 140 monitors the power consumption of the cryptographic device 110 and provides a recorded signal 160 to the computer 130 for analysis. Optionally, based on the information from the cryptographic device 110 and/or the oscilloscope 140, the computer 130 can determine the cryptographic keys or other confidential information used in encrypting the information.
[0029]
[0030]
[0031] In an exemplary embodiment of the disclosure, there are two locations that are vulnerable with respect to a power attack and may serve as potential leaks for the content of the logic circuit (e.g. 200 and 300). The first location is from the logic unit (e.g. 210, 310) during calculation of the next value/state, and the second location is when updating the storage, e.g. when storing the next value/state back into the storage element (e.g. 220, 320). In an exemplary embodiment of the disclosure, to prevent an eavesdropper from using power analysis to determine the current contents of the logic circuit, the calculation is split into two or more cycles.
[0032]
[0033] In an exemplary embodiment of the disclosure, the logic circuit 400 includes a random bit generator 440 that provides m random bits (R0, R1 . . . Ri . . . Rm) like the storage element 420. Optionally, a random bit Ri having a value of zero signifies that the bit stored in the flip flop Si is to be transferred to the logic unit 410 in a first cycle, whereas a random bit Ri having a value of one signifies that the bit stored in the flip flop Si is to be transferred to the logic unit 410 only in a second cycle. The random bits Ri randomly select 1 or more or of bits stored in the flip flops S0 to Sm to be processed by the combinatorial logic unit 410 in the first cycle and select the rest bits to be processed by the combinatorial logic unit 410 only in the second cycle. Optionally, the random bit generator 440 may provide a random bit sequence in which half of the bits are zero so that half of the bits are processed in the first cycle and then all of the bits are processed in the second cycle. This splits up the calculation processed by the combinatorial logic unit 410 into two cycles and protects the calculation from being deciphered by power analysis. In some embodiments of the disclosure, the calculation may be split into more than two cycles.
[0034] In an exemplary embodiment of the disclosure, a selector Li (L0 and L1 are shown in
[0035]
[0036] In the first cycle, some of the bits stored in the flip flops Si are transferred from storage element 420 to the combinatorial logic unit 410 and some bits are replaced by random values (step 630). The random bits Ri determine which bits are transferred and which bits are replaced in the first cycle. In the second cycle, all of the bits are transferred from the storage element 420 to the combinatorial logic unit 410 (the random bits are replaced by the real bits) (step 640). Optionally, in the second cycle, fewer bits change from 0 to 1 consuming a lot of power in the combinatorial logic unit 410, since about half are already changed in the previous cycle. The result of the processing by the combinatorial logic unit 410 serve as the next state bits Ni (540) to be stored back into the storage element 420 (step 650).
[0037] In an exemplary embodiment of the disclosure, a time line 560 shows a standard power usage by a logic circuit relative to a timeline 570 that shows the power consumption randomly split into two parts over the two cycles. Some of the bits are set correctly in the first cycle and some are only corrected in the second cycle.
[0038]
[0039]
[0040] In an exemplary embodiment of the disclosure, the enhanced logic circuit 400 may be designed to support three or more cycles in a similar manner as described above, for example changing some of the bits to the correct values in the first cycle, changing some bits in the second cycle and changing some bits in a third cycle. Optionally, each cycle may introduce the same number of correct bits.
[0041] It should further be appreciated that the above described methods and apparatus may be varied in many ways, including omitting or adding steps, changing the order of steps and the type of devices used. It should be appreciated that different features may be combined in different ways. In particular, not all the features shown above in a particular embodiment are necessary in every embodiment of the disclosure. Further combinations of the above features are also considered to be within the scope of some embodiments of the disclosure. It will also be appreciated by persons skilled in the art that the present disclosure is not limited to what has been particularly shown and described hereinabove.
[0042] It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.