Inspiration
People constantly exchange sensitive documents: medical reports, bank statements, transcripts, CVs, contracts and research files. Encrypting the file is only half the problem. Sender and recipient also need to know which exact version was exchanged, whether the recipient could verify it, what sharing conditions applied, and what happened afterwards. Ordinary access logs don't give a recipient-signed acknowledgement tied to a specific document version and sharing policy.
We also wanted the system to be ready for a post-quantum future. NIST has standardized ML-KEM and ML-DSA and published a transition roadmap away from quantum-vulnerable public-key schemes.
What it does
QSecure is a universal post-quantum secure document-sharing and authenticity-verification platform. One workflow serves medical, financial, education/research and personal/professional documents.
-Browser-side encryption: documents (and their sensitive metadata) are encrypted with AES-256-GCM before upload, so the server never sees plaintext files, document keys or private keys. -Post-quantum key protection: each document key is wrapped separately for every authorized recipient using ML-KEM-768 and HKDF-SHA-256. -Authenticity: every document version has a canonical manifest signed with ML-DSA-65, which the recipient verifies before decryption.
- Controlled sharing: per-recipient purpose, view/download permissions, expiry and revocation of future access, all enforced server-side on every request. -Key trust: first-contact public-key fingerprint confirmation through a separate channel. -Immutable versions: uploading a replacement creates a new version, key, manifest and signature, and old shares and receipts stay bound to the old version. -Recipient-signed handover receipts (our distinguishing feature): after the recipient's browser reports successful signature, integrity and decryption checks, the recipient signs a receipt bound to the exact document version, manifest hash, share ID, key IDs, and permission/expiry snapshot. -Tamper-evident audit history: a per-document SHA-256 hash chain with owner-signed, exportable checkpoints, plus transparent rule-based alerts (repeated denials, request bursts, bulk retrieval, expired/revoked attempts, repeated verification failures).
How we built it
QSecure extends two existing student projects:
-MediShield PQC Medical Vault is the primary foundation: a Flask/SQLite app with browser-side cryptography, an encrypted private-key vault, recipient-specific key envelopes, signatures and consent-based sharing. We are generalizing its medical roles and PDF-only limits to ordinary users and common file types. -PQC Secure Vault contributes its hash-chain audit module and rule-based monitoring logic, adapted into the Flask/SQLite application.
Stack: Flask (auth, authorization, share policy, encrypted storage), SQLite, vanilla JavaScript with Vite, @noble/post-quantum for ML-KEM-768/ML-DSA-65, Web Crypto API for AES-256-GCM, HKDF and SHA-256, and Argon2id (via @noble/hashes in a Web Worker) to protect the private-key vault. The backend also uses Flask-WTF, Flask-Limiter and argon2-cffi.
Challenges we faced
- Honest novelty: existing products already offer encrypted sharing, expiry, access logs and PQC file transfer. We surveyed them and deliberately scoped our contribution to the recipient-acknowledgement and version-binding workflow rather than claiming a "first of its kind" system. -Generalizing inherited code: the base project was PDF-only with a 5 MiB limit, and we are moving to a configurable ~10 MiB limit across common formats. -Key trust: trust-on-first-use is vulnerable to key substitution, so we added explicit out-of-band fingerprint confirmation. -Audit integrity: a hash chain alone can be rewritten, so we added signed checkpoints that detect rewriting or truncation. -Responsible detection: we chose explainable rules over an ML model trained only on simulated logs.
- Known issue:an Argon2id Web Worker responsiveness problem inherited from the base project must be measured before we claim non-blocking behavior. -Repository hygiene: a source archive contained secrets and local data, so we start from a clean repository and treat included secrets as exposed.
What we learned
Secure document exchange is about evidence and workflow as much as encryption. Being precise about what a cryptographic receipt does and does not prove matters. It shows that a recipient's key signed a statement about a specific version, but it does not prove the file was read, is not a legal signature, and uses an application timestamp rather than a trusted one.
Limitations (by design)
Revocation blocks only future retrieval through QSecure. View-only cannot stop screenshots. A compromised server could serve modified JavaScript. The Noble JS PQC library is not independently audited or constant-time. QSecure is an academic prototype, not production-certified cryptography.
What's next
Measured performance results (100 KiB to 10 MiB files), a task-based usability study with synthetic documents, key rotation/recovery, and larger-file streaming.