Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Side Channel Analysis Resistant Design Flow

M. Aigner1, S. Mangard1, F.Menichelli2, R.Menicocci2, M.Olivieri2, T. Popp1, G. Scotti2, and A. Trifiletti2


1
IAIK – Institute for Applied Information Processing and Communications, Graz University of Technology, Graz, Austria
e-mail: Manfred.Aigner@iaik.tugraz.at
2
DIE - Dipartimento di Ingegneria Elettronica, Università di Roma "La Sapienza", Roma, Italy
e-mail: trifiletti@mail.die.uniroma1.it

Abstract— The threat of side-channel attacks (SCA) is of phenomenon of SCA in a consistent manner, developed
crucial importance when designing systems with cryptographic appropriate analysis setups for SCA-attacks and designed
hardware or software. The FP6-funded project SCARD1, effective tools for designers of secure systems. Those
enhances the typical micro-chip design flow in order to provide extensions of the established semi-custom design flow of
a means for designing side-channel resistant circuits and micro-chips are necessary in order to effectively design SCA
systems. Appropriate SCA-simulation tools and SCA analysis secure devices. So far implementation of SCA
for the designer of secure systems are part of the project goals. countermeasures demands application of full-custom design
We consider these enhancements for traditional design flows of strategies which prevents straightforward re-use or
micro-chips as necessary in order to enable the design for the
technology transfer of the products.
next generation of secure and dependable devices. SCARD is
in its final phase, the final result, a SCARD chip designed by The objectives of the project SCARD are:
using the developed design flow is currently implemented.
1. To research side-channel attacks and
countermeasures at both, hardware and software
I. INTRODUCTION level by consistently structuring the problem
Since the publication of DPA by Paul Kocher in 1999 [1] domain, and by improving side-channel attacks in
development of SCA countermeasures is part of secure order to test systems with respect to side-channel
design for systems with cryptographic hardware or software. resistance;
Especially smart cards and related micro-chip systems have 2. To model and simulate side-channel effects;
shown considerable vulnerabilities in this respect. Side-
channel attacks analyze and exploit the information produced 3. To establish a semi-custom design flow for micro-
by some system by, for example, measuring its power chips or parts thereof with clear guidelines and
consumption or the electro-magnetic emanation of this appropriate synthesis tools in order to be able to
system. From these traces the attacker can potentially make design and implement SCA resistant circuits.
conclusions about the secret data involved in a computation
inside the system. Meanwhile, simple power analysis (SPA), II. RESEARCH OF SCA AND COUNTERMEASURES
differential power analysis (DPA), and their related attacks,
To enable a secure design flow, it was decided to embed
simple and differential electro-magnetic emanation analyses
the SCA countermeasures into the basic building blocks for
(SEMA, DEMA) became known to a broader public, and
digital circuit design, namely into the logic cells of a
thus pose the biggest threat. In the following, we will refer to
standard cell library. Research for secure logic styles,
these side-channel analysis methods and related attacks by
compatible to automatic synthesis and place and route, was
using the acronym SCA.
necessary. Previously known approaches ([2],[3]) have been
The SCARD consortium works on enhancements of the investigated for their suitability for application in cell
typical micro-chip design flow – from high level system libraries and several new logic styles have been proposed.
description over register transfer layer description down to
Serious problems were discovered with existing
gate level netlists, and finally placement & routing of the
solutions, like the side channel leakage of masked logic
micro-chip – in order to provide a means for designing side- styles due to glitches [4], or the unreachable routing
channel resistant circuits and systems. We studied the whole requirements of dual-rail-precharge logic styles. New secure
logic styles were developed to avoid these problems, the
1
The project “Side-Channel Analysis Resistant Design most promising one is an approach that combines masking
Flow – SCARD” is sponsored by the EC IST programme and dual-rail precharge [5].
FP6 under the contract nr. IST-2002-507270.

0-7803-9390-2/06/$20.00 ©2006 IEEE 2909 ISCAS 2006


