Post-quantum mesh VPN library with WireGuard, PQClean, Pyshark, Scapy, and Logging4
Project description
๐ง pqbit
Author: Kito Hamachi โ Bit512 Labs
License: MIT
Repository: github.com/kitohamachi/pqbit
PyPI: pypi.org/project/pqbit
๐ Table of Contents
- ๐งช Usage Examples
- ๐งฉ Key Components
- ๐ฆ Objective
- ๐ Supported Algorithms and Technologies
- ๐ Module Overview
- ๐ฆ Installation
- ๐ค Contributing
- ๐ License
- ๐ Gratitude
๐งช Usage Examples
from pqbit import falcon_keypair, falcon_sign, falcon_verify
pk, sk = falcon_keypair()
message = b"Bit512 integrity test"
signature = falcon_sign(message, sk)
if falcon_verify(message, signature, pk):
print("Signature verified โ
")
else:
print("Signature failed โ")
๐ Project Overview
pqbit is a Python security and networking library that combines cutting-edge technologies to create a resilient, distributed, post-quantum digital infrastructure. It is designed for researchers, engineers, and enthusiasts seeking to build secure and intelligent systems with complete control.
๐งฉ Key Components
-
๐ Post-Quantum Security
Uses algorithms such as Kyber1024 and Falcon1024 for quantum-resistant key exchange and digital signatures. -
๐ธ๏ธ Intelligent Mesh Network
Automatic configuration of WireGuard tunnels between multiple nodes with mesh topology and least privilege. -
๐ญ Distributed Authentication
Each node signs its identity with Falcon and validates peers before accepting packets, ensuring end-to-end trust. -
๐งฌ Adaptive Routing
Dynamic neighbor selection based on traffic entropy and latency, prioritizing security and performance. -
๐ฐ๏ธ Encrypted Broadcast
Discovery messages are encapsulated with Kyber and can only be decrypted by authorized nodes. -
๐ Adaptive Monitoring
Interactive dashboard with real-time visualization of entropy, latency, authentication, and events.
๐ฆ Objective
To offer a lightweight, auditable, and ready-to-use library for integrating quantum security with decentralized networks like Bit512.
Inspired by the PQClean project and integrated with anonymity technologies like Obfs4, WireGuard, and PySocks.
๐ Supported Algorithms and Technologies
๐ pqbit/simulation.py
โ
Integrated with __init__.py and test_repository.py
๐ง Simulates key generation, encapsulation, and decapsulation using secrets.token_bytes()
- Kyber1024 โ Quantum-resistant KEM
- Dilithium5 โ High-security post-quantum digital signatures
- Falcon1024 โ Compact and efficient signatures for restricted environments
- Obfs4 โ Traffic cloaking for anonymous networks
- WireGuard โ Lightweight and secure VPN
- PySocks โ SOCKS proxy for flexible traffic routing
- PQClean โ Clean C implementations for post-quantum security
- Wireshark (via PyShark) โ Deep packet inspection and live traffic analysis
๐ Module Overview
โ
benchmark.py
Performance tests for cryptographic operations and network latency.
โ
benchmark_routes.py
Benchmarks across multiple routing paths, measuring entropy and cloaking.
โ
dilithium.py
Post-quantum digital signatures using Dilithium5.
โ
falcon.py
Compact and efficient signatures with Falcon1024.
โ
guardian.py
Node validation, audit logging, and peer authentication.
โ
__init__.py
Centralized imports, versioning, and API exposure.
โ
kyber.py
Quantum-resistant key encapsulation with Kyber1024.
โ
log_benchmark.py
Structured logging of benchmark results and metrics.
โ
log_viewer.py
Real-time visualization of logs: latency, entropy, and events.
โ
mesh.yaml
Network topology configuration for mesh routing.
โ
obfs4.py
Traffic cloaking via obfs4proxy, with port and cert support.
โ
pqclean.py
Integration with PQClean C implementations via ctypes.
โ
pysocks.py
SOCKS proxy setup for flexible routing and anonymity.
โ
report.py
Audit reports and peer validation summaries.
โ
tunnel.py
WireGuard tunnel lifecycle management and config validation.
โ
verifier.py
Signature verification and peer identity checks.
โ
wg-meshconf.py
Generates WireGuard mesh configs from mesh.yaml.
โ
wireguard.py
Low-level WireGuard interface and tunnel orchestration.
โ
wireshark.py
Packet capture and analysis using PyShark and Scapy.
๐ฆ Installation
pip install pqbit
๐ค Contributing
Contributions are welcome! Fork the repository, open issues, and submit pull requests to help evolve Bit512.
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ Gratitude
This project is dedicated to the Python community and to those who believe in digital freedom.
---
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pqbit-1.0.0.tar.gz.
File metadata
- Download URL: pqbit-1.0.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a693b7f1b611ce1887271b0d6f771a868a5fe51d269eccf591089ffaa7772330
|
|
| MD5 |
59f27c6e9787441a39245fb4d6de7853
|
|
| BLAKE2b-256 |
d63b496bf7433076a83e9e5515e9fc835ff2b659f5aff772235f9585ebda2f92
|
File details
Details for the file pqbit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pqbit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00893039cb5b5ca42ba1a6ae856aea4b2bec4e7a31e52931d04d8505e8fbf9ad
|
|
| MD5 |
5495231e77a281a06333912e23d9c60a
|
|
| BLAKE2b-256 |
0162ef04e17075a65286e580e321f3afc844c895792bb3dc65ae4b7fdf5858a5
|