As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

File Formats

From ChipWhisperer Wiki
Revision as of 07:10, 18 May 2016 by Coflynn (Talk | contribs)

Jump to: navigation, search

File Formats (Projects and Traces)

This page explains some of the file formats used in the ChipWhisperer Software.

Project Files

Project files are stored as a simple text-file. The most basic file will include information about stored traces, along with some basic project file information.

As an example, the following shows a simple project file named "test_cw305_artix100_10k_4seg.cwp":
[Trace Management]
tracefile0 = test_cw305_artix100_10k_4seg_data\traces\config_2016.05.15-18.21.25_.cfg
enabled0 = True
tracefile1 = test_cw305_artix100_10k_4seg_data\traces\config_2016.05.15-18.26.48_.cfg
enabled1 = True
tracefile2 = test_cw305_artix100_10k_4seg_data\traces\config_2016.05.15-18.32.03_.cfg
enabled2 = True
tracefile3 = test_cw305_artix100_10k_4seg_data\traces\config_2016.05.15-18.37.27_.cfg
enabled3 = True
[ChipWhisperer]
[[General Settings]]
Project Name = Untitled
Program Name = ChipWhisperer
Project File Version = 1.00
Project Author = Unknown
Program Version = V3.0
The most important files are the ones contained in the [Trace Management] section. These contain links to the trace data stored in the project. The specific link is to a configuration file, which is described below.

Normally, in the same folder that the .cwp file is located will be a folder with the same suffix. For example if you have a file called supersecret_aes_test.cwp, there will be a directory called supersecret_aes_test. This directory will contain the trace data along with additional files generated during analysis. Note it's not required that all files are located in this directory, as you can reference another location.

Trace Files

Trace files in the ChipWhisperer software are defined through a configuration file, with the suffix .cfg. Any trace added to the ChipWhisperer project will have a configuration file - this file does not store data, but tells the software where it is stored and what format it is stored in.

While ChipWhisperer has a "native" file format, you can also interface to existing files. We'll first look at the configuration file before exploring the various trace file formats supported.

The most basic trace file configuration has this format, for example this file is config_2016.05.15-18.21.25_.cfg that was referenced earlier:
[Trace Config]
numTraces = 2500
format = native
numPoints = 240
prefix = 2016.05.15-18.21.25_
date = 2016-05-15 18:21:25
scopeSampleRate = 0
notes = ""
scopeName = ChipWhisperer/OpenADC
scopeXUnits = 0
targetSW = unknown
targetHW = ChipWhisperer CW305 (Artix-7)
scopeYUnits = 0
The most important lines are the first three (note - order is NOT important, only the name is used as an index), shown here:
Option Name Option Description Format
numTraces Number of traces contained in this reference. Int
format The format used to store the traces. String
numPoints Number of samples (points) within each trace. Int

The remaining options are used to populate the "trace manager" window.

Let's now investigate specific options for the "native" file format, along with format information.

Native File Format

Example Scripts

Native File Format to MATLAB Workspace

Native File Format to Text Files