AES ciphering APIs (setup operation, load key/iv, process ciphering)

This change provides an example of a AES ciphering operation from a
trusted application (TA) using the GPD TEE Core Internal API.

AES TA implements the basics for setting a AES/CTR ciphering session
using the TEE Core Internal API:
- Opening a session toward the AES TA creates AES ciphering session.
- A TA command allows to setup and allocate the ciphering resources.
- A TA command allows to load the AES key.
- A TA command allows to reset the initial vector.
- A TA command allows to cipher an input buffer into an output buffer.

The sample application creates an AES128-CTR encryption session,
provides the AES key and and initial vector then request encryption of
a data buffer. Then it sets up a decryption session, provide the same
key and initial vector and request decryption of the encrypted content.
Finally it checks clear and decoded data are the same.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
13 files changed
tree: 6efe0be98eaac513862e5dcf1ef0ca46d4dcddc4
  1. aes/
  2. hello_world/
  3. random/
  4. .gitignore
  5. Android.mk
  6. Makefile
  7. README.md
README.md

OP-TEE Sample Applications

Contents

  1. Introduction
  2. List of sample applications

1. Introduction

This document describes the sample applications that are included in the OP-TEE, that aim to showcase specific functionality and use case.

For sake of simplicity, all OP-TEE example test application are prefixed with optee_example_.


2. List of sample applications

Directory hello_world/:

  • A very simple Trusted Application to answer a hello command and incrementing an integer value.
  • Test application: optee_example_hello_world
  • Trusted application UUID: 8aaaf200-2450-11e4-abe2-0002a5d5c51b

Directory random/:

  • Generates a random UUID using capabilities of TEE API (TEE_GenerateRandom()).
  • Test application: optee_example_random
  • Trusted application UUID: b6c53aba-9669-4668-a7f2-205629d00f86

Directory aes/:

  • Runs an AES encryption and decryption from a TA using the GPD TEE Internal Core API. Non secure test application provides the key, initial vector and ciphered data.
  • Test application: optee_example_aes
  • Trusted application UUID: 5dbac793-f574-4871-8ad3-04331ec17f24