EDDSALPF3HSM.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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  */
32 
52 #ifndef ti_drivers_eddsa_EDDSALPF3HSM__include
53 #define ti_drivers_eddsa_EDDSALPF3HSM__include
54 
55 #include <ti/drivers/EDDSA.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* Defines */
62 /* The largest signature will be for NIST521 which will produce 72B per component (S and R) */
63 #define EDDSA_COMPONENT_VECTOR_LENGTH_BYTES 72
64 #define EDDSA_CURVE_LENGTH_25519 255
65 
75 #define EDDSALPF3HSM_STATUS_RESOURCE_UNAVAILABLE (ECDSA_STATUS_RESERVED - 0)
76 
80 #define EDDSALPF3HSM_STATUS_HARDWARE_ERROR (ECDSA_STATUS_RESERVED - 1)
81 
85 #define EDDSALPF3HSM_STATUS_INVALID_MESSAGE_LENGTH (ECDSA_STATUS_RESERVED - 2)
86 
90 #define EDDSALPF3HSM_STATUS_INVALID_KEY_ENCODING (ECDSA_STATUS_RESERVED - 3)
91 
98 typedef struct
99 {
100  uint16_t reserved1;
102 
108 typedef struct
109 {
112  bool isOpen;
115  int_fast16_t returnStatus;
121  int_fast16_t hsmStatus;
124  uint32_t paramAssetID;
125  uint32_t tempAssetID;
126  uint32_t stateAssetID;
127  const uint8_t *curveParam;
128  uint32_t curveParamSize;
129  uint8_t *input;
130  size_t inputLength;
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* ti_drivers_eddsa_EDDSALPF3HSM__include */
bool driverCreatedPublicKeyAsset
Definition: EDDSALPF3HSM.h:114
uint16_t reserved1
Definition: EDDSALPF3HSM.h:100
EDDSA_ReturnBehavior returnBehavior
Definition: EDDSALPF3HSM.h:119
uint32_t semaphoreTimeout
Definition: EDDSALPF3HSM.h:120
const uint8_t * curveParam
Definition: EDDSALPF3HSM.h:127
CryptoKey datastructure.
Definition: CryptoKey.h:211
#define EDDSA_COMPONENT_VECTOR_LENGTH_BYTES
Definition: EDDSALPF3HSM.h:63
EDDSA_CallbackFxn callbackFxn
Definition: EDDSALPF3HSM.h:118
TI Driver for Edwards Curve Digital Signature Algorithm.
uint32_t privateKeyAssetID
Definition: EDDSALPF3HSM.h:122
void(* EDDSA_CallbackFxn)(EDDSA_Handle handle, int_fast16_t returnStatus, EDDSA_Operation operation, EDDSA_OperationType operationType)
The definition of a callback function used by the EDDSA driver when used in EDDSA_RETURN_BEHAVIOR_CAL...
Definition: EDDSA.h:743
size_t inputLength
Definition: EDDSALPF3HSM.h:130
uint32_t stateAssetID
Definition: EDDSALPF3HSM.h:126
EDDSALPF3HSM Hardware Attributes.
Definition: EDDSALPF3HSM.h:98
bool driverCreatedPrivateKeyAsset
Definition: EDDSALPF3HSM.h:113
uint32_t publicKeyAssetID
Definition: EDDSALPF3HSM.h:123
size_t inputLengthRemaining
Definition: EDDSALPF3HSM.h:131
EDDSALPF3HSM Object.
Definition: EDDSALPF3HSM.h:108
EDDSA_ReturnBehavior
The way in which EDDSA function calls return after performing an encryption + authentication or decry...
Definition: EDDSA.h:583
uint32_t curveParamSize
Definition: EDDSALPF3HSM.h:128
bool isOpen
Definition: EDDSALPF3HSM.h:112
EDDSA_Operation * operation
Definition: EDDSALPF3HSM.h:116
CryptoKey * publicKey
Definition: EDDSALPF3HSM.h:111
CryptoKey * privateKey
Definition: EDDSALPF3HSM.h:110
EDDSA_OperationType
Enum for the operation types supported by the driver.
Definition: EDDSA.h:717
uint32_t tempAssetID
Definition: EDDSALPF3HSM.h:125
int_fast16_t hsmStatus
Definition: EDDSALPF3HSM.h:121
int_fast16_t returnStatus
Definition: EDDSALPF3HSM.h:115
uint8_t * input
Definition: EDDSALPF3HSM.h:129
Union containing pointers to all supported operation structs.
Definition: EDDSA.h:704
uint32_t paramAssetID
Definition: EDDSALPF3HSM.h:124
EDDSA_OperationType operationType
Definition: EDDSALPF3HSM.h:117
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale