10 / 24Next →
Applied cryptography prototype2023

Messaging App

A React and Flask messaging prototype built to explore hybrid encryption: RSA-OAEP key wrapping with authenticated 3DES-EAX message payloads.

ContextNIBM
Year2023
TypeWeb
StatusCompleted
RoleFull-stack development

Project media coming soon

Screenshots and demo videos for this case study will appear here.

Overview

The app provides sign-up, login, a user directory and one-to-one conversations. Each message is encrypted with a freshly generated 3DES key in EAX mode. That key is wrapped with RSA-OAEP, and the ciphertext, nonce, tag and wrapped key are stored in MySQL under SHA-256-hashed participant identifiers.

ReactPythonFlaskMySQLCryptography
Challenge

The project explored how asymmetric and symmetric cryptography work together when messages have to be stored and later recovered for an authenticated conversation.

Approach

I built a React client with a service layer that calls Flask JSON endpoints. The server uses session-based authentication with an auth decorator, PyCryptodome for RSA, 3DES-EAX and OAEP, and MySQL for users and encrypted messages.

Outcome

The prototype demonstrates the core concepts of hybrid encryption and full-stack integration. It is documented as an early learning implementation, not production-ready secure messaging.

Engineering decisions
01

Hybrid encryption, deliberately

RSA can only encrypt small payloads, so it wraps a per-message symmetric key and the symmetric cipher encrypts the content. EAX is an authenticated mode, so tampered ciphertext fails to decrypt instead of producing silently corrupted text.

02

Looking back

The keys are generated and held on the server, so this is encryption at rest, not end-to-end encryption. If I built it again, I would generate key pairs on each client, keep private keys on the device and use AES-GCM instead of 3DES.

What I built
01Account, session, user-directory and conversation interfaces
02Hybrid encryption using RSA-OAEP and authenticated 3DES-EAX payloads
03SHA-256-hashed participant identifiers and encrypted-message storage
04React service layer connected to Flask JSON endpoints
Next projectMental Health Management System →