Skip to content

Converting between Compressed and Uncompressed Addresses and Private Keys

Lokesh Cherukuri edited this page May 11, 2018 · 3 revisions

Compressed and Uncompressed Public Keys/Addresses, what's the difference?

All Bitcoin addresses (and thus all Omni addresses) have a corresponding public and private key. The private key is used to generate the public key and the/your (public) address is derived from that public key. What most people do not realize is that there are actually 2 supported methods for using the private key to generate a public key. Each of which will result in 2 very different (public) addresses. The 2 supported methods can be used to generate a compressed public key (33 bytes long) or an uncompressed public key (65 bytes long).

Because the underlying private key can be used to generate these 2 different addresses there are 2 (very popular) ways for the private key to be expressed which tells the most software how to interpret the private key and which version of the public key/address to generate when importing. If the compressed address is desired/needed the Private key will generally start with K or L, if the uncompressed address is desired needed the Private key will start with 5. (If you want some more technical reading/explanations take a look at this article on bitcoin talk)

Omniwallet, along with most wallets, has support for both versions (uncompressed and compressed). However, sometimes other wallets may only support exporting one version or just due to user error the user doesn't realize it and exports the wrong version and needs to convert from one to the other.

So how do I convert between the two?

The easiest and quickest is to use a service like Bitaddress.org.

Note: It is recommended to download a copy of the latest bitaddress.org website zip from their github repository and transport that to your offline machine to utilize in a safe secure fashion

  1. On an offline machine extract the Bitaddress.org website zip file to its own directory and open the bitaddres.org.html home page.
  2. Go to the 'Wallet Details' tab and enter the private key then click 'View Details'
  3. The page will now display both the Compressed and Uncompressed Addresses as well as the corresponding private key for them.
  4. Find the private key that corresponds to the address you want to import to Omniwallet and copy it
  5. You can now take that address back to Omniwallet and import/use it as needed.
Clone this wiki locally