You are on page 1of 8

An Introduction to Implementation Attacks and Countermeasures

Thomas Popp
Graz University of Technology
Institute for Applied Information Processing and Communications (IAIK)
Graz, Austria
Thomas.Popp@iaik.tugraz.at

Abstract—Implementation attacks pose a serious threat to Kerckhoffs’ principle and means that it is sufficient to protect
the security of cryptographic algorithms and protocols. In such only the secret or private key from disclosure.
attacks, not the abstract descriptions of cryptographic methods The security goal of confidentiality is typically achieved
are attacked but their practical realizations in cryptographic
devices. This opens up a wide range of powerful attacks, which with the help of encryption algorithms. An encryption algo-
are introduced in this article. Also the main approaches to rithm takes as inputs the message to be protected (plaintext)
counteract implementation attacks are discussed. and the secret or public key. It produces a ciphertext as
Keywords-Implementation attacks; Side-channel analysis; output, which can only be decrypted by an entity that
Fault analysis; Countermeasures also knows the secret key or possesses the related private
key. A very common symmetric-key encryption algorithm
I. I NTRODUCTION today is the Advanced Encryption Standard (AES) [2]. To
While cryptography tries to protect sensitive data from provide the security goal of data integrity, one-way functions
disclosure and manipulation, various types of attacks aim (hash functions) are usually an important building block.
at circumventing this protection. Implementation attacks Such functions “compress” data blocks of arbitrary length
are a relatively new and very powerful kind of attack on to blocks with a fixed length. A common hash algorithm is
cryptographic methods. the Secure Hash Algorithm 1 (SHA-1) [3]. For authentication
and non-repudiation, digital signatures are used. An example
A. Cryptography for them is the Rivest-Shamir-Adleman (RSA) signature
Whenever sensitive data is exchanged between differ- algorithm [4].
ent entities, a subset of the following main aspects of
information security is of importance. Usually, only the B. Attacks on Cryptography in General
intended recipients should be able to read and understand The ultimate goal of attacks against cryptographic algo-
the transmitted data (confidentiality). In many cases, it must rithms is to reveal secret (and private) keys. Cryptanalytic
be verifiable that the data was not altered on its way from attacks aim at cryptographic algorithms directly (classical
sender to receiver (integrity) or who the originator of the cryptanalysis) or at their implementations in a device (im-
data actually is (authenticity). In other cases, the sender must plementation attacks). Other approaches to get information
not be able to deny being the originator of the transmitted about secret keys such as keystroke logging or social engi-
information (non-repudiation). And also, there are more and neering are not considered as cryptanalytic attacks. Social
more situations where the privacy of sender and receiver engineering means that people are manipulated so that they
must be ensured (anonymity). are prepared to give away secret credentials like passwords
Cryptography [1] provides a comprehensive set of meth- (phishing) or that publicly available information about them
ods to achieve these security goals. We generally distinguish is collected and analyzed to get hints on their potential
between cryptographic algorithms that either use no key, passwords. Especially in times of Facebook & Co it became
the same key (symmetric-key methods), or different keys quite easy to acquire such personal data [5].
(asymmetric-key methods) for the communicating entities. In In classical cryptanalytic attacks, the structure of cryp-
case of symmetric-key algorithms, the same secret key must tographic algorithms and their input and output values are
be exchanged between entities, which is the major drawback analyzed mathematically for weaknesses. In the context of
of this approach. Asymmetric-key algorithms use a key pair: encryption, such a weakness might for example allow to
the private key and the public key. Only the private key must recover (parts of) the plaintexts if a certain number of
be kept secret, the public key can be transmitted openly to ciphertexts is available. In the best case, a cryptanalytic
the other communication entities. attack allows to deduce the secret key itself. Many different
An important property of cryptographic algorithms is that methods of classical cryptanalysis are known, such as linear
their strength should not rely on the fact that the details and differential cryptanalysis [6]. A reasonable cryptanalytic
of a particular algorithm are kept secret. This is known as attack on a particular cryptographic algorithm has a lower

978-1-4244-4807-4/09/$25.00 ©2009 IEEE 108


complexity (time, memory) than a brute-force attack on the
Attacks on cryptography
same algorithm. In a brute-force attack, all possible values of
the secret key are tried out, which is computationally infea-
sible for the key sizes of modern cryptographic algorithms
(128 bits and more). Interestingly, there exists a symmetric- Cryptanalytic attacks Others
key encryption algorithm called the one-time pad which
cannot even be broken by a brute-force attack because for
a given ciphertext all possible plaintexts are equally likely. Classical Implementation
The major drawback of a one-time pad is that it requires a Cryptanalysis attacks
truly-random key bit for each plaintext bit and the key bits e.g. e.g. e.g.
must never be reused.
Side-channel Social
Brute-force
analysis engineering
C. Implementation Attacks
Linear/ Keystroke
A relatively new type of cryptanalytic attacks are im- Fault analysis
differential logging
plementation attacks. As the name implies, not the ab-
stract cryptographic algorithms are attacked in this case Probing attacks
but their practical implementations in cryptographic devices.
Implementation attacks became popular with the rise of Reverse
mechanical and especially electrical devices (integrated cir- engineering
cuits) that perform the cryptographic operations. A cryp-
tographic device consists of the components in a system Figure 1. The common taxonomy to classify attacks on cryptography.
that either perform cryptographic operations or that handle
the data of these operations. Examples include general-
purpose hardware like microcontrollers that execute software A second common classification criterion for implemen-
implementations of cryptographic algorithms and protocols, tation attacks is the interface that is used to manipulate
dedicated cryptographic hardware modules like encryption a cryptographic device or to access the available infor-
coprocessors, and (non-volatile) memories that store secret mation. In this context, we distinguish non-invasive, semi-
keys. Cryptographic devices come in many different shapes invasive, and invasive attacks. In non-invasive attacks, the
like smart cards or USB tokens. They generally tend to cryptographic devices are not permanently altered in any
be small, closed platforms which facilitates protection from way. Only information from directly accessible interfaces
attacks. is exploited. In semi-invasive attacks, only outer, basically
Implementation attacks are very powerful because they non-functional layers of cryptographic devices are removed
also utilize the information “emitted” by the physical imple- (e.g. chip packages). Active circuitry is neither directly
mentation, for example the execution time of a cryptographic contacted nor altered. Finally, invasive attacks include all
algorithm. Furthermore, they can include a wide range of manipulations and accesses that are technically feasible.
manipulations of implementations like cutting a wire in a This includes directly probing, cutting, and rerouting of
circuit on a chip. Classical cryptanalytic attacks are much wires and changing the logic states of signals in a chip.
more restricted in this respect. On the other hand, a practical It is clear that the different types of implementation attacks
mathematical weakness in a cryptographic algorithm renders differ significantly in terms of their complexity and cost.
it completely unusable while a successful implementation A general rule of thumb is that passive attacks are easier
attack typically only affects a specific cryptographic device. to conduct than active ones and that invasive attacks are
In most cases, no general weakness of the cryptographic much more complex and costly than semi-invasive and non-
algorithm can be derived from such an attack. invasive attacks.
Implementation attacks can be generally classified in two The main types of implementation attacks are: side-
ways. First, we distinguish between passive and active channel analysis, fault analysis, probing attacks, and combi-
attacks. In passive attacks, only the information emitted by nations of them. Also reverse engineering of cryptographic
a normally operating cryptographic device (e.g. a physical algorithms is considered as an implementation attack. The
property like its power consumption) is observed. This common taxonomy to classify attacks on cryptography is
includes that the device is operated within its specifications summarized graphically in Figure 1. Reverse engineering
(supply voltage, temperature, etc.). In active attacks, the in this context means that the software or hardware im-
cryptographic device and/or its environment is manipulated. plementation of an unknown cryptographic algorithm is
The main aim is to make the device behave abnormally and analyzed to find out how it actually works. Cryptanalytic
to exploit this abnormal behavior in an attack. attacks are typically only possible if the functionality of

