Bitcoin Forum
November 07, 2024, 05:58:10 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Private key compression  (Read 1078 times)
cryptolaxy (OP)
Member
**
Offline Offline

Activity: 103
Merit: 10


View Profile
September 17, 2014, 01:37:13 PM
 #1

Wanted to know if it's possible to convert a compressed private key to an uncompressed private key.


Thanks!
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4801



View Profile
September 17, 2014, 01:54:37 PM
 #2

Wanted to know if it's possible to convert a compressed private key to an uncompressed private key.

Thanks!

Possible? Yes.

But why would you want to?

cryptolaxy (OP)
Member
**
Offline Offline

Activity: 103
Merit: 10


View Profile
September 17, 2014, 01:58:00 PM
 #3

Wanted to know if it's possible to convert a compressed private key to an uncompressed private key.

Thanks!

Possible? Yes.

But why would you want to?


From my earlier thread, the private key generated by coinbase starts with L which means it's compressed. Was thinking there's a way to uncompressed the private key and them import the paper wallet.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4801



View Profile
September 17, 2014, 02:18:23 PM
 #4

Wanted to know if it's possible to convert a compressed private key to an uncompressed private key.

Thanks!
Possible? Yes.

But why would you want to?
From my earlier thread, the private key generated by coinbase starts with L which means it's compressed. Was thinking there's a way to uncompressed the private key and them import the paper wallet.

The private key isn't actually compressed.  It's the public key that is compressed (which results in a completely different bitcoin address).

The private key has a byte added to it to indicate that it was used to generate a compressed public key.

If you convert it to the uncompressed format, then any wallet that you import it into will generate the wrong address (it will generate the address from the uncompressed public key), and will therefore not see or access the bitcoins that you sent to the address that was generated from the compressed public key.

The only thinkg I can think of that would make a private key "invalid" would be if the checksum was calculated incorrectly.  Otherwise, you should end up with a completely valid and importable private key no matter what the private key is.

If it was my paper wallet, I'd start by demanding support from Coinbase.

If they were slow to respond, then while I was waiting I'd:

  • Convert the WIF private key to a hex private key
  • Split apart the components
  • Calculate the checksum

  • If the checksum is different than the one already in the WIF private key, then I'd replace it with the one I calculated
  • Re-assemble the components
  • Convert back to Base58
  • Try importing the new private key

  • If the checksum is not different than the one already in the WIF private key, then I'd check to make sure that the 256 bit private key is within the bounds of a proper secp256k1 private key
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!