Prerequisites:
sudo apt install base58
sudo apt install xxd
sudo apt install qrencode
Usage:
Make the script executable for the current user:
chmod u+x brainwallet.sh
Run it:
./brainwallet.sh
Execution results:
- A file data.txt which includes the sensitive data (keys etc.) of the wallet.
- A file legacy_address.png which displays a QR code for the wallet's legacy (P2PKH) address.
- A file segwit_address.png which displays a QR code for the wallet's segwit (P2WPKH-P2SH) address.
data.txt file format:
Entropy: apogio created a brainwallet generator using bash
PK: 913fc1abf77ae447c662cbd14a0803e519df65f8c40b3bcb20a911f0f31091dc
WIF: L264Cp6WU73fzmQCvJ8Te2EazXTr3A17yAC13NQDQBwQvyUAaiG3
Public Key: 04582ed090da2d4e4fda943923910a0720391a9903fa5259aa9d50cf3710ed40bbc6ce378a86ab86f2b2d6635e8797e9c4fa2021eff4f57942c22395d7ad1afe83
Compressed Public Key: 03582ed090da2d4e4fda943923910a0720391a9903fa5259aa9d50cf3710ed40bb
HASH160: 8ef81d4f19a7f284e68b32dd58931c6817ceb275
Legacy Address: 1E2xBY8kVhGgNZuRK8RwbvimpeW1E6DPat
Segwit Address: 3MpZWJr5ct3Y4zEeSmbA1R17vj2RrRhfNw
Some notes:
- Make sure to use single quotes to include the phrase. Otherwise Bash will think that each word is a separate command line argument and the results will be totally unexpected.
- Make sure to remember that in brain wallets, every character matters. Thus, 'I am the best' is different from 'i am the best', or from 'I am the best '.