In a complementary approach Software countermeasures 1. Proper models for both the execution of the crypto
were investigated. Several different implementations of operation and the generation of the corresponding
AES, combining masking and randomization, as SCA relevant traces;
countermeasures were developed and analyzed. The
vulnerabilities due to glitches appearing in the insecure logic 2. Proper tools for the processing of the traces.
were shown and the added security level by software SCA tests can be implemented—with variable efficiency,
controlled randomization was assessed. significance, and costs—at several abstraction levels. Some
Up to now, people involved in side channel power applications of design-time SCA testing are described in [6],
analysis has performed power consumption measurements [7], and [8], for the power analysis context, and in [9], for the
by inserting a small resistor in series with the VDD or ground electromagnetic analysis context.
pin of the device under attack. In such approach, noise on the Within the SCARD project, the activity on SCA modeling
power supply, bonding wires, IC-package, PCB parasitics, and simulation mainly focused on SCA tests based on power
and the measurement setup parasitics heavily contributes to analysis, which were intensively explored at several
degrade the measured signal. abstraction levels.
In order to perform current measurements with a higher At high level, SystemC functionalities were exploited to
gain-bandwidth product, smaller insertion error and reduced analyze the susceptibility of a microcontroller system to
sensitivity to parasitics, a novel active circuit has been selected SCA attacks. The reference system was based on
proposed and implemented within the SCARD project. The ARM7 CPU and the analysis covered both software
active circuit allows us to provide the supply voltage to the (compiled C-code) and hardware (crypto-peripheral)
device under test and to detect and amplify the current implementations of AES128 [10], with or without specific
waveforms. We have been able to show that the active setup countermeasures.
allows us to increase the gain-bandwidth product of more
than 20 dB, to strongly reduce the equivalent impedance of Cycle-accurate SystemC models were used for the
the measurement setup and to reduce the sensitivity of the SW/HW crypto operation. As for power trace generation, we
measurement with respect to the parasitic capacitance due to used models based on Hamming measures (weight and
the on-chip power supply distribution. several kinds of distance) involving the status of the CPU or
of the crypto-peripheral, contributed from all the relevant
Experiments in which the proposed active measurement registers. For greater accuracy, we included some
circuit has been used to acquire the current traces of a simple coefficients to weight the power contributes of some
crypto core implemented on an FPGA, have shown about a registers with possibly high loads (e.g., bus drivers).
20 dB increase in sensitivity with respect to the resistor
based measurement. A prototypal SCA simulation platform, where many features
are user configurable, was produced and exploited for
The active circuit has then been used in the SCARD intensive attack simulation, by means of an off-line
measurement setup, which is based on two different boards: processing of power traces. As an example of positive result,
a “digital board” which provides all control and clock signals we mention the fast discovery of an implementation
needed to configure the SCARD test-chip and to carry out weakness in a countermeasure for a HW AES.
the measurements and an “analog board” on which the
SCARD test-chip and the active supply and measurement The main motivation for power estimation during HDL
circuitry are arranged. The Analog SCARD test board has development was to determine the SCA resistance during the
been placed in a metal box in order to improve the shielding. development process. We developed a method that allows
Measurements on the SCARD test-chip are ongoing and investigation for SCA susceptibility during logic simulation
preliminary results have confirmed the effectiveness of the of HDL models. This includes all levels of HDL models,
novel measurement approach. starting from high level architectural and behavioral
descriptions, down to gate level.
III. SCARD MODELLING & SIMULATION TECHNOLOGY Two prototypes of the HDL power estimator have been
implemented; one stand-alone tool, based on VCD outputs of
Designers of secure crypto systems can distribute and
HDL simulators, the other is directly embedded into
limit the costs of assessing the susceptibility of their designs
Mentor’s Modelsim via the PLI interface. Both methods
to SCA attacks by using a series of SCA tests, integrated in
were applied during the development of the SCARD chip
several steps of their design flow. Those tests can help in
and were especially helpful to avoid SCA leakages on the
detecting SCA vulnerabilities as soon as possible, so to
interfaces between secure and insecure parts that were not
optimize the costs for design adjustment.
considered initially.
Apart from a final assessment produced by testing
Though not modeled in the standard design flow of
physical prototypes, a SCA test basically consists in
digital integrated circuits, bond wires and package parasitics
simulating specific SCA attacks, which requires:
play an important role in determining the frequency response
of the current measurement setup.

