Code for my final university project/thesis titled "Digital Certification in IoT Devices."
This project aims to provide a quick way to benchmark between the most popular and high-rated cryptography libraries available to ESP32. The main focus is in digital signatures and certifications.
- ESP-IDF: This project uses the ESP-IDF framework, so you'll need ESP-IDF installed and configured on your machine (follow the instructions on ESP-IDF official documentation on how to do it)
- VSCode: Although it is possible to execute this project without VSCode, it is highly recommended that you do use VSCode, due to it's ease of use.
- WolfSSL: This project uses wolfssl, but in it's source code needs to be outside of it. Follow the instructions below on how to do it.
- Download the WolfSSL source code from it's GitHub page (v5.7.4-stable);
- Unzip the downloaded zip file, and move it to your desired location (ex:
C:/wolfssl-source
); - Create a system-wide environment variable called
WOLFSSL_ROOT
, pointing to the location of the wolfssl source code (ex:C:/wolfssl-source
); - Restart your machine;
- After these steps, when compiling the project, it should be able to automatically detect the wolfssl folder and use it to generate the builder folder.
In the main.cpp file, there's a call to a function named "perform_tests". This function is used for testing purposes, and it's parameters enable you to choose which library, signature algorithm and hash algorithm to use. Change them as you like.
First of all, make sure your esp32 device is connected to your mahcine. Then open the ESP-IDF PowerShell
or ESP-IDF CMD
that was installed when you installed ESP-IDF, and navigate to project root folder (ex: cd <path-to-project>/esp32-crypto-api
).
The project already has a build folder, so you can try simply running the project with idf.py flash
and then idf.py monitor
to flash the project to your device and start monitoring it. However, if this fails for some reason, delete the build folder, and execute the following commands:
idf.py set-target esp32
idf.py build
(alternatively, if using VSCode,CTRL + SHIFT + P
and selectESP-IDF: Build your project
idf.py flash
(alternatively, if using VSCode,CTRL + SHIFT + P
and selectESP-IDF: Flash your project
idf.py monitor
(alternatively, if using VSCode,CTRL + SHIFT + P
and selectESP-IDF: Monitor device
After this, the project should be up and running on your device.