Bitcoin Forum
December 11, 2024, 07:45:19 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Anyone know how to bip38 encrypt an already-generated private key?  (Read 1651 times)
fizgig (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
November 20, 2013, 11:22:41 PM
 #1

All the tools I see out there are for new keys and I'd like to avoid the trouble of sweeping the coins from my existing address to a new one.
UnaNos
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
November 20, 2013, 11:41:51 PM
 #2

Try: http://www.bit2factor.org

Click on "Generate & Encrypt Private Key" at the bottom, then provide a Passphrase and Private Key.

You can download and use it locally if you don't trust it: https://github.com/mannkind/bit2factor.org

fizgig (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
November 20, 2013, 11:57:17 PM
Last edit: November 21, 2013, 12:15:34 AM by fizgig
 #3

Neat.  Haven't encountered that page before.  To test it, I just did the following:

1.  I made a BIP38 address in bitaddress.org with the passphrase "tucker" (no quotes).  I got this: 6PfRsAUt4GoxgvLpfMAuPZnxK452gvdmbY2KcfBHFFJCQJKgGPZ9pSpdZH, with (apparently uncompressed) bitcoin address 1DoH8sE1twMQybnoFWpw7PZnJjNCuiDrfF

2.  I took that encrypted address to the details tab of that same webpage and entered "tucker" to get the decrypted private key of: L2xcepU1mUtYkbZeihcw1znmajibjgf6koG8szWQM4cpWGAjoqVb and a compressed addressed of 1CMwWVSH1fkifpbrkknYW1NCpk3pkD99fs (the uncompressed address given here matched what was shown in step 1 as expected)

3.  I took the decrypted private key over to bit2factor.org and asked it to encrypt it with the passphrase "tucker".  I got the same compressed bitcoin address of 1CMwWVSH1fkifpbrkknYW1NCpk3pkD99fs but the bip38 private key is shown as 6PYWAF9qqjk6ytZFbepaSDDk9oGb5gBwwgUP8cnaCgUa7LR4T6SJX9pLCQ.

Does anyone know why I didn't get the same bip38 key from bit2factor that I got from bitaddress.org?
fizgig (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
November 21, 2013, 12:20:57 AM
 #4

For fun, I took the different BIP38 address generated by bit2factor.org and ran it through the details tab of bitaddress.org.  Sure enough, I get the same compressed (but unencrypted) private key that I started with.

So, I guess the system works but I just don't know how a private key can have more than one BIP38 address.
Ozymandias
Sr. Member
****
Offline Offline

Activity: 644
Merit: 250


View Profile
November 21, 2013, 12:36:56 AM
 #5

For fun, I took the different BIP38 address generated by bit2factor.org and ran it through the details tab of bitaddress.org.  Sure enough, I get the same compressed (but unencrypted) private key that I started with.

So, I guess the system works but I just don't know how a private key can have more than one BIP38 address.


Wouldn't this technically be considered a collision since there are two different private keys for one address?
flatfly
Legendary
*
Offline Offline

Activity: 1120
Merit: 1016

090930


View Profile
November 21, 2013, 10:35:17 AM
 #6

For fun, I took the different BIP38 address generated by bit2factor.org and ran it through the details tab of bitaddress.org.  Sure enough, I get the same compressed (but unencrypted) private key that I started with.

So, I guess the system works but I just don't know how a private key can have more than one BIP38 address.


Wouldn't this technically be considered a collision since there are two different private keys for one address?

Doesn't look like a collision. IIRC, BIP38 (which is currently just a draft, by the way - things could still change) uses random salts each time, thus yielding different results.

Also, a little-known (and perhaps irrelevant) fact: there are roughly 2^96 different private keys for each address. Yes, it's a little mindblowing at first...
 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!