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 {
124 
139 
161 
163 
172 typedef int_fast16_t (*ECDSACC26X2_stateMachineFxn) (ECDSA_Handle handle);
173 
180 typedef struct {
193  uint8_t intPriority;
196 
202 typedef struct {
204  TRNGCC26XX_Object trngObject;
207  bool isOpen;
210  int_fast16_t operationStatus;
216  ECDSACC26X2_FsmState fsmState;
218  uint32_t resultAddress;
219  uint32_t *scratchNumber1;
220  uint32_t *scratchNumber2;
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 #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:144
uint8_t trngIntPriority
Definition: ECDSACC26X2.h:194
Definition: ECDSACC26X2.h:140
The CryptoKey type is an opaque representation of a cryptographic key.
TRNGCC26XX Hardware Attributes.
Definition: TRNGCC26XX.h:119
uint32_t resultAddress
Definition: ECDSACC26X2.h:218
Definition: ECDSACC26X2.h:149
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:608
uint32_t * scratchNumber2
Definition: ECDSACC26X2.h:220
Power Manager.
ECDSACC26X2_FsmState
ECDSACC26X2 Sign and Verify states.
Definition: ECDSACC26X2.h:122
TRNG Global configuration.
Definition: TRNG.h:273
uint32_t semaphoreTimeout
Definition: ECDSACC26X2.h:217
bool operationInProgress
Definition: ECDSACC26X2.h:208
CryptoKey datastructure.
Definition: CryptoKey.h:209
Definition: ECDSACC26X2.h:150
Definition: ECDSACC26X2.h:137
ECDSA Global configuration.
Definition: ECDSA.h:470
Definition: ECDSACC26X2.h:152
ECDSA_CallbackFxn callbackFxn
Definition: ECDSACC26X2.h:213
TRNG driver implementation for the CC26XX family.
TRNGCC26XX_Object trngObject
Definition: ECDSACC26X2.h:204
Definition: ECDSACC26X2.h:143
uint32_t * scratchNumber1
Definition: ECDSACC26X2.h:219
Definition: ECDSACC26X2.h:134
ECDSACC26X2 Object.
Definition: ECDSACC26X2.h:202
Definition: ECDSACC26X2.h:128
Definition: ECDSACC26X2.h:125
bool isOpen
Definition: ECDSACC26X2.h:207
ECDSA_OperationType
Enum for the operation types supported by the driver.
Definition: ECDSA.h:584
int_fast16_t(* ECDSACC26X2_stateMachineFxn)(ECDSA_Handle handle)
ECDSACC26X2 state machine function prototype.
Definition: ECDSACC26X2.h:172
Definition: ECDSACC26X2.h:129
Definition: ECDSACC26X2.h:123
Definition: ECDSACC26X2.h:141
ECDSACC26X2_FsmState fsmState
Definition: ECDSACC26X2.h:216
Union containing pointers to all supported operation structs.
Definition: ECDSA.h:576
uint8_t intPriority
PKA Peripheral&#39;s interrupt priority.
Definition: ECDSACC26X2.h:193
Definition: ECDSACC26X2.h:160
ECDSA_Operation operation
Definition: ECDSACC26X2.h:211
TRNG driver header.
ECDSACC26X2 Hardware Attributes.
Definition: ECDSACC26X2.h:180
ECDSACC26X2_stateMachineFxn fsmFxn
Definition: ECDSACC26X2.h:214
Definition: ECDSACC26X2.h:159
Definition: ECDSACC26X2.h:148
Definition: ECDSACC26X2.h:156
Definition: ECDSACC26X2.h:154
Definition: ECDSACC26X2.h:142
TRNG_Handle trngHandle
Definition: ECDSACC26X2.h:206
Definition: ECDSACC26X2.h:133
Definition: ECDSACC26X2.h:158
Definition: ECDSACC26X2.h:151
bool operationCanceled
Definition: ECDSACC26X2.h:209
Definition: ECDSACC26X2.h:155
Definition: ECDSACC26X2.h:135
Definition: ECDSACC26X2.h:138
ECDSA_ReturnBehavior returnBehavior
Definition: ECDSACC26X2.h:215
int_fast16_t operationStatus
Definition: ECDSACC26X2.h:210
Definition: ECDSACC26X2.h:127
ECDSA_OperationType operationType
Definition: ECDSACC26X2.h:212
TRNGCC26XX_HWAttrs trngHwAttrs
Definition: ECDSACC26X2.h:205
TRNG_Config trngConfig
Definition: ECDSACC26X2.h:203
Definition: ECDSACC26X2.h:126
CryptoKey pmsnKey
Definition: ECDSACC26X2.h:221
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale