Specifications

Smart Cards Lab COMPGA12 University College London
18.1 A Simple Timing Attack Project
For this we use the following program provided to students on a flash disk,
and based on a known open-source PC/SC project. The source code is
also given (so students can directly modify it by opening the .dsw file. )
To simply run it:
TimingAttackDemo.exe
which can be found in:
\Smart Cards Lab docs and free software\APDU tools\
TimingAttackDemo\sources\SCardDemo-Modif\Release\
How to use it: First open a reader and then type in an APDU com-
mand. Then press APDU button.
The timing information is displayed only in a log file, which will be
opened automatically at the end, after the program is closed by pressing
OK button.
Important: This timing attack is VERY imperfect, due to the latency
of the Windows OS, the USB port and the firmware of the smart card reader.
In order to get a precise result, one needs to repeat each command a large
number of times. this is also why it appears to freeze or it is slow.
The software provided is very simple: it can only do a loop on a single
command, it cannot execute a sequence of commands in a loop, and it
cannot power off or reset the card. Please improve it to execute sequences
of commands...
18.2 A Timing Attack on MiFare
This is just a very basic demonstration of the core principle. It does not
break MiFare authentication but shows that important timing differences
can be observed for real life products with extremely simple tools.
Here we will be executing a sequence of just two commands. It does not
matter the our tool will also repeat the first command 100 times to have
more precise timing.
Let’s take a MiFare Classic card with a known key, for example FFFFFFFFFFFF,
that is charged into memory. Then we will authenticate for block 0. this
gives, for example
APDU: FF82200006FFFFFFFFFFFF
Resp: (90 00)
c
Nicolas T. Courtois 2009-10