109
the targeted cryptographic algorithms is known. This is II. S IDE -C HANNEL A NALYSIS
especially true for implementation attacks as we will see
later. However, security products often use proprietary cryp- Besides the obvious output channel of cryptographic de-
tographic algorithms, whose details are kept secret. There vices, namely the one providing the result of the executed
is a steady discussion going on if this violation of Ker- cryptographic algorithm, there exist various other, so-called
ckhoffs’ principle actually increases the overall strength of side channels which also emit information during operation.
a cryptographic system or not. Opponents of this security- Such information is for example how long the algorithm
by-obscurity approach argue that designing mathematically execution takes (timing analysis, TA), how much current
strong cryptographic algorithms is so complex that only an is drawn from the power supply (power analysis, PA), or
open evaluation by many different experts leads to robust how much EM radiation is emitted due to electrical activity
results. Furthermore they say that keeping the details of (electro-magnetic analysis, EMA). Also some more exotic
cryptographic algorithms secret in the long run is very hard. side-channel signals like sound or temperature have already
A recent example is the successful reverse engineering of been investigated.
the proprietary Crypto-1 encryption algorithm that is used If a secret key is included in a cryptographic algorithm,
in some radio-frequency identification (RFID) tags [7]. After the output values of all side channels are somehow related to
the semiconductor and wiring layers of such an RFID tag that key. In case of the result output channel, the influence
had been visually analyzed, the digital circuit could be of the secret key is present and observable only in the final
reconstructed and the details of the algorithm were revealed. output value. The major difference to side-channel signals
Subsequent cryptanalytic attacks on the algorithm showed is that they are typically also available for the calculation
that it is mathematically weak [8]. of the intermediate results of a cryptographic algorithm.
Side-channel analysis (SCA) attacks have received a lot Many intermediate results only depend on small parts of
of attention in the last years. They are passive, non-invasive the secret key. This enables a divide-and-conquer approach,
attacks which exploit physical signals (the “side channels”) which dramatically reduces the attack complexity.
emitted by normally operated cryptographic devices. The Three general types of SCA attacks are known: simple,
most common side channels are execution time, power differential, and template SCA attacks. Simple SCA attacks
consumption, and electro-magnetic (EM) emanation. The are possible in cases where a side-channel signal strongly
basic principle of SCA attacks is to determine secret keys depends on the individual bits of the secret key. For example,
from their influence on the side-channel signals. How this the value of a bit might determine which of two operations is
works and what can be done against it is presented in executed next or whether or not an operation is executed at
Section II in detail. all. If the operations are clearly visible and distinguishable in
Fault analysis (FA) attacks have become increasingly the side-channel signal, an attacker can directly deduce the
popular in the last years. FA attacks are in general more key simply by looking at the patterns in a side-channel trace.
complex than SCA attacks because they are active attacks. Simple SCA attacks typically require detailed knowledge
Their aim is to induce faults in a cryptographic circuit so about the attacked device and are relatively easy to prevent.
that it behaves abnormally and/or delivers incorrect results, The main characteristics of simple SCA attacks are that only
which in turn reveals information about the secret key. one or few side-channel traces are used and that a trace is
FA attacks and possible countermeasures are discussed in analyzed along the time axis.
Section III. Much harder to prevent are differential SCA attacks. In
Probing attacks are another, very powerful type of im- these attacks, the side-channel information emitted during
plementation attacks. These are passive, invasive attacks the calculation of a specific intermediate result is statistically
where outputs of memory cells, wires between logic cells, analyzed. The targeted intermediate result must depend on a
etc. are electrically contacted to read out their state while small part (e.g. 8 bit) of the secret key and on other, varying
the cryptographic circuit operates normally. Very expensive but known data (e.g. parts of the plaintext or ciphertext).
equipment like a chip probing station is necessary for The concrete value of the key part in question specifically
such attacks. Furthermore, probing attacks get more and influences the side-channel signal of the intermediate result.
more complicated because of the steadily shrinking feature An attacker now tries to estimate the side-channel signal for
sizes of semiconductor technologies (we are currently in the different possibilities of the key part with the help of
the nanometer range) and because of the exponentially a side-channel model and determines which estimation fits
increasing complexity of chip circuits (which means more best to the actual (measured) side-channel signal. Figure 2
routing layers, and thus, wires that are no longer accessible graphically depicts the principle of differential SCA attacks.
without destroying other important structures). Nevertheless, Very small influences of the secret key on the side-channel
the effort may still be worth it because successfully planted signal can be exploited by a differential attack. Such small
probes allow in the best case to directly read out bits of signals are not directly visible because they are buried in
secret keys. the switching noise caused by simultaneously calculated

110
Varying and processed data. The templates then help to enhance the
input data subsequent simple or differential SCA attacks. Template-
based differential attacks are considered as the strongest
type of SCA attacks but they require the availability of a
characterization device.
Cryptographic Secret Side-channel Key
device key model guesses The basic equipment necessary for SCA attacks is rel-
atively inexpensive. A state-of-the-art personal computer
usually provides enough computing power, versatility, and
Side-channel Side-channel memory to control the side-channel measurements, store
signal signal predictions the measurement results, and do the analysis. For the
measurement of the side-channel signals, instruments like
oscilloscopes, EM antennas, and spectrum analyzers are
Highest correlation for
necessary. These are today also available off-the-shelf with
which key guess?
sufficient performance and accuracy.
Figure 2. The principle of differential SCA attacks.
A. Timing Analysis