2910
Within the SCARD project we have developed a attacks on masked circuits [12]. The new logic style MDPL
methodology to extract an accurate spice model of the performs masking with random values to de-correlate its
overall measurement setup starting from the VDD/GND pin power consumption and uses the DRP principle to avoid
of the IC up to the oscilloscope probe tips and applied it to glitches [5].
the specific case of the SCARD test-chip measurement
modeling. The SCARD design flow is based on standard tools for
digital circuit design. It was extended by a netlist conversion
The proposed method allows us to account for: tool [13] that performs the conversion from single rail logic
to dual rail and attaches necessary interface-cells to combine
1. Parasitic capacitance and resistance (Cchip and the secure modules with insecure designs in standard CMOS.
Rchip) between the VDD and GND pins of a given After standard synthesis the netlist is transformed and the
IC due to the on-chip supply distribution lines; cells from a standard CMOS library are exchanged with
2. Parasitic effects due to bonding and package secure cells with equal functionality. In a following step a
which are accurately modeled starting from 3D standard synthesizer is used to add the clock-tree and to
EM simulations or S-parameters measurements; insert buffers to meet the timing requirements. For MDPL no
3. PCB and cable parasitics modeled as lumped LC special constraints are necessary for the place-and-route step.
networks; For the two implementations of DRP cores, special steps for
4. Oscilloscope probes parasitic capacitance and parallel routing of differential signals were performed.
resistance.
SCA investigations based on the power traces generated
A key point of the proposed methodology is the
by the HDL power estimation methods throughout the
extraction of an accurate spice macro-model of bonding and
various steps of the design flow proofed to be very useful
package of a given IC starting from the physical description
during the design of the system.
(i. e. geometrical dimensions) of a given package and the
dimensions of the integrated circuit.
V. THE SCARD CHIP
The proposed approach is based on lumped RLC
networks whose parameters are obtained by means of a The SCARD chip is currently in a final implementation
fitting between the Scattering-parameters obtained by phase. It is specified in a way to demonstrate the potential of
simulating the spice model and the S-parameters of the the project results. By implementing it, we show that the
physical structure obtained by 3D full wave simulations or design flow developed in SCARD can be used to design
by measurements. Some commercial tools are available to chip-card like circuits. The chip contains different
carry out the extraction of this kind of model; we have used implementations of an 8051 controller core that is available
the Cadence IC Package Modeling (PKG) tool been used to in the open domain2. For cryptographic operation, a
perform the full wave simulations and the fitting procedure. hardware AES module is attached to the core. Fig. 1 shows
The accurate model of the SCARD test-chip bonding and the overall architecture of the chip. The µP-core is
package has then been included in the spice model of the implemented in six different versions on the chip, five
overall measurement setup; the complete model has then versions with SCA countermeasures and one plain version in
been ported to the CADENCE Analog Artist environment. standard CMOS for reference measurements (not all versions
are include into the sketch).
IV. SCARD SEMI-CUSTOM DESIGN FLOW
The method promoted by SCARD counteracts SCA on
the level of secure logic cells. A digital circuit is composed
of a limited number of different cells for storage (flip-flops)
and logic computation (AND, OR, NAND etc.). Data
depending power consumption of those cells are the reason
why SCA works and circuits implemented in standard
CMOS logic style. Dual Rail Pre-Charge (DRP) logic styles
are known since publication of K.Tiri [11] to prevent SCA
on that level, but they have several disadvantages. SCA
protection is only given if the pair of differential output wires
of each gate have absolutely balanced capacity. Theoretically
this could be achieved by perfectly parallel routing of
differential wires, but unfortunately this contradicts rules for
routing to prevent crosstalk. Masked logic styles use random
numbers to de-correlate the continuous power consumption
from the values of processed data. Different approaches on Figure 1: SCARD Chip Concept
masking on gate level have been published and patents have
been filed [3], but SCARD researchers showed that glitches 2
8051 IP core provided by Oregano Systems: see
can leak side-channel information that can be used to mount http://www.oregano.at/ip/8051.htm

