Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

ssi_aes.h File Reference

ssi_aes.h File Reference

This file contains all of the enums and definitions that are used for the CryptoCell AES APIs, as well as the APIs themselves. More...

Go to the source code of this file.

Data Structures

struct  SaSiAesUserContext_t
struct  SaSiAesUserKeyData_t
struct  SaSiAesHwKeyData_t

Typedefs

typedef uint8_t SaSiAesIv_t [SASI_AES_IV_SIZE_IN_BYTES]
typedef uint8_t SaSiAesKeyBuffer_t [SASI_AES_KEY_MAX_SIZE_IN_BYTES]
typedef struct SaSiAesUserContext_t SaSiAesUserContext_t
typedef struct SaSiAesUserKeyData_t SaSiAesUserKeyData_t
typedef struct SaSiAesHwKeyData_t SaSiAesHwKeyData_t

Enumerations

enum  SaSiAesEncryptMode_t { SASI_AES_ENCRYPT = 0, SASI_AES_DECRYPT = 1, SASI_AES_NUM_OF_ENCRYPT_MODES, SASI_AES_ENCRYPT_MODE_LAST = 0x7FFFFFFF }
enum  SaSiAesOperationMode_t {
  SASI_AES_MODE_ECB = 0, SASI_AES_MODE_CBC = 1, SASI_AES_MODE_CBC_MAC = 2, SASI_AES_MODE_CTR = 3,
  SASI_AES_MODE_XCBC_MAC = 4, SASI_AES_MODE_CMAC = 5, SASI_AES_MODE_XTS = 6, SASI_AES_MODE_CBC_CTS = 7,
  SASI_AES_MODE_OFB = 8, SASI_AES_NUM_OF_OPERATION_MODES, SASI_AES_OPERATION_MODE_LAST = 0x7FFFFFFF
}
enum  SaSiAesPaddingType_t { SASI_AES_PADDING_NONE = 0, SASI_AES_PADDING_PKCS7 = 1, SASI_AES_NUM_OF_PADDING_TYPES, SASI_AES_PADDING_TYPE_LAST = 0x7FFFFFFF }
enum  SaSiAesKeyType_t {
  SASI_AES_USER_KEY = 0, SASI_AES_PLATFORM_KEY = 1, SASI_AES_CUSTOMER_KEY = 2, SASI_AES_NUM_OF_KEY_TYPES,
  SASI_AES_KEY_TYPE_LAST = 0x7FFFFFFF
}

Functions

CIMPORT_C SaSiError_t SaSi_AesInit (SaSiAesUserContext_t *pContext, SaSiAesEncryptMode_t encryptDecryptFlag, SaSiAesOperationMode_t operationMode, SaSiAesPaddingType_t paddingType)
 This function is used to initialize an AES operation context. To operate the AES machine, this must be the first API called.
CIMPORT_C SaSiError_t SaSi_AesSetKey (SaSiAesUserContext_t *pContext, SaSiAesKeyType_t keyType, void *pKeyData, size_t keyDataSize)
 This function sets the key information for the AES operation, in the context that was initialized by SaSi_AesInit.
CIMPORT_C SaSiError_t SaSi_AesSetIv (SaSiAesUserContext_t *pContext, SaSiAesIv_t pIV)
 This function sets the IV, counter or tweak data for the following AES operation on the same context. The context must be first initialized by SaSi_AesInit. It must be called at least once prior to the first SaSi_AesBlock operation on the same context - for those ciphers that require it. If needed, it can also be called to override the IV in the middle of a sequence of SaSi_AesBlock operations.
CIMPORT_C SaSiError_t SaSi_AesGetIv (SaSiAesUserContext_t *pContext, SaSiAesIv_t pIV)
 This function retrieves the current IV, counter or tweak from the AES context.
CIMPORT_C SaSiError_t SaSi_AesBlock (SaSiAesUserContext_t *pContext, uint8_t *pDataIn, size_t dataInSize, uint8_t *pDataOut)
 This function performs an AES operation on an input data buffer, according to the configuration defined in the context parameter. It can be called as many times as needed, until all the input data is processed. SaSi_AesInit, SaSi_AesSetKey, and for some ciphers SaSi_AesSetIv, must be called before the first call to this API with the same context.
CIMPORT_C SaSiError_t SaSi_AesFinish (SaSiAesUserContext_t *pContext, size_t dataSize, uint8_t *pDataIn, size_t dataInBuffSize, uint8_t *pDataOut, size_t *dataOutBuffSize)
 This function is used to finish AES operation.
CIMPORT_C SaSiError_t SaSi_AesFree (SaSiAesUserContext_t *pContext)
 This function releases and crears resources after AES operations.

Detailed Description

This file contains all of the enums and definitions that are used for the CryptoCell AES APIs, as well as the APIs themselves.

Definition in file ssi_aes.h.