I am currently working on a project that involves RSA signing data before POSTing it to a PHP web server.
I believe this uses the CC310 cryptography hardware in the nRF9160, but even if the RSA signature takes time to complete it is not an issue.
I have dug around a lot today and have come up with what I think is a good start for this, at this link.
I am currently using nRF9160 SDK v1.5.0 and have been trying to compile a working sample. I am uploading the file.
Ultimately the goal is to be able to sign arbitrary data to be POSTed to a PHP server with an RSA private key and using this as a starting point for that development, does this seem possible?
Then the nRF9160 will retrieve the result from the server and write the data to an SD card (the SD card functionality has no issues).
The error that I am encountering is
/opt/nordic/ncs/v1.5.0/toolchain/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: modules/nrfxlib/nrf_security/src/mbedtls/libmbedtls_base_vanilla.a(entropy.c.obj): in function `mbedtls_entropy_init': /opt/nordic/ncs/v1.5.0/mbedtls/library/entropy.c:115: undefined reference to `mbedtls_hardware_poll'
The zip project should be extracted here and use the following command to build it.
/opt/nordic/ncs/v1.5.0/nrf/samples/nrf9160/rsa_test
west build -b nrf9160dk_nrf9160ns -p
I am also copying the proj.conf here as I believe the issue is in this file, but I don't know what to change.
# Logging CONFIG_LOG=y CONFIG_LOG_IMMEDIATE=y # Debugging CONFIG_ASSERT=y CONFIG_STACK_SENTINEL=y CONFIG_DEBUG_OPTIMIZATIONS=y CONFIG_LOG_PRINTK=y # Heap CONFIG_MAIN_STACK_SIZE=8192 CONFIG_HEAP_MEM_POOL_SIZE=8192 CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=8192 # Entropy CONFIG_ENTROPY_GENERATOR=y #CONFIG_ENTROPY_NRF5_THR_POOL_SIZE=32 #CONFIG_ENTROPY_NRF5_THR_THRESHOLD=16 # Crypto CONFIG_NORDIC_SECURITY_BACKEND=y CONFIG_CC3XX_BACKEND=n CONFIG_OBERON_BACKEND=y CONFIG_MBEDTLS_VANILLA_BACKEND=n # build\modules\nrfxlib\nrf_security\include CONFIG_MBEDTLS_CFG_FILE="../../../../config-mbedtls.h"