BB84 Messaging App / Application de messagerie BB84
English
Inspiration
This project was inspired by a fundamental idea in quantum mechanics:
Observing information can change it.
In classical communication, messages can be copied without detection. However, in quantum systems, measurement disturbs the state. This makes it possible to detect eavesdropping.
We were inspired by the elegance of the BB84 protocol and wanted to make it interactive and understandable.
What it does
This project is a browser-based simulation of quantum key distribution (BB84) combined with encrypted messaging.
It allows two users to:
- Generate a shared secret key using BB84
- Detect eavesdropping using QBER (Quantum Bit Error Rate)
- Communicate securely using AES-GCM encryption
- Visualize the protocol through transcripts and animations
How we built it
The application uses:
- Node.js + Express (backend)
- Socket.IO (real-time communication)
- Web Crypto API (encryption)
- HTML/CSS/JS frontend
- PWA support for mobile
Pipeline:
- Alice generates random bits and bases
- Qubits are simulated and sent
- Eve may intercept
- Bob measures randomly
- Matching bases are kept
- Sample is revealed for QBER
- Key is derived
- Messages are encrypted
Challenges we ran into
- Synchronization issues between users
- BB84 flow bugs
- Real-time state consistency
- Visualizing abstract quantum concepts
- Mobile responsiveness
- Balancing accuracy vs simplicity
Accomplishments that we're proud of
- Fully working BB84 simulation
- Real-time QBER detection
- Integrated encryption pipeline
- Interactive visualizations
- Mobile-compatible PWA
What we learned
- Security can come from physics
- Visualization improves understanding
- Real-time systems are complex
- Theory must be simplified for implementation
QBER = errors / tested bits
What's next for BB84 Messaging App
- Error correction
- Privacy amplification
- Bloch sphere visualization
- More quantum protocols
- Persistent message storage
- Permanent deployment
Français
Inspiration
Ce projet est inspiré par l’idée que l’observation peut modifier l’information.
En mécanique quantique, la mesure perturbe l’état, ce qui permet de détecter un espion.
Ce que fait le projet
Simulation du protocole BB84 avec messagerie chiffrée.
Fonctionnalités:
- Génération de clé
- Détection d’espionnage (QBER)
- Communication sécurisée
- Visualisation du protocole
Comment nous l’avons construit
- Node.js + Express
- Socket.IO
- Web Crypto API
- Frontend web
- PWA mobile
Pipeline:
- Alice génère bits/bases
- Transmission
- Eve peut intercepter
- Bob mesure
- Sifting
- QBER
- Clé finale
- Chiffrement
Défis rencontrés
- Synchronisation
- Bugs BB84
- Temps réel
- Visualisation
- Mobile
- Simplicité vs précision
Accomplissements
- Simulation BB84 fonctionnelle
- Détection QBER
- Messagerie chiffrée
- Visualisations
- Support mobile
Ce que nous avons appris
- Sécurité basée sur la physique
- Importance de la visualisation
- Complexité des systèmes distribués
Prochaines étapes
- Correction d’erreurs
- Amplification de confidentialité
- Visualisation avancée
- Déploiement permanent ## Demo & Visualizations
BB84 Encrypted Chat Interface
Main interface showing session controls, BB84 pipeline, and encrypted chat.
Per-Qubit BB84 Transcript
Detailed breakdown of each qubit: Alice → Eve → Bob, with basis comparison and key decisions.
Protocol Stage Overview
Shows raw qubits, sifted bits, disclosed samples, and final key derivation.
Basis Agreement Heatmap
Green = kept bits, Gray = discarded, Purple = test bits, Red = errors.
Photon Polarization Replay
Visualization of quantum states traveling from Alice → Eve → Bob.
System Architecture
Simplified architecture showing frontend, backend, and quantum simulation pipeline.
Mobile / PWA Experience
Responsive design with full-screen quantum viewer and touch-friendly controls.
Log in or sign up for Devpost to join the conversation.