1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<!--==========================================================================
3  Copyright 2008 Nintendo.  All rights reserved.
4
5  These coded instructions, statements, and computer programs contain
6  proprietary information of Nintendo of America Inc. and/or Nintendo
7  Company Ltd., and are protected by Federal copyright law.  They may
8  not be disclosed to third parties or copied or duplicated in any form,
9  in whole or in part, without the prior written consent of Nintendo.
10 ==========================================================================-->
11<HTML>
12<HEAD>
13	<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
14	<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
15	<META http-equiv="Content-Style-Type" content="text/css">
16	<LINK rel="stylesheet" type="text/css" href="../../css/nitro.css">
17	<TITLE>CRYPTO Demos</TITLE>
18</HEAD>
19<BODY>
20<H1>CRYPTO Library (CRYPTO) Sample Demos</H1>
21<H2>Location</H2>
22<P><CODE>$TwlSDK/build/demos/crypto</CODE></P>
23
24<H2>Compilation</H2>
25<P>Move to the <CODE>$TwlSDK/build/demos/crypto</CODE> (or <CODE>$TwlSDK/build/demos.TWL/crypto</CODE>) directory and enter the following.</P>
26<BLOCKQUOTE><CODE>% make</CODE></BLOCKQUOTE>
27<P>&nbsp; The compilation begin, and the SRL executable file and the NEF or TEF files with binary information are generated in <CODE>$TwlSDK/build/demos/fs/(sample name)/bin/(platform)/(target)/</CODE>.</P>
28<BLOCKQUOTE><CODE>$TwlSDK/build/demos/crypto/(sample name)/bin/(platform)/(target)/</CODE><BR> <CODE>$TwlSDK/build/demos.TWL/crypto/(sample name)/bin/(platform)/(target)/</CODE></BLOCKQUOTE>
29<P>&nbsp;&nbsp;For example:</P>
30<BLOCKQUOTE><CODE>$TwlSDK/build/demos/crypto/rc4-1/bin/ARM9-TS/Release/main.srl</CODE></BLOCKQUOTE>
31<P>is the executable file for the <CODE>rc4-1</CODE> demo.</P>
32
33<H2>Execution</H2>
34<H3>For NITRO ROMs:</H3>
35<P>If using the Ensata emulator:</P>
36<UL>
37<LI>Execute NEF and SRL files with ensata
38</UL>
39<P>If using IS-NITRO-DEBUGGER:</P>
40<UL>
41<LI>Load and execute an NLF file with IS-NITRO-DEBUGGER
42<LI>Execute an SRL file with IS-NITRO-DEBUGGER
43<LI>Execute an SRL file with IS-NITRO-DEBUGGER using the <CODE>loadrun.exe</CODE> tool from a command line
44</UL>
45<P>If using IS-TWL-DEBUGGER:</P>
46<UL>
47<LI>Load and execute an NLF file with IS-TWL-DEBUGGER
48<LI>Execute an SRL file with IS-TWL-DEBUGGER
49<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line
50</UL>
51<H3>For TWL/NITRO Hybrid ROMs</H3>
52<P>If using IS-NITRO-DEBUGGER:</P>
53<UL>
54<LI>Execute an SRL file with IS-NITRO-DEBUGGER
55<LI>Execute an SRL file with IS-NITRO-DEBUGGER using the <CODE>loadrun.exe</CODE> tool from a command line
56</UL>
57<P>If using IS-TWL-DEBUGGER:</P>
58<UL>
59<LI>Load and execute a TLF file with IS-TWL-DEBUGGER
60<LI>Execute an SRL file with IS-TWL-DEBUGGER
61<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line
62</UL>
63<H3>For TWL Limited ROMs</H3>
64<P>If using IS-TWL-DEBUGGER:</P>
65<UL>
66<LI>Load and execute a TLF file with IS-TWL-DEBUGGER
67<LI>Execute an SRL file with IS-TWL-DEBUGGER
68<LI>Execute an SRL file with IS-TWL-DEBUGGER using the <CODE>loadrun.TWL.exe</CODE> tool from a command line
69</UL>
70
71<H2>Description</H2>
72<TABLE width="720">
73  <TBODY>
74    <TR>
75<TH>Name</TH>
76<TH>Directories</TH>
77<TH>Operation</TH>
78    </TR>
79    <TR>
80<TD width="187"><CODE>rc4-1</CODE></TD>
81<TD><CODE>demos</CODE></TD>
82<TD width="525">This sample whether encryption/decription using the RC4 algorithm is working correctly.</TD>
83    </TR>
84    <TR>
85<TD width="187"><CODE>rc4-2</CODE></TD>
86<TD><CODE>demos</CODE></TD>
87<TD width="525">This sample measures the difference in speed between the two types of RC4 functions.</TD>
88    </TR>
89    <TR>
90<TD width="187"><CODE>rc4-3</CODE></TD>
91<TD><CODE>demos</CODE></TD>
92<TD width="525">This sample performs highly secure encryption through the combined use of the RC4 function and the SHA-1 function in the SDK. A pseudorandom number generator is set up to create a safe IV.</TD>
93    </TR>
94    <TR>
95<TD width="187"><CODE>sign-1</CODE></TD>
96<TD><CODE>demos</CODE></TD>
97<TD width="525">This sample checks if the digital signature verification function is working correctly.</TD>
98    </TR>
99    <TR>
100<TD width="187"><CODE>sign-2</CODE></TD>
101<TD><CODE>demos.TWL</CODE></TD>
102<TD width="525">This sample checks if the digital signature creation function is working correctly.</TD>
103    </TR>
104    <TR>
105<TD width="187"><CODE>rsa-1</CODE></TD>
106<TD><CODE>demos.TWL</CODE></TD>
107<TD width="525">This sample whether encryption/decription using the RSA algorithm is working correctly.</TD>
108    </TR>
109  </TBODY>
110</TABLE>
111<H2>Operation</H2>
112<P>Operates normally in all operating environments.</P>
113<H2>See Also</H2>
114<P><A href="../../crypto/list_crypto.html">List of CRYPTO Functions</A></P>
115<H2>Revision History</H2>
116<P>
1172008/10/31 Changed the demo directory name.<BR> 2008/07/11 Changed notation to correspond with TWL.<BR> 2006/04/22 Added <CODE>sign-2</CODE>.<br> 2007/03/27 TWL-SDK port: initial version.<br> 2006/03/08 Initial version.
118</P>
119<hr><p>CONFIDENTIAL</p></body>
120</HTML>