Bitcoin phrase wallets

Does anyone remember when it was common to generate a bitcoin wallet from any possible phrase? Like you would take a sentence from a favorite book and use that as your key.

I remember a story in 2017 or so that it appeared someone had ran the majority of written history through a scraper and drained many such wallets.

I can’t find a wallet generator like that anymore, maybe they have all gone offline now that it’s known to be insecure. But there were some fun ones to check like if you just entered “bitcoin” as the seed phrase people would be running transactions through that wallet as a public pot game.


It looks like maybe these were “deterministic wallets”.

And here’s one generator but I’m not sure if it was a standard or if different generators worked differently.

I think it would be fun if we could do these in grin.

You could use the SHA-512 hash of any possible phrase as the extended private key for a Grin wallet and it would work most of the time, but, as you already pointed out, this is a bad idea due to people not being very good at thinking up random phrases.


Perfect, anyone know of a relatively easy way to get a 512 key into any of our current wallet apps?

I don’t know Rust, so take this with a grain of salt. You can replace this line in grin with hasher.append_sha512("any possible phrase".as_bytes()); to hardcode a passphrase into it. I think that will work without breaking too much else.

Then you’d need to change these files in grin-wallet to use your modified grin repo:

:warning:Don’t use this on mainnet :warning: I can send you some Grin testnet coins if you really want to try this.


Nice. I need to insert that before building grin wallet right? And then any ideas what to do once it’a built to execute that?

Here’s the generalized steps that you’d need to do.

  1. Download the grin source code: git clone
  2. Edit this line in grin with your hardcoded passphrase.
  3. Download the grin-wallet source code: git clone
  4. Edit the Cargo.toml files in grin-wallet to use the package that you modified step 2.
  5. Build the grin-wallet that you modified in step 4: cargo build
  6. Run the compiled grin-wallet program to create a Grin wallet: ./target/debug/grin-wallet --testnet init
1 Like

Thanks I’ll give that a try sometime.

1 Like

To make a seed from a seedphrase, it is crucial that you use an extremely costly transformation.
One possibility is to use the seedphrase to seed siphash and try solve the corresponding cuckatooN graph, where N > 32. For any long enough cycle, its cyclehash will make a good masterkey.

This follows the basic idea of key stretching/strengthening [1].

[1] Key stretching - Wikipedia


Is the idea that this cost would prevent the scraper and other attacks? The “bitcoin” wallet would still be easy to guess right?

Yes, the scraper and brute force attacks are not very effective when taking gigabytes of memory and multiple seconds (or even minutes) per guess.