π OPAQUE authentication
Login without ever revealing the password to the server. Derives a session key that protects sensitive API payloads.
A secure messaging application to send messages or large files that can only be decrypted after a specific release date.
π A digital time capsule powered by OPAQUE, ECIES + AES-GCM, Ed25519, and chunk-based encryption.
K (AES-GCM-256). Split into chunks, compute BLAKE2b per chunk to form HK to recipient via ECIES (ECDH P-256 + HKDF) β Ck(H || Ck || T)T β server releases Ck iff now β₯ T. Client verifies & decapsulates to recover K, then decrypts all ciphertext chunks.This is a personal project to explore modern cryptography (OPAQUE, ECIES, Ed25519) and its integration into a modern development stack.
It is intended for learning and experimentation, not for production use.
What the app delivers beyond a typical messaging PoC.
Login without ever revealing the password to the server. Derives a session key that protects sensitive API payloads.
Only recipients can decrypt. A per-message key K is encapsulated via ECIES (ECDH P-256 + HKDF) to produce Ck.
Authenticity & non-repudiation. Sign (H || Ck || T) where H summarizes BLAKE2b(Ck).
Server enforces T and withholds Ck until due. Client verifies, decapsulates, then decrypts all C.
64 MB chunking, streaming/resume, per-chunk BLAKE2b verification.
Only encrypted blobs are stored. Private keys stay client-side, protected by Argon2id-derived keys.
Change password without losing access to past messages, preserving cryptographic integrity.
Client-side crypto keeps the backend lightweight and horizontally scalable.
K to CkOPAQUE
Encrypt + chunk
ciphertext C, hash with BLAKE2b
ECIES encapsulate K β Ck
Sign metadata with Ed25519
Release @ T
Verify signature β server releases Ck at T β decapsulate K β decrypt all ciphertext chunks C
Run locally with Docker Compose. Three quick steps.
git clone https://github.com/hadrylouis/msg2future
cd msg2future
docker compose build
51733000docker compose up -d
battle-tested cryptographic primitives with a simple API.
native browser support with secure, efficient operations.
modern password-authenticated key exchange without revealing the password.
frontend/ # React + Vite + Tailwind + Radix UI + Zustand + libsodium-wrappers
βββ src/
βββ App.tsx
βββ assets/ # images, iconsβ¦
βββ components/ # reusable UI (buttons, fields, modals)
βββ crypto/ # ECIES, Ed25519, AES-GCM, Argon2id, HKDF, utils
βββ hooks/
βββ layouts/
βββ lib/ # helpers (http, validators)
βββ main.tsx
βββ pages/ # views/screens
βββ services/ # API per feature (auth, messagesβ¦)
βββ stores/ # Zustand stores (session, uploadsβ¦)
βββ types/
backend/ # Fastify (TS) + Prisma (SQLite) + serenity-kit/opaque + libsodium
βββ src/
βββ crypto/ # hkdf.ts, session-crypto.ts (AES-GCM over session_key)
βββ routes/ # auth.ts, login.ts, message.ts, user.ts
βββ server.ts # Fastify bootstrap
βββ types/ # TS types
βββ utils.ts
The report/ folder contains the full cryptographic design and analysis. It includes:
Licensed under GNU GPL-3.0. You may use, modify, and redistribute under the same terms.