Ultra lite Security Accelerator(SA2_UL) subsystem is designed to provide low-cost hardware cryptographic acceleration for the Encryption and authentication.
Features Supported
- Encryption and authentication
- Encryption and authentication of content in applications requiring DRM (digital rights management) and content/asset protection.
- Crypto function library for software acceleration
- AES - 128, 256 operations
- SHA2 - 256, 512 operations
- supports Randam number generator(RNG)
- Keys and initialization values (IVs) for encryption
- Keys for keyed MAC algorithms
- Private keys for digital signature algorithms
- Values to be used in entity authentication mechanisms
- PIN and password generation
SysConfig Features
Features NOT Supported
Usage Overview
API Sequence
To use the sa2ul module,following APIs are needed:
Initializing the SA2UL Module
- SA2UL_init() must be called before any other SA2UL APIs. This function iterates through the elements of the gSa2ulConfig[] array, calling the element's device implementation SA2UL initialization function. Please note that initializing SA2UL driver is taken care by the SysConfig generated code.
Opening the SA2UL Driver
- After initializing the SA2UL driver by calling SA2UL_init(), the application can open a SA2UL instance by calling SA2UL_open(). Please note that opening SA2UL driver is taken care by the SysConfig generated code. This function takes an index into the gSa2ulConfig[] array, and the SA2UL parameters data structure. The SA2UL instance is specified by the index of the SA2UL in gSa2ulConfig[]. Calling SA2UL_open() second time with the same index previously passed to SA2UL_open() will result in an error.
Re-use the index if the instance is closed via SA2UL_close().
If no SA2UL_init structure is passed to SA2UL_open(), default values are used. If the open call is successful, it returns a non-NULL value.
Ultra lite Security Accelerator
RNG (Random number generation)
Example Usage
Include the below file to access the APIs
#include<stdio.h>
Crypto_ShaContext gCryptoSha512Context;
static uint8_t gCryptoSha512TestBuf[9] = {"abcdefpra"};
sa2ul_sha Example
int32_t status;
uint8_t sha512sum[64];
params.
type = CRYPTO_TYPE_HW;
ctxParams.
inputLen =
sizeof(gCryptoSha512TestBuf);
status =
SA2UL_contextProcess(&gCtxObj,&gCryptoSha512TestBuf[0],
sizeof(gCryptoSha512TestBuf), sha512sum);
API
APIs for SA2UL