This repository demonstrates public key encryption on the Seeed Wio Terminal.
This project implements public key encryption functionality on the Seeed Wio Terminal, utilizing mbedTLS for cryptographic operations. It's built with PlatformIO and uses various Seeed Arduino libraries to handle storage, encryption, and communication.
- Seeed Wio Terminal
- microSD card with FAT32 format (for storing keys)
The project relies on several Seeed Arduino libraries:
- Seeed_Arduino_mbedtls - Cryptography implementation
- Seeed_Arduino_rpcUnified - RPC functionality
- Seeed_Arduino_FS - File system operations
- Seeed_Arduino_SFUD - SPI Flash Universal Driver
Before running the project, you need to generate RSA keys using OpenSSL:
- Generate an RSA private key:
openssl genrsa -out private.key 2048
- Convert private key to DER format (DER is a binary format that is easier to work with mbedTLS):
openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in private.key -out private.der
- Extract public key in DER format:
openssl rsa -in private.key -pubout -outform DER -out public.der
- Place the
private.der
andpublic.der
files at the root of your SD card
- Install PlatformIO
- vscode will prompt you to install PlatformIO when you open the project
- Clone this repository
- Open in VS Code with PlatformIO extension
- Build and upload to your Wio Terminal:
pio run -t upload
- Monitor serial output:
pio run -t monitor
This project is licensed under the MIT License.