Encryption

Encryption & Wallet Addresses

Encryption and Digital Wallet Addresses are one of Bitcoin and Cryptos greatest strengths. Cryptography is in cryptocurrency’s name, we apply it in the security that Encryption and Wallet Addresses provide. In this section we’ll explain how encrypt crypto currency is, and what a digital wallet address is.

Hashing Explained:

Hashing is an essential part of encryption, wallet addresses, and the security they provide Bitcoin and Cryptos. A hash function is a mathematical process which can take input of any size (a string), process it using a hashing algorithm and return the output in a fixed size (a digest). Each hash output is unique (theoretically it is possible for 2 data inputs to have the same hash output but realistically the probability is so low that it can be ignored),  it is impossible to derive the original data input from the hash output, and the output will always be the same for a given input. This can be used to detect change, you can play around on this site to get a feel for how it works. You’ll see the slightest change to data input (e.g. adding a space) will completely change the hash output.

There are many types of hash functions and you can find out more through this link, the one that Bitcoin’s Blockchain uses is SHA256.

SHA stands for ‘Secure Hashing Algorithm’, and 256 means it’ll produce a 256 bit output. First of all ‘Bit’ is short for ‘Binary Digit’, the smallest unit of data on a computer. A bit has a single binary value, either one or zero, a 256 bit represents 256 ones and zeros. Or 64 characters (hexadecimal representation consist of 1-0, A-F), which is what you’ll see in the Blockchain.

Public Keys vs Private Keys:

Bitcoin Blockchain uses Asymmetric encryption, a cryptographic system which uses a pair of keys (Public Keys and Private Keys). We derive the Public Key from Private Key and Private Keys are much longer. We can disseminate Public Keys widely. Alternatively, only the owner should know the Private Keys and must keep it secret and secure.

Keys can have 2 functions, either as an authenticator or encryption key. As an authenticator the Public Key verifies the Private Key that sent the message (e.g. used in digital signature). As an encryption key, the paired Private Key can decrypt the message encrypted with the Public Key. Bitcoin uses the encryption aspect. Your Public Key is your address (Inflowing funds) and Private Key enables spending funds at said address (outflowing funds). However, this isn’t entirely accurate but gives a conceptual understanding of how addresses, wallets, and transactions work in a blockchain.

Wallet Address:

A Bitcoin address is an identifier 26-35 alphanumeric characters. Addresses are case sensitive so you should always copy and paste it or use QR codes. With some specific rules, for example certain characters like Upper case ‘I’ are never used to avoid visual ambiguity, and some characters are used as a checksum for the validation process. In very simple terms, an address is a hash of your Public Key.

The reason we use a hash of the Public Key rather than the Public Key is for added security. Only give your Public Key at the point you spend your Bitcoin (and many discourage re-use of the same address). Additionally there are also uncompress(ed) vs compress(ed) elements but we won’t cover it here as you don’t need technical details to understand how it works.

There are a few common misconceptions, like “wallet and addresses are the same thing and you store coins there”. Your wallet contains a collection of a paired keys, and your addresses derive from Public Keys. Your coins are not stored in the wallet or the address, they are always on the Blockchain, what happens with each transaction is simply transfer of ownership.

This is explained clearly in the Blockchain and transaction sections, but in short, when someone sends bitcoin to your address, they are simply encrypting it with your Public Key, and you can spend those coins by decrypting it with your Private Key.

Learn more about Digital Wallets, Cold Storage, service providers, and how to set them up here.