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.

2 Likes

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.

https://keybase.io/warp/warp_1.0.9_SHA256_a2067491ab582bde779f4505055807c2479354633a2216b22cf1e92d1a6e4a87.html

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.

2 Likes

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.

3 Likes

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 https://github.com/mimblewimble/grin.git
  2. Edit this line in grin with your hardcoded passphrase.
  3. Download the grin-wallet source code: git clone https://github.com/mimblewimble/grin-wallet.git
  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

4 Likes

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.

4 Likes