Skip to content

About

Quantum-Internet-Banking Hybrid quantum-classical security architecture for future-proof interbank settlements. Combines MDI-QKD for physics-level secrecy with lattice-based PQC for strong authentication, creating a dual-layer, zero-trust defense against quantum attacks like “Harvest Now, Decrypt Later.” Scalable, resilient, and designed for real-w

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🔐 Quantum Internet Banking

Hybrid MDI-QKD + Post-Quantum Cryptography Architecture

A demonstration project for the Quantum Internet Alliance Challenge 2025

Python License QIA 2025

Quick Start • Architecture • Documentation • Benchmarks


🎯 Overview

Quantum Internet Banking is a proof-of-concept implementation of a crypto-agile security system that combines two complementary cryptographic layers:

🌌 Quantum Layer

MDI-QKD Protocol

  • Information-theoretic security
  • Based on quantum physics laws
  • Immune to computational attacks
  • CASCADE error correction

🔢 Classical Layer

Lattice Cryptography

  • Post-quantum resistant
  • NIST-standardized algorithms
  • Kyber KEM + Dilithium signatures
  • Mature implementation ecosystem

🛡️ Why Hybrid?

The combination provides defense-in-depth security: an attacker must simultaneously break both quantum physics and mathematical hardness assumptions.

graph LR
    A[Transaction Data] --> B{Hybrid Key Generation}
    B --> C[MDI-QKD<br/>Quantum Bits]
    B --> D[Kyber KEM<br/>Lattice Secret]
    C --> E[XOR + SHA3-256]
    D --> E
    E --> F[Master Key 256-bit]
    F --> G[AES-256-GCM Encryption]
    G --> H[Secured Transaction]
    
    style B fill:#8A2BE2,color:#fff
    style E fill:#00ADD8,color:#fff
    style F fill:#3776AB,color:#fff
    style G fill:#28a745,color:#fff
Loading

🚀 Quick Start

Prerequisites

  • Python 3.8+ (Tested with Python 3.12.3)
  • (Optional) NetSquid registration for quantum simulation

Installation

# Clone the repository
git clone https://github.com/refexa/Quantum-Internet-Banking.git
cd Quantum-Internet-Banking

# Verify Python version
python --version  # Should be ≥ 3.8

# ✨ No installation needed! Uses Python standard library only.

# Run the demo
python demo.py

📦 Optional: Enable Real Quantum Simulation

# 1. Register at https://netsquid.org/
# 2. Install dependencies
pip install squidasm netqasm netsquid

# 3. Verify quantum simulation is enabled
python -c "from qib import SQUIDASM_AVAILABLE; print(f'Quantum Sim: {SQUIDASM_AVAILABLE}')"

🎮 Try It Out

from qib import run_mdi_protocol, run_kyber_kem, generate_hybrid_key

# Step 1: Generate quantum-secured bits (MDI-QKD)
quantum_bits = run_mdi_protocol(
    fiber_distance_km=10,
    num_bits=256
)

# Step 2: Generate lattice-based secret (Kyber KEM)
lattice_secret = run_kyber_kem(security_level=3)

# Step 3: Combine into hybrid master key
master_key = generate_hybrid_key(quantum_bits, lattice_secret)

print(f"✅ Hybrid Master Key: {master_key.hex()}")

🏗️ Architecture

┌──────────────────────────────────────────────────────────────┐
│                    HYBRID SECURITY SYSTEM                    │
└──────────────────────────────────────────────────────────────┘
                              │
              ┌───────────────┴───────────────┐
              │                               │
              ▼                               ▼
   ┌─────────────────────┐         ┌─────────────────────┐
   │   MDI-QKD Protocol  │         │   Kyber KEM (PQC)   │
   ├─────────────────────┤         ├─────────────────────┤
   │ • Alice & Bob nodes │         │ • Key encapsulation │
   │ • Charlie relay     │         │ • NIST Level 3      │
   │ • Bell measurements │         │ • Module-LWE hard   │
   │ • CASCADE error fix │         │ • 256-bit security  │
   └──────────┬──────────┘         └──────────┬──────────┘
              │                               │
              │    256 bits        32 bytes   │
              └───────────────┬───────────────┘
                              ▼
                  ┌───────────────────────┐
                  │  Hybrid Key Combiner  │
                  ├───────────────────────┤
                  │  1. XOR combination   │
                  │  2. SHA3-256 KDF      │
                  │  3. Output: 32 bytes  │
                  └───────────┬───────────┘
                              ▼
                  ┌───────────────────────┐
                  │   Master Key (256b)   │
                  └───────────┬───────────┘
                              ▼
                  ┌───────────────────────┐
                  │   AES-256-GCM Encrypt │
                  └───────────────────────┘

🔑 Key Components

Component Purpose Security Basis
MDI-QKD Quantum key distribution No-cloning theorem, Bell inequalities
CASCADE Error correction Information-theoretic privacy amplification
Kyber Post-quantum KEM Module-LWE lattice problem hardness
Dilithium Digital signatures Module-SIS lattice problem hardness
SHA3-256 Key derivation Keccak sponge construction

📊 Benchmarks

Run the benchmark suite:

python benchmark.py

Performance Metrics

Throughput

Distance  | Keys/sec | Latency
----------|----------|--------
10 km     | ~80      | 12 ms
25 km     | ~65      | 15 ms
50 km     | ~45      | 22 ms

Component Breakdown

Component      | Time (ms)
---------------|----------
MDI-QKD        | 8.5
Kyber KEM      | 2.8
Key Combiner   | 0.1
Total          | 11.4

Error Correction Performance

QBER Level | Success Rate | CASCADE Passes
-----------|--------------|---------------
0.5%       | 100%         | 4
2.0%       | 98%          | 5
5.0%       | 92%          | 6

🧪 Testing

Run the comprehensive test suite (19 tests):

python tests.py

Test Coverage:

  • ✅ MDI-QKD Protocol (5 tests)
  • ✅ Kyber KEM (4 tests)
  • ✅ Dilithium Signatures (4 tests)
  • ✅ Hybrid Key Generation (6 tests)

📚 Documentation

Document Description
ARCHITECTURE.md Detailed system design and component specifications
SECURITY.md Security analysis, threat model, and proofs
ERROR_CORRECTION.md CASCADE protocol implementation details
SQUIDASM_SETUP.md Quantum simulation setup guide

🎓 Key Features

🔬 Quantum Simulation

Two modes: fast classical fallback or real quantum state simulation with Squidasm/NetSquid

🛡️ Defense-in-Depth

Requires breaking both quantum physics AND lattice mathematics simultaneously

🎯 NIST-Compliant

Uses CRYSTALS-Kyber and CRYSTALS-Dilithium (NIST PQC standards)

⚡ High Performance

~80 keys/sec at 10km with realistic error rates and correction

🔧 Crypto-Agile

Modular design allows algorithm swapping without architecture changes

📏 Production-Ready

Includes HSM guidelines, FIPS considerations, and enterprise security patterns


🎯 Use Cases

graph TD
    A[Quantum Internet Banking] --> B[Interbank Settlements]
    A --> C[Central Bank Communications]
    A --> D[Quantum-Safe Key Exchange]
    A --> E[Critical Infrastructure]
    
    B --> B1[High-value transactions $100M+]
    C --> C1[Government financial networks]
    D --> D1[Future-proof cryptography]
    E --> E1[Defense & aerospace]
    
    style A fill:#8A2BE2,color:#fff
    style B fill:#3776AB,color:#fff
    style C fill:#3776AB,color:#fff
    style D fill:#3776AB,color:#fff
    style E fill:#3776AB,color:#fff
Loading

⚠️ Considerations

Challenge Mitigation Strategy
Hardware Cost Deploy only for Tier-1 settlements ($100M+)
Distance Limitation 50km range with repeaters for longer distances
Computational Overhead AVX2 optimization, FPGA acceleration
DoS Vulnerability Automatic fallback to pure PQC mode

Note: This is a demonstration project. Production deployment requires certified implementations (e.g., liboqs, PQClean) and hardware QKD systems (ID Quantique, Toshiba).


🌟 Project Structure

Outputs                         # contains sample outputs of the files
Report_Quantum_Internet_Banking.pdf          # extensive report of the project
Quantum-Internet-Banking/
├── 📦 qib/                    # Core package
│   ├── __init__.py            # Package exports
│   ├── mdi_qkd.py             # MDI-QKD protocol + CASCADE
│   ├── lattice.py             # Kyber KEM + Dilithium
│   └── hybrid.py              # Hybrid key combiner
├── 📄 demo.py                 # Quick demonstration
├── 💼 banking_transaction.py  # Full transaction simulation
├── 📊 benchmark.py            # Performance benchmarks
├── 🧪 tests.py                # Test suite (19 tests)
├── 📚 docs/                   # Documentation
│   ├── ARCHITECTURE.md
│   ├── SECURITY.md
│   ├── ERROR_CORRECTION.md
│   └── SQUIDASM_SETUP.md
│   Outputs                         # contains sample outputs of the files
│   Report_Quantum_Internet_Banking.pdf          # extensive report of the project
└── 📋 requirements.txt        # Dependencies

🤝 Contributing

This is a demonstration project for the Quantum Internet Alliance Challenge 2025. Contributions, suggestions, and feedback are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📖 Academic References

  1. MDI-QKD: Lo, H.-K., Curty, M., & Qi, B. (2012). Measurement-Device-Independent Quantum Key Distribution. Physical Review Letters.
  2. CASCADE: Brassard, G., & Salvail, L. (1994). Secret-Key Reconciliation by Public Discussion. EUROCRYPT.
  3. CRYSTALS-Kyber: Bos, J., et al. (2018). CRYSTALS - Kyber: A CCA-Secure Module-Lattice-Based KEM. IEEE EuroS&P.
  4. CRYSTALS-Dilithium: Ducas, L., et al. (2018). CRYSTALS-Dilithium: A Lattice-Based Digital Signature Scheme. IACR TCHES.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🏆 Built for QIA Challenge 2025

Demonstrating practical quantum-safe cryptography for critical financial infrastructure

Report an Issue • Request Feature


Made with 💜 by @refexa

About

Quantum-Internet-Banking Hybrid quantum-classical security architecture for future-proof interbank settlements. Combines MDI-QKD for physics-level secrecy with lattice-based PQC for strong authentication, creating a dual-layer, zero-trust defense against quantum attacks like “Harvest Now, Decrypt Later.” Scalable, resilient, and designed for real-w

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages