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 B5 Breaking AES (Straightforward)

108 bytes added, 17:30, 28 September 2018
no edit summary
[[File:Cwlite_demo_video.png|link=http://www.youtube.com/watch?v=MJmkYqA-LeM&hd=1]]
==== Hardware Setup ====
<ol style="list-style-type: decimal;">{{CollapsibleSection<li><p>Connect the |intro = ==== CW1173/CW1200 by USB cable to computer.</p>(Lite) Hardware Setup ====<blockquote><p>[[File:cw1173_microusb.jpg|image]]</p></blockquote></li><li> The software AES implementation that will run on the target is located in <code>chipwhisperer\hardware\victims\firmware\simpleserial-aes</code>. In a terminal window, navigate here and run the command <code>make</code> to build the firmware. content= CWLite HW Setup}}
As in previous tutorials, ensure that the firmware has been built for the correct board. Here, the output of <code>make</code> should end like{{CollapsibleSection<pre>|intro = ==== CW1200 (Pro) Hardware Setup ====AVR Memory Usage----------------Device: atxmega128d3|content= CW1200 HW Setup}}
Program: 3078 bytes {{CollapsibleSection|intro = ==== CW308 (2.2% FullUFO)Hardware Setup ====(.text + .data + .bootloader)|content= CW308 HW Setup}}
Data: 352 bytes (4.3% Full)=== Building Firmware ===(.data + .bss + .noinit){{CollapsibleSection|intro = ==== Building for CWLite with XMEGA Target ====|content= Building for XMEGA}}
{{CollapsibleSection
|intro = ==== Building for CWLite with Arm Target ====
|content= Building for Arm}}
Built {{CollapsibleSection|intro = ==== Building for platform CW-Lite XMEGAOther Targets ====|content= Building for Other Targets}}
-------- end --------=== Flashing Firmware ===</pre>{{CollapsibleSectionLike before, if you're using |intro = ==== Programming the ARM target, use <code>make PLATFORMXMEGA Target =CWLITEARM CRYPTO_TARGET=TINYAES128C</code>.==|content= Programming XMEGA}}
Make sure that {{CollapsibleSection|intro = ==== Programming the platform is correct.STM32F3 (CW303 Arm) Target ====</li>|content= Programming Arm}}
<li> Upload the firmware to the target chip. The process to do this is the same as the previous tutorials:{{CollapsibleSection* Open the ChipWhisperer Capture software.|intro = ==== Programming Other Targets ====* Connect to the ChipWhisperer. (You can do this using a script or by filling out the generic settings and connecting to the board yourself.)* Open the XMEGA Programmer (**Tools > ChipWhisperer-Lite XMEGA Programmer**), or, if you're using the ARM target, open the STM32F Programmer.* Find the hex file you compiled and program it onto the target.</li></ol>|content= Programming Other}}
==== Capturing the Traces ====
[[File:cwsetup_scriptselection.png|889x889px]]
Note in previous software versions, this tutorial took you through manual setup. This can still be done (using the GUI), but instead now the API has been made more powerful, so the example configuration script will be used instead.
To do so, simply scroll down and select the "setup_cwlite_xmega_aes.py" if you're using the CW303 XMEGA target. If you're using the ARM CW303 Arm target, select "setup_cwlite_stm32f_aes.py":.  If you're using another target, use the setup script for that target (such as setup_cw308_esp32.py). Additionally, try capturing a trace and seeing how long the "Trigger Active Count" field is under trigger setup. This will set an upper bound on how big "Total Samples" should be (since the AES is completed by this point). Reducing "Total Samples" will give better correlation and take less time to capture and analyze, but lowering it too much will miss the operations we're interest in! If your target lacks a script, "setup_cwlite_stm32f_aes.py" will probably work, but you should check the wiki page for your target to make sure there aren't any differences.
[[File:cwsetup_scriptselection_xmegaconfig_cwliterun.png|718x718px]]
To complete the tutorial, follow these steps:<ol start="7" style="list-style-type: decimal;">
<li>Switch to the ''General Settings'' tab</li>
<li>If you wish to change the number of traces, do so here. The default of 50 should be sufficient to break AES for most targets though!</li>
<li>Hit the ''Capture Many'' button (M in a green triangle) to start the capture process.</li>
<li>You will see each new trace plotted in the waveform display.</li>
<li>Finally save this project using the ''File --&gt; Save Project'' option, give it any name you want.</li>
<li>Skip ahead to [[#Analyzing_the_Traces]].</li></ol>
 
=== Capturing with ChipWhisperer-Lite and UFO Board ===
 
TODO
== Analyzing the Traces ==
Approved_users, administrator
366
edits

Navigation menu