Basic AES Counter Example

Encrypt/Decrypt a message using AES Counter Mode

API Features Demonstrated


This app works on:

Requirements and Prerequisites

Requires a Gecko OS evaluation board, such as a WGM160P_eval.


AES functions from the Gecko OS crypto library are used to encrypt and then decrypt a text message. The encrypted and decrypted messages are written in turn to the Gecko OS log bus using the gos_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