Encrypt and decrypt on Nano 33 BLE

I am very new to Arduino Ecosystem. I started exploring on how to encrypt and decrypt a text file containing hex dump of data.

I came across different libraries but none seems to be compiling on Nano 33 BLE.

  1. AESLib by Davy Landman
  2. AESLib by Matej Sychra

I get following error

In file included from /home/user/Arduino/libraries/AESLib/src/AES.h:4:0,
                 from /home/usert/Downloads/AES-master/examples/aes/aes.ino:1:
/home/user/Arduino/libraries/AESLib/src/AES_config.h:37:14: fatal error: pgmspace.h: No such file or directory
     #include <pgmspace.h> // probably ESP's PGMSPACE, needs to be mocked for testing
              ^~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Nano 33 BLE.

What is the best way to encrypt and decrypt data on the board or encrypt data on my local machine and decrypt on the Nano 33 BLE hardware?

To fix that error, you may be able to simply remove the line in question. The Nano 33 does not need the associated functions to read and write to program memory. Otherwise, go through the code and remove all library function calls and symbols like PROGMEM, pgm_read_byte() etc.

Any standard C/C++ code will run on the Nano 33, and there are plenty of encryption libraries from which to choose.

Welcome to the forum.

The Arduino Nano 33 BLE uses mbed OS. Maybe the mbed documentation will be helpful.

https://os.mbed.com/docs/mbed-os/v6.15/apis/security.html

https://os.mbed.com/docs/mbed-os/v6.15/apis/mbed-crypto.html

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.