CRYPTO Demos

# CRYPTO Library (CRYPTO) Sample Demos

## Location

`$TwlSDK/build/demos/crypto`

## Compilation

Move to the `$TwlSDK/build/demos/crypto` (or `$TwlSDK/build/demos.TWL/crypto`) directory and enter the following.

> `% make`

The compilation begin, and the SRL executable file and the NEF or TEF files with binary information are generated in `$TwlSDK/build/demos/fs/(sample name)/bin/(platform)/(target)/`.

> `$TwlSDK/build/demos/crypto/(sample name)/bin/(platform)/(target)/`
> `$TwlSDK/build/demos.TWL/crypto/(sample name)/bin/(platform)/(target)/`

For example:

> `$TwlSDK/build/demos/crypto/rc4-1/bin/ARM9-TS/Release/main.srl`

is the executable file for the `rc4-1` demo.

## Execution

### For NITRO ROMs:

If using the Ensata emulator:

- Execute NEF and SRL files with ensata

If using IS-NITRO-DEBUGGER:

- Load and execute an NLF file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line

If using IS-TWL-DEBUGGER:

- Load and execute an NLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

### For TWL/NITRO Hybrid ROMs

If using IS-NITRO-DEBUGGER:

- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

### For TWL Limited ROMs

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

## Description

Name | Directories | Operation
--- | --- | ---
`rc4-1` | `demos` | This sample whether encryption/decription using the RC4 algorithm is working correctly.
`rc4-2` | `demos` | This sample measures the difference in speed between the two types of RC4 functions.
`rc4-3` | `demos` | 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.
`sign-1` | `demos` | This sample checks if the digital signature verification function is working correctly.
`sign-2` | `demos.TWL` | This sample checks if the digital signature creation function is working correctly.
`rsa-1` | `demos.TWL` | This sample whether encryption/decription using the RSA algorithm is working correctly.

## Operation

Operates normally in all operating environments.

## See Also

List of CRYPTO Functions

## Revision History

2008/10/31 Changed the demo directory name.
2008/07/11 Changed notation to correspond with TWL.
2006/04/22 Added `sign-2`.
2007/03/27 TWL-SDK port: initial version.
2006/03/08 Initial version.

CONFIDENTIAL