intermediate results and in all sorts of electronic noise. TA was first used in differential attacks on asymmetric
Due to the statistical analysis of the side-channel signal for cryptographic algorithms [9]. It was experimentally shown
varying, known data, it is possible to significantly reduce that by measuring the execution time of operations involving
this noise in the side-channel signal. the private key, information can be gathered that allows to
The main characteristics of differential SCA attacks are disclose the key. Some years later, an enhanced version of
that many side-channel traces for varying processed data the TA attack was used against the Secure Socket Layer
are used and that the analysis happens over the side-channel (SSL) library OpenSSL. This open-source library is used
values of the traces at a fixed point in time. The points in many web servers to secure connections. In the attack,
in time where the differential attack finally succeeds marks RSA decryption queries were sent to such a server over
exactly that points when the targeted intermediate result is the network. By analyzing the response times, the RSA
processed. This means that an attacker does not exactly private key could be determined [10]. The TA vulnerability
need to know when this processing actually happens. For in OpenSSL was fixed immediately after its discovery.
each trace, the side-channel signal is just recorded for a The reasons why the execution times of cryptographic
reasonable interval (e.g. from the beginning of an encryption algorithms and protocols depend on the input data are
to its end) and the differential attack is then performed manifold. All conditional statements that cause different
successively at each point in time. This is one main rea- operations to be executed typically have such an effect.
son why differential attacks typically require less detailed Furthermore, the run times of the basic arithmetic and logic
knowledge about the attacked device than simple attacks. So operations used in cryptographic algorithms usually vary
far, we only discussed first-order differential attacks where at least slightly with different input values. In software
only one intermediate result is analyzed. In higher-order implementations, cache misses and page faults in cache and
differential SCA attacks, two (second-order attacks) or more virtual memory systems significantly influence the execution
intermediate results are considered. Higher-order differential time. Practical experiments in that direction have been for
attacks are mainly used to defeat countermeasures against example the cache-timing attacks on AES [11].
SCA attacks. A successful TA attack has also been performed on
The third type of SCA attacks are template attacks. In Microsoft’s Xbox 360 game console. The firmware of the
such attacks, the side-channel model that describes how console is protected by a 16-byte integrity value, which
the performed operations and the processed data influence can only be calculated if a special secret key is known.
the side-channel signal are determined in a characterization The bytes of the integrity value were checked sequentially
step. This requires that the attacker has access to a fully for correctness. A significant timing difference could be
controllable cryptographic device, which is similar or even measured in the error indication signal depending on the
identical to the attacked one. With this characterization correctness of the first byte. This allowed an attacker to try
device, the attacker builds descriptions of the side-channel all 256 possibilities for the first byte, find the correct one,
signal for different keys and processed data. One such and move on to the next byte. In the end, the attacker got a
description for a specific key and processed data value is valid integrity value for a firmware that was not intended to
called a template. A template usually describes several points run on the console. Recent versions of the Xbox 360 seem
of a side-channel trace that show a relation to the used key to be no longer vulnerable to this specific TA attack.

