ECDSACC26X2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019, 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  */
87 #ifndef ti_drivers_ecdsa_ECDSACC26X2__include
88 #define ti_drivers_ecdsa_ECDSACC26X2__include
89 
90 #include <stdint.h>
91 #include <stdbool.h>
92 
93 #include <ti/drivers/Power.h>
94 #include <ti/drivers/ECDSA.h>
95 #include <ti/drivers/TRNG.h>
99 
100 #include <ti/drivers/dpl/HwiP.h>
101 #include <ti/drivers/dpl/SwiP.h>
102 #include <ti/drivers/dpl/SemaphoreP.h>
103 
104 #ifdef __cplusplus
105 extern "C" {
106 #endif
107 
108 /* Exit the SWI and wait until an HWI call posts the SWI again */
109 #define ECDSACC26X2_STATUS_FSM_RUN_PKA_OP ECDSA_STATUS_RESERVED - 0
110 /* Execute the next FSM state immediately without waiting for the next HWI */
111 #define ECDSACC26X2_STATUS_FSM_RUN_FSM ECDSA_STATUS_RESERVED - 1
112 
122 typedef enum
123 {
125 
140 
162 
164 
173 typedef int_fast16_t (*ECDSACC26X2_stateMachineFxn)(ECDSA_Handle handle);
174 
181 typedef struct
182 {
196  uint8_t intPriority;
199 
205 typedef struct
206 {
208  TRNGCC26XX_Object trngObject;
211  bool isOpen;
214  int_fast16_t operationStatus;
220  ECDSACC26X2_FsmState fsmState;
222  uint32_t resultAddress;
223  uint32_t *scratchNumber1;
224  uint32_t *scratchNumber2;
227 
228 #ifdef __cplusplus
229 }
230 #endif
231 
232 #endif /* ti_drivers_ecdsa_ECDSACC26X2__include */
TI Driver for Elliptic Curve Digital Signature Algorithm.
ECDSA_ReturnBehavior
The way in which ECDSA function calls return after performing an encryption + authentication or decry...
Definition: ECDSA.h:505
Definition: ECDSACC26X2.h:145
uint8_t trngIntPriority
Definition: ECDSACC26X2.h:197
Definition: ECDSACC26X2.h:141
The CryptoKey type is an opaque representation of a cryptographic key.
TRNGCC26XX Hardware Attributes.
Definition: TRNGCC26XX.h:127
uint32_t resultAddress
Definition: ECDSACC26X2.h:222
Definition: ECDSACC26X2.h:150
void(* ECDSA_CallbackFxn)(ECDSA_Handle handle, int_fast16_t returnStatus, ECDSA_Operation operation, ECDSA_OperationType operationType)
The definition of a callback function used by the ECDSA driver when used in ECDSA_RETURN_BEHAVIOR_CAL...
Definition: ECDSA.h:613
uint32_t * scratchNumber2
Definition: ECDSACC26X2.h:224
Power Manager.
ECDSACC26X2_FsmState
ECDSACC26X2 Sign and Verify states.
Definition: ECDSACC26X2.h:122
TRNG Global configuration.
Definition: TRNG.h:320
uint32_t semaphoreTimeout
Definition: ECDSACC26X2.h:221
bool operationInProgress
Definition: ECDSACC26X2.h:212
CryptoKey datastructure.
Definition: CryptoKey.h:192
Definition: ECDSACC26X2.h:151
Definition: ECDSACC26X2.h:138
ECDSA Global configuration.
Definition: ECDSA.h:469
Definition: ECDSACC26X2.h:153
ECDSA_CallbackFxn callbackFxn
Definition: ECDSACC26X2.h:217
TRNG driver implementation for the CC26XX family.
TRNGCC26XX_Object trngObject
Definition: ECDSACC26X2.h:208
Definition: ECDSACC26X2.h:144
uint32_t * scratchNumber1
Definition: ECDSACC26X2.h:223
Definition: ECDSACC26X2.h:135
ECDSACC26X2 Object.
Definition: ECDSACC26X2.h:205
Definition: ECDSACC26X2.h:129
Definition: ECDSACC26X2.h:126
bool isOpen
Definition: ECDSACC26X2.h:211
ECDSA_OperationType
Enum for the operation types supported by the driver.
Definition: ECDSA.h:588
int_fast16_t(* ECDSACC26X2_stateMachineFxn)(ECDSA_Handle handle)
ECDSACC26X2 state machine function prototype.
Definition: ECDSACC26X2.h:173
Definition: ECDSACC26X2.h:130
Definition: ECDSACC26X2.h:124
Definition: ECDSACC26X2.h:142
ECDSACC26X2_FsmState fsmState
Definition: ECDSACC26X2.h:220
Union containing pointers to all supported operation structs.
Definition: ECDSA.h:579
uint8_t intPriority
PKA Peripheral&#39;s interrupt priority.
Definition: ECDSACC26X2.h:196
Definition: ECDSACC26X2.h:161
ECDSA_Operation operation
Definition: ECDSACC26X2.h:215
TRNG driver header.
ECDSACC26X2 Hardware Attributes.
Definition: ECDSACC26X2.h:181
ECDSACC26X2_stateMachineFxn fsmFxn
Definition: ECDSACC26X2.h:218
Definition: ECDSACC26X2.h:160
Definition: ECDSACC26X2.h:149
Definition: ECDSACC26X2.h:157
Definition: ECDSACC26X2.h:155
Definition: ECDSACC26X2.h:143
TRNG_Handle trngHandle
Definition: ECDSACC26X2.h:210
Definition: ECDSACC26X2.h:134
Definition: ECDSACC26X2.h:159
Definition: ECDSACC26X2.h:152
bool operationCanceled
Definition: ECDSACC26X2.h:213
Definition: ECDSACC26X2.h:156
Definition: ECDSACC26X2.h:136
Definition: ECDSACC26X2.h:139
ECDSA_ReturnBehavior returnBehavior
Definition: ECDSACC26X2.h:219
int_fast16_t operationStatus
Definition: ECDSACC26X2.h:214
Definition: ECDSACC26X2.h:128
ECDSA_OperationType operationType
Definition: ECDSACC26X2.h:216
TRNGCC26XX_HWAttrs trngHwAttrs
Definition: ECDSACC26X2.h:209
TRNG_Config trngConfig
Definition: ECDSACC26X2.h:207
Definition: ECDSACC26X2.h:127
CryptoKey pmsnKey
Definition: ECDSACC26X2.h:225
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale