4
Circuits and design techniques for secure ICs resistant to side- channel attacks I Verbauwhede1 2, K Tiri2, D. Hwang2, P Schaumont3 1K U.Leuven, 2UCLA, 3Virginia Tech Abstract Security T + + 2 * *+ A < *+ 1- +- L ~~~~~~~~~~Protocol Integrated circuits used for security applications, such as smart- Acecture cards, leak information. The key or other sensitive information, can be guessed by monitoring the execution time, the power varia- security tion and/or the electromagnetic radiation of the integrated circuit. Algorithms This class of so-called side-channel attacks doesn't need expen- sive equipment or intrusive monitoring to be effective. We have shown that we can obtain the secret key out of a regular standardTheory CMOS implementation of the AES encryption algorithm by moni- toring the power consumption of only 2000 encryptions. This is Cycl Instruction Accuerate Models orders of magnitude lower than the mathematical security of 2128 Circuit possible encryption keys to break the algorithm. The root cause of styles this problem is that standard CMOS is power efficient and it will Implementation only consume dynamic power when nodes are switching. Mathe- matical solutions have been proposed that include randomization Figure 1: The security pyramid and masking techniques. Our original approach is that we address the problem at circuit level. Instead of a full custom layout, a few ation. The most well-known ones are timing, power and electro- key modifications are incorporated in a regular synchronous magnetic attacks. E.g. execution times that depend on the values CMOS standard cell design flow. We will present the basis for of data and/or key show what they are doing. Simple timing or side-channel attack resistance and adjust the library databases and power attacks give visual information on the circuit. constraint files of the synthesis and place & route procedures. For instance, an if-then-else in a cryptographic algorithm is a We will show the measurement results on two functionally good target. The jump or branch often depends on the value of the identical co-processors which were fabricated using a TSMC 6M keybits. These keybits can be derived by monitoring the execution 0.1 8,um CMOS. We will also discuss issues of side-channel resis- time or the power consumption profile of the algorithm. tance when implementing ICs in future technologies. Algorithmic counter measures are taken to make sure that the key bits are not revealed by simple observations. E.g. an algorithm Keywords: Security, integrated circuits, side-channel attacks, can be made side-channel secure by making sure that the if-then- VLSI design methods else is not key or data dependent. But even when these first order precautions are taken, much 1 Introduction more aggressive attacks are differential and higher order attacks. Every electronic device needs security, from the smallest RFID Especially differential power analysis (DPA) is of great concern. tags, to the larger handheld devices. Security is needed for finan- The attacks is based on the fact that circuits implemented in cial, medical, consumer, automotive applications, and other appli- CMOS technology have power characteristics that depend on the cations [2]. For instance, recently it was shown that even the data they are processing. It relies on statistical analysis and error memory size of an RFID tag is sufficiently large to accommodate correction to extract the information from the power consumption a computer virus. measurements that is correlated to the secret key. The DPA is Security is as strong as its weakest link [1]. This is illustrated in effective even if power variations are hidden due to measurement Figure 1. Strong cryptographic algorithms and protocols have errors and power dissipation from other processing elements on been developed. An example is the recently developed AES algo- the die. rithm. For implementation in embedded devices, efficient arith- Most countermeasures for DPA propose to increase random- metic and side-channel secure architectures and design methods ness or add extra noise to the circuit. Our original approach is to need to be developed. All these tasks are necessary, but the weak- look at the source of the power variations. Our idea is to reduce est link might sit at the circuit and implementation level, the data dependent power variations in CMOS circuit styles. Indeed, side channel attacks are a major source of concern for Hence we have developed circuit styles and associated design integrated circuits. Side channel attacks are a class of attacks that methods to address this problem. derive information from the integrated circuits, while it is in oper- 1 -4244-0098-8/06/$20.O ©0(2006 I EEE. 1 ICICDTO6

Circuits designtechniques channelattacks TAbstract+ + 2 ...rijndael.ece.vt.edu/schaum/pdf/papers/2006icicdt.pdf · cards, leak information. The key or other sensitive information,

Embed Size (px)

Citation preview

Circuits and design techniques for secure ICs resistant to side-channel attacks

I Verbauwhede1 2, K Tiri2, D. Hwang2, P Schaumont31K U.Leuven,2UCLA, 3Virginia Tech

Abstract SecurityT + + 2 * *+ A < *+ 1- +- L ~~~~~~~~~~ProtocolIntegrated circuits used for security applications, such as smart- Acecture

cards, leak information. The key or other sensitive information,can be guessed by monitoring the execution time, the power varia- securitytion and/or the electromagnetic radiation of the integrated circuit. Algorithms

This class of so-called side-channel attacks doesn't need expen-sive equipment or intrusive monitoring to be effective. We haveshown that we can obtain the secret key out of a regular standardTheoryCMOS implementation of the AES encryption algorithm by moni-toring the power consumption of only 2000 encryptions. This is Cycl

Instruction Accuerate Modelsorders of magnitude lower than the mathematical security of 2128 Circuitpossible encryption keys to break the algorithm. The root cause of stylesthis problem is that standard CMOS is power efficient and it will Implementationonly consume dynamic power when nodes are switching. Mathe-matical solutions have been proposed that include randomization Figure 1: The security pyramidand masking techniques. Our original approach is that we addressthe problem at circuit level. Instead of a full custom layout, a few ation. The most well-known ones are timing, power and electro-key modifications are incorporated in a regular synchronous magnetic attacks. E.g. execution times that depend on the valuesCMOS standard cell design flow. We will present the basis for of data and/or key show what they are doing. Simple timing orside-channel attack resistance and adjust the library databases and power attacks give visual information on the circuit.constraint files of the synthesis and place & route procedures. For instance, an if-then-else in a cryptographic algorithm is aWe will show the measurement results on two functionally good target. The jump or branch often depends on the value of the

identical co-processors which were fabricated using a TSMC 6M keybits. These keybits can be derived by monitoring the execution0.1 8,um CMOS. We will also discuss issues of side-channel resis- time or the power consumption profile of the algorithm.tance when implementing ICs in future technologies. Algorithmic counter measures are taken to make sure that the

key bits are not revealed by simple observations. E.g. an algorithmKeywords: Security, integrated circuits, side-channel attacks, can be made side-channel secure by making sure that the if-then-

VLSI design methods else is not key or data dependent.But even when these first order precautions are taken, much

1 Introduction more aggressive attacks are differential and higher order attacks.Every electronic device needs security, from the smallest RFID Especially differential power analysis (DPA) is of great concern.

tags, to the larger handheld devices. Security is needed for finan- The attacks is based on the fact that circuits implemented incial, medical, consumer, automotive applications, and other appli- CMOS technology have power characteristics that depend on thecations [2]. For instance, recently it was shown that even the data they are processing. It relies on statistical analysis and errormemory size of an RFID tag is sufficiently large to accommodate correction to extract the information from the power consumptiona computer virus. measurements that is correlated to the secret key. The DPA is

Security is as strong as its weakest link [1]. This is illustrated in effective even if power variations are hidden due to measurementFigure 1. Strong cryptographic algorithms and protocols have errors and power dissipation from other processing elements onbeen developed. An example is the recently developed AES algo- the die.rithm. For implementation in embedded devices, efficient arith- Most countermeasures for DPA propose to increase random-metic and side-channel secure architectures and design methods ness or add extra noise to the circuit. Our original approach is toneed to be developed. All these tasks are necessary, but the weak- look at the source of the power variations. Our idea is to reduceest link might sit at the circuit and implementation level, the data dependent power variations in CMOS circuit styles.

Indeed, side channel attacks are a major source of concern for Hence we have developed circuit styles and associated designintegrated circuits. Side channel attacks are a class of attacks that methods to address this problem.derive information from the integrated circuits, while it is in oper-

1 -4244-0098-8/06/$20.O ©0(2006 IEEE. 1 ICICDTO6

The rest of the paper is organized as follows. In section 2, thefundamental reason for the side-channel attacks is discussed. In clk EEcIksection 3, we present a insecure and a secure AES implementation. NAND r ANDIn section 4, we evaluate its side-channel resistance.

2 CMOS circuit styles VDDThe success of regular standard CMOS circuits is their low

power behavior. Indeed, to a first degree, (not taking into accountleakage current) a regular standard CMOS circuit will only con- AJsume power when a capacitance gets charged and later discharged,i.e. when a gate switches state. It is the main reason that CMOS isthe style of choice for every battery operated or low power device.This is illustrated in Figure 2 below for a simple invertor:

clk10-1

transition IN OUT event lk.0 to 0 0 Figure 3: Sense-Amplifier based Logic0 tot discharge output cap ANDINANDgateI to 0 charge output cap

A

I to I 0 This circuit style does require however a full-custom charac-terization and layout. It also suffers from a high clock load com-mon to all dynamic logic styles.

All four transitions of the CMOS invertor can be distinguished 2.2 Wave-dynamic differential logicwhen monitoring the power supply. When making a gate differen- To avoid the problems associated with full custom design andtial, it will hide the difference between a discharge and a charge with clocked dynamic logic, we have developed a circuit style,event, as exactly one output will charge and the other output will called wave-dynamic differential logic [4].discharge. However, one can still see if an event took place. Mak- The WDDL versions of an AND cell and an A0122 cell areing a gate dynamic, will make consecutive events independent. shown in Figure 4. The cells behave differential with differential

Therefore, secure gates need to be made dynamic and differen- inputs. They are positive cells, thus they will propagate a '0' whential. The differential property makes it impossible to differentiate all inputs are '0'. Hence the name 'wave' dynamic differential.between 0 and 1, the dynamic property disconnects current data During operation, a '0' or reset wave is alternated with a regularfrom previous data. There will be exactly one charge/discharge evaluation wave.event in every clock cycle.A dynamic and differential style is a necessary but not suffi- 2.3 Dlfferenial routing

cient condition. The circuit style should not suffer from 'memory In balancing the output capacitance, one has to take intoeffects'. I.e. the circuits cannot have internal nodes that become account three major components: the output capacitance of theisolated from VDD or GND during evaluation. driving gate, the interconnect capacitance and the input capaci-

The second main condition is that during every cycle the same tance of the fanout gates. As technology moves to smaller geome-capacitance (or the same amount of charge) is charged and dis- tries, the interconnect capacitance is the most dominant one.charged. This means a balance in internal capacitances (i.e. includ- There are no regular place & route tools which can guaranteeing the memory effect), input capacitances and output this type of perfectly matched differential routing. In certain rout-capacitances. Matching internal and input capacitances is a one ers, it can be done for a few special nets, such as the clock or atime effort during the construction of the logic gates. The same is reset signal. It is not available for all nets in a module such as e.g.true for the output capacitance associated with the gate itself. 20K+ gates in an AES module. Therefore, we have developed a

Therefore, a major design effort is in matching the interconnect novel design methodology to make sure that differential signalscapacitance.

__ ~~A A0122XI IVX42.1 Sense-Amplifier Based logic A A V

Therefore we have developed a circuit style called SABL, y

Sense-Amplifier Based Logic, which is illustrated in Figure 3 [3].Its main advantage is that it has balanced input and output nodes

2 X

and that all internal nodes connect to an output. The output capac- OAitances can be balanced. We have shown that it effectively works y

as acountermeasure to side channel attacks.Systematic methods have been developed to make sure that B

both branches of the differential pull-down network are balanced Figure 4: WOOL basic cells (a) WOOL ANDand that no memory effects are present in the network [5]. cell and (b) WOOL A0122 cell

1 -4244-0098-8/06/$20.O ©0(2006 IEEE. 2 ICICDT06

DIN S U B S H F T mWix RDOUT

R B R C

Figure 5: AES architecture

are always routed in adjacent tracks such that the parasitic effects The standard cell coprocessor has 199 Kgates with an area ofbetween the two wires are balanced [6]. 1.98-mm2 (0.79-mm2 for AES). The AES can operate at 330-

MHz for a 3.84 Gb/s encryption rate. As far as we know, this is the2.4 Synthesis, place & route fastest AES encryption rate published in silicon. At 50 MHz,

The WDDL approach can be integrated in a regular standard power consumption results for the AES and full system architec-cell synthesis approach. The user describes an application in a tra- ture are 0.054 W and 0.036 W, respectively.ditional VHDL or Verilog language. Synthesis is applied to this The WDDL coprocessor has 596 Kgates with an area of 5.95-behavioral description to obtain a gate level description. This can mm2 (2.45-mm2 for AES). The AES can operate at 85.5 MHz forbe done with regular synthesis tools. The only difference is a a 0.99 Gb/s encryption rate. For WDDL at 50 MHz, power con-library limitation, where the cells are restricted to the ones for sumption results are 0.200 W and 0.486 W for the AES and fullwhich a WDDL equivalent exists. And there is a post-processing system architecture, respectively.step to replace the regular cells by WDDL equivalent cells.

During place and route, regular nets and routes are replaced by 4 Side-channel resistancedifferential nets and routes. The details are described in [7]. The supply current of the insecure coprocessor exhibits large

3 AES example variations. It broadcasts the eleven encryption rounds. The powerconsumption profile of the secure implementation on the other

The WDDL logic style combined with the balanced place and hand is invariant and does not reveal any information in a simpleroute approach has been applied to the design of an AES co-pro- power analysis. In each clock cycle, the same total load capaci-cessor unit. tance is charged.

The architecture of the AES is illustrated in Figure 5. It imple- We performed DPA on each coprocessor as it executed AES,ments one round of the AES algorithm. It has a keyschedule mod- measuring 15,000 and 1,500,000 supply current acquisitions forule that calculates the roundkeys 'on-the-fly'. It has a 128 bit input the standard cell and WDDL coprocessors, respectively. In otherand 128 bit output. In total it takes 11 clock cycles to finish one words, we performed 15,000 encryptions on the standard cellAES encryption. coprocessor using the same key (with different inputs) while mea-

Two functionally identical versions of this AES module are suring the current fluctuations from the power supply. Using thesedesigned and fabricated in a 0.18 ,um CMOS standard cell technol- current fluctuations we performed the correlation DPA attack.ogy [8]. The AES module is part of a larger prototype biometric With WDDL, we performed 1.5 million encryptions.fingerprint authentication. Both the regular and protected versions The resistance against DPA is quantified with the number ofare shown in Figure 6. measurements to disclosure (MTD), which is the cross-over point

between the correlation coefficient of the correct key and the max-imum correlation coefficient of all the wrong keys guesses. Forboth coprocessors, an attack on one key byte is shown in Figure 7

I EIEIII iii and Figure 8. MTD is shown in the "Correlation vs. Number ofI Ehihiiii_N.g-g-gXlul2 = Measurements" graphs as the point where the black line crosses

the grey envelope. Though only one of the sixteen key-bytes (128-b key =16 key bytes) is shown, the results for the other fifteen keybytes are similar.

Please note that when attacking one key byte, the calculationson the other 15 key bytes act as noise. It shows that DPA attacks

I~~~~~~~~~~~~~~~~ are a really powerful tool to derive secret information from an'II~~~~~~ integrated circuit.

l~ ~~~~~~ _ii _|ll 1X1 0w*ugIIIeleu;W= 111 5 Conclusions s_* __ _ _

3C~~~~~~~~~~~~~~~~Scurity is as strong as its weakest link. In this overview paper,we have shown that security also has to be taken into account at

Figure 6: Regular and WOOL protected IC the circuit level of a design. Novel logic styles and associated dif-

1 -4244-0098-8/06/$20.O ©0(2006 IEEE. 3 ICICDT06

Correlation - [10o-] Correlation@ 15K Meas. - [10 11

0.5- 0.5

0 . 5 . 0.5. .

secret keymax/min other keysectky

1 -13 6 912 1 5 0 63 127 191 2550 3 6 9 312 15 KeyGuessNumber of Measurements - [1 0K]

Figure 7: DPA attack on insecure AES implementation (15K measurements)

Correlation - [1 0-1] 1Correlation @ 1 .5M Meas. - [1 0-1]1 F

0.5 0.St

-0.5 -0.5, ,~~~ secret key.

x/min other keysret k1 .__..__.._ -10 3 6 9 12 15 0 63 127 191 255

Number of Measurements - [1 01 Key Guess

Figure 8: DPA attack on secure AES implementation (1.5M measurements).ferential routing are an important tool to reduce the effects of a stand differential power analysis on smart cards," Proc. ESSCIRCside-channel attack. Perfect security does not exist, but with a 2002, September 2002.careful design one can eliminate or reduce the weak parts in a [4] K. Tiri and I. Verbauwhede, "A logic level design methodology fordesign. a secure DPA resistant ASIC or FPGA implementation," Proc.

Process variations and leakage current are major issues in the Design Automation and Test in Europe (DATE 2004), Feb. 2004.

design of future integrated circuits. It is unknown how they will [5] K. Tin and I. Verbauwhede, "Design method for constant powerconsumption of differential logic circuits," Proc. DATE 2005, pp.

influence the security of a device. Through leakage current, maybe 628-633, March 2005.one can deduce the state of a circuit. Process variations on the [6] K. Tiri, I. Verbauwhede, "Place and route for secure standard cellother hand, will influence the capacitance matching between dif- design," Proc. 6th Smart Card Research and Advanced Applicationferential routes. These are topic of current research. IFIP Conference (CARDIS 2004), August 2004.

[7] K. Tiri, I. Verbauwhede, "A Digital Design Flow for Secure Inte-6 Acknowledgements grated Circuits," accepted for IEEE Transactions on Computer-

This work was performed while the authors were at UCLA, Aided Design of Integrated Circuits and Systems.working in the Embedded security group [9]. The work was done [8] K. Tiri, David Hwang, A. Hodjat, B.C. Lai, S. Yang, P. Schaumont,

with the support of NSF, SRC, and UC-Micro. I. Verbauwhede, "AES-Based Cryptographic and Biometric Secu-with the support of NSF, SRC, and UC-Micro. rity Coprocessor IC in 0.18-um CMOS Resistant to Side-ChannelPower Analysis Attacks," 2005 Symposia on VLSI Technology

References and Circuits (VLSI SYMPOSIUM 2005), pp. 216-219, June 2005.[1] P. Schaumont, I. Verbauwhede, "Domain specific codesign for [9] Embedded security group, www.emsec.ee.ucla.edu

embedded security," IEEE Computer, vol. 36, no. 4, pp. 68-74,April 2003.

[2] M. Renaudin, F. Bouesse, P. Proust, J. Tual, L. Sourgen and F. Ger-main, "High Security Smart-cards," DATE, pp. 228-233, 2004.

[3] K. Tiri, M. Akmal, I. Verbauwhede, "A dynamic and differentialCMOS logic with signal independent power consumption to with-

1 -4244-0098-8/06/$20.O ©0(2006 IEEE. 4 ICICDTO6