Side-Channel Analysis

Опубликовано: 20 Май 2026
на канале: Cihangir Tezcan
377
8

Full Course:    • Lightweight Cryptography for Internet of T...  

Slides are just shortened version of Stefan Mangard’s course slides: Secure Implementation of Cryptographic Algorithms

#internetofthings #cryptography #cybersecurity

Embedded Systems
An embedded system is some combination of computer hardware and software that is specifically designed for a particular function
Recently embedded systems have become more and more complex and are close to the functionality of a PC (e.g. smart phones)
Many side-channel attacks focus on small embedded systems where all components (including RAM, Flash memory, etc.) that are critical for the security applications are integrated on a single piece of silicon
Attacks on systems with multiple chips can be performed in similar ways and are typically simpler
Integrated circuit Market: More than 5 billion devices per year

Embedded System Security
In general attack scenarios we only assume that the communication channel is insecure and the attacker can eavesdrop
In case of embedded systems the attacker often has more power
Pay TV: The broadcasting company gives smart cards to customers, customers may try to duplicate the card
Electronic purse: The customers might want to add money themselves
DRM: The customers might want to copy the material for their friends
Brand protection: The customer wants to use cheaper ink, batteries,...
When designing an embedded system it is necessary to assume that the customer will try to break it

Attacks on Embedded Devices
Social Engineering
Logical Attacks
Software vulnerabilities
API attacks
Cryptanalysis
Physical Attacks: Observe and manipulate physical properties of the device or its environment

Examples of Physical Attacks
You find a USB stick with secret data on it
To access it you need to enter an 8-digit PIN
Device has a delay response - so one trial takes 1 second
Brute force requires ≈ 3 years
Can we do better?
Let’s assume that password check is implemented on an embedded ARM processor in a straightforward way
It checks correctness of the 1st digit, if it is correct then it checks the 2nd digit and so on
Thus, execution time is directly proportional to the number of correct PIN digits!

A Timing Attack on the PIN Check
1. Select a random PIN value
2. Fix all digits except the first one
3. Measure the timing for all 10 possible values of the first digit
4. The value that leads to the longest execution time is the correct one
5. Set the first digit to this value and proceed with the next digits in the same way
6. 10x8=80 trials are enough to access the USB stick
7. If the timing measurement is noisy, averaging over multiple measurements needs to be done

Checking every digit of the entered PIN is not a solution because code requires more operations to be performed when a digit is correct
Assume that the designer of the USB stick inserts NOP (no operation) instructions to balance the timing of both execution paths
How can we attack such a fixed system?

Timing Attacks on Symmetric Cryptography
Timing attacks are in particular relevant for asymmetric cryptography
However, attacks on symmetric cryptography is possible if either
the software implementation is not done carefully
the hardware adds data-dependent behavior
Each intermediate data values of all cryptographic algorithm carries information about the key!!
AES example: During the matrix multiplication, multiplication by 2 means
Shift left
If MSB was 1 before the shift, add 0x1B to the result
because the multiplication is not an integer multiplication but it is a Galois Field multiplication

The Power Consumption of Digital Circuits
The vast majority of digital circuits are implemented using CMOS logic
The instantaneous power consumption of devices implemented in CMOS depends on
the instruction that is executed
the data that is being processed
Consequences for the PIN check implementation: An attacker who measure the power consumption can easily detect whether NOP instructions are executed or not

A Power Analysis on the PIN Check
1. Select a random PIN value
2. Fix all digits except the first one
3. Measure the power consumption for all 10 possible values of the first digit
4. The value that leads to a significantly different power consumption than the other nine is the correct one
5. Set the first digit to this value and proceed with the next digits in the same way
6. 10x8=80 power measurements are enough to access the USB stick
7. If the power measurement is noisy, averaging over multiple measurements needs to be done

Counteracting the Power Analysis Attack
Counteracting power analysis attacks is a challenging task
Assume that the designer of the USB stick is able to balance the timing and the power consumption of both execution paths
How can we attack such a fixed system?

Fault Attacks: By changing the operating conditions an attacker can bring the digital circuits into states with undefined or unpredictable behavior