r
Rosa Reyes
Get in touch
PythonFlaskAES-GCMRSAScryptOpenSSLSQLite

Secure
Messaging App

End-to-end encrypted chat built for a cryptography course. AES-GCM encrypts messages, RSA protects the key exchange, and a custom PKI handles user identity. No plaintext leaves the client.

University · 2024View on GitHub
Secure Messaging App interface
Primitives

One primitive per concern: AES-GCM for message confidentiality and integrity, RSA for key distribution, Scrypt for passwords at rest, PKI for identity. Each layer does one job and nothing else.

The server ends up with ciphertext, wrapped keys, and signatures. It can't read any of it.

AES-GCM
Message encryption

Authenticated symmetric cipher. Encrypts message bodies and detects tampering via the authentication tag.

RSA
Key exchange

Asymmetric encryption wraps the AES session key with the recipient's public key. Only they can unwrap it.

Digital Signatures
Identity proof

Messages are signed with the sender's private key. Recipients verify the signature against the PKI-issued certificate.

PKI
Certificate authority

A full certificate authority handles user registration, certificate issuance, and lifecycle management.

How it works
01

Register

Create an account and receive a PKI-issued certificate bound to your public key.

02

Encrypt

A random AES-GCM key encrypts the message body. RSA wraps that key for the recipient.

03

Transmit

Ciphertext, wrapped key, and digital signature are stored in SQLite.

04

Decrypt

Recipient verifies the signature, unwraps the AES key with their private key, and decrypts.

Stack
Python 3.7+FlaskSQLiteAES-GCMRSAScryptOpenSSL
View source

PKI, encryption layer, Flask backend, and web UI. All on GitHub.

rosareyes/cryptography-project