What does SHA-256 mean?

SHA-256 is a cryptographic algorithm. SHA is an abbreviation of the phrase ‘secure hash algorithm’, whilst ‘256’ refers to the algorithm’s digest length in bits.

What is a Secure Hash Algorithm?

A secure hash algorithm is a mathematical operation which can be run on any data to provide an encrypted string of characters which is unique to that data. The most notable aspect of this operation is that it is irreversible. This means that it is possible for anybody to compute a hash from a piece of data, but it is not possible to start with the hash and then use it to reconstruct the original data.

Secure hash algorithms have many applications within computer science. They can be used to check the integrity of data, to prove possession of data.

How SHA-256 is Used in Bitcoin

The most famous application of SHA-256 is in Bitcoin and other Bitcoin-like cryptocurrencies, where it is used by individual wallets to sign financial transactions, or to sign messages (to prove identity or ownership), and by ‘miners’ to confirm transactions and maintain the network through ‘proof of work’.

Bitcoin miners must perform secure hashing algorithms many times in order to win the chance to mine a block of transactions, which in turn allows them to generate new coins and to profit from transaction fees paid by other users. The computational cost associated with this is called ‘proof of work’. Without this proof of work an attacker could set up thousands (or millions) of miners to take control of the network for their own benefit, but with the proof of work trying to do this would be so expensive to do that it is practically impossible, because ay attacker would have to control such a huge amount of computing power to do it.

The irreversible nature of SHA operations means that they can be used to sign transactions and prove ownership of a particular address (to prove that you are its owner and you really did want to send some of its balance to another person) using a private key, without anybody else being able to use your signature to calculate your private key and take control of your wallet.

The SHA-2 Family

SHA-256 is part of the SHA-2 family of algorithms. These algorithms were developed by the United States National security Agency (NSA) and were first published in 2001, to replace the SHA-1 family of algorithms which are less secure. Other members of the same family include: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256.

« Back to Glossary Index