111
B. Power and EM-Radiation Analysis C. Countermeasures
Many countermeasures against SCA attacks and espe-
SCA attacks exploiting the power consumption side- cially PA attacks have been proposed in the last ten years.
channel were presented for the first time at a conference Their aim is to reduce the exploitable part of the side-channel
in 1999 [12]. One of the first academic publications about information to a level where attacks are no longer possible or
EMA attacks was [13]. However, we know today that the US at least to a level that would require too much measurements
government was already aware in the 1950s that for example of the side-channel signal by an attacker. The first goal is of
EM signals radiated from monitor screens can be used to course the more attractive one, but it is very hard to reach
reconstruct the displayed content from a distance. This lead in practice. A general countermeasure against all types of
to the development of a set of standards summarized with the SCA attacks is to use secret keys and similar data as rarely
term TEMPEST, which describes possible countermeasures. as possible (e.g. derive session keys and work with them)
and to update them as often as practically possible.
The power consumption and the EM radiation of elec-
tronic devices have the same source: The currents flowing More technically speaking, the goal of SCA countermea-
in the circuits. Thus, the results from both types of SCA sures is to break the dependency between the data values
attacks are similar to some extent. A main difference is and operations occurring in a cryptographic algorithm and
the necessary measurement equipment: resistors and current the side-channel signals of a cryptographic device. Two
probes in the power supply line in case of PA; EM probes on basic approaches can be followed to achieve this goal. The
the chip package in case of EMA. Furthermore, EMA attacks first one is masking, which means that the intermediate
allow to target only parts of a circuit if a sufficiently small results in the algorithm are randomized before they are
probe can be placed near the interesting circuit component. processed in the device. The second one is hiding, which
This might also help to defeat some countermeasures. The breaks the link between the values processed in the device
noise in EMA measurements is typically higher than in PA and the side-channel signal. Masking as well as hiding
measurements (strong carrier signals, etc.). countermeasures are applied either at the architecture level
(software/hardware) or at the cell level (hardware) of cryp-
PA and EMA attacks are the most well studied types of tographic devices.
SCA attacks [14]. If data is processed in digital circuits, When masking is used, all vulnerable intermediate values
different signal wires must be charged and discharged. This v of a cryptographic algorithm are concealed by a random
leads to data and operation-dependent current flows. Besides value m called the mask: vm = v ∗ m. The random mask
simple power/EM analysis (SPA/SEMA), especially differ- is generated internally by a device because it must not
ential power/EM analysis (DPA/DEMA) is very common. be known by an attacker. All operations performed in a
The reason is that very good generic power and EM side- cryptographic device work only with the masked values vm .
channel models are available for differential attacks. We The most common masking operations ∗ are the exclusive-or
discussed before that such models are required to map (XOR) function (boolean masking) and arithmetic operations
predicted intermediate results (depending on the secret key) like modular addition or multiplication (arithmetic masking).
to power consumption and EM radiation values. These Examples of masking countermeasures are masked look-up
generic side-channel models are the Hamming weight (HW) tables in software, masked functional blocks in hardware,
model, the Hamming distance (HD) model, and the zero- masked or randomly precharged buses, and masked logic
value (ZV) model. The HW model assumes that the side- styles. In the asymmetric-key area, masking is usually called
channel signal is correlated to the number of bits that are 1 in blinding.
the intermediate result, the HD model assumes a correlation
Hiding countermeasures try to change the side-channel
to the number of changing bits, and the ZV model assumes
characteristics of cryptographic devices in a way that the
that the side-channel signal is significantly different for a
data processed on a device and the emitted side-channel
special value like 0 compared to all other values.
signals are no longer related. However, this is typically not
One example of successfully applying DPA on a com- perfectly possible in practice. There are essentially two ap-
mercial product is the attack on the KEELOQ code hopping proaches to implement hiding. The first one is to randomize
protocol [15], which is widely used in remote keyless entry the side-channel signals. The second approach is to make the
systems of garage and car doors. The DPA attack allowed side-channel signals equal for all operations and data values.
to retrieve the device keys of the hand-held transmitters, Randomization of side-channel signals can be achieved by
which can then be cloned easily. Much more seriously, also performing the operations of cryptographic algorithms at
the manufacturer key could be disclosed by the attacks. different moments in time for each execution (randomization
The manufacturer key is unique for a particular vendor of in time) or by directly increasing the noise level in the side-
KEELOQ products, and knowing it allows for example to channel signals (randomization in the amplitude dimension).
produce your own transmitters. Examples for randomization in time are: random insertion

