Github Link:
https://github.com/apogio/bash21
Background: So I’ve been sick for a few days and thought it’d be a good time to test my coding skills. Paper wallets aren’t really my thing, but I figured I could learn more about Bitcoin by trying to make one with Bash.
For someone who’s new to Bash, this looks really impressive! Honestly, it seems like you're a pro already haha. I tried something similar with C and GMP library just for kicks. I know my code ain’t perfect, but it works! Found a site to test keys, and they worked fine.
Your code probably has loads of room for improvement. I didn’t do anything fancy since the library did most of the work. Figuring out their terminology was a bit tricky.
FYI, Bitcoin Core dropped OpenSSL due to some security issues.
Don't feel bad. I use Linux every day but Bash scripts aren’t my thing. Yours seems way better than mine.
I enjoy Bash but haven't looked into creating a WIF private key yet. If you’re up for a challenge, using qrencode and ImageMagick to make a cool printable version with Segwit address could be fun.
Everyone is bored these days.
Both keys on QR codes with some artistic design. Print it multiple times in case one gets damaged. There was a nice paper wallet site that went scam after it got sold, but their design was great.
Sounds like a plan! I’ll definitely work on that.
I just added QR code generation for the address. Now it creates:
1. keys.gpg encrypted wallet info
2. address.png QR code for the wallet address
3. address.txt plain text address.
Yeah, Canton Becker’s site used to be the go-to. I still have a paper wallet from his offline code. After he sold it, the new owners totally ruined it. Scammed everyone.
For sure, the focus was on attack space. Replacing OpenSSL completely for your script does seem overkill, especially after the whole heartbleed fiasco.
Hey everyone!
I just added Nested Segwit addresses to the script! The output files now look like this:
1. keys.gpg: encrypted keys directory
2. addresses.txt: includes P2PKH and P2SH addresses
3. segwit_address.png: QR code for Segwit address
4. legacy_address.png: QR code for legacy address.
@LoyceV suggested creating a PDF with both the private key and address as QR codes. I’ve implemented that! You’ll need imagemagick to generate the files.
The new PDF layout is different, but since this is more for learning, I tried it out.