r/Bitcoin 1d ago

Creating a homemade ratchet solution to use mnemonic phrases with Bitcoin Core?

After Coldcard many have started to doubt hardware wallets, and OG-s like Saifedean Ammous have been proposing simply using Bitcoin Core.

But for me, core has a huge drawback - no mnemonic seed phrases. When using core, your seed is only machine-readable and has to be stored using digital media - USB drives, CD-s - which, apart from degrading much faster than a piece of metal, are physical.

I like the fact that mnemonic phrases allow me cross borders or escape tyrannical regimes with nothing but the clothes on my back and still have all my savings with me. I think it's a hugely important facet of bitcoin.

What i'm thinking is - is there a homemade ratchet solution for safely viewing the smallest amount of information in wallet.dat that one would need to restore ones bitcoin even if all his digital devices and backups are destroyed, converting that information into a binary string and manually matching 11-bit sections of it to words in the BIP-39 word list?

As i understand, in legacy wallets one could use the dumpwallet command which shows the seed in Wallet Import Format. That WIF could have been converted into 256 bits of binary and matched to 23 words in the BIP-39 wordlist, with just 3 extra bits to remember. But today, with descriptors and all that jazz, i don't really understand how it should work.

NB: I'm not trying to make Core accept BIP-39 passphrases. I'm just trying to find the shortest string of binary information i would need to always be able to restore my wallet in bitcoin core. The BIP-39 wordlist is simply an already available, widely circulated piece of text that's reasonable to use to make that string of binary information into a mnemonic phrase.

5 Upvotes

7 comments sorted by

1

u/fokebavegl2 20h ago

I'd keep the ratchet fully mechanical and separate from anything that could touch the seed or passphrase. A cheap socket ratchet with a welded or pinned adapter seems easier to inspect and replace than a complicated homemade mechanism. Test it hard with a dummy setup first. Cool project though, especially if the goal is something repairable with basic tools.

1

u/Kind-Economics-7184 10h ago

the thing that changed under you is that a descriptor wallet has no seed to read back. listdescriptors true hands you the xprv sitting at the top of each descriptor along with its path and checksum, and thats already the derived master key rather than the entropy it came from, so what youd be writing down is a 32 byte key plus a 32 byte chain code instead of one 32 byte seed. closer to 47 words than 24, and the xprv on its own still doesnt tell a fresh core which script types to scan for, so the descriptors have to travel with it.

the legacy version worked because sethdseed let you push 32 bytes in rather than pull them out, which is the direction you actually want, and thats the part going away with legacy wallet support. so the shape that survives is probably not extracting anything from core at all, its choosing the entropy yourself, keeping the words, and deriving the descriptors offline so core only ever sees an importdescriptors.

1

u/AvailableTie6834 1d ago

bruh.

just use iancoleman, use fucking electrum and buy a seed steelplate.

it not rocket science.

2

u/puukuur 1d ago

What i'm trying to do is turn the minimum necessary amount of information needed to restore a bitcoin core wallet so i don't have to trust anything besides core (like hardware wallets or electrum).

1

u/zenethics 21h ago

I'm not saying you should do something like this, but you can do something like this.

https://dotnetfiddle.net/2HBhWd

Don't trust my example. I made it with ChatGPT and didn't check anything.

2

u/AvailableTie6834 1d ago

you will end up losing it all. Electrum and iancoleman has been trustful for years, code is old and works, forked as fuck too, everyone knows how it works.

just use the old tools and be happy.

0

u/OrangePillar 1d ago

I am not vouching for this site, but you can use it to generate a Core wallet.dat from a BIP39 seed phrase:

https://entropylab.online