[[File:A5_pp_resync_end.png|400px]]}}
=== = Continuing the Attack ====
The next step is to program our own leakage model. The following Python code models the Hamming weight model of the 13th round S-box:
== Appendix A: Target Code ==
<pre> syntaxhighlight lang=python>
#!/usr/bin/python
# -*- coding: utf-8 -*-
else:
raise IOError("Failed to communicate, no response")
</presyntaxhighlight>
== Appendix B: Capture Script ==
# Set the 'Target Module' as 'AES Bootloader' (you need to have that target on your system)
<pre> syntaxhighlight lang=python>
"""Setup script for CWLite/1200 with XMEGA (CW303/CW308-XMEGA/CWLite target)
specifically for Tutorial A5: the AES-256 bootloader attack
scope.io.tio2 = "serial_tx"
scope.io.hs2 = "clkgen"
</presyntaxhighlight>
== Appendix C: AES-256 14th Round Key Script ==