Basic AES Counter Example
Encrypt/Decrypt a message using AES Counter Mode
- SDK directory:
apps/basic/aes_ctr
- Zentri App Store:
ZENTRI-BAAESCOUNTER
API Features Demonstrated
Platforms
This app works on:
- AMW004 - Zentri Mackerel evaluation board
- AMW106 - Zentri Moray evaluation board
- NXP-SCCK - NXP Secure Cloud Connectivity Kit
Requirements and Prerequisites
Requires a ZentriOS evaluation board, such as an AMWx06-E03 (Moray).
Description
AES functions from the ZentriOS crypto library are used to encrypt and then decrypt a text message. The encrypted and decrypted messages are written in turn to the ZentriOS log bus using the zn_dump_buffer API.
Output is as follows:
> AES CTR Example
Unencrypted data: **Client Hello**
Buffer: 0x100834d8 (16): Encrypted Buffer
D1 FE D8 65 73 5D 96 0E F5 8B 8B 49 EC D5 6B 66
Buffer: 0x100834d8 (16): Decrypted Buffer
2A 2A 43 6C 69 65 6E 74 20 48 65 6C 6C 6F 2A 2A **Client Hello**
Source Code
See: