ECIESXX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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  */
48 #ifndef ti_drivers_ecies_ECIESXX__include
49 #define ti_drivers_ecies_ECIESXX__include
50 
51 #include <stdbool.h>
52 
53 #include <ti/drivers/ECIES.h>
54 #include <ti/drivers/AESGCM.h>
55 #include <ti/drivers/ANSIX936KDF.h>
57 #include <ti/drivers/ECDH.h>
58 #include <ti/drivers/RNG.h>
59 
60 #include <ti/devices/DeviceFamily.h>
61 
62 #if ((DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) || \
63  (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4))
64  #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2)
65  #include <ti/drivers/aesgcm/AESGCMCC26XX.h>
66  #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4)
67  #include <ti/drivers/aesgcm/AESGCMCC26X4.h>
68  #endif
69  #include <ti/drivers/ecdh/ECDHCC26X2.h>
70  #include <ti/drivers/rng/RNGCC26XX.h>
71 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC23X0)
75 #else
76  #error "ECIESXX device family not supported"
77 #endif
78 
79 #ifdef __cplusplus
80 extern "C" {
81 #endif
82 
89 typedef struct
90 {
92 #if ((DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) || \
93  (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4))
94  #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2)
95  AESGCMCC26XX_HWAttrs aesHwAttrs;
96  #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4)
97  AESGCMCC26X4_HWAttrs aesHwAttrs;
98  #endif
99  ECDHCC26X2_HWAttrs ecdhHwAttrs;
100  RNGCC26XX_HWAttrs rngHwAttrs;
101 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC23X0)
102  AESGCMLPF3_HWAttrs aesHwAttrs;
103  ECDHLPF3SW_HWAttrs ecdhHwAttrs;
104  RNGLPF3RF_HWAttrs rngHwAttrs;
105 #endif
107 
113 typedef struct
114 {
117 
120 
123 
126 
128 
129 #if ((DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) || \
130  (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4))
131  #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2)
132  AESGCMCC26XX_Object aesObject;
133  #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4)
134  AESGCMCC26X4_Object aesObject;
135  #endif
136  ECDHCC26X2_Object ecdhObject;
137  RNGCC26XX_Object rngObject;
138 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC23X0)
139  AESGCMLPF3_Object aesObject;
140  ECDHLPF3SW_Object ecdhObject;
141  RNGLPF3RF_Object rngObject;
142 #endif
143 
144  bool isOpen;
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif /* ti_drivers_ecies_ECIESXX__include */
ANSI-X9.63 Key Derivation Function driver implementation for the CC13X1/CC26X1, CC13X2/CC26X2, CC13X4/CC26X4, and CC23X0 families.
ECC Global configuration.
Definition: ECDH.h:526
ECDHCC26X2_Object ecdhObject
Definition: ECIESXX.h:136
bool isOpen
Definition: ECIESXX.h:144
ECDH_Handle ecdhHandle
Definition: ECIESXX.h:122
AESGCM_Handle aesHandle
Definition: ECIESXX.h:116
ANSIX936KDF_Handle kdfHandle
Definition: ECIESXX.h:119
RNGCC26XX_Object rngObject
Definition: ECIESXX.h:137
ANSIX936KDF_Config kdfConfig
Definition: ECIESXX.h:118
AES Global configuration.
Definition: AESCommon.h:154
ECDHLPF3SW Hardware Attributes.
Definition: ECDHLPF3SW.h:75
AESGCM driver header.
RNG_Config rngConfig
Definition: ECIESXX.h:124
AESGCMCC26XX_Object aesObject
Definition: ECIESXX.h:132
ECDH_Config ecdhConfig
Definition: ECIESXX.h:121
ANSIX936KDFXX_HWAttrs kdfHwAttrs
Definition: ECIESXX.h:91
ECDH software driver implementation for the Low Power F3 family.
RNGCC26XX_HWAttrs rngHwAttrs
Definition: ECIESXX.h:100
AESGCMLPF3 Object.
Definition: AESGCMLPF3.h:94
RNG driver header.
ECDHLPF3SW Object.
Definition: ECDHLPF3SW.h:123
ECDHCC26X2_HWAttrs ecdhHwAttrs
Definition: ECIESXX.h:99
TI Driver for Elliptic Curve Diffie-Hellman key agreement scheme.
AESGCM driver implementation for the Low Power F3 family.
AESCommonLPF3 Hardware Attributes.
Definition: AESCommonLPF3.h:80
ANSIX936KDF driver header.
AESGCMCC26XX_HWAttrs aesHwAttrs
Definition: ECIESXX.h:95
ANSIX936KDF Global configuration.
Definition: ANSIX936KDF.h:214
ANSIX936KDFXX Object.
Definition: ANSIX936KDFXX.h:99
RNG Global configuration.
Definition: RNG.h:412
ECIES driver header.
RNG driver implementation for the CC23X0 family.
AESGCM_Config aesConfig
Definition: ECIESXX.h:115
Hardware-specific configuration attributes.
Definition: ANSIX936KDFXX.h:82
ECIESXX Object.
Definition: ECIESXX.h:113
RNG_Handle rngHandle
Definition: ECIESXX.h:125
Hardware-specific configuration attributes.
Definition: ECIESXX.h:89
ANSIX936KDFXX_Object kdfObject
Definition: ECIESXX.h:127
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale