Hacker News new | ask | show | jobs
How secure is your Bitcoin wallet's mnemonic seed phrase? (bennet.org)
27 points by arcane_node 350 days ago
6 comments

Hey, author here. I made this to help technically curious people understand what's really going on when they're handed a Bitcoin seed phrase (i.e. why it's not just a password). You can flip bits of entropy, explore checksum validation, and see how mnemonic phrases are turned into deterministic wallets. Feedback welcome. If anything breaks I’ll fix it fast.
I could not help but think of a class of early internet scam websites offering to check if your credit card number was stolen.

I'm sure that you aren't just collecting wallet seeds, but that's what it reminds me of.

Thanks - I appreciate the comment. It's a valid concern, and one I thought about while making this. Just to clarify a few things:

- I've explicitly discouraged entering a real mnemonic, in several places. In fact I tried to steer people in a safe direction by putting the random generation component first. The article works best when starting with random entropy.

- All the BIP39 logic is handled client-side using paulmillr/scure-bip39, a minimal audited library.

- It works fully offline - no backend, no database, no server calls.

- There are no cookies or tracking scripts beyond simple pageview stats via Plausible (which is privacy-focused)

That said, I’d genuinely welcome suggestions on how to make it more trustable. Do you think open-sourcing the code for the page/site would help?

I think you did enough due diligence by putting the random part first, but I suppose one way to stop someone from putting in a real BIP39 mnemonic would be to use a completely different set of words than those allowed in BIP39.
Make the text fields non-editable or drop them entirely? The writing and clickable demos provide a very good lesson without using any text input.
I think the disclaimer is the best an honest site owner could do in this case.

If the site was malicious, there wouldn't be any disclaimer, and once you insert a passphrase, BIP39 or not, in a text field, it's game over. No need to press Submit even, some JavaScript will send it wherever it has to.

Can you explain why this is a valid mnemonic?

    bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon
The last word contains checksum bits but not all of the bits it represents are checksum bits. It just so happens to be possible for all of them to be the same word here. In this case it can be bacon (139th word) or one of the following: cupboard, double, jelly, neutral, review, smile, voice
Exactly what oakwhiz said. Similarly, if you set all 256 bits of the entropy portion to 1 (i.e. you play minesweeper with my grid) then the resulting valid mnemonic is zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote. The last word contains the checksum, which is the hash of the string of 1s.
This is really fun, thanks for putting it together. I appreciated the checksum and entropy visualizers quite a bit, they made how it works "click" for me.
Thanks er4hn, I'm glad to hear it!
The first question you should ask yourself when tasked to secury literally anything is the same: secure it against whom or what?

This article is about entropy and mostly an explaination why your mnemonic seed is already safe against wild guesses. The question then is how to secure it against attackers who might want to get it otherwise.

If you live alone writing it on a piece of paper and putting it into a locked drawer might literally be enough, since your main concern would probably be online aftacks. If you have 30 guests a week that calculation might change, but then your scenario is to protect against a guest who A) knows you have a lot of bitcoins, B) posseses all other required information to access the wallet and C) is invited or has broken into your flat. If the latter is an issue, maybe getting a decent door and a safe is a good idea.

This is just an example, but if you want to secure a thing, knowing which attack-vectors to secure it against is key.

Safest way to generate seed words is a set of dice and printed table. It's odd they only encode 256 bits of entropy, which clearly isn't enough to make multiple 256-bit private keys.
just XOR two photos from your iphone and pick middle part of that... you can even sha512 that.

Maybe Subkey generation ?

Maaan, i stopped paying attention to bitcoin after Bitcoin Cash fork fiasco. Everything flew back into my consciousness. eth DAOHACK fail. Website, listing all possible BTC private keys. (de)Dusting. Printing signed transactions offline into QR codes on thermal paper... Good old days.

I am not sure BTC is still worth the hassle, most of hashrate is inside of USA (70+% =>51%...). most of BTC holdings is in USA... btc saga will end soon and badly in my opinion. BTC Cash made me pessimistic.

In Europe they have SEPA Instant Credit Transfer which allows people inter bank transfers in under 15 seconds. All KYC, all legal, all gov approved, gov regulated, all without fees to btc exchange / VISA. BTC does not even makes sense anymore. Technological innovations flew right past the BTC.

i am not even sure BTC infrastructure is quantum safe, blockchain "is", but i doubt rest of infrastructure is...

You're missing its monetary fundamentals that make it the hardest asset mankind has ever seen.
I'm totally not into Bitcoins but nice and interesting writeup. I very much like the interactivity of the article.
Yeah, Jupyter notebooks / literate programming for everything !
Shit posts making top of the HN, again. Are people really that stupid?