60#define CRYS_ERROR_BASE 0x00F00000UL
63#define CRYS_ERROR_LAYER_RANGE 0x00010000UL
66#define CRYS_ERROR_MODULE_RANGE 0x00000100UL
70#define CRYS_LAYER_ERROR_IDX 0x00UL
72#define LLF_LAYER_ERROR_IDX 0x01UL
74#define GENERIC_ERROR_IDX 0x05UL
78#define AES_ERROR_IDX 0x00UL
80#define DES_ERROR_IDX 0x01UL
82#define HASH_ERROR_IDX 0x02UL
84#define HMAC_ERROR_IDX 0x03UL
86#define RSA_ERROR_IDX 0x04UL
88#define DH_ERROR_IDX 0x05UL
91#define ECPKI_ERROR_IDX 0x08UL
93#define RND_ERROR_IDX 0x0CUL
95#define COMMON_ERROR_IDX 0x0DUL
97#define KDF_ERROR_IDX 0x11UL
99#define HKDF_ERROR_IDX 0x12UL
101#define AESCCM_ERROR_IDX 0x15UL
103#define FIPS_ERROR_IDX 0x17UL
106#define PKA_MODULE_ERROR_IDX 0x21UL
108#define CHACHA_ERROR_IDX 0x22UL
110#define EC_MONT_EDW_ERROR_IDX 0x23UL
112#define CHACHA_POLY_ERROR_IDX 0x24UL
114#define POLY_ERROR_IDX 0x25UL
116#define SRP_ERROR_IDX 0x26UL
124#define CRYS_AES_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
125 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
126 (CRYS_ERROR_MODULE_RANGE * AES_ERROR_IDX ) )
129#define CRYS_DES_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
130 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
131 (CRYS_ERROR_MODULE_RANGE * DES_ERROR_IDX ) )
134#define CRYS_HASH_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
135 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
136 (CRYS_ERROR_MODULE_RANGE * HASH_ERROR_IDX ) )
139#define CRYS_HMAC_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
140 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
141 (CRYS_ERROR_MODULE_RANGE * HMAC_ERROR_IDX ) )
144#define CRYS_RSA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
145 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
146 (CRYS_ERROR_MODULE_RANGE * RSA_ERROR_IDX ) )
149#define CRYS_DH_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
150 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
151 (CRYS_ERROR_MODULE_RANGE * DH_ERROR_IDX ) )
154#define CRYS_ECPKI_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
155 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
156 (CRYS_ERROR_MODULE_RANGE * ECPKI_ERROR_IDX ) )
159#define LLF_ECPKI_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
160 (CRYS_ERROR_LAYER_RANGE * LLF_LAYER_ERROR_IDX) + \
161 (CRYS_ERROR_MODULE_RANGE * ECPKI_ERROR_IDX ) )
164#define CRYS_RND_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
165 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
166 (CRYS_ERROR_MODULE_RANGE * RND_ERROR_IDX ) )
169#define LLF_RND_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
170 (CRYS_ERROR_LAYER_RANGE * LLF_LAYER_ERROR_IDX) + \
171 (CRYS_ERROR_MODULE_RANGE * RND_ERROR_IDX ) )
174#define CRYS_COMMON_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
175 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
176 (CRYS_ERROR_MODULE_RANGE * COMMON_ERROR_IDX ) )
179#define CRYS_KDF_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
180 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
181 (CRYS_ERROR_MODULE_RANGE * KDF_ERROR_IDX ) )
184#define CRYS_HKDF_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
185 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
186 (CRYS_ERROR_MODULE_RANGE * HKDF_ERROR_IDX ) )
189#define CRYS_AESCCM_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
190 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
191 (CRYS_ERROR_MODULE_RANGE * AESCCM_ERROR_IDX ) )
194#define CRYS_FIPS_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
195 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
196 (CRYS_ERROR_MODULE_RANGE * FIPS_ERROR_IDX ) )
199#define PKA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
200 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
201 (CRYS_ERROR_MODULE_RANGE * PKA_MODULE_ERROR_IDX ) )
204#define CRYS_CHACHA_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
205 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
206 (CRYS_ERROR_MODULE_RANGE * CHACHA_ERROR_IDX ) )
208#define CRYS_CHACHA_POLY_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
209 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
210 (CRYS_ERROR_MODULE_RANGE * CHACHA_POLY_ERROR_IDX ) )
212#define CRYS_POLY_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
213 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
214 (CRYS_ERROR_MODULE_RANGE * POLY_ERROR_IDX ) )
217#define CRYS_SRP_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
218 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
219 (CRYS_ERROR_MODULE_RANGE * SRP_ERROR_IDX ) )
223#define CRYS_EC_MONT_EDW_MODULE_ERROR_BASE (CRYS_ERROR_BASE + \
224 (CRYS_ERROR_LAYER_RANGE * CRYS_LAYER_ERROR_IDX) + \
225 (CRYS_ERROR_MODULE_RANGE * EC_MONT_EDW_ERROR_IDX ) )
229#define GENERIC_ERROR_BASE ( CRYS_ERROR_BASE + (CRYS_ERROR_LAYER_RANGE * GENERIC_ERROR_IDX) )
231#define CRYS_FATAL_ERROR (GENERIC_ERROR_BASE + 0x00UL)
233#define CRYS_OUT_OF_RESOURCE_ERROR (GENERIC_ERROR_BASE + 0x01UL)
235#define CRYS_ILLEGAL_RESOURCE_VAL_ERROR (GENERIC_ERROR_BASE + 0x02UL)
244#define SASI_CRYS_RETURN_ERROR(retCode, retcodeInfo, funcHandler) \
245 ((retCode) == 0 ? CRYS_OK : funcHandler(retCode, retcodeInfo))
uint32_t CRYSError_t
Definition: crys_error.h:253
This file contains the platform dependent definitions and types.