mbed TLS v2.2.0
Main Page
Modules
Files
Documentation Home
silabs.com
File List
util
third_party
mbedtls
sl_crypto
include
aesdrv.h
Go to the documentation of this file.
1
22
#ifndef __SILICON_LABS_AESDRV_H
23
#define __SILICON_LABS_AESDRV_H
24
25
#if !defined(MBEDTLS_CONFIG_FILE)
26
#include "
config.h
"
27
#else
28
#include MBEDTLS_CONFIG_FILE
29
#endif
30
31
#include "em_device.h"
32
#if ( defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) ) || \
33
( defined(AES_COUNT) && (AES_COUNT > 0) )
34
35
#include "
mbedtls_ecode.h
"
36
#include <stdint.h>
37
#include <stdbool.h>
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
43
/*******************************************************************************
44
******************************* ERROR CODES **********************************
45
******************************************************************************/
46
47
#define MBEDTLS_ECODE_AESDRV_NOT_SUPPORTED ((int)MBEDTLS_ECODE_AESDRV_BASE | 0x1)
48
#define MBEDTLS_ECODE_AESDRV_AUTHENTICATION_FAILED ((int)MBEDTLS_ECODE_AESDRV_BASE | 0x2)
49
#define MBEDTLS_ECODE_AESDRV_OUT_OF_RESOURCES ((int)MBEDTLS_ECODE_AESDRV_BASE | 0x3)
50
#define MBEDTLS_ECODE_AESDRV_INVALID_PARAM ((int)MBEDTLS_ECODE_AESDRV_BASE | 0x4)
51
52
/*******************************************************************************
53
******************************* TYPEDEFS **********************************
54
******************************************************************************/
55
58
typedef
enum
59
{
60
aesdrvIoModeCore
,
61
aesdrvIoModeDma
62
}
AESDRV_IoMode_t
;
63
65
typedef
struct
66
{
67
unsigned
int
dmaChIn
;
68
unsigned
int
dmaChOut
;
69
}
AESDRV_DmaConfig_t
;
70
72
typedef
union
73
{
74
AESDRV_DmaConfig_t
dmaConfig
;
75
}
AESDRV_IoModeSpecific_t
;
76
78
typedef
void (*
AESDRV_CtrCallback_t
)(uint8_t *ctr);
79
80
#if ( defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) )
81
#include "
cryptodrv.h
"
82
83
/* Main AESDRV context structure. */
84
typedef
struct
85
{
86
CRYPTODRV_Context_t
cryptodrvContext
;
87
AESDRV_IoMode_t
ioMode
;
88
AESDRV_IoModeSpecific_t
ioModeSpecific
;
90
bool
authTagOptimize
;
95
}
AESDRV_Context_t
;
96
97
#elif ( defined(AES_COUNT) && (AES_COUNT > 0) )
98
99
typedef
struct
100
{
101
uint32_t ccmCounter[4];
102
}
AESDRV_Context_t
;
103
104
#endif
105
106
#ifdef __cplusplus
107
}
108
#endif
109
110
#endif
/* #if ( defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) ) || \
111
( defined(AES_COUNT) && (AES_COUNT > 0) ) */
112
113
#endif
/* __SILICON_LABS_AESDRV_H */
AESDRV_Context_t::cryptodrvContext
CRYPTODRV_Context_t cryptodrvContext
CRYPTO driver context.
Definition:
aesdrv.h:86
AESDRV_IoModeSpecific_t
Data I/O mode specific configuration structure.
Definition:
aesdrv.h:72
AESDRV_Context_t::ioMode
AESDRV_IoMode_t ioMode
Data I/O mode.
Definition:
aesdrv.h:87
config.h
Compatibility names (set of defines)
AESDRV_IoModeSpecific_t::dmaConfig
AESDRV_DmaConfig_t dmaConfig
Definition:
aesdrv.h:74
mbedtls_ecode.h
Silicon Labs specific mbedtls error code definitions.
aesdrvIoModeDma
Core CPU moves data to/from the data registers.
Definition:
aesdrv.h:61
AESDRV_DmaConfig_t
DMA I/O mode specific configuration structure.
Definition:
aesdrv.h:65
aesdrvIoModeCore
Definition:
aesdrv.h:60
AESDRV_Context_t::ioModeSpecific
AESDRV_IoModeSpecific_t ioModeSpecific
Data I/O mode specific config.
Definition:
aesdrv.h:88
AESDRV_IoMode_t
AESDRV_IoMode_t
Enum defines which data I/O mode to use for moving data to/from the AES/CRYPTO hardware module...
Definition:
aesdrv.h:58
AESDRV_DmaConfig_t::dmaChOut
unsigned int dmaChOut
DMA output channel.
Definition:
aesdrv.h:68
AESDRV_CtrCallback_t
void(* AESDRV_CtrCallback_t)(uint8_t *ctr)
Prototype of counter callback function provided by user.
Definition:
aesdrv.h:78
CRYPTODRV_Context_t
CRYPTODRV operation context.
Definition:
cryptodrv.h:98
cryptodrv.h
AESDRV_DmaConfig_t::dmaChIn
unsigned int dmaChIn
DMA input channel.
Definition:
aesdrv.h:67
AESDRV_Context_t::authTagOptimize
bool authTagOptimize
Enable/disable optimized handling of authentication tag in CCM/GCM.
Definition:
aesdrv.h:90
AESDRV_Context_t
Definition:
aesdrv.h:84
Generated on Thu Mar 9 2017 20:48:04 for mbed TLS v2.2.0 by
1.8.10