![]() |
nRF Connect SDK API 3.3.99
|
|
inline |
#include <subsys/nrf_security/src/drivers/cracen/common/include/cracen/sx_error.h>
Function to convert CRACEN SW library error codes to errno.
| [in] | sx_err | Error code from sxsymcrypt or silexpk. |
No compatible hardware for this operation.
This error occurs if the dedicated hardware to execute the operation is not present, or hardware is present and operation not supported by it.
Hardware DMA error
Fatal error that should never happen. Can be caused by invalid or wrong addresses, RAM corruption, a hardware or software bug or system corruption.
Fatal error, trying to call a function with an uninitialized object
For example calling sx_aead_decrypt() with an sxaead object which has not been created yet with sx_aead_create_*() function.
Fatal error, trying to call an AEAD or block cipher create function with an uninitialized or invalid key reference.
Examples: calling sx_blkcipher_create_aesecb() with a key reference which has not been initialized yet with sx_keyref_load_material() or sx_keyref_load_by_id() function, sx_keyref_load_material() was called with key NULL or size 0, or sx_keyref_load_by_id() was called with an invalid index ID.
Hardware cannot work anymore.
To recover, reset the hardware or call *_init() function. For example, if this error is received when sx_trng_get() is called, call again sx_trng_open() to reset the hardware.
The signature is not valid
This error can happen during signature generation and signature verification
The modulus has an unexpected value
This error happens when the modulus is zero or even when odd modulus is expected
The input operand is too large
Happens when an operand is bigger than one of the following:
The hardware is still in IK mode
This error happens when a normal operation is started and the hardware is still in IK mode. Run command ::SX_PK_CMD_IK_EXIT to exit the IK mode and to run normal operations again
The IK module is not ready
This error happens when a IK operation is started but the IK module has not yet generated the internal keys. Call sx_pk_ik_derive_keys() before starting IK operations.
The size passed as part of a request is not valid
A PRNG reseed is required
An invalid parameter was passed to a function
The task is ready for consume, produce, run or partial run
Hash algorithm not supported
The ciphertext is not valid
The number of attempts in an algorithm has exceeded a given threshold
Range checks, performed on p and/or q during RSA key generation, failed
Function needs bigger workmem buffer than what is provided
Size of entropy buffer is too small.
Return "not supported" for any error-codes that are not handled.