How QSBitcoin Works

QSBitcoin is a soft fork of Bitcoin Core that adds quantum-safe signatures through unified opcodes, allowing seamless migration from ECDSA to post-quantum cryptography.

Core Concepts (Similar to Bitcoin)

QSBitcoin shares several fundamental concepts with Bitcoin:

Technical Implementation

QSBitcoin's quantum-safe implementation is built on several key innovations:

Unified Opcodes

Instead of adding separate opcodes for each quantum algorithm, QSBitcoin uses just two unified opcodes:

The algorithm is identified by the first byte of the signature data (0x02 for ML-DSA, 0x03 for SLH-DSA), making the system extensible for future quantum algorithms.

Signature Format

Quantum signatures follow this format in witness data:

[algorithm_id:1 byte][signature_data][sighash_type:1 byte]

Address Format

All quantum addresses use standard P2WSH (Pay-to-Witness-Script-Hash) format:

No special prefixes distinguish quantum addresses from regular P2WSH addresses, maintaining privacy.

Soft Fork Activation

Weight and Fee Structure

QSBitcoin implements special weight calculations and fee incentives for quantum signatures:

Transaction Weight

Fee Structure

Transaction Limits

Using Quantum Signatures

To create a quantum-safe address:

  1. Generate a quantum key pair (ML-DSA or SLH-DSA)
  2. Create witness script: <pubkey> OP_CHECKSIG_EX
  3. Hash the witness script with SHA256
  4. Encode as bech32 P2WSH address

When spending, the signature includes the algorithm ID as its first byte, allowing the script interpreter to automatically select the correct verification method.

For detailed technical specifications, see our Developer Documentation.