Compilation of Program for Measurement

At this stage, you should have verified that the SmartCard works correctly (responds to the command for AES encryption), and that the signals from the card look reasonable. Press Disconnect or close JSmartCard Explorer, and close PicoScope 6 GUI. We will use a separate program to control both the SmartCard reader and the oscilloscope.

For measurement it is necessary to adjust and compile C++ program stored in an archive Zip file contains source files and Microsoft Visual Studio project. After extracting the archive and opening the project in Microsoft Visual Studio you have to check the following settings in project properties:

  • 1. Paths to include and library directories, see Fig.4.8.
  • 2. Paths to additional dependencies, see Fig. 4.9.
  • 3. In source file main.cpp set up the measuring channels, trigger voltage level, and number of measurements.

Compile the program (Build ^ Build Solution). Before running the program do not forget:

  • • to disconnect the card in JSmartCard Explorer and
  • • quit the PicoScope program,

otherwise the card and/or the PicoScope would be occupied, hence the measuring program will not be able to connect to it.

Visual Studio project setup—include and library directory paths

Fig. 4.8 Visual Studio project setup—include and library directory paths

Visual Studio project setup—additional dependencies

Fig. 4.9 Visual Studio project setup—additional dependencies

Measured data are in file traces.bin, plaintext and cipher text in files plaintext.txt and ciphertext.txt and length of one measurement is stored in file traceLength.txt. Now you have measured data to be used for DPA.


  • 1. Mangard S, Oswald E, Popp T. Power analysis attacks: revealing the secrets of smart cards. US: Springer; 2008.
  • 2. Tucci P. JSmartCardExplorer. Accessed 02 Mar 2016.
  • 3. Tucci P. JSmartCardExplorer. Explorer.jar. Accessed 02 Mar 2016.
  • 4. Picotech. PicoScope 6 software with drivers. PicoScope6_r6_8_11.exe. Accessed 02 Mar 2016.
  • 5. Picotech. Software development kit. zip. Accessed 02 Mar 2016.
< Prev   CONTENTS   Source   Next >