250 return -ECONNREFUSED;
281inline __attribute__((always_inline))
const char *
sx_err2str(
int sx_err)
290 return "SX_ERR_HW_PROCESSING";
293 return "SX_ERR_RETRY";
302 return "SX_ERR_INCOMPATIBLE_HW";
305 return "SX_ERR_INVALID_TAG";
314 return "SX_ERR_DMA_FAILED";
324 return "SX_ERR_UNINITIALIZED_OBJ";
337 return "SX_ERR_INVALID_KEYREF";
341 return "SX_ERR_ALLOCATION_TOO_SMALL";
344 return "SX_ERR_TOO_BIG";
347 return "SX_ERR_INPUT_BUFFER_TOO_SMALL";
350 return "SX_ERR_OUTPUT_BUFFER_TOO_SMALL";
355 return "SX_ERR_INVALID_KEY_SZ";
358 return "SX_ERR_INVALID_TAG_SIZE";
361 return "SX_ERR_INVALID_NONCE_SIZE";
364 return "SX_ERR_FEED_COUNT_EXCEEDED";
367 return "SX_ERR_WRONG_SIZE_GRANULARITY";
372 return "SX_ERR_HW_KEY_NOT_SUPPORTED";
377 return "SX_ERR_CONTEXT_SAVING_NOT_SUPPORTED";
380 return "SX_ERR_FEED_AFTER_DATA";
389 return "SX_ERR_RESET_NEEDED";
394 return "SX_ERR_INVALID_PARAM";
397 return "SX_ERR_UNKNOWN_ERROR";
400 return "SX_ERR_BUSY";
403 return "SX_ERR_NOT_QUADRATIC_RESIDUE";
406 return "SX_ERR_COMPOSITE_VALUE";
409 return "SX_ERR_NOT_INVERTIBLE";
417 return "SX_ERR_INVALID_SIGNATURE";
420 return "SX_ERR_NOT_IMPLEMENTED";
423 return "SX_ERR_POINT_AT_INFINITY";
426 return "SX_ERR_OUT_OF_RANGE";
434 return "SX_ERR_INVALID_MODULUS";
437 return "SX_ERR_POINT_NOT_ON_CURVE";
448 return "SX_ERR_OPERAND_TOO_LARGE";
451 return "SX_ERR_PLATFORM_ERROR";
454 return "SX_ERR_EXPIRED";
464 return "SX_ERR_IK_MODE";
467 return "SX_ERR_INVALID_CURVE_PARAM";
476 return "SX_ERR_IK_NOT_READY";
479 return "SX_ERR_PK_RETRY";
484 return "SX_ERR_INVALID_REQ_SZ";
487 return "SX_ERR_RESEED_NEEDED";
490 return "SX_ERR_INVALID_ARG";
494 return "SX_ERR_READY";
497 return "SX_ERR_UNSUPPORTED_HASH_ALG";
500 return "SX_ERR_INVALID_CIPHERTEXT";
505 return "SX_ERR_TOO_MANY_ATTEMPTS";
510 return "SX_ERR_RSA_PQ_RANGE_CHECK_FAIL";
514 return "SX_ERR_WORKMEM_BUFFER_TOO_SMALL";
#define SX_ERR_TOO_BIG
Definition statuscodes.h:190
#define SX_ERR_INVALID_TAG_SIZE
Definition statuscodes.h:199
#define SX_ERR_INVALID_SIGNATURE
Definition statuscodes.h:46
#define SX_ERR_IK_NOT_READY
Definition statuscodes.h:108
#define SX_ERR_FEED_COUNT_EXCEEDED
Definition statuscodes.h:205
#define SX_ERR_INVALID_KEYREF
Definition statuscodes.h:184
#define SX_ERR_NOT_IMPLEMENTED
Definition statuscodes.h:49
#define SX_ERR_NOT_INVERTIBLE
Definition statuscodes.h:39
#define SX_ERR_INVALID_MODULUS
Definition statuscodes.h:69
#define SX_ERR_OPERAND_TOO_LARGE
Definition statuscodes.h:82
#define SX_ERR_PLATFORM_ERROR
Definition statuscodes.h:85
#define SX_ERR_DMA_FAILED
Definition statuscodes.h:167
#define SX_ERR_ALLOCATION_TOO_SMALL
Definition statuscodes.h:187
#define SX_ERR_INVALID_CURVE_PARAM
Definition statuscodes.h:100
#define SX_ERR_INVALID_PARAM
Definition statuscodes.h:24
#define SX_ERR_BUSY
Definition statuscodes.h:30
#define SX_ERR_COMPOSITE_VALUE
Definition statuscodes.h:36
#define SX_ERR_HW_PROCESSING
Definition statuscodes.h:146
#define SX_ERR_OUT_OF_RANGE
Definition statuscodes.h:62
#define SX_ERR_IK_MODE
Definition statuscodes.h:97
#define SX_ERR_READY
Definition statuscodes.h:128
#define SX_ERR_INVALID_KEY_SZ
Definition statuscodes.h:196
#define SX_ERR_INCOMPATIBLE_HW
Definition statuscodes.h:156
#define SX_ERR_INVALID_NONCE_SIZE
Definition statuscodes.h:202
#define SX_ERR_UNKNOWN_ERROR
Definition statuscodes.h:27
#define SX_ERR_FEED_AFTER_DATA
Definition statuscodes.h:217
#define SX_ERR_CONTEXT_SAVING_NOT_SUPPORTED
Definition statuscodes.h:214
#define SX_ERR_INVALID_ARG
Definition statuscodes.h:125
#define SX_ERR_RETRY
Definition statuscodes.h:149
#define SX_ERR_OUTPUT_BUFFER_TOO_SMALL
Definition statuscodes.h:193
#define SX_OK
Definition statuscodes.h:21
#define SX_ERR_PK_RETRY
Definition statuscodes.h:111
#define SX_ERR_RSA_PQ_RANGE_CHECK_FAIL
Definition statuscodes.h:140
#define SX_ERR_HW_KEY_NOT_SUPPORTED
Definition statuscodes.h:211
#define SX_ERR_INVALID_REQ_SZ
Definition statuscodes.h:119
#define SX_ERR_UNSUPPORTED_HASH_ALG
Definition statuscodes.h:131
#define SX_ERR_POINT_NOT_ON_CURVE
Definition statuscodes.h:72
#define SX_ERR_INVALID_TAG
Definition statuscodes.h:159
#define SX_ERR_RESET_NEEDED
Definition statuscodes.h:226
#define SX_ERR_INSUFFICIENT_ENTROPY
Definition statuscodes.h:239
#define SX_ERR_RESEED_NEEDED
Definition statuscodes.h:122
#define SX_ERR_NOT_QUADRATIC_RESIDUE
Definition statuscodes.h:33
#define SX_ERR_TOO_MANY_ATTEMPTS
Definition statuscodes.h:137
#define SX_ERR_WRONG_SIZE_GRANULARITY
Definition statuscodes.h:208
#define SX_ERR_POINT_AT_INFINITY
Definition statuscodes.h:59
#define SX_ERR_EXPIRED
Definition statuscodes.h:88
#define SX_ERR_INPUT_BUFFER_TOO_SMALL
Definition statuscodes.h:236
#define SX_ERR_INVALID_CIPHERTEXT
Definition statuscodes.h:134
#define SX_ERR_WORKMEM_BUFFER_TOO_SMALL
Definition statuscodes.h:143
#define SX_ERR_UNINITIALIZED_OBJ
Definition statuscodes.h:174
int sx_err2errno(int sx_err)
Function to convert CRACEN SW library error codes to errno.
Definition sx_error.h:28
const char * sx_err2str(int sx_err)
Function to convert CRACEN SW library error codes to strings for logging.
Definition sx_error.h:281