level
Expert Level Reading
11 Jun, 2024

SHA-256

[ Shah too-faiv-siks ]

SHA-256 is a hashing algorithm from the SHA-2 family designed to produce a 256-bit hash output from any length of text.

Susan Oh
Written by
Susan Oh
Susan Oh Susan Oh Author
Susan Oh is a leading figure in the integration of AI and blockchain for social good, serving as the CMO for BeOmni by Beyond Imagination and a civic technologist dedicated to creating scalable solutions. She is a board member of the Blockchain Commission For Sustainable Development supported by the UN GA Office of Partnerships, and...
pawel Laskarzewski
Fact checked by
Paweł Łaskarzewski
pawel Laskarzewski Paweł Łaskarzewski Expert
Paweł Łaskarzewski is an accomplished engineering professional turned serial entrepreneur with an extensive two-decade career traversing sectors like aerospace, fintech, AI, and biotech. Beginning his career in engineering, Paweł developed key problem-solving and technical skills that laid the groundwork for his later entrepreneurial achievements. He has notably contributed to the banking sector by co-founding two...

What Is SHA-256?

SHA-256 is a hashing algorithm. SHA stands for Secure Hashing Algorithm, and the number “256” represents the algorithm’s output in bits; SHA-256 outputs a 256-bit hash. 

blockquote icon

The algorithm is part of the SHA-2 family of hashing algorithms (incl., SHA-224, SHA-384, and SHA-512) developed by the U.S. National Security Agency (NSA).

Hashing algorithms are most commonly used for cryptographic purposes. They’re used to secure connections over the Internet, facilitate end-to-end encryption, mine new blocks on a blockchain, and more.

SHA-256 is by far the most commonly used and well-known SHA-2 algorithm. It is also used in the world’s first cryptocurrency, Bitcoin. 

How Does SHA-256 Work?

Simplified SHA-256 Function
Simplified SHA-256 Function | Source: Steemit.com

Note: Explaining how SHA-256 works in detail goes far beyond the scope of this text. There is a lot of complex maths and computer science involved. Explore this thorough technical explanation of SHA-256. 

Now let’s understand how the SHA-256 algorithm works in principle:

Simply said, what SHA-256 and all hashing algorithms do is take a piece of textual information of any content and length and convert it into a fixed-length text called a hash.

Hashing works so that even if a single character in the input text changes, the hash will be completely different

The SHA-256 compression function operates on a 512-bit message block and a 256-bit intermediate hash value. It is essentially a 256-bit block cipher algorithm which encrypts the intermediate hash value using the message block as key [sic].

EIPS (n.d.)

This is incredibly useful in cryptography, where you often want to ensure data integrity without revealing the data itself. 

For example, a website that requires a login doesn’t need to store your password, it only needs to know its hash value. Once you enter the password, it will be processed with an SHA-256 or similar algorithm to verify it’s the same without you ever having to disclose it.

Finally, SHA-256 is an irreversible hashing function, meaning that it is near-impossible to derive its input from its output (i.e., the hash). 

SHA-256 in Cryptocurrency

Blocks Using Previous Block Hashes for Security
Blocks Using Previous Block Hashes for Security | Source: Blockchainknowledge.in

The SHA-256 hashing algorithm plays an important role in crypto and blockchain. Miners run this function continuously while mining Bitcoin and other proof-of-work (PoW) (i.e., mining-based) blockchains in search of a matching hash value.

The security of the blockchain comes from the chaining of hash values representing blocks. This makes undoing previous blocks virtually impossible without a majority consensus (i.e., 51%). 

SHA-256 is also used to create and verify digital signatures associated with transactions on the blockchain. 

Evaluating the Security of SHA-256

SHA-256 is used worldwide for countless applications; however, technological advancements in computing have recently questioned its future security. 

Increases in computing power and the advent of quantum computers are pushing future-minded developers toward new hashing solutions. SHA-3 is one such solution, developed as an advancement of SHA-256 that features performance improvements and better quantum resistance.

Conclusion

SHA-256 is still a robust, secure, and widely used hashing algorithm. It has stood the test of time and serves as the backbone of modern-day cryptography.

doc ico
Article Sources
arrow ico

Coinweb requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial process.

Susan Oh
Written by

Susan Oh is a leading figure in the integration of AI and blockchain for social good, serving as the CMO for BeOmni by Beyond Imagination and a civic technologist dedicated to creating scalable solutions. She is a board member of the Blockchain Commission For Sustainable Development supported by the UN GA Office of Partnerships, and a member of the Global Sustainability Network, a joint initiative by the Vatican and the Church of England to combat human trafficking. Recognized with the Quantum Impact Award #DecadeOfWomen by the UN GA as one of the top frontier women in digital, Susan speaks globally on leveraging AI and blockchain for the UN’s sustainable development goals.

In 2017, she co-founded Muckr.AI, a platform using machine learning to evaluate content trustworthiness. Additionally, Susan contributes her expertise to Coinweb as a journalist, covering advancements in blockchain and crypto technologies. Her work across these diverse roles underscores her commitment to using technology for transparency, trust, and positive societal impact.

More crypto lingo