2911
Internal RAM structures of the controller are REFERENCES
implemented as flip-flops to allow easy synthesis. One core [1] P. C. Kocher, J. Jaffe, and B. Jun., “Differential Power Analysis.” In
in DRP style is additionally equipped with an SCA protected Michael Wiener, Advances in Cryptology - CRYPTO ’99, 19th
XRAM block that was developed in SCARD. Annual International Cryptology Conference, Santa Barbara,
California, USA, August 15- 19, 1999, Proceedings, volume 1666 of
Additional control logic for selection of one active core, Lecture Notes in Computer Science, pages 388–397. Springer, 1999.
switching of inputs and output signals and deactivation of all [2] K. Tiri and I. Verbauwhede. “A Logic Level Design Methodology for
other cores is part of the design. A scenario to favor SCA a Secure DPA Resistant ASIC or FPGA Implementation”. In 2004
attacks is considered to measure and evaluate the level of Design, Automation and Test in Europe Conference and Exposition
(DATE 2004), 16-20 February 2004, Paris, France, pages 246–251.
SCA protection achieved by the countermeasures. Therefore IEEE Computer Society, 2004.
the chip will not be equipped with additional sensors and [3] F. Klug, O. Kniffler, and B. Gammel. “Rechenwerk, Verfahren zum
noise generators that are often integrated into chip card Ausführen einer Operation mit einem verschlüsselten Operanden,
products. Trigger outputs are available to signal starting Carry-Select-Addierer und Kryptographieprozessor. German Patent
points of operations that are planned to attack. The different DE 10201449 C1, January 2002.
cores have identical functionality, we expect therefore for the [4] S. Mangard, T. Popp, B. Gammel, “Side-Channel Leakage of Masked
first time fair comparisons of the protection level for CMOS Gates”, Proceedings of the RSA Conference 2005
Cryptographers' Track (CT-RSA 2005, February 14-18, 2005, San
different SCA countermeasures. Implementation on the same Francisco, USA), Lecture Notes in Computer Science (LNCS),
technology will furthermore allow fair comparison of the Springer Verlag, 2005
specific costs in terms of throughput, area and power [5] T. Popp, S. Mangard, "Masked Dual-Rail Pre-Charge Logic: DPA-
consumption. The controllers will be fully programmable by Resistance without Routing Constraints", Proceedings of the
code that is provided on an external ROM component. Workshop on Cryptographic Hardware and Embedded Systems 2005
(CHES 2005, August 29 - September 1, 2005, Edinburgh, Scotland),
Lecture Notes in Computer Science (LNCS), Springer Verlag, 2005
VI. CONCLUSION [6] J.I. den Hartog and E.P. de Vink, “Virtual Analysis and Reduction of
SCARD has produced many interesting results, which Side-Channel Vulnerabilities of Smartcards”, Proceedings of 2nd
International Workshop on Formal Aspects in Security and Trust -
can be well appreciated when thinking about the unique FAST 2004, IFIP 173.
scenario now available for the project partners. The relevant
[7] S. Berna Ors, F. Gurkaynak, E. Oswald, and B. Preneel, “Power-
advantage is the availability of a common platform, Analysis Attack on an ASIC AES implementation”, Proceedings of
consisting of the developed chip, tools, and methodologies, the IEEE International Conference on Information Technology:
for further SCA research. In fact, different approaches for Coding and Computing - ITCC’04, vol. 2, pp. 546-552.
SCA countermeasures are implemented in the same [8] M. Bucci, M. Guglielmo, R. Luzzi, and A. Trifiletti, “A Power
technology - on the same chip - together with an unprotected Consumption Randomization Countermeasure for DPA-Resistant
Cryptographic Processor”, Integrated Circuit and System Design -
reference design. Moreover, complete information from all Power and Timing Modeling, Optimization and Simulation -
abstraction layers, from specification via HDL model to PATMOS 2004, Lecture Notes in Computer Science, 3254, pp. 481-
several netlists, are available to produce, by simulation, a 490, 2004.
deep understanding of physical measurements. Back [9] H. Li, A.T. Markettos, and S. Moore, “Security Evaluation Against
annotation of the power models for accurate power Electromagnetic Analysis at Design Time”, Workshop on
simulation on higher levels can also be performed. Finally, Cryptographic Hardware and Embedded Systems - CHES 2005,
Lecture Notes in Computer Science, 3659, pp. 280-292, 2005.
an assessment of efficiency and/or effectiveness of software
and/or hardware countermeasures can be given. [10] AES, Advanced Encryption Standard, FIPS 197, Available at
http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf.
We are optimistic that the developed methods will be [11] Kris Tiri and Ingrid Verbauwhede. “Securing Encryption Algorithms
integrated into design-flows for commercial security against DPA at the Logic Level: Next Generation Smart Card
systems, although some important characteristics like Technology.” In Colin D. Walter, Cetin Kaya Koc, and Christof Paar,
editors, Cryptographic Hardware and Embedded Systems - CHES
throughput optimization or low-power considerations are not 2003, 5th International Workshop, Cologne, Germany, September 8-
applied in the first step towards a SCA-secure design flow. 10, 2003, Proceedings, volume 2779 of Lecture Notes in Computer
Future research includes area, power and throughput Science, pages 137–151. Springer, 2003.
optimization, as well as EM-attacks and even better [12] S. Mangard, N. Pramstaller, and E. Oswald. "Successfully Attacking
measurement setups. Masked AES Hardware Implementations", Proceedings of the
Workshop on Cryptographic Hardware and Embedded Systems 2005
(CHES 2005, August 29 - September 1, 2005, Edinburgh, Scotland),
AKNOWLEDGEMENTS Lecture Notes in Computer Science (LNCS), Springer Verlag, 2005
[13] E. Valentini, R.Ulmer, E. Haselwandter and T. Popp, “Configurable
This work has been generated by the SCARD consortium Logic Style Translation Based on an OpenAccess Engine” to be
and is supported by the European Commission under the published in the proceedingsof IEEE International Conference on
Sixth Framework Programme (Project SCARD, Contract Electronics, Circuits and Systems (ICECS), December 2005
Number IST-2002-507270).

2912

View publication stats

You might also like