Status: experimental. Claims in this README about scale, speed, security or readiness are design goals or earlier drafts unless they point to a test, measurement or audit report. No independent audit is claimed.
A quantum-resistant blockchain implementation featuring hybrid signatures (Ed25519 + SPHINCS+) for enhanced security and future-proofing against quantum computing threats.
-
Hybrid Signature System
- Ed25519 for current security and efficiency
- SPHINCS+ for quantum resistance (shake256-128f)
- Seamless signature verification
- Support for legacy wallets
-
Transaction System
- UTXO-based transaction model
- Change output calculation
- Fee handling
- Coinbase transaction support
- JSON serialization
-
Merkle Tree Implementation
- Efficient proof generation
- Transaction verification
- Support for odd number of transactions
- Duplicate leaf handling
quantumchain/
├── src/ # Source code
│ ├── __init__.py # Package initialization
│ ├── block.py # Block implementation
│ ├── blockchain.py # Blockchain core logic
│ ├── merkle.py # Merkle tree implementation
│ ├── quantum_sig.py # SPHINCS+ and hybrid signatures
│ ├── transaction.py # Transaction implementation
│ ├── utxo.py # UTXO set management
│ └── wallet.py # Wallet implementation
├── tests/ # Test suite
│ ├── merkle_test.py # Merkle tree tests
│ ├── quantum_sig_test.py # Signature tests
│ ├── transaction_test.py # Transaction tests
│ ├── utxo_test.py # UTXO tests
│ └── wallet_test.py # Wallet tests
├── CONTRIBUTING.md # Contribution guidelines
├── README.md # This file
├── ROADMAP.md # Development roadmap
├── requirements.txt # Python dependencies
└── demo.py # Demo application
- Python 3.10+
- pyspx 0.5.0 (SPHINCS+ implementation)
- cryptography (Ed25519 implementation)
- pytest (testing)
- Clone the repository:
git clone https://github.com/yourusername/quantumchain.git
cd quantumchain- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a new wallet:
from src.wallet import Wallet
# Generate new wallet with both Ed25519 and SPHINCS+ keys
wallet = Wallet.generate()
# Save wallet to file
wallet.save('my_wallet.json')- Create and sign a transaction:
from src.transaction import Transaction
from decimal import Decimal
# Create transaction
tx = Transaction(
sender=wallet.address,
recipient="recipient_address",
amount=Decimal('1.0'),
fee=Decimal('0.001'),
inputs=[utxo]
)
# Sign with both Ed25519 and SPHINCS+
tx.sign(wallet)- Verify transaction:
# Verify transaction including signatures and UTXO validity
is_valid = tx.verify(utxo_set, wallet)Run the test suite:
python -m pytest -vThis implementation uses:
- Ed25519 for traditional digital signatures
- SPHINCS+ (shake256-128f) for post-quantum security
- SHA-256 for Merkle tree hashing
- JSON for data serialization
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- SPHINCS+ team for the pyspx implementation
- The quantum computing community for security insights