BASH38 Easy Offline BIP38 Tool

3 replies 217 views
Posts: 84 · Reputation: 87
#1Aug 21, 2023, 05:52 AM
Just made my own BIP38 tool. Didn't wanna just copy what was out there since they're already solid. So I came up with a bash wrapper to work with the Python library, and yes, it works offline too! Requirements? You’ll need an offline Linux machine for key generation, an online one to grab the libraries, and a USB stick to move everything around.
6 Reply Quote Share
ColdGangMember
Posts: 73 · Reputation: 183
#2Aug 21, 2023, 07:23 AM
Cool project, nice job! But I’m curious, since I haven’t coded in Python for ages, what about updates to the BIP38 or bitcoinlib libraries when you’re offline? I guess manual updates would be a must. Also, can we use different sources of entropy? And is it possible to verify everything before installing? Just thinking out loud!
3 Reply Quote Share
Posts: 84 · Reputation: 87
#3Aug 21, 2023, 03:32 PM
Yeah, you can totally follow the same method. If you're set up with both an online and offline device, it's straightforward. As for entropy, I’m using this line: entropy=$(head -c 32 /dev/urandom | xxd -p -c 32). The bitcoinlib might do the same. About verifying libraries, I'm sure there are ways but I didn’t dig too deep into that. 😅
2 Reply Quote Share
j0hn.ga5Newbie
Posts: 36 · Reputation: 19
#4Aug 21, 2023, 07:53 PM
Awesome to see a completely offline setup! A couple of things to consider: Better to build wheels on the online machine and keep track of hashes. On the offline side, pinning and checking hashes is way safer than just a blind pip install. Also, instead of passing the passphrase directly as an arg (which ends up in shell history), prompt for it. Like this: read -rsp "Passphrase: " passphrase; echo. Then feed it to Python securely.
5 Reply Quote Share

Related topics