9.1.1. chipwhisperer.analyzer package

9.1.1.1. Subpackages

9.1.1.2. Submodules

9.1.1.3. chipwhisperer.analyzer.ChipWhispererAnalyzer module

class chipwhisperer.analyzer.ChipWhispererAnalyzer.ChipWhispererAnalyzer[source]

Bases: chipwhisperer.common.MainChip.MainChip

Main ChipWhisperer Analyzer GUI Window Class.

You can run this class from another Python script if you wish to, which gives you the ability to drive the system from another Python script, and not be forced to do everything through the GUI. Unfortunutly the GUI window still needs to open, as much of the program flow is done through PySide signals/slots.

MaxRecentFiles = 4
addSettingsDocks()[source]

Add settings dock to main window

addToolbars()[source]

Add toolbars and menus to the main window

addWaveforms()[source]

Add waveform display dock to main window

doAttack()[source]

Called when the ‘Do Attack’ button is pressed, or can be called via API to cause attack to run

editorControl(filename, filedesc, default=False, bringToFront=True)[source]

This is the call-back from the script editor file list, which opens editors

editorDocks()[source]

Ensure we have a script editor window for each referenced analyzer script file

listModules()[source]

Overload this to test imports

newProject()[source]

Create a new ChipWhisperer project file

openProject(fname)[source]

Open a ChipWhisperer project file

paramList()[source]
plotInputTrace()[source]

Plot the input trace(s) as given by the GUI settings.

reloadAttackParamList(list=None)[source]

Reloads parameter tree in GUI when attack changes

reloadParamList(lst=None)[source]

Reload parameter trees in a given list, ensuring GUI matches loaded modules.

reloadParamListPreprocessing(list=None)[source]

Reload the parameter lists, ensuring GUI is showing correct options to user

reloadParamListResults(lst=None)[source]

Reload parameter tree for results settings, ensuring GUI matches loaded modules.

reloadScripts()[source]

Rewrite the auto-generated analyzer script, using settings from the GUI

runFunc(name)[source]
runScriptFunction(funcname, filename=None)[source]

Loads a given script and runs a specific function within it.

saveProject()[source]

Save a ChipWhisperer project file

setAttack(attack)[source]

Set the attack module, reloading GUI and connecting appropriate signals

setPlotInputEach(enabled)[source]
setPreprocessing(num, module)[source]

Insert the preprocessing module selected from the GUI into the list of active modules.

This ensures that the options for that module are then displayed in the GUI, along with writing the auto-generated script.

setTraceLimits(traces=None, points=None, deftrace=1, defpoint=-1)[source]

When traces is loaded, Tell everything default point/trace range

setupParametersTree()[source]

Setup all parameter trees so they can be reloaded later with changes

setupPreprocessorChain(mod=None)[source]

Setup the preprocessor chain by chaining the first module input to the source traces, the next module input to the previous module output, etc.

setupScriptModule(filename=None)[source]

Loads a given script as a module for dynamic run-time insertion.

Args:
filename (str): The full filename to open. If None it opens the
auto-generated script instead.
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x085DB198>
tracesChanged()[source]

Traces changed due to loading new project or adjustment in trace manager, so adjust limits displayed and re-plot the new input trace

chipwhisperer.analyzer.ChipWhispererAnalyzer.main()[source]
chipwhisperer.analyzer.ChipWhispererAnalyzer.makeApplication()[source]

9.1.1.4. chipwhisperer.analyzer.ListAllModules module

chipwhisperer.analyzer.ListAllModules.ListAllModules()[source]

9.1.1.5. chipwhisperer.analyzer.ResultsPlotting module

class chipwhisperer.analyzer.ResultsPlotting.CorrelationVsTrace(subkeys=16, permPerSubkey=256)[source]

Bases: chipwhisperer.analyzer.ResultsPlotting.ResultsPlotData

Plots maximum correlation vs number of traces in attack.

name = 'Correlation vs Traces in Attack'
redrawPlot()[source]

Redraw the plot, loading data from attack

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835BAA8>
updateData()[source]
class chipwhisperer.analyzer.ResultsPlotting.OutputVsTime(subkeys=16, permPerSubkey=256)[source]

Bases: chipwhisperer.analyzer.ResultsPlotting.ResultsPlotData

Generic data plotting stuff. Adds ability to highlight certain guesses, used in plotting for example the correlation over all data points, or the most likely correlation over number of traces

getPrange(bnum, diffs)[source]

Get a list of all points for a given byte number statistic

name = 'Output vs Point Plot'
redrawPlot()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835B9B8>
class chipwhisperer.analyzer.ResultsPlotting.PGEVsTrace(subkeys=16, permPerSubkey=256)[source]

Bases: chipwhisperer.analyzer.ResultsPlotting.ResultsPlotData

Plots Partial Guessing Entropy (PGE) vs Traces in Attack

calculatePGE()[source]

Calculate the Partial Guessing Entropy (PGE)

copyPGE(dontCopy=False, addPlotMatlab=True)[source]

Copy the Partial Guessing Entropy (PGE) to clipboard for use in other programs

name = 'PGE vs Trace Plot'
redrawPlot()[source]

Recalculate the PGE and redraw the PGE plot

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835BA58>
class chipwhisperer.analyzer.ResultsPlotting.ResultsPlotData(subkeys=16, permPerSubkey=256)[source]

Bases: chipwhisperer.common.GraphWidget.GraphWidget

Generic data plotting stuff. Adds ability to highlight certain guesses, used in plotting for example the correlation over all data points, or the most likely correlation over number of traces

drawData(xdatalst, ydatalst, enabledBytes=[-1])[source]

Redraw the plot

genericParameters()[source]
knownkey()[source]

Get the known key

name = 'Some Descriptive Name'
paramList()[source]

Returns parameter list

setAttack(attack)[source]

Set the source of statistics (i.e. the attack)

setByteAll(status)[source]

Enable all bytes in plot

setBytePlot(num, sel)[source]

Set which bytes to plot

setDock(dock)[source]

Set the dock holding this widget, used for visibility control

setKeyOverride(orfunction)[source]
setKnownKey(knownkey)[source]

Set the known encryption key (used for highlighting)

setupHighlights()[source]

Initialize the highlights based on the known key

showDockSignal = <PySide.QtCore.Signal object at 0x08359EA0>
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835B9E0>
visibleChanged()[source]

Dock visability changed

class chipwhisperer.analyzer.ResultsPlotting.ResultsPlotting[source]

Bases: PySide.QtCore.QObject

attackDone()[source]

Attack is done, update everything

attackSettingsChanged()[source]

Attack settings have changed, so pass required changes to other modules such as plotting

attackStatsUpdated()[source]

New attack statistics available, replot/redraw graphs

dockList()[source]

Return list of docks

paramList()[source]

Returns list of parameters for parameter tree GUI display

paramListUpdated = <PySide.QtCore.Signal object at 0x08359EC0>

Interface to main program, various routines for plotting output data

processKnownKey(key)[source]

Process known key in case of override by user

setAttack(attack)[source]

Pass the attack to all plotting devices. They pull stats from the attack directly, and listen to attackDone/statusUpdated signals.

setKnownKeySrc(keysrc)[source]

Set key as ‘attack’ or ‘override’

setKnownKeyStr(strkey)[source]

Override known key by user selection

setTraceManager(tmanager)[source]

Set the trace manager

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835B968>
updateKnownKey()[source]

Re-Read the Known Key from saved traces

class chipwhisperer.analyzer.ResultsPlotting.ResultsSave[source]

Bases: PySide.QtCore.QObject

Save Correlation Output to Files

attackDone()[source]

Attack is done

attackStatsUpdated()[source]

Stats have been updated

paramList()[source]

Returns list for parameter tree in settings dock

setAttack(attack)[source]

Set source of statistics (i.e. attack)

setBytesEnabled(enabledbytes)[source]

Set what bytes to include in table

setEnabled(enabled)[source]
setKnownKey(knownkey)[source]

Set the known encryption key, required for PGE calculation

setStartTrace(starttrace)[source]

Set starting trace number

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835BB20>
class chipwhisperer.analyzer.ResultsPlotting.ResultsTable(subkeys=16, permPerSubkey=256, useAbs=True)[source]

Bases: PySide.QtCore.QObject

Table of results, showing all guesses based on sorting output of attack

knownkey()[source]

Get the known key

paramList()[source]

Returns list for parameter tree in settings dock

setAbsoluteMode(enabled)[source]

If absolute mode is enabled, table is sorted based on absolute value of statistic

setAttack(attack)[source]

Set source of statistics (i.e. attack)

setBytesEnabled(enabledbytes)[source]

Set what bytes to include in table

setKeyOverride(orfunc)[source]

Set key override function in case we don’t want to use one from attack

setKnownKey(knownkey)[source]

Set the known encryption key, required for PGE calculation

setSingleMode(enabled)[source]

Single mode uses the same point across all traces, not useful normally

setStartTrace(starttrace)[source]

Set starting trace number

setUpdateMode(mode)[source]

Set if we update entire table or just PGE on every statistics update

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0835BAD0>
updateTable(attackDone=False)[source]

Resort data and redraw the table. If update-mode is ‘pge’ we only redraw entire table when ‘attackDone’ is True.

visibleChanged()[source]

Called when visibility changed, ensures GUI matches real setting

9.1.1.6. Module contents