Skip to main content

QuSec - Quantum Security Framework

Description

QuSec is a comprehensive Quantum Security Framework designed for Quantum Digital Signature (QDS) threat detection.

Introduction

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.

QuSec on PyPI

🚀 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 Guide

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]"

💻 Quickstart

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

Metadata

Release files for qusec 0.1.1

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.1
File Size Uploaded
qusec-0.1.1.tar.gz 12.3 kB Details

Built distribution (wheel)

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

Total release size: 24.2 kB

Release files / qusec-0.1.1.tar.gz

Download URL qusec-0.1.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c9807e6d69e806a1af58dfcae2926dec159f6ec9e0ed997db40f400ff7a9956
BLAKE2b-256 checksum
How to use checksums
e1600667e2320879290981d14ea93fe831e145eb0c016cce16ff2a9d4024f350
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.1-py3-none-any.whl

Download URL qusec-0.1.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfb81245f31a13d047ee38c0b2c1f1bb9064c8a6d766f33b4e195bf1f5cb616f
BLAKE2b-256 checksum
How to use checksums
ba7ec2f09d318e49fa4691c0729f4d80260209e94f4380b3f2e59dadfac6671a
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

This release

0.1.1 This release

2 release files

0.1.0

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