112
of dummy operations, shuffling of operations, and randomly
changing the clock frequency. Examples for randomization
in the amplitude dimension are: architectures with wider
datapaths and noise engines. Equal side-channel signals for
different operations and data values can be achieved by
carefully selecting executed instructions and program flow,
filtering the side-channel signal, and special logic styles that
have equal propagation delay and/or power consumption.
Equalizing a side-channel signal typically means that the
signal is always a maximum.
III. FAULT A NALYSIS
If faults occur in cryptographic devices, the resulting
abnormal behavior or the erroneous output values of the
devices may reveal information about confidential data like
secret keys. In FA attacks, it is actively tried by various
means to induce faults in cryptographic devices. In general,
everything that causes a device to operate outside its speci-
fication or that puts it into an unintended state is considered
a fault. A rare group of passive FA attacks are those on
cryptographic devices that are faulty ex factory.
Already in the 1970s, the investigation of faults induced
in electronic systems in the field (e.g. in aircrafts) started.
At that time, it was mainly a safety-driven topic. One of the
first attacks on cryptographic systems involving faults was
reported in 1997 [16]. This attack, which is often referred
to as the “Bellcore attack”, targeted the asymmetric-key
algorithm RSA implemented in an optimized way based
on the Chinese remainder theorem (CRT). RSA’s security
is amongst other things based on the assumption that in Figure 3. Examples of fault induction techniques regarding their invasive-
ness: semi-invasive mechanical and chemical chip depackaging as deep as
practice an attacker cannot factorize a big known composite the circuits passivation layer (top); non-invasive attack with electric spark
value (the RSA modulus) into its two prime factors. If a (bottom left); invasive contacting of transistor structures through two wiring
specific fault can be induced in the RSA operation, this is layers with a FIB unit (bottom right).
easily possible.
Concerning their invasiveness, FA attacks are conducted
in the whole range from non-invasive to invasive approaches. rays, wire manipulations). Mid- and low-cost equipment for
Non-invasive FA attacks include the introduction of vari- FA attacks includes microscopes, lasers, mechanical and
ations and spikes in the supply voltage or the external chemical chip depackaging equipment, charge pumps (elec-
clock signal (glitch attacks). Another approach is to heat tric sparks), and microcontrollers (glitch attacks). Figure 3
or cool a cryptographic device so that its normal operation shows examples of non-/semi-invasive and invasive fault
range is left. Also sometimes radiation is used that has the induction techniques. A comprehensive overview of semi-
ability to successfully penetrate the intact package of a chip invasive and invasive fault induction techniques is given in
(e.g. X-rays, ion beams). In semi-invasive FA attacks, all [17].
types of radiation are used to induce faults in circuits via FA attacks are executed in two steps. First, the intended
photoelectric and other effects. Infrared and visible light, fault must be induced in the cryptographic device and its
laser beams (more focused than normal light), and ultraviolet effects must be recorded. This is typically the more resource-
radiation are typical means for semi-invasive fault induction. and expertise-intensive task. The second step is the analysis
Finally, invasive FA attacks include all methods where faults of the “erroneous” data gathered from the faulty operations.
are induced by cutting, inserting, or rerouting wires in a This step sometimes includes tasks that are computationally
circuit and where wires are electrically contacted in order to complex with respect to time and memory.
change their signal state (forcing). Especially the equipment Fault models are used to describe the properties of faults
necessary for invasive FA attacks is very expensive. It in- in detail. Fault models are independent of the attacked
cludes laser cutters (focused radiation, wire cutting), probing cryptographic algorithms and are related to the physical
stations (forcing), and focused ion-beam (FIB) units (particle and architectural properties of the attacked cryptographic

113
devices. The difficulty of a specific fault attack is amongst asymmetric-key algorithms. The exact attack approaches
other things defined by the properties of the models that in the two cases usually differ significantly. Examples of
describe the faults necessary for a successful attack. Fault theoretical and practical FA attacks can be found in [19].
models commonly include the following property categories Concerning examples of FA attacks on commercial products,
[18]. there have been some reports that smart cards used in pay-
TV systems have been successfully targeted. For example, it
• Impact on value: Should a data block flip its value (in
was allegedly possible to reactivate some of those cards after
case of a bit), should it be set to a specific fixed value,
they reached their expiration date: Faults have been used to
or should it be set to a random value?
jump out of the dead-end loops where the card controller
• Precision: This includes timing and location of the fault
was stuck after expiry.
induction event. Related to timing, the question is how
narrow the period is in which the fault must be induced.
In terms of location, the fault model describes the actual A. Countermeasures
target: a specific bit (which is very hard), a specific Countermeasures against FA attacks generally try to pre-
byte, some (random) bits within a specific byte or word, vent, detect, or correct faults being induced in a crypto-
etc. graphic device. Fault prevention is the most favorable ap-
• Duration: How long is the fault present in the cryp- proach because it ensures that the device operates completely
tographic device? We distinguish transient faults (fault unaffected. However, prevention measures alone are not
occurs only in one execution run), permanent faults enough in many cases. Therefore, they are typically com-
(fault can only be removed via a complete device reset), bined with fault detection methods, which are much more
and destructive faults (fault permanently changes the flexible. If a fault is detected, a cryptographic device usually
device). resets itself or even ceases operation. Fault correction is
• Probability: This property gives the overall probability a very complex and fragile approach and it is commonly
that the described fault is successfully induced. A assumed that it often even increases the vulnerability to
problem in this context is sometimes how an attacker fault attacks. Thus, it is rarely used to protect cryptographic
can verify that a fault was successfully induced. devices from fault attacks.
In the following, we briefly present some common FA Basic fault prevention measures are implemented in hard-
attack scenarios. Glitch attacks are low-cost FA attacks ware because this is the place where a fault actually mani-
that often target microprocessors and similar devices. Their fests. Common techniques are stabilizers (e.g. for the supply
typical aim is that important instructions are misinterpreted voltage) and filters (e.g. for the external clock signal). A
or even skipped (program flow modification) or that data general prevention method for fault attacks using the clock
values are modified. With attacks where the temperature signal is to generate it internally. Passive shields (coating)
is pushed outside its nominal range, it is tried to selec- are often used to prevent radiation from entering a chip
tively block read and write operations in various types of package. Note that such shields might also reduce the radia-
memories. Semi-invasive fault attacks with light aim at tion emitted by a cryptographic device, which makes EMA
the active areas of the transistors of integrated circuits to attacks harder. A more elaborate fault prevention method
make them conduct in cases where they actually should is the randomization of operations, which is applicable to
not. For example, static random-access memories (SRAMs) hardware and software. As a result, it gets harder for an
can be attacked in that way. If security fuses (they protect attacker to induce faults in the intended operation steps and
for example program memories in embedded systems from data blocks. Another common approach for hardware and
being read out) or non-volatile memories like electrically software implementations is data masking or encryption.
erasable programable read-only memories (EEPROMs) are This makes it hard for an attacker to estimate the conse-
targeted, usually ultraviolet light must be used because a quences (impact on value, precision) of an induced fault.
higher-energy radiation is necessary to influence the transis- Fault detection methods implemented in hardware include
tors in these cases. In general, it becomes steadily harder all sorts of detectors (light, supply voltage level, clock signal
to attack chips from the front side. The main reason is shape, EM radiation level, etc.) and active shields. Such
that transistors become more and more inaccessible due shields usually detect mechanical manipulations of the chip
to shrinking structure dimensions, increasing numbers of package. Fault detection mechanisms applicable to software
interconnect layers, and also due to the application of FA and hardware include the large field of calculation and data
countermeasures. A possible alternative here are rear-side redundancy. The same calculation can be performed more
fault attacks. In this case, chips are opened on the back than once in parallel (hardware redundancy) or consecutively
side and infrared radiation is used to penetrate the circuit (time redundancy). Combinations of both approaches are
substrate, in which the transistors are embedded. also possible. Data redundancy is implemented for example
The targets of FA attacks are both symmetric-key and with special data codes, checksums, and error correcting

114
codes. Some types of redundancy methods also allow for [8] F. D. Garcia, P. van Rossum, R. Verdult, and R. W. Schreur,
fault correction. “Wirelessly Pickpocketing a Mifare Classic Card,” in 30th
IEEE Symposium on Security and Privacy (S&P 2009),
A typical drawback of many pure hardware counter-
Oakland, CA, USA, 17-20 May, 2009, Proceedings. IEEE
measures is that they only protect against specific, known Computer Society, May 2009.
types of faults. Countermeasures that are applicable both to
software and to hardware implementations usually protect [9] P. C. Kocher, “Timing Attacks on Implementations of Diffie-
Hellman, RSA, DSS, and Other Systems,” in Advances in
against a broader range of fault attacks. Cryptology - CRYPTO ’96, 16th Annual International Cryp-
tology Conference, Santa Barbara, CA, USA, August 18-22,
IV. C ONCLUSIONS 1996, Proceedings, ser. LNCS, N. Koblitz, Ed., no. 1109.
Springer, 1996, pp. 104–113.
Implementation attacks are very versatile and allow to
attack cryptographic methods which are assumed to be [10] D. Brumley and D. Boneh, “Remote timing attacks are
practical,” Computer Networks, vol. 48, no. 5, pp. 701–716,
secure from a mathematically standpoint. Regular reports
2005.
of successful implementation attacks on (commercial) cryp-
tographic products confirm that the threat is real. Crypto- [11] D. J. Bernstein, “Cache-timing attacks on AES,”
graphic devices must be properly protected against all types April 2005. [Online]. Available: http://cr.yp.to/antiforgery/
cachetiming-20050414.pdf
of implementation attacks.
[12] P. C. Kocher, J. Jaffe, and B. Jun, “Differential Power
ACKNOWLEDGMENT Analysis,” in Advances in Cryptology - CRYPTO ’99, 19th
Annual International Cryptology Conference, Santa Barbara,
This work has been supported by the Austrian Gov- CA, USA, August 15-19, 1999, Proceedings, ser. LNCS,
ernment through the research program FIT-IT Trust in IT M. Wiener, Ed., vol. 1666. Springer, 1999, pp. 388–397.
Systems (Project ARTEUS, Project Number 816148). I [13] K. Gandolfi, C. Mourtel, and F. Olivier, “Electromagnetic
personally want to thank my colleague Jörn-Marc Schmidt Analysis: Concrete Results,” in Cryptographic Hardware
for his comprehensive help concerning the section about and Embedded Systems – CHES 2001, Third International
fault analysis. Workshop, Paris, France, May 14-16, 2001, Proceedings, ser.
LNCS, Çetin Kaya Koç, D. Naccache, and C. Paar, Eds., vol.
2162. Springer, 2001, pp. 251–261.
R EFERENCES
[14] S. Mangard, E. Oswald, and T. Popp, Power Analysis Attacks
[1] A. J. Menezes, P. C. van Oorschot, and S. A. – Revealing the Secrets of Smart Cards. Springer, 2007,
Vanstone, Handbook of Applied Cryptography, ser. ISBN 978-0-387-30857-9.
Discrete Mathematics and its Applications. CRC
Press, 1997, ISBN 0-8493-8523-7. [Online]. Available: [15] T. Eisenbarth, T. Kasper, A. Moradi, C. Paar, M. Salma-
http://www.cacr.math.uwaterloo.ca/hac/ sizadeh, and M. T. M. Shalmani, “On the Power of Power
Analysis in the Real World: A Complete Break of the
[2] National Institute of Standards and Technology (NIST), KEELOQ Code Hopping Scheme,” in Advances in Cryptol-
“FIPS-197: Advanced Encryption Standard,” November ogy - CRYPTO 2008, 28th Annual International Cryptology
2001. [Online]. Available: http://www.itl.nist.gov/fipspubs/ Conference, Santa Barbara, CA, USA, August 17-21, 2008,
Proceedings, ser. LNCS, D. Wagner, Ed., no. 5157. Springer,
2008, pp. 203–220.
[3] ——, “FIPS-180-3: Secure Hash Standard,” October 2008.
[Online]. Available: http://www.itl.nist.gov/fipspubs/ [16] D. Boneh, R. A. DeMillo, and R. J. Lipton, “On the Impor-
tance of Checking Cryptographic Protocols for Faults (Ex-
[4] R. L. Rivest, A. Shamir, and L. Adleman, “A Method for tended Abstract),” in Advances in Cryptology - EUROCRYPT
Obtaining Digital Signatures and Public-Key Cryptosystems,” ’97, International Conference on the Theory and Application
Communications of the ACM, vol. 21, no. 2, pp. 120–126, of Cryptographic Techniques, Konstanz, Germany, May 11-
February 1978. 15, 1997, Proceedings, ser. LNCS, W. Fumy, Ed., vol. 1233.
Springer, 1997, pp. 37–51.
[5] H. H. Thompson, “How I Stole Someone’s Identity,” August
[17] S. P. Skorobogatov, “Semi-invasive attacks - A new approach
2008. [Online]. Available: http://www.scientificamerican.
to hardware security analysis,” Ph.D. dissertation, University
com/article.cfm?id=anatomy-of-a-social-hack
of Cambridge - Computer Laboratory, 2005. [Online].
Available: http://www.cl.cam.ac.uk/TechReports/
[6] E. Biham and A. Shamir, Differential Cryptanalysis of the
Data Encryption Standard, 1st ed. Springer, May 1993, [18] M. Otto, “Fault Attacks and Countermeasures,” Ph.D. disser-
ISBN 978-0387979304. tation, Universität Paderborn, 2005.

[7] K. Nohl, D. Evans, Starbug, and H. Plötz, “Reverse- [19] H. Bar-El, H. Choukri, D. Naccache, M. Tunstall, and
Engineering a Cryptographic RFID Tag,” in USENIX Security C. Whelan, “The Sorcerer’s Apprentice Guide to Fault
Symposium, San Jose, CA, USA, 31 July, 2008. USENIX, Attacks,” Cryptology ePrint Archive, Report 2004/100, 2004.
2008, pp. 1–9. [Online]. Available: http://eprint.iacr.org/

115

You might also like