3

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 Answer 1

2

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.

10
  • 2
    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. Jan 1, 2018 at 14:01
  • 1
    No, the protocol would allow you to spend bitcoin from either address A or B. Jan 1, 2018 at 14:13
  • 1
    Which transaction? Jan 1, 2018 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. Jan 1, 2018 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 Jan 1, 2018 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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