SPB Git

Repository Public

RECOVERY.md 4.9 KB

# QYVORA — recovery

What the recovery phrase gives on every chain, so that the funds can be reached without QYVORA. The application shows the same data for the wallet at hand in Settings → Quantum Recovery → Recovery sheet (RecoverySheet, Sources/QyvoraRecovery/RecoverySheet.swift; the accounts of the other chains come from WalletService.recoveryAccounts, Sources/QyvoraWallet/WalletService+Shield.swift).

The recovery phrase is a standard BIP-39 mnemonic (12 or 24 words). It is the only backup of the keys: QYVORA has no server and cannot restore it. Everything below is derived from it with public standards; nothing is specific to QYVORA except the encrypted backup file described at the end.

Recovering in another wallet has not been tried by the project with each of the wallets named below: the paths and formats are the standard ones, and the addresses of the public test phrase ("abandon … about") are checked in the tests against published vectors (Tests/QyvoraWalletTests/MultiChainTests.swift, Tests/QyvoraBitcoinTests/UTXOReferenceVectors.swift). Compare the first address the other wallet shows with the one on the recovery sheet before relying on it.

# Derivation, per chain

Chain Path Key and scheme Address
Bitcoin m/84'/0'/0' (test networks m/84'/1'/0'), then /0/i receive, /1/i change BIP-32 secp256k1, BIP-84 native SegWit Bech32, bc1q… / tb1q…
Litecoin m/84'/2'/0' (test m/84'/1'/0') BIP-32 secp256k1, BIP-84 ltc1q… / tltc1q…
Dogecoin m/44'/3'/0' (test m/44'/1'/0') BIP-32 secp256k1, BIP-44 legacy P2PKH, D…
Bitcoin Cash m/44'/145'/0' (test m/44'/1'/0') BIP-32 secp256k1, BIP-44 CashAddr, bitcoincash:q… / bchtest:q…
Ethereum and every EVM network m/44'/60'/0'/0/0 BIP-32 secp256k1, BIP-44 0x…, EIP-55 checksum; the same on Base, Arbitrum, Optimism, Polygon, BNB Smart Chain, Avalanche
Solana m/44'/501'/0'/0' SLIP-0010 Ed25519 the public key, base58; the same on every cluster
TRON m/44'/195'/0'/0/0 BIP-32 secp256k1 Base58Check, T…; the same on mainnet, Nile and Shasta

The UTXO coins use a gap limit of 20 unused addresses on each of the receive and change chains.

# Descriptors and extended keys

The recovery sheet gives, for each UTXO network:

  • the master fingerprint and the account derivation path;
  • the account extended public key. Bitcoin: xpub / tpub and the SLIP-132 form zpub / vpub. Litecoin, Dogecoin and Bitcoin Cash: written with Bitcoin's version bytes (xpub / tpub), as the sheet says next to them;
  • the output descriptor of the receive chain, without checksum: wpkh([fingerprint/84h/coin_typeh/0h]xpub…/0/*) for BIP-84 accounts (Bitcoin, Litecoin), pkh([fingerprint/44h/coin_typeh/0h]xpub…/0/*) for BIP-44 accounts (Dogecoin, Bitcoin Cash). For Bitcoin the sheet also prints the change descriptor (/1/*); for the other coins the change chain is the same key with /1/*;
  • the first receive address (…/0/0), to check against the other wallet.

For the EVM account it lists the first addresses of m/44'/60'/0'/0/i (QYVORA uses index 0). For Solana and TRON it gives the path and the address. Each account of another chain carries the registry identifier of its network (RecoverySheet.ChainAccount.chainID); a sheet written before that field existed still decodes.

The sheet holds public data only. The recovery phrase itself is added only when it is asked for explicitly, after a fresh authentication (recoverySheet(includePrivateMaterial:)).

# Recovering a chain in another wallet

  • Bitcoin: import the phrase in a wallet that supports BIP-84 (native SegWit, account 0), or import the descriptor of the sheet as watch-only and sign with the phrase elsewhere.
  • Litecoin: a wallet that derives BIP-84 with coin type 2.
  • Dogecoin: a wallet that derives BIP-44 with coin type 3 (legacy addresses).
  • Bitcoin Cash: a wallet that derives BIP-44 with coin type 145 and shows CashAddr addresses.
  • EVM networks: any wallet using m/44'/60'/0'/0/0; add the networks by their chain id (CHAINS.md).
  • Solana: choose the path m/44'/501'/0'/0' when the wallet asks (the sheet's note names Phantom, Solflare and Ledger as using it).
  • TRON: m/44'/195'/0'/0/0 (the sheet's note: the path TronLink and Ledger use).

Test networks use coin type 1 for the UTXO coins; the EVM, Solana and TRON addresses are the same on test and main networks.

# Encrypted backup file

Besides the phrase, QYVORA writes an encrypted backup of the vault records (extension .qyvora, magic QYVORABK), protected by its own password (Argon2id combined with PBKDF2, AES-256-GCM) and optionally signed by the wallet's post-quantum identity. The byte layout is documented at the top of Sources/QyvoraRecovery/BackupFile.swift. This file is read by QYVORA only: it is a convenience, not a substitute for the written phrase.

Files main
Menu

Theme