With Bitcoin, Satoshi Nakamoto decided to use ECDSA for the signature method. With this, we create a private key (sk) and then create the public key for pk=sk.G. For the wallet ID, we take a SHA256 hash of the public key, and then a RIPEMD160 hash of this. This produces a 160-bit Bitcoin wallet ID. Often, the seed value is not stored, and where we store a Base58 version of the private key (sk) — and define this as the Wif key.
For a transaction, we sign the private key (sk) to produce a signature of (r,s). So, how do we verify?
Well, every client can extract the public key from the signature, and then verify the signature of the transaction. We can then take a SHA256 hash and then a RIPEMD160 hash to produce the wallet ID, and check that it matches the sender of the transaction.
So let’s use the BX program [here] to generate the keys. First, we can take a seed value of “baadf00dbaadf00dbaadf00dbaadf00d”,
>echo baadf00dbaadf00dbaadf00dbaadf00d | bx ec-new
8ed1d17dabce1fccbbe5e9bf008b318334e5bcc78eb9e7c1ea850b7eb0ddb9c8and produce a public key:
> echo baadf00dbaadf00dbaadf00dbaadf00d | bx ec-new |…