AI Hacker Detection in BB84 QKD

A playful quantum key distribution simulator with AI-assisted eavesdropper inference.

QKD Simulation Interface

Overview

This project is an interactive simulation of the BB84 quantum key distribution protocol, designed to demonstrate how quantum mechanics enables secure communication. The system models basis selection, photon encoding, measurement, and key reconciliation between Alice and Bob — while optionally introducing an eavesdropper (Eve).

The twist: an integrated AI assistant analyzes the transmission statistics (including basis mismatches and quantum bit error rate) and attempts to infer whether a hacker is present — and what strategy they might be using.

What It Demonstrates

• Core BB84 protocol mechanics (random basis selection & collapse).
• Error-rate signatures of intercept-resend attacks.
• How quantum measurement disturbance reveals eavesdropping.
• AI-assisted interpretation of protocol outcomes.

Technical Stack

The application was built with a React frontend and a Python (Flask/FastAPI) backend. The simulation logic handles quantum state encoding and measurement modeling, while the AI layer integrates large language model inference to generate contextual analysis of possible adversarial behavior.

The project was deployed as a full-stack web application, requiring environment configuration, API orchestration, and cloud deployment setup.

Why I Built It

I wanted to create an accessible and interactive way to explore quantum cryptography — not just as abstract theory, but as a system you can experiment with. This project blends quantum information, simulation engineering, and AI-driven analysis into a single cohesive application.

GitHub Repository → Demo →