1

I know that a public key can be compressed. However, a public key and its compressed one have the same private key. Then why do we need two different Wallet import formats for each compressed and uncompressed one?

1

Wallet software needs to know whether to search the blockchain for an address generated from a compressed public key or not. The encoding of the private key signals which type should be searched for.

  • 1
    It really depends on the implementation of the wallet software. Some software may decide to check both addresses, others may not. The addresses will be considered as distinct, but funds from either could be spent from a signature generated from the same private key. – Matthew Charles Stannard Jan 1 '18 at 14:01
  • 1
    No, the protocol would allow you to spend bitcoin from either address A or B. – Matthew Charles Stannard Jan 1 '18 at 14:13
  • 1
    Which transaction? – Matthew Charles Stannard Jan 1 '18 at 14:26
  • 1
    All transactions from either type of address would be valid, but it would depend on the implementation of the particular wallet software as to whether both uncompressed and compressed addresses are tracked. – Matthew Charles Stannard Jan 1 '18 at 14:34
  • 1
    Wallet software should never reuse the same private key. Unless they have done this, the software will never need to track the two different types of addresses – Matthew Charles Stannard Jan 1 '18 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.