Skip to Content
ProtocolSecurity Analysis

Security Analysis

Tidecoin’s security is layered. No single primitive protects the whole system. Transaction authorization depends on post-quantum signatures; wallet derivation depends on PQHD seed secrecy; script hashing depends on HASH160, SHA-256, and SHA-512 depending on output type; proof-of-work depends on the active mining phase; peer privacy depends on encrypted transport; and implementation safety depends on careful key handling and validation.

This page states the threat model and boundaries. It is not an audit report and not a guarantee that every implementation bug has been found. For normative consensus rules, see Consensus Rules.

Threat model

ThreatTidecoin design response
Quantum key recovery against ECDSA/SchnorrTidecoin does not use ECDSA or Schnorr for transaction signatures.
Harvest-now-decrypt-later against exposed classical public keysFalcon-512 has been used from genesis for transaction signatures.
Need for future cryptographic agilityFalcon-1024 and ML-DSA-44/65/87 are implemented and height-gated for post-AuxPoW activation.
Public derivation leakage from xpub-style walletsPQHD is hardened-only and does not expose BIP32-style non-hardened public derivation.
Weak script-hash margin under Grover’s algorithmWitness v1 P2WSH-512 uses 64-byte SHA-512 script hashes after AuxPoW activation.
Quantum-vulnerable P2P key exchangeV2 transport uses ML-KEM-512 instead of elliptic-curve key exchange.
Small-chain standalone PoW attacksAuxPoW path is built for scrypt merged mining with Litecoin-scale parent work.

Signature security

Scheme familyTidecoin roleSecurity basisMain boundary
Falcon-512Live mainnet transaction signaturesSIS over NTRU lattices in the quantum random oracle modelCategory 1 target; compact but implementation-sensitive.
Falcon-1024Built for post-AuxPoW cryptographic agilitySame family at higher parameter setNot active on mainnet before AuxPoW.
ML-DSA-44/65/87Built for post-AuxPoW cryptographic agilityModule-LWE and Module-SIS lattice assumptionsLarger signatures and public keys.

The practical signature boundary is the scheme registry and activation gate. Before AuxPoW activation, Falcon-512 is the only consensus-allowed scheme. At and after AuxPoW activation, the node may accept the broader scheme set under strict verification rules.

Hash security

ComponentHashing usedSecurity note
Legacy key-hash addressesHASH160Compatibility surface; public-key exposure and address reuse should still be minimized.
Witness v0 script hashSHA-256Bitcoin-compatible witness v0 behavior.
Witness v1 P2WSH-512SHA-51264-byte script hash for stronger post-quantum preimage margin.
P2P transport key derivationHKDF-SHA256Derives transport keys from ML-KEM shared secret and network-specific salt.
PQHD derivationHMAC-SHA512 and SHA-256 domain-separated componentsHardened-only wallet derivation.

Hash functions are less directly affected by quantum computers than elliptic-curve signatures. Grover’s algorithm gives a quadratic search speedup, which is why SHA-512 is used for the higher-margin witness v1 script-hash path.

Proof-of-work security

PhaseWork sourceSecurity goalMain limitation
Pre-AuxPoWYespowerTIDECPU-accessible launch mining and memory-hard standalone PoWA small standalone chain can have limited economic hashpower.
Post-AuxPoWScrypt parent proof through AuxPoWInherit security from a larger scrypt mining baseRequires pool/miner adoption and correct AuxPoW integration.

The scrypt merged-mining path is designed to raise both the economic cost of attack and the implementation cost of a quantum PoW oracle. This does not make proof-of-work immune to economic attack. It makes the relevant attack target the live scrypt merged-mining ecosystem rather than only Tidecoin’s standalone hashpower.

Transport security

Tidecoin v2 transport uses ML-KEM-512 to establish a 32-byte shared secret, then derives encrypted packet keys from that secret. The transport protects relay privacy against passive observation and plaintext message classification. It does not hide confirmed blockchain data, and it does not prevent a peer that receives a transaction from learning that transaction.

The important quantum boundary is key exchange. A recorded elliptic-curve transport handshake could become decryptable to a future Shor-capable adversary. ML-KEM avoids that specific failure mode.

Wallet and key-management security

PQHD removes BIP32-style non-hardened public derivation. That matters because post-quantum signature schemes do not support the same safe homomorphic public derivation pattern as secp256k1 BIP32, and exposed public derivation material should not become a substitute private key.

Operationally, the main wallet risks remain ordinary but serious:

RiskMitigation
Seed lossBack up the wallet seed and verify recovery.
Seed theftEncrypt wallets, use offline signing for large balances, and limit hot-wallet exposure.
Address misuseAvoid assuming all address formats have the same activation or spending rules.
Scheme confusionTreat the scheme prefix as part of the serialized public key and validate against the scheme registry.

Implementation safety

The codebase uses several defensive patterns around sensitive material:

AreaPractice
Secret cleanupSecret material is cleansed after use where wrappers own the data.
Sensitive storageSecure allocators are used for private key material.
Object lifetimeSensitive KEM keypair wrappers use RAII cleanup and delete copy/move operations.
Deterministic derivationPQHD uses domain-separated derivation and deterministic retry behavior for scheme key generation.
Verification dispatchPublic-key prefixes select known schemes through a compile-time registry.

These practices reduce risk; they do not replace external review, fuzzing, reproducible builds, or conservative release engineering.

Remaining risks

RiskStatus
Unknown cryptanalysis of lattice schemesMitigated by NIST-vetted schemes and cryptographic agility, not eliminated.
Implementation side channelsReduced by clean implementations and integer-emulated Falcon paths; still requires platform review.
RNG failureCritical for key generation and signing; wallet and system entropy must be protected.
Consensus bugsMitigated by Bitcoin Core heritage and tests; any consensus change still requires careful review.
Low adoption of merged miningAuxPoW code alone does not provide security unless miners and pools actually participate.
User operational mistakesBackups, offline signing, and clear wallet UX remain essential.

Source of truth

TopicSource
Scheme registry and activation gate../tidecoin/src/pq/pq_scheme.h
Falcon and ML-DSA implementations../tidecoin/src/pq/
PQHD design../tidecoin/doc/design/pqhd.md, ../tidecoin/src/pq/pqhd_*
Script and witness security rules../tidecoin/src/script/interpreter.h, ../tidecoin/src/script/interpreter.cpp
Proof-of-work and AuxPoW../tidecoin/src/pow.cpp, ../tidecoin/src/auxpow.cpp, ../tidecoin/src/validation.cpp
P2P transport../tidecoin/src/bip324_pq.*, ../tidecoin/src/net.*
Whitepaper security analysis../tidecoin/doc/whitepaper.md

See also: Design Positioning, P2P Transport, Proof-of-Work, PQHD, Verification Modes.

Last updated on