{"id":30377242,"url":"https://github.com/devrizz/qsvm_cyberx","last_synced_at":"2025-10-11T04:09:59.316Z","repository":{"id":309773628,"uuid":"1037518722","full_name":"DevRizz/QSVM_CyberX","owner":"DevRizz","description":"This is our quantum SVM project where we are simulating the ML models to harness the Hilbert Space features and qubits transformations where we will show the comparison btw classical SVM and quantum SVM and with addition on that we are also adding QKD protocol to make the connection secure.","archived":false,"fork":false,"pushed_at":"2025-08-28T16:53:48.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T23:35:36.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevRizz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-13T17:38:09.000Z","updated_at":"2025-08-28T16:53:52.000Z","dependencies_parsed_at":"2025-08-13T19:50:47.638Z","dependency_job_id":null,"html_url":"https://github.com/DevRizz/QSVM_CyberX","commit_stats":null,"previous_names":["devrizz/qsvm_cyberx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DevRizz/QSVM_CyberX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRizz%2FQSVM_CyberX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRizz%2FQSVM_CyberX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRizz%2FQSVM_CyberX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRizz%2FQSVM_CyberX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevRizz","download_url":"https://codeload.github.com/DevRizz/QSVM_CyberX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRizz%2FQSVM_CyberX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006259,"owners_count":26084060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-20T16:28:30.636Z","updated_at":"2025-10-11T04:09:59.301Z","avatar_url":"https://github.com/DevRizz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Kernel Online Anomaly Detection with QKD-secured Pipeline\n\nA full-stack system for real-time network anomaly detection that blends:\n- Live packet capture (or PCAP upload)\n- Feature extraction and scaling\n- Quantum kernel classifier (PennyLane) with Nyström approximation\n- Online learning: streaming baseline (River) and on-demand quantum SVM retraining\n- QKD (BB84) simulation to derive session keys\n- AES-GCM encryption of messages/logs using QKD-derived keys\n- Streamlit UI for control, visualization, and human-in-the-loop feedback\n- SQLite logging of events and anomalies\n\nThis repository is self-contained with all code and commands.\n\nImportant notes:\n- Live sniffing may require administrator privileges (root) or special capabilities.\n- QKD here is a protocol simulation (BB84) for software demonstration. Real QKD requires quantum channels and specialized hardware. We use the simulated key to secure your local pipeline (AES-GCM).\n\n## Folder Structure\n\n```\n.\n├── README.md\n├── Dockerfile\n├── .env.example\n├── requirements.txt\n├── streamlit_app\n│   ├── app.py\n│   └── pages\n│       ├── 01_Live_Capture.py\n│       └── 02_PCAP_Upload.py\n├── quantum_anomaly\n│   ├── __init__.py\n│   ├── utils\n│   │   └── logging_setup.py\n│   ├── storage\n│   │   └── db.py\n│   ├── security\n│   │   ├── qkd.py\n│   │   └── secure_channel.py\n│   ├── capture\n│   │   ├── live_sniffer.py\n│   │   └── pcap_loader.py\n│   ├── features\n│   │   └── engine.py\n│   ├── quantum\n│   │   └── kernel.py\n│   ├── online\n│   │   └── buffer.py\n│   ├── models\n│   │   ├── online.py\n│   │   └── quantum_svm.py\n│   └── orchestrator.py\n└── scripts\n    ├── dev.sh\n    └── dev.ps1\n```\n\n## Quick Start\n\nWe recommend Python 3.11+.\n\n### 1) macOS / Linux (bash or zsh)\n\n```bash\n# Clone your repository (skip if already inside)\n# git clone https://github.com/DevRizz/QSVM_CyberX \u0026\u0026 cd QSVM_CyberX\n\n# Create venv\npython3 -m venv .venv\nsource .venv/bin/activate\n\n# Upgrade pip\npip install --upgrade pip\n\n# Install system deps if you want live capture (scapy uses libpcap):\n# macOS (brew): brew install libpcap\n# Ubuntu/Debian: sudo apt-get update \u0026\u0026 sudo apt-get install -y libpcap-dev tshark\n# (For pyshark, tshark is recommended.)\n\n# Install Python deps\npip install -r requirements.txt\n\n# Copy and edit env (optional)\ncp .env.example .env\n\n# Initialize DB\npython -c \"from quantum_anomaly.storage.db import init_db; init_db()\"\n\n# Run Streamlit\nstreamlit run streamlit_app/app.py\n```\n\nLive capture permissions:\n- Linux: run with sudo OR grant capabilities:\n  sudo setcap cap_net_raw,cap_net_admin=eip $(which python3)\n- macOS: run as sudo (Terminal prompt will ask for admin password).\n- Windows: run PowerShell as Administrator.\n\n### 2) Windows (PowerShell)\n\n```powershell\n# Create venv\npy -3 -m venv .venv\n. .\\.venv\\Scripts\\Activate.ps1\n\n# Upgrade pip\npython -m pip install --upgrade pip\n\n# Install Wireshark/TShark if using pyshark:\n# Download from https://www.wireshark.org/#download and make sure tshark is in PATH\n\n# Install Python deps\npip install -r requirements.txt\n\n# Copy and edit env (optional)\nCopy-Item .env.example .env\n\n# Initialize DB\npython -c \"from quantum_anomaly.storage.db import init_db; init_db()\"\n\n# Run Streamlit (Run PowerShell as Administrator for live sniff)\nstreamlit run streamlit_app/app.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrizz%2Fqsvm_cyberx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevrizz%2Fqsvm_cyberx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrizz%2Fqsvm_cyberx/lists"}