Saturday, October 5, 2024

deal with – Did uncompressed public keys use the `04` prefix earlier than compressed public keys had been used?

Have uncompressed keys at all times used the 04 prefix, even earlier than compressed keys (which use 02, 03) had been used?

Sure.

Did bitcoin bear an replace so as to add these prefixes to the totally different key varieties?

Bitcoin pockets software program did bear an replace to make use of those compressed keys. There was no change to the consensus guidelines/implementation wanted, as a result of (on the time) OpenSSL accepted each compressed and uncompressed public keys. In truth, there’s a third kind that was (and nonetheless is!) supporter, hybrid keys, which use prefix 06 or 07 (relying on even/odd T coordinate), adopted by 32-byte X, and 32-byte Y coordinate. I don’t perceive the motivation for having such a sort, but it surely works.

If that’s the case, since these prefixes are included within the hash used to supply addresses, did addresses utilizing uncompressed keys “change” when compressed keys had been launched?

Sure. However ony the receiver cares in regards to the distinction, because the sender solely sees the 160-bit public key hash. At spend time, the receiver must reveal the total public key, whose hash must match the general public key hash despatched to.

In case you have an excessive previous Bitcoin Core pockets.dat file that has by no means been up to date, and cargo it into a really trendy Bitcoin Core 27.0 software program, it’ll nonetheless produce P2PKH addresses utilizing the uncompressed public key, in order that one can nonetheless return to previous variations. This won’t preserve working nonetheless, as legacy pockets help is scheduled to be faraway from Bitcoin Core. Such previous information will nonetheless be usable, however will have to be transformed to a contemporary format first.

Additionally observe that for the reason that introduction of compressed public keys, there have been precise new deal with varieties (with corresponding consensus modifications): P2SH, segwit, and taproot.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles