Address Scheme¶
Soqucoin uses Bech32m addresses with BLAKE2b-160 hashing. Every address encodes a hash of a Dilithium public key, making all Soqucoin addresses quantum-resistant from genesis.
Address Format¶
Prefix Convention¶
| Network | Prefix | Example |
|---|---|---|
| Stagenet | ssq1 |
ssq1q3f5h9k7m2n4p6r8t0v1w3x5z7... |
| Regtest | soqrt1 |
soqrt1q3f5h9k7m2n4p6... |
Why Bech32m?
Bech32m (BIP-350) provides better error detection than legacy Base58Check and is the standard for SegWit v1+ outputs. It eliminates address confusion between legacy (P2PKH) and modern (witness) address types.
How Addresses Are Generated¶
flowchart LR
A[Dilithium Keypair] --> B["Public Key (1,312 bytes)"]
B --> C["BLAKE2b-160 Hash (20 bytes)"]
C --> D["Bech32m Encode"]
D --> E["soq1q... (42 chars)"]
- Generate a Dilithium ML-DSA-44 keypair
- Take the 1,312-byte public key
- Hash with BLAKE2b-160 to produce a 20-byte digest
- Encode with Bech32m using the appropriate network prefix
Why BLAKE2b Instead of SHA-256?¶
| Property | BLAKE2b-160 | SHA-256 + RIPEMD-160 |
|---|---|---|
| Speed | ~2× faster than SHA-256 | Two-hash pipeline |
| Quantum resistance | 80-bit collision | 80-bit collision |
| Single function | Yes | Requires two hash functions |
| NIST consideration | SHA-3 finalist | Legacy standard |
BLAKE2b gives equivalent security in a single pass. Bitcoin's two-hash pipeline (SHA256 then RIPEMD-160) was a pragmatic choice in 2009 but adds unnecessary complexity.
Validation Rules¶
- Addresses MUST use lowercase encoding (Bech32m spec)
- Witness version 0 and 1 are Dilithium signature versions
- Invalid checksums are rejected at the RPC and wallet level
- Sending to an invalid address returns error
-5from the RPC