This is the documentation for the latest (main) development branch of HPM SDK. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

22.4. Equal symmetric encryption and decryption algorithm AES-CTR

22.4.1. Overview

aes_ctr_mode_example the example project shows the implementation of aes-ctr mode of equal symmetric encryption and decryption algorithm.

  • The equal symmetry encryption and decryption algorithm of this project adopts aes128 encryption algorithm CTR counting mode to complete the module encryption and decryption test.

22.4.2. Board Setting

  • No special settings

22.4.3. Running the example

When the project runs correctly, and the serial port terminal will output the following information:

> tc_start() - Performing AES128-CTR mode tests:
> Performing CTR tests:
> CTR test #1 (encryption SP 800-38a tests):
> ===================================================================
> PASS - test_1_and_2.
> CTR test #2 (decryption SP 800-38a tests):
> ===================================================================
> PASS - test_1_and_2.
> All CTR tests succeeded!
> ===================================================================
> PASS - main.
> ===================================================================
> PROJECT EXECUTION SUCCESSFUL