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

Changes

Jump to: navigation, search

Tutorial B3-1 Timing Analysis with Power for Password Bypass

515 bytes added, 17:05, 23 September 2017
Running a Single Capture
With our settings prepared, the next step is to use our script to record and analyze a power trace. We need to be able to get the trace data into our Python script so we can analyze it for the timing attack.
The API allows us to ''press the Capture 1'' button and ''view the power trace'' without using the GUI. There are two relevant commands here. First, we'll need to import ChipWhisperer: * <code> self.api.capture1()import chipwhisperer as cw</code> acts as if  Then, we've just pressed can build our own "capture controller". This controller deals with talking to the ''Capture 1'' button;scope and target for you. To capture a single trace you could perform the following steps: * <codesyntaxhighlight lang=python> # Test one capturecw.captureN(self.apiscope, self.getScope()target, None, self.channels[0]aux_list, self.getTracektp, 1)trace = scope.getLastTrace()</codesyntaxhighlight> returns a list of datapoints that were recorded in the previous capture. 
We want to test these two commands. After the setup portion of your script, add some code similar to the following:
<presyntaxhighlight lang=python>#Put this at beginning of scriptimport chipwhisperer as cw #Put this later on after setup happenscw.captureN(self.apiscope, self.capture1()data = target, None, self.apiaux_list, self.getScope(ktp, 1)trace = scope.channels[0].getTracegetLastTrace()print datatrace</presyntaxhighlight>
Run your script. The ChipWhisperer should automatically capture one trace and print out the several thousand datapoints. (Note that output of <code>print</code> statements may go to the ''Debug Logging'' tab in the GUI.) This is all we need to continue.
 
 
# Test one capture
cw.captureN(self.scope, self.target, None, self.aux_list, self.ktp, 1)
trace = scope.getLastTrace()
print trace
== Attacking a Single Letter ==
Approved_users, bureaucrat, administrator
1,956
edits

Navigation menu