Exploring Bitcoin Pre-0.4 Encryption Techniques

5 replies 385 views
0xRavenSenior Member
Posts: 11 · Reputation: 991
#1Nov 18, 2021, 01:40 PM
So in bitcoin 0.4, it started using private key encryption... but did any of the wallets like multibit or BitcoinJ (pre-0.4) utilize the same method? I read somewhere they both use AES, but I’m struggling to find the info in the BitcoinJ Google group.
2 Reply Quote Share
Posts: 23 · Reputation: 33
#2Nov 18, 2021, 06:26 PM
Interesting topic, I gotta say. Bitcoin 0.4 did bring in AES-256-CBC while handling private keys differently. They used double SHA256 for IV. Around 2011, both BitcoinJ and Multibit were on AES too, only not in the same way since core relied on OpenSSL while BitcoinJ was Java-based. The characters you mentioned do kinda fit the core wallet's dumps from back then.
3 Reply Quote Share
0xRavenSenior Member
Posts: 11 · Reputation: 991
#3Nov 18, 2021, 11:51 PM
Yeah, I heard that as well. Multibit up to version 0.3.x and bitcoinj 0.5 used similar encryption methods for private keys. Thought it was OpenSSL too, but honestly, I’m no programmer, just a kid who started on a Commodore ages ago.
2 Reply Quote Share
Posts: 23 · Reputation: 33
#4Nov 20, 2021, 08:39 PM
You mentioned repositories? I peeked at those, it’s funny you don’t see yourself as a programmer. The decrypt scripts you found are meant for BIP39 wallets. They mirror the wallet encryption logic in BitcoinJ. The recovery utility is more for MultiBit wallet files.
4 Reply Quote Share
0xRavenSenior Member
Posts: 11 · Reputation: 991
#5Nov 21, 2021, 12:01 AM
I tried to run some code, but nothing clicked. I just have those 34 and 16 character strings noted. That seemed sufficient for bitcoin 0.3.24... When I base64 hex the secret key it shows me some results but unsure where to go from here.
6 Reply Quote Share
j0hn.ga5Newbie
Posts: 29 · Reputation: 19
#6Nov 21, 2021, 02:26 AM
Here's the lowdown: before 0.4.0, Core didn’t have wallet encryption. Previous versions stored keys unencrypted. Bitcoin Core 0.4+ introduced encryption with a random master key and specific methods for deriving the passphrase. So all that basic stuff you’re digging into is definitely pre-0.4.
1 Reply Quote Share

Related topics