Hash – The Puzzle of Bitcoin (What Are the Miner's Mining?) (2024)

In the previous post we have explained the ideas behind the Bitcoin system, however, one issue remained unexplained: What is this bloody hard puzzle that the Bitcoin miners constantly try to solve?

Recall that in the Bitcoin system the miners are in constant competition: Whoever solves the puzzle first will earn the honor of adding a new block to the block-chain and make some money as well. Hence, the miners try feverishly to be the first to solve the puzzle. In the following section we are going to address the following questions:

  • What exactly is this puzzle?
  • How is it integrated in the Bitcoin system?

The Puzzle - A Cryptographic Hash Puzzle

Don’t be scared of the word ‘cryptography’, in our context it simply means that the ‘hash’ puzzle is related to the world of cryptography, i.e. building unbreakable systems.

Maybe the best real world analogy to a hash puzzle is a fingerprint.

Hash – The Puzzle of Bitcoin (What Are the Miner's Mining?) (1)

Imagine that you are given a fingerprint sample and you are asked to discover the height, weight and overall look of the person to whom this fingerprint belongs. What would you do?

To make it a bit harder, assume that there is no correlation between fingerprints and other human features (like hair color) so the only way to test if this fingerprint came from your best friend is to take his fingerprint and compare it with the other one.

Your best choice, then, would be taking fingerprints from every person on Earth and then comparing it to the fingerprint in question, until you find a match and stop. In case you are unlucky, the right person would be the last one that you checked, which means that you’ll keep looking for him for the next 13,555 years, assuming you check one person per minute (and the Earth’s population is about 7.125 billion people). If you are lucky, though, you are expected to look for that person for only half of that time, hooray! Bad news ah?

Let’s go back to our hash puzzle. In a hash puzzle, the fingerprint that you are given is a list of characters (let’s call it a word), like “dog”, after which your task is to find the right person (in our case this is a word as well) that produced the fingerprint. To this end the only thing you can do is to try all possible combinations of digits (of some length), one by one.

Hash – The Puzzle of Bitcoin (What Are the Miner's Mining?) (2)

(Image source:https://blog.varonis.com/the-definitive-guide-to-cryptographic-hash-functions-part-1/)

Conceptually speaking, you have a machine that whenever you put some digits in it, it produces an output of some other combination of digits. You know completely nothing about this machine and it works like magic - you don’t see any correlation between the characters that you put in and the characters that it produces. The only rule that you have observed is that no matter how many characters you put in the machine, the produced output always has the same length.

One little technicality: The characters that are used by the machine (both your input and its output) are only composed by the ten digits 0-9 and the six letters a-f. This means that every character of the input or output could be one out of 16 characters.

The puzzle is essentially a word (list of characters), call it A, which represents the machine’s output, in order to solve it your task is to find the the correct input (another word), call iti B, such that when you put B into the machine you will get A as an output.

Starting with a simple case, suppose that the machine produces outputs of a single character. This means that there are only 16 different possible outputs. As an example, assume you got the character ‘d’ (as the puzzle) and the machine works in such a way that every character that is inserted leads to a different outputted character. Thus, if you try all possible characters 0-9 and a-f you will find the match, i.e. the character that when inserted in the machine produces the character ‘d’ as an output. In particular a minimum of 16 comparisons is required in order to be completely sure that a match will be found.

Complicating this a bit further, consider the case in which the machine produces an output of 2 characters instead of a single one, as in the previous example. This means that there are 16X16=256 different possible outputs. So when given some puzzle, ‘4c’ for instance, then you will need to try all possible inputs of 2 characters (i.e. ‘00’, ‘01’ … ’fd’,’fe’,’ff’) in order to guarantee a success.

Note that increasing the machine’s output length by a single character increases the number of trials you need to make by one order of magnitude (in our example by a factor of 16!). Thus, an output of a single character leads to 16 trials, an output of 2 characters leads to 256 trials, an output of 3 characters leads to 4096 trials, and so on.

So, ‘what’s the big deal?’ one might ask. Computers are so fast these days, you can build a software that will compute all trials for you in seconds!

Well, you might have noticed that the number of trials is growing in an exponential way! This means that for an output of x characters you will have to make x16 trials! For an output of 40 characters you will need to make 1461501637330902918203684832716283019655932542976 trials!! This number is so enormous no modern computer can make this number of trials even if it works constantly till the collapse of the solar system.

If you are still not convinced that the hash puzzle is a hard one, you might want to try it and find the solution to the following puzzle: Find a list of characters that when you put it through the SHA1 machine you get an output of all zero characters (that is ‘000000…’). The machine is available at sha1-online.com. Good luck 😉

The Connection to Bitcoin

Recall (from the previous post) that in every short time (usually 10 minutes) a single ‘block’ is appended to the ‘block-chain’ by a single ‘miner’ (the winer of the round). That miner, who appends that block, is the first one who found a solution to the hash puzzle. In order to understand this puzzle we need to know how does a block looks like. Details follow.

Briefly, a block in the block-chain is some data structure containing:

  1. A nonce, this is the nucleus of the solution, the part of the block that entitles the miner the transaction fee.
  2. A reference to the previous block - this is required in order to be able to track the history of all transaction, each block refers its predecessor, this way one can go back in history till the first block (You can track the transactions history at blockchain.info)
  3. A list of all transactions to be processed if this block is appended to the block-chain.

In the figure below you can see these 3 properties: the nonce (in the last yellowed row), the reference (‘previous block hash’), and the list of transactions in greyed rows (the highlighted right hand side of the figure is explained soon).

Hash – The Puzzle of Bitcoin (What Are the Miner's Mining?) (3)

(image source:http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html)

As mentioned, the miners are looking for the correct nonce that would solve the puzzle. The hash puzzle described in the previous question was a specific list of characters that the machine has produced as an output, in order to solve it one needs to find an input that produces this specific output.

In the bitcoin system, however, the hash puzzle is somewhat easier: Instead of chasing after a specific output, the miner needs to find an input that produces an output from a big set of allowed outputs. That is, a puzzle could be a list of characters such that its first 16 characters are ‘0’ while there is no limitation on the rest of the characters, they could be anything. Although this makes the puzzle a lot easier, it is a time and energy consuming problem to solve. In the figure above, the miner performs many trials in order to solve the puzzle, the only field that is permitted to be changed in each trial is the nonce. In every trial, the miner combines the nonce that it just chose, the list of transaction that it wished to add to the block-chain and the reference to the previous block all together, it then input it to the SHA1 machine. If the output of the SHA1 machine begins with 16 ‘0’ characters then it solved the puzzle and won the game.

Hope you enjoyed reading, see you in the next post!

Hash – The Puzzle of Bitcoin (What Are the Miner's Mining?) (2024)

FAQs

What are the puzzles Bitcoin miners solve? ›

Mining transactions are validated digitally on the bitcoin network you use and add to the blockchain ledger. It is done by solving complex cryptographic hash puzzles to verify blocks of transactions updated on the decentralized blockchain ledger.

What is the Bitcoin mining math puzzle? ›

What is the bitcoin mining math puzzle? At the heart of bitcoin mining is a math puzzle that miners are supposed to solve in order to earn bitcoin rewards. The puzzle is called proof of work (PoW), a reference to the computational work expended by miners to mine bitcoin.

How do you solve a hash puzzle? ›

The puzzle is essentially a word (list of characters), call it A, which represents the machine's output, in order to solve it your task is to find the the correct input (another word), call iti B, such that when you put B into the machine you will get A as an output.

What are miners hashing? ›

The resulting encrypted value is a series of numbers and letters that do not resemble the original data and is called a hash. Cryptocurrency mining involves working with this hash. Hashing requires processing the data from a block through a mathematical function, which results in an output of a fixed length.

How do you win the Bitcoin lottery? ›

It couldn't be simpler to bet on the Bitcoin lotto; all you have to do is pick 6 numbers (you can even do a QuickPick) and submit your bet. What's more, there's an incredible overall 1-in-7 chance of winning a prize. You'd be mad to miss out!

What is the (!) Full (!) miners reward for every mined Bitcoin block at this moment? ›

Each halving reduces the rate of inflation and, as a result, pushes the Bitcoin price upward. As of 2022, Bitcoin miners, or people who use their computers to participate in Bitcoin's blockchain network as a transaction processor and validator, are awarded 6.25 bitcoins (BTC) for each block they successfully mine.

What is Bitcoin Mcq answer? ›

Detailed Solution

The correct answer is Cryptocurrency. Bitcoin is built on Blockchain technology. Bitcoin is a digital or virtual currency that uses peer-to-peer technology to facilitate instant payments.

What are the Bitcoin questions? ›

Bitcoin CryptoCurrency Interview Questions
  • What do you mean by Bitcoin Mining? ...
  • What is the difference between Blockchain and Banking Ledgers? ...
  • How is Bitcoin Purchased? ...
  • What do you mean by Double Spending? ...
  • Who developed Bitcoin? ...
  • Should we perceive it as important? ...
  • What do we mean by hard limit? ...
  • Can we sell Bitcoins?

Who comes up with the Bitcoin puzzle? ›

The Bitcoin puzzle belongs to crypto artist Marguerite deCourcelle, and she's celebrating her puzzle being solved after nearly three years. "He's a very brilliant man," deCourcelle told As It Happens host Carol Off about the programmer who cracked her puzzle.

How does the hashing trick work? ›

It works by applying a hash function to the features and using their hash values as indices directly, rather than looking the indices up in an associative array. This trick is often attributed to Weinberger et al. (2009), but there exists a much earlier description of this method published by John Moody in 1989.

Can I decode hash code? ›

No, you cannot decode hashes. A hash is a one-way (almost unique) representation of a piece of data. You could use rainbow tables, brute-force or dictionary attacks on the hashes to recover the unencrypted password.

Can you crack a hash code? ›

The simplest way to crack a hash is to try first to guess the password. Each attempt is hashed and then is compared to the actual hashed value to see if they are the same, but the process can take a long time. Dictionary and brute-force attacks are the most common ways of guessing passwords.

What are the 3 types of hashing? ›

Types of Hashing

There are many different types of hash algorithms such as RipeMD, Tiger, xxhash and more, but the most common type of hashing used for file integrity checks are MD5, SHA-2 and CRC32. MD5 - An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.

What is a hash function Mcq? ›

A hash function is used to derive the physical location of a record. Explanation: Search condition in this is a equality condition on a single field called hash field. Hash field is a key field of the file in which case it is called hash key.

What is a miner in blockchain mcq? ›

What is a miner? A type of blockchain. An algorithm that predicts the next part of the chain. A person doing calculations to verify a transaction. Computers that validate and process Blockchain transactions.

Is there any trick to win lottery? ›

Spend money on buying more tickets:

It's always better to form a syndicate, but if you want to keep the full price yourself, buy more tickets. More tickets, more lottery numbers, leads to more chances of winning. Try to record how much you are investing in the lottery and if you will get a price back.

Which lottery is easiest to win? ›

The lottery with the best odds in the world, for a major jackpot, is the Spanish Christmas Lottery, known as El Gordo ('The Fat One') at the outstanding odds of 1 in 100,000. However, this lottery is actually more like a raffle.

What are the 9 Ways to Win the lottery? ›

What are the nine prizes for the Powerball?
  • 1 number plus the Powerball – still $4. ...
  • 2 numbers plus the Powerball - $7. ...
  • 3 numbers - $7 again. ...
  • 3 numbers plus the Powerball - $100. ...
  • 4 numbers - $100. ...
  • 4 numbers plus the Powerball - $50,000. ...
  • 5 numbers - $1 million.

What will happen when 100% of Bitcoin is mined? ›

When all bitcoin have been mined, miner revenue will depend entirely on transaction fees. The price and purchasing power of bitcoin will adjust to the lack of new supply. The scarcity of Bitcoin will make it more attractive to investors and users.

What is the current amount that Bitcoin miners receive? ›

Bitcoin Miner Payment= Block Reward + Transaction Fees

At present, Bitcoin miners are awarded 6.25 Bitcoins for every block that is added on a Bitcoin blockchain network.

How do Bitcoin miners get paid? ›

If a miner is able to successfully add a block to the blockchain, they will receive 6.25 bitcoins as a reward. The reward amount is cut in half roughly every four years, or every 210,000 blocks. As of September 2022, Bitcoin traded at around $20,000, making 6.25 bitcoins worth $125,000.

What is a bitcoin blockchain Mcq? ›

A blockchain is “a distributed database that maintains a continuously growing list of ordered records, called blocks.” These blocks “are linked using cryptography. Each block contains, A cryptographic hash of the previous block, A timestamp, and. Transaction data.

What is bitcoin simple answer? ›

Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin's creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.”

What is bitcoin Class 9? ›

Bitcoin is a cryptocurrency developed by an unknown person or a group of unknown persons using the name Satoshi Nakamoto. It was first used in 2009 after being released as an open-source software. The bitcoin record uses Blockchain technology.

What are the 3 types of Bitcoin? ›

Answer: The four major types include utility, payment, security, and stablecoins. There also are DeFi tokens, NFTs, and asset-backed tokens. Of all cryptocurrencies, the most common are utility and payment tokens. These do not have their investment-backed or guaranteed by regulation.

Is Bitcoin money yes or no? ›

Simply put, bitcoin is a digital currency. No bills to print or coins to mint. It's decentralized -- there's no government, institution (like a bank) or other authority that controls it.

What are 4 benefits of Bitcoin? ›

Advantages of Bitcoins:
  • Protection From Payment Fraud. Bitcoins are digital currencies. ...
  • Reduced Possibility of Identity Theft. Bitcoin transactions are completely anonymous. ...
  • Immediate Settlement. ...
  • Direct Transfer. ...
  • Greater Liquidity. ...
  • International Transactions. ...
  • Independent. ...
  • Security.

Who created the 21 million Bitcoin? ›

One of the many mysteries surrounding the creation of Bitcoin is why the total supply is restricted to 21 million. There are a number of theories as to why Bitcoin creator, Satoshi Nakomoto, chose 21 million.

Who is the real real founder of Bitcoin? ›

Key Takeaways. Satoshi Nakamoto is the pseudonym used by the creator or creators of Bitcoin. The identity of Satoshi Nakamoto is not publicly known. One of the first major public investigations ended with Dorian Nakamoto being identify as Bitcoin's creator, but he continues to decline the claim.

Who is the guy who owns Bitcoin? ›

Satoshi Nakamoto
Born5 April 1975 (claimed) Japan (claimed)
NationalityJapanese (claimed)
Alma materCalifornia State Polytechnic University, Pomona (claimed)
Known forInventing bitcoin, implementing the first blockchain
3 more rows

What is the formula for hashing? ›

With modular hashing, the hash function is simply h(k) = k mod m for some m (usually, the number of buckets). The value k is an integer hash code generated from the key. If m is a power of two (i.e., m=2p), then h(k) is just the p lowest-order bits of k.

What are the fastest hash methods? ›

And so we have the non-cryptography hashing methods, and which are often ultra-fast and highly efficient. To show the difference, in a test, SHA-1 — one of the fastest cryptography hashing methods — managed a processing rate of 364.95 MiB/s, while t1ha was nearly a 100 times faster, at 34,636 MiB/s.

How do hackers find hashes? ›

The problem is that the hashes still have to be stored, and anything that is stored can be stolen. Hackers could get the password hashes from the server they are stored on in a number of ways. These include through disgruntled employees, SQL injections and a range of other attacks.

What is secret key in hash? ›

A private key, also known as a secret key, is a variable in cryptography that is used with an algorithm to encrypt and decrypt data. Secret keys should only be shared with the key's generator or parties authorized to decrypt the data.

How many types of hash are there? ›

Some common hashing algorithms include MD5, SHA-1, SHA-2, NTLM, and LANMAN. MD5: This is the fifth version of the Message Digest algorithm. MD5 creates 128-bit outputs. MD5 was a very commonly used hashing algorithm.

What hash code is gold? ›

CSS Color Names
Color NameHex Code RGBDecimal Code RGB
OrangeFFA500255,165,0
Yellows
GoldFFD700255,215,0
YellowFFFF00255,255,0
51 more rows

How long would it take to crack a 7 digit code? ›

A seven-character complex password could be cracked in 31 seconds, while one with six or fewer characters could be cracked instantly. Shorter passwords with only one or two character types, such as only numbers or lowercase letters, or only numbers and letters, would take just minutes to crack.

How long does it take to crack a 5 digit code? ›

If a password is only four or five characters (whether they are just numbers or a combination of numbers, letters and symbols), there's a very high chance that it will be hacked instantly. However, if a password is only numbers and up to 18 characters, it could take a hacker up to nine months to crack the code.

How long would it take to crack an 8 digit code? ›

The findings suggest that even an eight-character password — with a healthy mix of numbers, uppercase letters, lowercase letters and symbols — can be cracked within eight hours by the average hacker.

What are the 3 main properties of hash function? ›

In particular, cryptographic hash functions exhibit these three properties:
  • They are “collision-free.” This means that no two input hashes should map to the same output hash.
  • They can be hidden. It should be difficult to guess the input value for a hash function from its output.
  • They should be puzzle-friendly.

What type of hash is Bitcoin? ›

How does Bitcoin's hash rate work? The SHA-256 cryptographic hashing function, which converts any input data into a 256-bit string (the hash), is one of the technologies using which Bitcoin measures its hash rate.

What is hashing with example? ›

Hashing is an important data structure designed to solve the problem of efficiently finding and storing data in an array. For example, if you have a list of 20000 numbers, and you have given a number to search in that list- you will scan each number in the list until you find a match.

What is hash table MCQS? ›

Explanation: A hash table is used to implement associative arrays which has a key-value pair, so the has table maps keys to values. ADVERTIsem*nT.

What are the functions of hashCode () method? ›

The hashCode() method is defined in Java Object class which computes the hash values of given input objects. It returns an integer whose value represents the hash value of the input object. The hashCode() method is used to generate the hash values of objects.

What are hash functions and types? ›

Hashing is the process of generating a value from a text or a list of numbers using a mathematical function known as a hash function. A Hash Function is a function that converts a given numeric or alphanumeric key to a small practical integer value. The mapped integer value is used as an index in the hash table.

What is a miner answer? ›

A miner is a person who works underground in mines in order to obtain minerals such as coal, diamonds, or gold.

What are bitcoin miners? ›

Bitcoin mining is the process by which Bitcoin transactions are validated digitally on the Bitcoin network and added to the blockchain ledger. It is done by solving complex cryptographic hash puzzles to verify blocks of transactions that are updated on the decentralized blockchain ledger.

What is data mining model Mcq? ›

Explanation: data mining is a process of mining of knowledge from data or extracting information from a large collection of data. It also involves several other processes like data cleaning, data transformation, and data integration. 14.

Why do Bitcoin miners solve math problems? ›

In order to confirm the Bitcoin transaction, the miner has to solve a complex cryptographic puzzle, and by solving it, he/she proves mathematically whether the transaction is valid or not. The process of trying numerous solutions until you get the right one is known as Proof of Work (PoW).

What are cryptographic puzzles? ›

A cryptogram is a type of puzzle that consists of a short piece of encrypted text. Generally the cipher used to encrypt the text is simple enough that the cryptogram can be solved by hand. Substitution ciphers where each letter is replaced by a different letter or number are frequently used.

How bitcoin mining works? ›

Bitcoin runs on a decentralized computer network or distributed ledger that tracks transactions in the cryptocurrency. When computers on the network verify and process transactions, new bitcoins are created, or mined. These networked computers, or miners, process the transaction in exchange for a payment in Bitcoin.

How many Bitcoins are left? ›

There are 2.3 million Bitcoin left to be mined. Surprisingly, even though 18.6 million Bitcoin were mined in just over 10 years, it will take another 120 years to mine the remaining 2.3 million. That's because of the Bitcoin halving.

Why is it so hard to mine a bitcoin? ›

In the early days of Bitcoin, anybody could simply run a mining program from their PC or laptop. But as the network got larger and more people became interested in mining, the mining algorithm became more difficult. This is because the code for Bitcoin targets finding a new block once every 10 minutes, on average.

What is a cryptographic hash puzzle? ›

A cryptographic hash function is a mathematical function used in cryptography. Typical hash functions take inputs of variable lengths to return outputs of a fixed length. A cryptographic hash function combines the message-passing capabilities of hash functions with security properties.

What are the two types of puzzles? ›

There are different genres of puzzles, such as crossword puzzles, word-search puzzles, number puzzles, relational puzzles, and logic puzzles.

What are the four types of puzzle? ›

Puzzles are usually grouped together into four groups: logic puzzles, word puzzles, mechanical puzzles, and other puzzles.

Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 6090

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.