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 Pico5000.zip. 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.
Fig. 4.8 Visual Studio project setup—include and library directory paths
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. https://www.primianotucci.com/os/smartcard-explorer. Accessed 02 Mar 2016.
- 3. Tucci P. JSmartCardExplorer. http://downloads.sourceforge.net/jsmart-card/JSmartCard Explorer.jar. Accessed 02 Mar 2016.
- 4. Picotech. PicoScope 6 software with drivers. http://downloads.picotech.com/winxp/ PicoScope6_r6_8_11.exe. Accessed 02 Mar 2016.
- 5. Picotech. Software development kit. http://dl.picotech.com/drivers/PS5000sdk_r10_5_0_32. zip. Accessed 02 Mar 2016.