nandApp Demos

# AES Encryption Library Sample Demos

## Location

`$TwlSDK/build/demos.TWL/aes`

## Compilation

Move to the `$TwlSDK/build/demos.TWL/aes` directory and enter the following:

> `% make`

The SRL executable file and the TEF files with binary information are created in `$TwlSDK/build/demos.TWL/aes/(sample name)/bin/(platform)/(target)/`.

> ``

For example:

> `$TwlSDK/build/demos.TWL/aes/ctr/bin/ARM9-TS.HYB/Release/main.srl`

will be the executable file for the `ctr` demo.

## Running the Tool

### For TWL/NITRO HYBRID 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.

### 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
--- | --- | ---
`ctr` | `demos.TWL` | This demo performs encryption and decryption using `AES_Ctr()`.
`ccm` | `demos.TWL` | This demo performs encryption and decryption using the `AES_CcmEncryptAndSign` and `AES_CcmDecryptAndVerify` functions.
`encrypt` | `demos.TWL` | This demo performs encryption and decryption using the `AES_Encrypt` and `AES_Decrypt` functions.
`encrypt-and-sign` | `demos.TWL` | This demo performs encryption and decryption using the `AES_EncryptAndSign` and `AES_DecryptAndVerify` functions.
`ctr-partial` | `demos.TWL` | This demo performs partial decryption of encrypted data in CTR mode.
`ctr-compatible` | `demos.TWL` | This demo performs encryption and decryption that is compatible with the standard AES cipher in CTR mode.
`ccm-compatible` | `demos.TWL` | This demo performs encryption and decryption that is compatible with the standard AES cipher in CCM mode.

## Operation

The AES library demos will operate normally only in TWL mode.

## See Also

## Revision History

2007/12/10 Initial version.

CONFIDENTIAL