![]() |
![]() |
This is the header file for the Crypto driver which exposes the data structures and exported API which can be used by the applications to use the Crypto driver. More...
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <ti/common/mmwave_error.h>
Data Structures | |
struct | Crypto_AesCcmCfg_t |
AES CCM mode configuration. More... | |
struct | Crypto_AesAadInputParams_t |
AES Additional Authentication Data input parameters. More... | |
union | Crypto_AesAadParams_t |
AES Additional Authentication Data Parameters. More... | |
struct | Crypto_AesModeParams_t |
AES Mode specific parameters. Certain AES modes need additional configuration that be handled here. Valid for AES_CTR, GCM and CCM modes only. More... | |
struct | Crypto_EncryptParams_t |
AES Parameters. More... | |
struct | Crypto_HmacParams_t |
HMAC Parameters. More... | |
struct | Crypto_Config_t |
Crypto Global configuration. More... | |
Macros | |
#define | CRYPTO_EINVAL (MMWAVE_ERRNO_CRYPTO_BASE-1) |
Error Code: Invalid argument. | |
#define | CRYPTO_EINUSE (MMWAVE_ERRNO_CRYPTO_BASE-2) |
Error Code: Operation cannot be implemented because a previous operation is still not complete. | |
#define | CRYPTO_ENOTIMPL (MMWAVE_ERRNO_CRYPTO_BASE-3) |
Error Code: Operation is not implemented. | |
#define | CRYPTO_EVERIFY (MMWAVE_ERRNO_CRYPTO_BASE-4) |
Error Code: Verification failed. | |
Typedefs | |
typedef enum Crypto_AESMode_t | Crypto_AESMode |
AES Cryptography mode configuration. More... | |
typedef enum Crypto_HmacMode_t | Crypto_HmacMode |
HMAC Cryptography mode configuration. More... | |
typedef enum Crypto_AesKeySize_t | Crypto_AesKeySize |
AES Cryptography key size type configuration. More... | |
typedef enum Crypto_AesCounterWidth_t | Crypto_AesCounterWidth |
AES Counter Mode counter width configuration. More... | |
typedef enum Crypto_AesGcmMode_t | Crypto_AesGcmMode |
AES GCM Mode configuration. More... | |
typedef enum Crypto_AesCCM_LWidth_t | Crypto_AesCCM_LWidth |
AES CCM length field configuration. More... | |
typedef enum Crypto_AesCCM_MWidth_t | Crypto_AesCCM_MWidth |
AES CCM length field configuration. More... | |
typedef struct Crypto_AesCcmCfg_t | Crypto_AesCcmCfg |
AES CCM mode configuration. More... | |
typedef struct Crypto_AesAadInputParams_t | Crypto_AesAadInputParams |
AES Additional Authentication Data input parameters. More... | |
typedef union Crypto_AesAadParams_t | Crypto_AesAadParams |
AES Additional Authentication Data Parameters. More... | |
typedef struct Crypto_AesModeParams_t | Crypto_AesModeParams |
AES Mode specific parameters. Certain AES modes need additional configuration that be handled here. Valid for AES_CTR, GCM and CCM modes only. More... | |
typedef struct Crypto_EncryptParams_t | Crypto_EncryptParams |
AES Parameters. More... | |
typedef struct Crypto_HmacParams_t | Crypto_HmacParams |
HMAC Parameters. More... | |
typedef struct Crypto_Config_t * | Crypto_Handle |
A handle that is returned from a Crypto_open() call. | |
typedef struct Crypto_Config_t | Crypto_Config |
Crypto Global configuration. More... | |
Enumerations |
Functions | |
int32_t | Crypto_close (Crypto_Handle handle) |
void | Crypto_init (void) |
Crypto_Handle | Crypto_open (Crypto_Type type) |
int32_t | Crypto_encrypt (Crypto_Handle handle, Crypto_AESMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrOutput, Crypto_EncryptParams *ptrParams) |
int32_t | Crypto_decrypt (Crypto_Handle handle, Crypto_AESMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrOutput, Crypto_EncryptParams *ptrParams) |
int32_t | Crypto_hmacParams_init (Crypto_HmacParams *params) |
int32_t | Crypto_sign (Crypto_Handle handle, Crypto_HmacMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrSignature, Crypto_HmacParams *ptrParams) |
int32_t | Crypto_verify (Crypto_Handle handle, Crypto_HmacMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrSignature, Crypto_HmacParams *ptrParams) |
This is the header file for the Crypto driver which exposes the data structures and exported API which can be used by the applications to use the Crypto driver.
Copyright (c) 2015-2016, Texas Instruments Incorporated All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.