458
edits
As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com. |
Changes
no edit summary
== Tutorial #B10: Using with SASEBO-W CardOS or DPA Contest v4.2 ==
=== Background ===
A number of extremely useful tools for side channel analysis are distributed by Morita Tech Co., Ltd under the [http://satoh.cs.uec.ac.jp/SAKURA/index.html SAKURA] project name. In fact much the original ChipWhisperer system was developed on these tools, and a great debt is owed to Akashi Satoh for this development.
This tutorial will demonstrate how the ChipWhisperer system can be used in tandem with the SASEBO-W system. The first part of this tutorial will target the same ATMegaCard used by the SASEBO-W, and the second part of the tutorial will demonstrate how the ATMega328p can be connected to the SASEBO-W using the interposer board.
=== Hardware Setup ===
==== About the ATMega Card ====
The ATMega Card is shown below:
Alternatively of course you can package your target algorithm into something like the demo SimpleSerial project too. There is no real need to use the SmartCard APDU format, and the interface tends to be much slower on the ChipWhisperer system.
==== Programming ====
You will need an image to program into the SmartCard. This tutorial uses the SASEBO-W Card OS. Details of this are available from the [http://satoh.cs.uec.ac.jp/SAKURA/hardware/SASEBO-W.html SASEBO-W Page]. Download the file entitled ''Smartcard sample binary for ATMega 163'', which is described in the document entitled ''SASEBO-W Smart Card OS Specification Ver. 0.4-5''.
Then use AVRStudio to program the .hex file. The instructions for doing this are as in [[Installing_ChipWhisperer#Getting_AVR_Compiler_Toolchain]], however when selecting the AVR type select ''ATMega163'' instead of ''ATMega328p''. Check the ''Read Signature'' option works, if not double-check the above hardware connections.
==== Hardware setup for using Card Socket ====
The following describes the jumper settings when using the SmartCard socket on the MultiTarget Victim Board:
Connect the 20-pin cable and SMA cable if not already connected, and plug your programmed MegaCard into the SmartCard socket. This completes the hardware setup when using the card socket.
==== Hardware Setup using ATMega16 ====
The AtMega16 is binary-compatible with the AtMega163, meaning a hex file for the ATMega163 can be programmed directly into the ATMega16. Assuming you have the SASEBO-W adapter, this simple schematic shows the required circuit:
<pre>avrdude -c sasebow -p m16 -P ft0 -B 115200 -u -e -U flash:w:AES.hex:a -U lfuse:w:0xD0:m -U hfuse:w:0x99:m -v
pause</pre>
==== Hardware Setup using ATMega328p ====
See [[SASEBO-W_Target#Connecting_the_Multi-Target_Board_to_the_SASEBO-W]] for details of connecting the Multi-Target board to the SASEBO-W.
[[File:/images/sasebow/sasebow_scardfake.jpg|image]]
=== Software Setup and Example Capture (CardOS) ===
<blockquote># Run the ChipWhisperer Capture software
</blockquote>
=== Changes for DPAContest v4.2 Card ===
As of ChipWhisperer Release 0.09, the DPAContest v4.2 protocol is also supported. This protocol uses AES-128 RSM, making an interesting attack of a protected target. The following details settings required to attack this card.