59#define CRYS_ERROR_BASE 0x00F00000UL
62#define CRYS_ERROR_LAYER_RANGE 0x00010000UL
65#define CRYS_ERROR_MODULE_RANGE 0x00000100UL
69#define CRYS_LAYER_ERROR_IDX 0x00UL
71#define LLF_LAYER_ERROR_IDX 0x01UL
73#define GENERIC_ERROR_IDX 0x05UL
77#define AES_ERROR_IDX 0x00UL
79#define DES_ERROR_IDX 0x01UL
81#define HASH_ERROR_IDX 0x02UL
83#define HMAC_ERROR_IDX 0x03UL
85#define RSA_ERROR_IDX 0x04UL
87#define DH_ERROR_IDX 0x05UL
90#define ECPKI_ERROR_IDX 0x08UL
92#define RND_ERROR_IDX 0x0CUL
94#define COMMON_ERROR_IDX 0x0DUL
96#define KDF_ERROR_IDX 0x11UL
98#define HKDF_ERROR_IDX 0x12UL
100#define AESCCM_ERROR_IDX 0x15UL
102#define FIPS_ERROR_IDX 0x17UL
105#define PKA_MODULE_ERROR_IDX 0x21UL
107#define CHACHA_ERROR_IDX 0x22UL
109#define EC_MONT_EDW_ERROR_IDX 0x23UL
111#define CHACHA_POLY_ERROR_IDX 0x24UL
113#define POLY_ERROR_IDX 0x25UL
115#define SRP_ERROR_IDX 0x26UL
123#define CRYS_AES_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
124 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
125 (CRYS_ERROR_MODULE_RANGE * AES_ERROR_IDX ) )
128#define CRYS_DES_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
129 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
130 (CRYS_ERROR_MODULE_RANGE * DES_ERROR_IDX ) )
133#define CRYS_HASH_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
134 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
135 (CRYS_ERROR_MODULE_RANGE * HASH_ERROR_IDX ) )
138#define CRYS_HMAC_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
139 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
140 (CRYS_ERROR_MODULE_RANGE * HMAC_ERROR_IDX ) )
143#define CRYS_RSA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
144 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
145 (CRYS_ERROR_MODULE_RANGE * RSA_ERROR_IDX ) )
148#define CRYS_DH_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
149 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
150 (CRYS_ERROR_MODULE_RANGE * DH_ERROR_IDX ) )
153#define CRYS_ECPKI_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
154 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
155 (CRYS_ERROR_MODULE_RANGE * ECPKI_ERROR_IDX ) )
158#define LLF_ECPKI_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
159 (CRYS_ERROR_LAYER_RANGE * LLF_LAYER_ERROR_IDX) + \
160 (CRYS_ERROR_MODULE_RANGE * ECPKI_ERROR_IDX ) )
163#define CRYS_RND_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
164 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
165 (CRYS_ERROR_MODULE_RANGE * RND_ERROR_IDX ) )
168#define LLF_RND_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
169 (CRYS_ERROR_LAYER_RANGE * LLF_LAYER_ERROR_IDX) + \
170 (CRYS_ERROR_MODULE_RANGE * RND_ERROR_IDX ) )
173#define CRYS_COMMON_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
174 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
175 (CRYS_ERROR_MODULE_RANGE * COMMON_ERROR_IDX ) )
178#define CRYS_KDF_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
179 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
180 (CRYS_ERROR_MODULE_RANGE * KDF_ERROR_IDX ) )
183#define CRYS_HKDF_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
184 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
185 (CRYS_ERROR_MODULE_RANGE * HKDF_ERROR_IDX ) )
188#define CRYS_AESCCM_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
189 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
190 (CRYS_ERROR_MODULE_RANGE * AESCCM_ERROR_IDX ) )
193#define CRYS_FIPS_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
194 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
195 (CRYS_ERROR_MODULE_RANGE * FIPS_ERROR_IDX ) )
198#define PKA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
199 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
200 (CRYS_ERROR_MODULE_RANGE * PKA_MODULE_ERROR_IDX ) )
203#define CRYS_CHACHA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
204 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
205 (CRYS_ERROR_MODULE_RANGE * CHACHA_ERROR_IDX ) )
207#define CRYS_CHACHA_POLY_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
208 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
209 (CRYS_ERROR_MODULE_RANGE * CHACHA_POLY_ERROR_IDX ) )
211#define CRYS_POLY_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
212 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
213 (CRYS_ERROR_MODULE_RANGE * POLY_ERROR_IDX ) )
216#define CRYS_SRP_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
217 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
218 (CRYS_ERROR_MODULE_RANGE * SRP_ERROR_IDX ) )
222#define CRYS_EC_MONT_EDW_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
223 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
224 (CRYS_ERROR_MODULE_RANGE * EC_MONT_EDW_ERROR_IDX ) )
228#define GENERIC_ERROR_BASE ( CRYS_ERROR_BASE + (CRYS_ERROR_LAYER_RANGE * GENERIC_ERROR_IDX) )
230#define CRYS_FATAL_ERROR (GENERIC_ERROR_BASE + 0x00UL)
232#define CRYS_OUT_OF_RESOURCE_ERROR (GENERIC_ERROR_BASE + 0x01UL)
234#define CRYS_ILLEGAL_RESOURCE_VAL_ERROR (GENERIC_ERROR_BASE + 0x02UL)
243#define SASI_CRYS_RETURN_ERROR(retCode, retcodeInfo, funcHandler) \
244 ((retCode) == 0 ? CRYS_OK : funcHandler(retCode, retcodeInfo))
uint32_t CRYSError_t
Definition crys_error.h:252
This file contains the platform dependent definitions and types.