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.
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.
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:
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].