Skip to content
Kindelia Wiki
Kindelia Wiki · 02 of 06

Post-Quantum WOTS Safety

Kindelia achieves post-quantum signatures using only SHA3-256 via Winternitz One-Time Signatures (SPEC.md §4). Every signature is stateful and single-use.

How Signing Works (SPEC.md §4, §7)

  • An account's address is its initial public key (sign_key(secret_0)).
  • Every transaction specifies next, the public key of the next one-time keypair, and signs the transaction digest with the current key.
  • The digest must satisfy the constant-sum antichain rule (sum of 32 digest bytes == 4,080), preventing an attacker from forging a second message from one valid signature.
  • Once confirmed on-chain, the account's active key rotates to next.

The One Fatal Rule: Never Sign Twice With One Key

If you sign two different transactions with the same one-time key, you expose hash preimages across both directions of the Winternitz chains. Anyone observing both signatures can forge a transaction draining the account.

  • Use one seed on one device at a time. Never import the same wallet.key or 24-word phrase on two machines concurrently.
  • **Keep the .sent journal file.** kindelia writes wallet.key.<START>.<LEVEL>.sent before broadcasting so it knows which key index nth was already used.
  • After restoring from a 24-word backup: Wait at least 10 minutes while watching the network and confirm no earlier transaction from that wallet is still pending before signing (SPEC.md §7).
  • Operational ceiling: The reference CLI scans up to 2^20 (1,048,576) keys per wallet (clang/kindelia.c:481). High-volume senders (such as pools or exchanges) should rotate to a fresh wallet before approaching that index.

Pool Payout Safety Pattern

Automated senders must enforce strict sequential signing:

1. Record /entry/<addr>["key"] before calling kindelia send. 2. Verify zero pending transactions from <addr> exist across all pages of /pool?from=K. 3. Allow at most one payout transaction in flight at a time. 4. Never auto-refund or re-sign an ambiguous payout if /tx/<hash> ages past KEEP blocks (404); check whether /entry/<addr>["key"] rotated on-chain first, and halt on uncertainty.