FAILED1: Sign Failed

Hello,

When we execute the signature via the chip, we get the error message "FAILED1: Sign Failed".

In our main.c, we get the "err_code" = 8516 from the following statement:

err_code = nrf_crypto_ecdsa_sign(&sign_context, &private_key, global_raw_message, sizeof(global_raw_message), local_raw_signature, NRF_CRYPTO_ECDSA_SECP256K1_SIGNATURE_SIZE);\

so we track back to the condition which generates the error message:

if (err_code != NRF_SUCCESS){Serial_Print(FAILED1: Sign Failed\n);} (the code is like the fig.)

Due to this error, we again track to figure out where the problem is, and we find that the problem is in the file "nrf_crypto_ecdsa.c", where we run the function "nrf_crypto_ecdsa_sign", and we got the result = 8516 (the code is like fig) from the the following statement:

result = backend_implementation(p_context, p_private_key, p_hask, hash_size, p_signature)

We would like to ask
1. Why do we get this error code "8516"?

2. Do the following two statements
"result = backend_implementation(p_context, p_private_key, p_hask, hash_size, p_signature)"
and
"backend_implementation = BACKEND_IMPL_GET(sign_impl, p_info->curve_type)"
represent the same thing?


Our execution environment is as follows:
nRF Connect v3.11.1

Toolchain manager v1.0.0

Programmer v3.0.3

nRF Connect SDK v1.9.0

nRF SDK v17.0.2

MinGW v2021.09.05

GNU Tools Arm Embedded v10.3 2021-q3-major

Parents Reply Children
No Data
Related