Skip to content

Bizyroth/Elliptic-Curve-on-ESP32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elliptic-Curve-on-ESP32

Takes temperature and pressure's mesure with a BMP180 and ESP32 module.

ESP32

To compile, build and flash ESP32 project see here

Connection between ESP32 module and BMP180

  • Connect VIN pin of BMP180 with 3v3 pin on ESP32
  • Connect GND pin of BMP180 with GND pin on ESP32
  • Connect SCL pin of BMP180 with IO23 pin on ESP32
  • Connect SDA pin of BMP180 with IO22 pin on ESP32

Cryptographic function

Samples are encrypted with AES-GCM 256 bits. Symetric key is sent to the receiver by being encrypted following ECIES schema. uECC files from ESP32's library is used for the elliptic curve cryptography and mbdetls/aes.h is used for AES-GCM.

First connection between ESP32 and Server

ESP32 and server wich receives datas must be connected on the same WiFi network. When connection is done, the server must send first his ECIES public key in compressed format (ie begining with 0x40). Then ESP32 sends a packet with the symetric key encrypted with ECIES schema. The used elliptic curve is secp256r1.

Sending sample

ESP32 bufferizes 10 samples and encrypts them with AES-GCM 256 bits. A local timestamp is added to the sample.

Files

PS

This project is very specific but i put it on github more for the cryptographic example than to make it functionnal for another user.