For cryptocurrency miners, the aim of the game is to calculate the correct hash of each block. Each hash calculated by a miner has the same chance of being successful in this. In this article, we use the example of Bitcoin to explain aspects of how hashes work in practice.
The 256-bit hash is often expressed as a number in hexadecimal format. Rather than using base 10 decimals, hexadecimals use 0-9 followed by a-f. Each hex digit expresses a 4-bit binary string. An example of a hash expressed as a hexadecimal string is:
Public and Private Keys
Hashes are also used in derivation of public and private keys.
The public key can be shared safely with others, and the private key can be used to verify ownership of a particular address. Think of the pair as a public account number, and a private PIN. Sample public and private key pairs for Bitcoin can be generated online, and in Bitcoin clients.
The private key is an unsigned 256-bit (32 byte) number, and the public key is usually expressed as a 33 byte number comprising of a 256-bit number and a prefix. These pairs are derived from hashes of the Eliptic Curve Digital Signature Algorithm (ECDSA) in the process shown below.
If you have downloaded a wallet client, the public/private keypair is stored in the wallet data file, usually identifiable by its file name “wallet.dat”.
Base58Check is used to create more widely shared Bitcoin addresses. For example, the address which received the reward for mining the Bitcoin genesis block can be noted as: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
The original Bitcoin client justifies using Base58 due to its exclusion of sometimes identical-looking characters 0, O, I and l. Use of this method was justified by Bitcoin’s creator due to ease of alphanumeric characters to be accepted as account numbers, ease of users to select an alphanumeric address by double clicking, and ability to express such addresses clearly in communications.
For more information, feel free to get in touch by emailing Charles at:
Alternatively, contact us using the form below: