Changes

Tutorial B3-1 Timing Analysis with Power for Password Bypass

223 bytes removed, 03:51, 23 September 2017
Scripting the Setup
<ol start="4" style="list-style-type: decimal;">
<li><p>Next, append the required commands to clear the simpleserial commands and to enable the automatic resets. Doing so will require two steps: (1) figuring out the target settings and adjusting them, and (2) inserting our code to perform the device reset.</p>
<prep>#Example of using a list to set parameters. Slightly easier to copy/paste in this formatlstexample = [['CW Extra'Using the console, 'CW Extra Settings', 'Trigger Pins', 'Target IO4 you can dump parameters of the simpleserial target (Trigger Lineassuming you are still connected)', True],: ...BUNCH MORE COMMANDS HERE HAVE BEEN REMOVED...<syntaxhighlight lang=python> #Final step: make DCMs relock in case they are lost>>> target ['OpenADC', 'Clock Setup', 'ADC Clock', 'Reset ADC DCM', None],init_cmd = key_cmd = k$KEY$\ninput_cmd = go_cmd = p$TEXT$\noutput_cmd = r$RESPONSE$\nbaud = 38400protver = </syntaxhighlight></p></li>
#Append your commands here<li>You should be able to see how you can simply clear all of the above settings using the script. This would mean adding some lines as follows to the script: [<syntaxhighlight lang=python>target.key_cmd = 'Simple Serial', target.go_cmd = 'Load Key Command', u''], [target.output_cmd = 'Simple Serial', 'Go Command', u''], ['Simple Serial', 'Output Format', u''], </li>
['Generic Settings', 'Auxiliary Module', 'Reset AVR/XMEGA via CW-Lite']<li>Remembering the auxilary module,you can also add the lines to perform this task as well to your script: ['Aux Settings', 'Reset AVR/XMEGA via CW-Lite', 'Delay <syntaxhighlight lang=python>from chipwhisperer.capture.auxiliary.ResetCW1173Read import ResetCW1173Resetter = ResetCW1173(Post-Arm)'xmega=True, delay_ms=1200])aux_list.register(Resetter.resetThenDelay, "before_trace") ]</presyntaxhighlight></li>
<li><p>Finally, we will set the password. You can enter the password in the Capture ''Target Settings'' tab, and see the following sort of call would set the appropriate password:or simply use a command like </pcode><pre>selftarget.api.setParameter([go_cmd = 'Simple Serial', 'Go Command', u'h0px3\h0p3\n'])</precode><p>Note the newline is actually escaped, to set the text equivalent of what will be printed. This will result in an actual newline going out across the serial port. Set that command at some point in your script.</pli><li>Close any open ChipWhisperer-Capture windowsFinally, and run the script as beforeyou made. You It should connect load all settings & on hitting capture-1 you will get a waveform related to the target, and be able to press ''Capture 1'' and see power measurement during the correct waveformcomparison.</li>
</ol>
Approved_users, bureaucrat, administrator
1,956
edits