Sitemap
Press enter or click to view image in full size

So What’s In a Bitcoin Wallet?

2 min readJul 29, 2025

--

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.

Press enter or click to view image in full size

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
8ed1d17dabce1fccbbe5e9bf008b318334e5bcc78eb9e7c1ea850b7eb0ddb9c8

and produce a public key:

> echo baadf00dbaadf00dbaadf00dbaadf00d | bx ec-new |…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.

Responses (1)