Skip to main content

QuSec - Quantum Security Framework

QuSec is a comprehensive Quantum Security Framework designed for Quantum Digital Signature (QDS) threat detection. It leverages Qiskit to simulate a quantum-safe teleportation-based QDS protocol layered with the SARG04 decoy-state method to detect active tampering, forgery, and interception attacks.

🚀 Features

  • Teleportation-Based QDS: Transmits signature payload using a 3-qubit Bell-state entanglement and Pauli corrections.
  • SARG04 Protocol Integration: Employs mathematical decoy states ($\mu$, $\nu$, vacuum) for sifting and quantum channel security.
  • Attack Simulations: Test real-time quantum threat vectors including Forgery, Impersonation, Intercept-Resend, Replay, and Channel Tampering.
  • Multi-Backend Execution:
    • Simulator: Ideal local execution via Qiskit Aer.
    • Noisy: Local simulation mapped with a configurable depolarizing noise model.
    • Hardware: Secure execution loop ready for real IBM Quantum API connections.
  • Dynamic Threat Analysis: Dynamically calculates Quantum Bit Error Rate (QBER) and statistically evaluates it against security thresholds.

📦 Installation

To install QuSec, ensure you have Python 3.9+ installed.

python -m venv venv
source venv/bin/activate  # On macOS/Linux
# venv\Scripts\activate   # On Windows

2. Install QuSec

Install QuSec directly in editable mode for local development:

pip install -e .

(Optional) If you plan on running your circuits on real IBM Quantum Hardware, install the hardware add-on:

pip install -e ".[hardware]"

💻 Usage

QuSec comes with a beautiful, fully-interactive Terminal User Interface (TUI).

To launch the framework and start a secure message transfer, simply run:

qusec run

Advanced Usage Flags

You can skip the interactive menus by passing parameters directly to the CLI:

  • View detailed transmission steps (Bit-by-Bit):
    qusec run --verbose
    
  • Select a specific execution backend:
    qusec run --backend noisy
    
  • Machine-readable JSON output (Great for CI/CD or logging):
    qusec run --json
    
  • Tweak the mathematical constraints:
    qusec run --shots 2000 --threshold 0.04
    

Run qusec run --help to see all available configuration options!


🛡️ Simulating Attacks

When using the interactive simulator (qusec run), you will be prompted to simulate a cyberattack vector.

  1. No Attack: The message transfers securely. QBER remains $0.0$, and the signature is VERIFIED.
  2. Forgery / Impersonation: Attempting to supply fake signature data. The verification layer catches the mathematical anomaly and blocks the transmission: REJECTED.
  3. Quantum Channel Tampering: Induces simulated X and Z errors in the teleportation channel. You will see the QBER instantly spike above the defined threshold (default 0.06), triggering a THREAT DETECTED system halt.

🏗️ Architecture

                    QUSEC SECURITY ENGINE
                           │
                  Quantum Circuit Layer
                           │
                 Abstract Backend Manager
                           │
          ┌────────────────┼────────────────┐
          ▼                ▼                ▼
      AerSimulator    Noisy AerSimulator   Quantum Hardware
                           │
                  Measurement Results
                           │
               Projective/SARG04 Security Pipeline

Built for Smart India Hackathon problem statement SIH26141.

Metadata

Release files for qusec 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qusec 0.1.0
File Size Uploaded
qusec-0.1.0.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qusec 0.1.0
File Interpreter ABI Platform
qusec-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / qusec-0.1.0.tar.gz

Download URL qusec-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8f88c468d67ba048d45dd82176cb8d31bc2d3580d39c0b9c33957a45492409c4
BLAKE2b-256 checksum
How to use checksums
b8d134a76e911b8132de03a282a59cb5fba6ac72db60e7d42753423b2e0caf09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / qusec-0.1.0-py3-none-any.whl

Download URL qusec-0.1.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c87fb390202c8df450cf779dc449ddc413d6b20032aa675336b05e1dc1d170cb
BLAKE2b-256 checksum
How to use checksums
c1d4a6a9088704dbd10ba005657382fc98a29c815f000c79e12af6e8ffd1fd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page