Skip to content

An explanation: Using Bitcoin

The name ‘bitcoin’ (btc) is a reference to the term ‘bit’, which is used to describe the basic unit of digital information in computing and information theory (Mackenzie, Charles E. (1980). Coded Character Sets, History and Development. The Systems Programming Series (1 ed.). Addison-Wesley Publishing Company, Inc. p. x. ISBN 978-0-201-14460-4. LCCN 77-90165. Archived from the original on 2016-11-18). Bit is a blend of the word “binary” and “digit”. Binary refers to a mathematical system, which only uses two numbers, most commonly “0” and “1”. A digit is a single number such as a 0 or 1. The binary system is used in almost all computer based systems. Computers store data and perform calculations using only 0’s and 1’s. A single binary digit can only represent true (1) or false (0). However, multiple binary digits combined can be used to represent large numbers and perform complex functions.

Bitcoin must be stored on an electronic medium, a wallet. This has a similar function to an E-mail account. A Bitcoin wallet is a piece of software. One can either run it on a personal computer, acquire a designated computer with pre-installed software or use a third party custodial service. A wallet allows you to access, control and exchange your bitcoin. The Bitcoin block chain, the decentralized public Bitcoin database, safely stores all wallet information.

A Bitcoin wallet consists of a key pair (private and public key), the corresponding wallet address and a separate log of all transactions. The log gives the user a complete history of all outgoing and incoming transactions. Bitcoin keys are randomly generated strings of numbers. Overly simplified, the key pair functions like the password and address to your E-mail account. The private key, like your password, is used to access your bitcoin. The public key, somewhat like your E-mail address, is computed from your private key and used to generate your bitcoin address so people can send you bitcoin. Once a bitcoin wallet is set up, it is active, a private key is the access authorisation to spend bitcoin.

Source: https://blog.coinsource.net/private-keys-public-keys-addresses-and-wallets/

The private key is a 256-bit integer number and gives anyone who holds it access to your bitcoin. An integer is a number that can be written without a fractional component. For example 0, 5 or − 4. A 256-bit number is a number that can be stored inside 256 bits of data. 256 bits gives room to use some pretty big numbers. The total possible combinations of 256-bit numbers is equal to 2256 or written in it’s full form: 116,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00. That’s more than the number of atoms in the entire universe. If you had one million computers who could each generate one million private keys per second, it would take roughly 3,671,743,063,080,802,746,815,416,825,491,118,336,277,193,184,902,172 million years (on average) before one of the computers generates the same private key as another one (learnbitcoin.com). This makes a private key random, secure and practically impossible to guess. The private key must remain secret at all times. Revealing it to third parties is equivalent to giving them control over your bitcoin. If you loose your private key, you loose access to your bitcoin. You probably heard the phrase “not your keys, not your coins”

As it is unhandy to write down and remember a 256-bit integer number, nowadays, wallets generate a “seed phrase” – a group of easy to remember words – from the private key. A seed phrase is a combination of 12 – 24 words also known as a mnemonic sentence. A mnemonic sentence or code is superior for human interaction compared to the handling of raw numerical values. The words can be written on paper or spoken over the telephone more easily (BIP: 39). A simplified explanation of how seed phrases work is that the wallet software has a list of words taken from a dictionary, with each word assigned to a number. You can derive the private key from the seed phrase, by converting each word to its corresponding number (Bitcoin Wiki). The seed phrase acts as a back-up. If one loses access to a wallet, or experiences a wallet failure, one can restore the wallet by using the backup seed phrase. A seed phrase can be locked at as a master key.

A 24 word seed phrase is extremely secure. The only way for a someone to guess the private key would be by brute-force-attack, which refers to an attacker trying out every single possible combination. The seed comes from a specific list of 2048 words. Someone would not only have to guess all the words, but also put them in the correct order. For a 24 word seed phrase, there are about 197,618,498,965,019,640,189,561,147,748,160,696,069,580,773,829,359,895,960,674,276,7068,384,079,188,241 possible combinations. A number so large, a human brain can’t even read it. No computer in the world could guess the right combinations either.

Bitcoin wallet ‘Trezor’ with it’s corresponding 24 word recovery seed.

Source: https://medium.com/@cryptoauthority/what-is-a-cryptocurrency-recovery-seed-ada9b620fb3c

The balance of every Bitcoin wallet is kept with the unspent transaction output (UTXO) model. This model works differently than the debit and credit system that banks use, by running balances at statement time. In a standard banking system the state is a balance sheet, where a transaction is a request to move funds from account a to account b. Bitcoin can be thought of as a state transition system, where there is a “state” consisting of the ownership status of all existing bitcoins. Imagine an excel sheet containing information about who owns bitcoin. On average every 10 minutes, when a new transaction block is confirmed, the ‘excel’ sheet is updated and a new “is state” of all existing bitcoins is registered. This accounting structure allows for all in the bitcoin network to agree on the same set of account balances, without a central authority.

The “state” in Bitcoin is the collection of all coins (technically, unspent transaction outputs or UTXO) that sit in a wallet and have not yet been spent. A bitcoin transaction contains one or more inputs and one or more outputs. Each input contains a reference to an existing UTXO and a cryptographic signature produced by the private key associated with the owner’s address, in order to prevent people from spending others peoples coins. Each output contains a new UTXO to be added to the state.

Let’s assume that Alice has a wallet balance of 1.7 bitcoin, which she received in two separate transactions (t). Transaction t1 = 0.8 bitcoin and transaction t2 = 0.9 bitcoin. Her total wallet balance of 1.7 bitcoin is made up of two separate UTXOs, t1 (0.8) and t2 (0.9 ). If Alice wants to send 1 bitcoin to Bob, Alice needs to check her wallet balance for a set of available UTXOs that total at least 1 bitcoin. Alice will not be able to get exactly 1 bitcoin; but she can add t1 and t2. She then creates a transaction with those two inputs and two outputs. The first output is 1 bitcoin with Bob’s address as the owner, and the second output is the remaining 0.7 bitcoin change, with the owner being Alice’s address. The bitcoin Bob received from Alice is Bob’s unspent transaction output. The change that Alice received is her unspent transaction output. It is the output from a transaction that a user did not spend and is able to spend at a later date. The “address balance” is the sum of all of the UTXOs associated with an address.

Example of a bitcoin wallet (Wasabi Wallet) with 10 UTXOs. The total wallet balance is the sum of all UTXOs = 0,22039629 BTC.

The Bitcoin protocol considers coins as integers. These coins are called satoschi (sat) in memory of Satoshi Nakamoto. One satoschi equals 0.00000001 bitcoin, which is 100 millionth of a bitcoin. Alice may say she has 1.7 bitcoin, but what the code would say if it could speak is that Alice has one hundred and seventy million (170,000,000) coins or what we would say, one hundred and seventy million (170,000,000) satoschi. A satoshi is the smallest accounting unit of Bitcoin. All accounting at the protocol level is calculated in satoschi. The existence of a bitcoin is defined by looking at the set of unspent transaction outputs and calling every entry with 100 million base units “one bitcoin”.

‘There are no bitcoin, there are ledger entry’s in a distributed ledger. What you do own, is the access to your ledger entry. Your private key, your seed phrase’ (Gigi)

Continue reading: The History of Money & Banking

If you enjoyed this piece, you can send me a tip to:
⚡ law@getalby.com

Follow me 
leonwankum.com 
Twitter (X)
Nostr