CrypticComm - Secure message transmission using STM32
Abstract
Abstract
Google meet link : https://meet.google.com/tsf-zuux-rhc
Introduction
Modern embedded systems often demand secure and efficient data handling in resource-constrained environments. This project explores the integration of low-level hardware abstraction with high-level data security using the STM32F446RE microcontroller. Key functionalities include:
- LCD display via custom GPIO drivers.
- Data encryption and decryption using AES-128
- Data transfer between internal subsystems using custom I2C drivers.
By developing custom drivers instead of relying on HAL or standard libraries, the project provides better insight into peripheral management and performance tuning at the hardware interface level.
Technologies and Components Used
1) STM32F446RE
2) STM32CubeIDE
Methodology
Hardware Components:
- STM32F446RE microcontroller (ARM Cortex-M4)
- LCD Module (16x2)
- I2C Lines (configured on separate ports for I2C1 and I2C2)
Software Components:
Custom GPIO Driver:
- Configures GPIO ports for LCD communication.
- Supports 4-bit data mode with control signals (RS, RW, EN).
- Provides LCD initialization, string display, and cursor control functions.
LCD Interface Layer:
- Utilizes the GPIO driver to send characters and strings to the display.
- Offers high-level APIs for writing messages to the LCD.
AES Encryption Module:
- Uses tiny-AES
- ECB mode with 128-bit key size.
- Encrypts the original string before transmission.
Custom I2C1 and I2C2 Drivers:
- Custom low-level implementation for I2C master (I2C1) and slave (I2C2) communication.
- Implements start condition, address sending, data transmission/reception, and stop condition handling.
- Handles synchronization and error detection manually.
Data Transmission and Reception Logic:
- I2C1 sends the AES-encrypted data to I2C2.
- I2C2 receives the encrypted data and sends it to AES decryption module.
AES Decryption Module:
- Uses the same key to decrypt the received data
- Restores the original string
Final Display:
- Decrypted message is displayed again on the LCD via GPIO driver.
Results:
1) Displaying the encrypted message: 2) Decrypted message:
Conclusion:
This project successfully demonstrates a complete data flow in an embedded system involving secure communication and display using the STM32F446RE microcontroller. By developing custom drivers for GPIO and I2C, we achieved fine-grained control over the hardware, optimized performance, and ensured system robustness. The utilization of AES enabled secure and efficient encryption and decryption processes. The project serves as a foundational framework for more advanced applications, such as secure sensor networks or IoT devices.
Github repo:
Whole code for the project can be found here: https://github.com/Adithya1435/Envision-CrypticComm
Mentors and Mentees details:
Mentors: Mentees:
Adithya A (231EC102) Abhinav S Rao (241EC101)
Aayush Srinivasan (231EC202) Joseph Varghese (241EC125)
Rakesh D (231EC245) Sai Abhinay Rangineni (241EC146)
Nandaa Ramasamy (241EE136)
Report Information
Team Members
- Adithya A [Diode]
- Aayush Srinivasan [Diode]
- Rakesh D [Diode]
Team Members
- Adithya A [Diode]
- Aayush Srinivasan [Diode]
- Rakesh D [Diode]
Report Details
Created: May 24, 2025, 5:35 p.m.
Approved by: Adithya Kasal [Diode]
Approval date: May 24, 2025, 7:52 p.m.
Report Details
Created: May 24, 2025, 5:35 p.m.
Approved by: Adithya Kasal [Diode]
Approval date: May 24, 2025, 7:52 p.m.