ECDSALPF3HSM.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024-2025, 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  */
59 #ifndef ti_drivers_ecdsa_ECDSALPF3HSM__include
60 #define ti_drivers_ecdsa_ECDSALPF3HSM__include
61 
62 #include <stdint.h>
63 #include <stdbool.h>
64 
65 #include <ti/drivers/ECDSA.h>
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 /* Defines */
72 /* The largest signature will be for NIST521 which will produce 72B per component (S and R) */
73 #define ECDSALPF3HSM_COMPONENT_VECTOR_LENGTH 144
74 
78 #define ECDSALPF3HSM_STATUS_NO_VALID_CURVE_TYPE_PROVIDED (ECDSA_STATUS_RESERVED - 0)
79 
83 #define ECDSALPF3HSM_STATUS_INVALID_KEY_ENCODING (ECDSA_STATUS_RESERVED - 1)
84 
88 #define ECDSALPF3HSM_STATUS_HARDWARE_ERROR (ECDSA_STATUS_RESERVED - 2)
89 
96 typedef struct
97 {
98  uint8_t dummy;
100 
104 typedef enum
105 {
109 
115 typedef struct
116 {
118  uint32_t keyAssetID;
119  uint32_t paramAssetID;
121  uint32_t curveParamSize;
122  uint8_t signature[ECDSALPF3HSM_COMPONENT_VECTOR_LENGTH] __attribute__((aligned(4)));
123  int_fast16_t returnStatus;
124  int_fast16_t hsmStatus;
126  uint32_t accessTimeout;
134  const uint8_t *curveParam;
135  uint8_t *input;
137  bool isOpen;
139 
140 #ifdef __cplusplus
141 }
142 #endif
143 
144 #endif /* ti_drivers_ecdsa_ECDSALPF3HSM__include */
TI Driver for Elliptic Curve Digital Signature Algorithm.
ECDSA_CurveType
Enum for the curve types supported by the driver.
Definition: ECDSA.h:644
ECDSA_ReturnBehavior
The way in which ECDSA function calls return after performing an encryption + authentication or decry...
Definition: ECDSA.h:622
const uint8_t * curveParam
Definition: ECDSALPF3HSM.h:134
uint32_t paramAssetID
Definition: ECDSALPF3HSM.h:119
uint32_t accessTimeout
Definition: ECDSALPF3HSM.h:126
ECDSA_ReturnBehavior returnBehavior
Definition: ECDSALPF3HSM.h:125
uint32_t publicObjAssetID
Definition: ECDSALPF3HSM.h:120
Definition: ECDSALPF3HSM.h:107
ECDSALPF3HSM Object.
Definition: ECDSALPF3HSM.h:115
CryptoKey * key
Definition: ECDSALPF3HSM.h:117
#define ECDSALPF3HSM_COMPONENT_VECTOR_LENGTH
Definition: ECDSALPF3HSM.h:73
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:777
ECDSA_CallbackFxn callbackFxn
Definition: ECDSALPF3HSM.h:133
Definition: ECDSALPF3HSM.h:106
CryptoKey datastructure.
Definition: CryptoKey.h:211
ECDSA_DigestLength
Enum for the hash digest lengths in bits supported by the driver.
Definition: ECDSA.h:671
ECDSA_DomainID domainId
Definition: ECDSALPF3HSM.h:128
ECDSA_DomainID
Enum for the curve domain id supported by the driver.
Definition: ECDSALPF3HSM.h:104
uint32_t curveParamSize
Definition: ECDSALPF3HSM.h:121
uint32_t keyAssetID
Definition: ECDSALPF3HSM.h:118
uint8_t dummy
Definition: ECDSALPF3HSM.h:98
ECDSA_Operation * operation
Definition: ECDSALPF3HSM.h:132
ECDSA_CurveLength
Enum for signature sizes in bits supported by the driver.
Definition: ECDSA.h:658
int_fast16_t hsmStatus
Definition: ECDSALPF3HSM.h:124
ECDSALPF3HSM Hardware Attributes.
Definition: ECDSALPF3HSM.h:96
ECDSA_OperationType
Enum for the operation types supported by the driver.
Definition: ECDSA.h:752
Union containing pointers to all supported operation structs.
Definition: ECDSA.h:743
ECDSA_CurveLength curveLength
Definition: ECDSALPF3HSM.h:129
bool driverCreatedKeyAsset
Definition: ECDSALPF3HSM.h:136
int_fast16_t returnStatus
Definition: ECDSALPF3HSM.h:123
ECDSA_DigestLength digestLength
Definition: ECDSALPF3HSM.h:130
uint8_t * input
Definition: ECDSALPF3HSM.h:135
ECDSA_OperationType operationType
Definition: ECDSALPF3HSM.h:131
ECDSA_CurveType curveType
Definition: ECDSALPF3HSM.h:127
bool isOpen
Definition: ECDSALPF3HSM.h:137
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale