BASH21 Simple Bash Wallet Generator Discussion

16 replies 337 views
Posts: 224 · Reputation: 87
#1Jul 5, 2024, 03:59 PM
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.
4 Reply Quote Share
nova42Newbie
Posts: 86 · Reputation: 6
#2Jul 5, 2024, 06:47 PM
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.
1 Reply Quote Share
Posts: 224 · Reputation: 87
#3Jul 6, 2024, 09:38 AM
I’m definitely gonna check it out since I’m decent at C. I’ll share my thoughts if I spot anything.
3 Reply Quote Share
nova42Newbie
Posts: 86 · Reputation: 6
#4Jul 6, 2024, 03:28 PM
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.
0 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#5Jul 7, 2024, 03:27 PM
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.
2 Reply Quote Share
Posts: 224 · Reputation: 87
#6Jul 7, 2024, 06:58 PM
Thanks for the heads up! I’ll find a way to steer clear of OpenSSL. I can do sha256sum instead, but I’m unsure about ripemd160 and ec. Great catch!
4 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#7Jul 7, 2024, 07:57 PM
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.
5 Reply Quote Share
Posts: 224 · Reputation: 87
#8Jul 7, 2024, 08:35 PM
Haha that’s a great idea! So, you want to print the address on a QR code? And what do you mean by redundancy?
6 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#9Jul 7, 2024, 10:57 PM
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.
0 Reply Quote Share
Posts: 224 · Reputation: 87
#10Jul 8, 2024, 04:57 AM
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.
3 Reply Quote Share
yield2016Full Member
Posts: 34 · Reputation: 538
#11Jul 8, 2024, 07:23 PM
Awesome work! Bash was actually my first coding language, so I’ll give it a try this week and see if I can add something cool.
2 Reply Quote Share
Posts: 185 · Reputation: 37
#12Jul 8, 2024, 10:30 PM
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.
3 Reply Quote Share
Posts: 224 · Reputation: 87
#13Jul 8, 2024, 11:47 PM
Thanks! I can definitely handle that. Just need to change the prefix for the address generation from 00 to 05. I’ll make those updates.
1 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#14Jul 9, 2024, 03:14 AM
For sure, the focus was on attack space. Replacing OpenSSL completely for your script does seem overkill, especially after the whole heartbleed fiasco.
2 Reply Quote Share
Posts: 224 · Reputation: 87
#15Jul 9, 2024, 09:24 AM
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.
4 Reply Quote Share
Posts: 224 · Reputation: 87
#16Jul 9, 2024, 10:32 AM
@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.
2 Reply Quote Share
Posts: 224 · Reputation: 87
#17Jul 9, 2024, 11:57 AM
Added the Github link at the top of the discussion. https://github.com/apogio/bash21
2 Reply Quote Share

Related topics