01 logo

Bitcoin Deconstructed

First in a Series of Articles - Hash Functions

By Steve LancePublished 3 years ago Updated 2 years ago 3 min read
1
Bitcoin Deconstructed
Photo by Executium on Unsplash

Introduction

Most of you have heard of Bitcoin. Some of you may own or have considered owning Bitcoin. Only a few understand how Bitcoin works.

This is not to be critical, we live busy lives, and finding detail information on Bitcoin is challenging.

At first, how Bitcoin works may seem complicated, but this is only because many of the terms used are unfamiliar. If you take a few minutes to learn a couple of new terms and some simple concepts, you will gain a basic understanding of Bitcoin.

This series of articles takes you step by step through how Bitcoin works.

You will learn:

  • What a hash function is, and how it is used to validate the Bitcoin ledger.
  • How hash codes control the number of Bitcoins that get produced.
  • What a Blockchain is, and how it stores transactions.
  • The role Bitcoin miners play, and how they are compensated for their efforts.

By learning the vocabulary and these basic concepts, you will have the tools needed to carry on a meaningful discussion on if Bitcoin is a good investment and if it is likely to last far into the future.

Hash Function

A hash function takes any text as input and outputs a hash code.

For Example, if you input “Learn about Bitcoin” the output would be the following hash code.

9d4917a7696cb5ad6de6ff6d1cf059e815ede23f76b23e2b6dbaa1bdb6b7dca5

If you change the input, even the slightest change, “Learn about Bitcoin” (an extra space was added after ‘about ‘) the hash code is entirely different.

7a45d867191f68276194d6129d157cb6e02f9400be1e46de7d6888f5912ff3d8

The only way to recreate the code is to have the exact same input. Any change will produce a new and unique code. Also, there is no way to predict the output. This will be important when we discuss how often Bitcoins are produced.

Hash Function – Recap

Congratulations, you have taken the first step to understanding Bitcoin. You have added Hash Function and Hash Code to your vocabulary.

You have also learned that you can take any text and generate a unique code.

In a future article, you will see how this code is used to ensure that the Bitcoin ledger has not been compromised. You will also learn how it is used to control the number of Bitcoins that are mined.

Hash Function – Bonus Facts

You do not need to know the following to understand Bitcoin, but here are a couple of frequently asked questions.

What hash function does Bitcoin use?

• Bitcoin uses the SHA-256 hash function, which stands for “Secure Hash Algorithm”. The 256 is the number of bits it uses.

Why does the hash code have both numbers and letters?

• It is a 64-digit hexadecimal number. Hexadecimal numbers are base 16 vs. base 10, which we use in our everyday lives. The letters 'a' through 'f' represent the number 10 through 15. In hexadecimal, the number 10 is represented by 'a', 11 by 'b' …. 15 by 'f', 16 by 10, 17 by 11, etc.

I have heard that it is possible for two different text strings to have the same hash code. Is this true?

• While in theory it is possible, they refer to this as a collision. It has never been known to happen. The odds are astronomically against it happening. It is far more likely that you would hit the Lottery on the same day that the Browns win the Super Bowl, you catch only green lights all day long, a massive asteroid hits earth, and McDonalds brings back the McRib sandwich.

Were hash functions created for Bitcoin?

• No hash functions have been around for a very long time. You can find references back as far as 1953. They have many uses other than Bitcoin. They are widely used in computer software.

Next Article

In the next article, we will discuss Block Chains. You will learn about its structure, how it is used to store transactions, and how it makes use of hash codes.

cryptocurrency
1

About the Creator

Steve Lance

My long search continues.

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.