Is there a typical P2PKH?

on

|

views

and

comments


I used to be implementing a small utility that computes the bitcoin deal with ranging from a non-public key (256-bit quantity). I’m shocked in regards to the lack of a single reliable reference to this, in contrast to the case of the BIPs.

The e book of Antonopoulos and the bitcoin wiki point out that the general public key (pubK) should undergo sha256 and ripemd160 hashes earlier than base58check encoding that ends in the ultimate bitcoin deal with; there are additionally particulars in regards to the model byte. However the pubK may very well be serialized in a minimum of two kinds, both the complete 65-bytes 0x04<xcoord><ycoord> or the compressed 33-bytes 0x02/0x03 <xcoord> illustration. Each result in totally different bitcoin addresses. The wiki explains step-by-step the right way to receive an deal with from the compressed pubK, however the picture within the web page reveals a diagram that makes use of the complete pubK illustration as an alternative. The http://gobittest.appspot.com/ web site, referenced within the bitcoin wiki for testing the WIF format, computes the addresses utilizing the complete pubK.

Alright, I do know that the personal key WIF serialization format has a byte to point whether or not the pubK addresses are computed utilizing the the compressed or full illustration (see https://en.bitcoin.it/wiki/Wallet_import_format).

Additionally add a 0x01 byte on the finish if the personal key will correspond to a compressed public key.

Nonetheless,

  1. it isn’t talked about wherever what’s the worth of that byte when the complete pubK is used.
  2. finally a non-public key’s only a 256-bit quantity, there must be a novel strategy to derive an deal with from there.

Are there truly two addresses for every personal key within the bitcoin-core implementation? Is not there like a typical manner of getting the deal with?

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here