# Cipher Demo

## Overview

This section covers the security-related samples under `sample_cipher`, including AES, software hash, hardware hash, and PUF-based flows.

## Source Paths

- `src/rtsmart/examples/mpp/sample_cipher/sample_aes`
- `src/rtsmart/examples/mpp/sample_cipher/sample_hash`
- `src/rtsmart/examples/mpp/sample_cipher/sample_hwhash`
- `src/rtsmart/examples/mpp/sample_cipher/sample_pufs`

## Build

Enable the following items in `make menuconfig`:

- `RT-Smart UserSpace Examples Configuration`
- `Enable MPP examples`
- `Enable Build sample_cipher`

## Run

```shell
cd /sdcard/app/examples/mpp
./sample_aes.elf
./sample_hash.elf
./sample_hwhash.elf
./sample_pufs.elf
```

## Notes

- `sample_aes` tests `/dev/aes` related flows
- `sample_hash` uses the software hash path
- `sample_hwhash` uses the hardware hash path
- `sample_pufs` demonstrates PUF encryption, decryption, and signing flows
