AESCCMLPF3.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2023, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
62 #ifndef ti_drivers_aesccm_AESCCMLPF3__include
63 #define ti_drivers_aesccm_AESCCMLPF3__include
64 
65 #include <stdbool.h>
66 #include <stdint.h>
67 
68 #include <ti/drivers/AESCCM.h>
70 
71 #include <ti/devices/DeviceFamily.h>
72 #include DeviceFamily_constructPath(driverlib/aes.h)
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 #define AESCCMLPF3_AAD_BUFFER_SIZE 2U
79 
87 
93 typedef struct
94 {
95  /* Common member first to allow struct to be cast to the common type */
97  const uint8_t *aad;
98  const uint8_t *input;
99  uint8_t *output;
100  const uint8_t *nonce;
101  uint8_t *mac;
102  volatile uint32_t intermediateCounter[AES_IV_LENGTH_BYTES / 4];
103  volatile uint32_t intermediateTag[AES_TAG_LENGTH_BYTES / 4];
106  size_t inputLength;
107  volatile size_t inputCBCMACLengthRemaining;
108  volatile size_t inputCTRLengthRemaining;
112  volatile size_t totalCBCMACLengthRemaining;
113  volatile size_t totalCTRLengthRemaining;
115  uint8_t bufferedAAD[AESCCMLPF3_AAD_BUFFER_SIZE];
117  uint8_t macLength;
118  uint8_t nonceLength;
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* ti_drivers_aesccm_AESCCMLPF3__include */
AESCommonLPF3_HWAttrs AESCCMLPF3_HWAttrs
AESCCMLPF3 Hardware Attributes.
Definition: AESCCMLPF3.h:86
const uint8_t * input
Definition: AESCCMLPF3.h:98
AESCommonLPF3_Object common
Definition: AESCCMLPF3.h:96
#define AESCCMLPF3_AAD_BUFFER_SIZE
Definition: AESCCMLPF3.h:78
volatile size_t totalCTRLengthRemaining
Definition: AESCCMLPF3.h:113
AESCCM_CallbackFxn callbackFxn
Definition: AESCCMLPF3.h:104
AESCCM_OperationUnion * operation
Definition: AESCCMLPF3.h:105
size_t totalDataLength
Definition: AESCCMLPF3.h:110
const uint8_t * nonce
Definition: AESCCMLPF3.h:100
AESCCMLPF3 Object.
Definition: AESCCMLPF3.h:93
size_t totalAADLength
Definition: AESCCMLPF3.h:109
size_t inputLength
Definition: AESCCMLPF3.h:106
uint8_t * output
Definition: AESCCMLPF3.h:99
AESCCM_OperationType operationType
Definition: AESCCMLPF3.h:114
void(* AESCCM_CallbackFxn)(AESCCM_Handle handle, int_fast16_t returnValue, AESCCM_OperationUnion *operation, AESCCM_OperationType operationType)
The definition of a callback function used by the AESCCM driver when used in AESCCM_RETURN_BEHAVIOR_C...
Definition: AESCCM.h:1059
AESCommonLPF3 Hardware Attributes.
Definition: AESCommonLPF3.h:80
const uint8_t * aad
Definition: AESCCMLPF3.h:97
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
Definition: AESCCM.h:1017
AESCommon driver implementation for the Low Power F3 family.
volatile size_t inputCBCMACLengthRemaining
Definition: AESCCMLPF3.h:107
uint8_t macLength
Definition: AESCCMLPF3.h:117
volatile size_t totalCBCMACLengthRemaining
Definition: AESCCMLPF3.h:112
volatile size_t inputCTRLengthRemaining
Definition: AESCCMLPF3.h:108
size_t aadBytesProcessed
Definition: AESCCMLPF3.h:111
AESCCM_OperationType
Enum for the operation types supported by the driver.
Definition: AESCCM.h:1029
uint8_t * mac
Definition: AESCCMLPF3.h:101
AESCCM driver header.
uint8_t nonceLength
Definition: AESCCMLPF3.h:118
AESCommonLPF3 Object.
Definition: AESCommonLPF3.h:102
uint8_t bufferedAADLength
Definition: AESCCMLPF3.h:116
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale