Describe hash functions with your own words
A hash function is a one way function, a hash function input of any size produces a unique digital output /fingerprint that is always the same fixed length.
How are hash functions used in cryptocurrencies like bitcoin?
Hash functions are part of the block hashing algorithm which is used to write new transactions (proof of work) into the blockchain through the mining process which ultimately produces a new block reward.
What does it mean when we say that hash functions need to be collision resistant?
If 2 different inputs hashed to the same output then they would collide and not be collision resistant. SHA 256 used in bitcoin is more collision resistant than for example SHA 128.
-
Describe hash functions with your own words
A complex computation of an input that results in a unique output like a fingerprint. It is however infeasible to take an output and find the input. -
How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
Hash functions are used in mining bitcoin. Blocks, where transactions are recorded, are hashed together so that the previous block is compounded into the subsequent block. -
What does it mean when we say that hash functions need to be collision resistant? (We didnāt use the term ācollision resistantā in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, thatās how you learn best). It means that it is not feasible to find 2 different inputs that result in the same output. Not impossible but highly infeasible.
- A Hash Function outputs a unique numeric string, a signature, representing the input.
- a) Prevents double spending.
b) Provides anonymity.
c) Provides security - The term āCollisionā refers to duplicate Hash outputs.
It is important to prevent duplication of āsignaturesā for security, authenticity, and validity of
Hashed data.
A hash function is the algorithm between the input and output. You can find an output using the input, but you canāt use an output to find an input.
These are not my own words,but from the article I think that this is the nut of it:
The blockchain is a linked list that contains data and a hash pointer that points to its previous block, hence creating the chain. What is a hash pointer? A hash pointer is similar to a pointer, but instead of just containing the address of the previous block it also contains the hash of the data inside the previous block
The term collision resistant refers to when two different inputs get the same outputs. Its very improbable that this would happen. Whats more is that if his did happen, the block with the longer chain would win. If the blocks were the same length, (which is very unlikely) the block that got the next new block first would win.
-
Describe hash functions with your own words
A: Each unique Input give a unique output and for cryptocurrencies, it is a one-way function⦠you can not got from output to input. Hash function is any algorithm that maps data of arbitrary length to data of a fixed length. -
How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
A: In the bitcoin protocol, hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process. -
What does it mean when we say that hash functions need to be collision resistant? (We didnāt use the term ācollision resistantā in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, thatās how you learn best).
A: Collision resistance is a property of cryptographic hash function a hash function H is collision resistant if it is hard to find two inputs that hash to the same output.
Homework on Hash Functions - Questions
- Describe hash functions with your own words
Hashing is the process of taking an input of any length and performing a mathematical function on it to produce an output of a fixed length. - How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
Hashing functions help condense the information into a fixed length. Instead of remembering a huge amount of information then you just remember the hash. In this case you are remembering the hash of the previous block, which points the the previous one before that etc⦠all the way back to the genesis block. - What does it mean when we say that hash functions need to be collision resistant? (We didnāt use the term ācollision resistantā in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, thatās how you learn best).
Collision resistant hash functions mean that it is highly unlikely to find two hashes which have different inputs but produce the same output
- Hash functions are a one way cryptographic algorhythm that will produce a random 256 bit output string from any character string used as input. It is near impossible to determine the input string from reading the output string.
- Hash functions are used in crypto currencies to scramble data which provides a high level of security & integrity to the system. Combining transaction & ID data then hashing them creates a unique finger print of the transaction that is basically tamper proof & ideally suited to the exchange of value system that crypto has become.
- Hash functions need to be collision resistant in order to reduce the possibility of 2 inputs arriving at the same output.
Homework on Hash Functions - Questions
-
Describe hash functions with your own words
It generates out of a unique input a unique output. -
How are hash functions used in cryptocurrencies like bitcoin?
For bitcoin, miners are verifying all new transactions -
What does it mean when we say that hash functions need to be collision resistant?
that two different inputs should not give the same output
- Describe hash functions with your own words
Tool designed to take a string of any length as input and produce a fixed-length hash value.
- How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
Instead of remembering the input data, you can just remember the hash and keep track
Mining
Creation of Addresses
- What does it mean when we say that hash functions need to be collision resistant? (We didnāt use the term ācollision resistantā in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, thatās how you learn best).
Every hash algorithm produces some amount of Output from large Input and is guaranteed that some Input will hash to the same Output. So simply collisions exists but they are hard to find.
-
Hash functions convert data into a hash number. The data has a unique hash number like a finger print and it will always be the same. It is easy to verify. You can go from data to hash but you cannot go from hash to data. It is one directional.
-
Hash functions are used in private keys to sign transactions. They are also used on the blockchain to encrypt the data of each block and the hash of the previous block will be placed in the subsequent block.
-
Collision resistant means it is really really hard (near to impossible) to get the same hash from two different inputs.
-
Hash functions are functions encrypting text/numerical data, giving a unique output for each unique input.
-
SHA-256 Hash functions must be deterministic, efficient computation, pre-image and collision resistant. This means itās near impossible to work out the targeted input from a given targeted output.
-
Collision resistant - meaning that it is highly unlikely and improbable that two hashed outputs would be the same.
-
Describe hash functions with your own words
Generating a value from a string of text using a mathematical formula. Good for security as you can send messages to specific people that canāt be tampered with. -
How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
One way function gives outputs, but you canāt go back and get inputs, so immutable and helps create the blocks. -
What does it mean when we say that hash functions need to be collision resistant? (We didnāt use the term ācollision resistantā in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, thatās how you learn best).
There is a really low probability of two inputs generating the exact same hash.
-
They are a cryptographic way to transform one input into a unique output or digital fingerprint.
-
They are used in mining new Bitcoin transactions, its used mainly in the proof of work method by making the miners add data till the output matches a certain number of zeros.
-
It means that its difficult to be able to find 2 inputs that hash to the same output.
-
A hash function takes a string of text of any length and using a mathematical function converts it into a unique fixed length output, the operation goes in one direction meaning it is infeasible to work out the input from the output.
-
They are used in order to overcome the problem of carrying on all the data from previous blocks on the chain which will create a very large block size causing storage limitations and makes it extremely time consuming to verify data on the blockchain, instead a hash function of the previous data is carried on to each new block making it possible to verify data continuity and integrity without creating whole new copies.
-
it means the function needs to be able to produce unique outputs for unique inputs, not allowing for two different inputs to create the same output, while so far we donāt have functions that are 100% collision free the probability of a collision is extremely unlikely making it infeasible to arrive to such a scenario.
-
A Hash function takes a data set and maps it to a fixed length ( normally smaller ) value, normally a alphanumeric string
-
In cryptocurrencies hash functions are used to validate transactions using proof of work and
to maintain immutability. Bitcoin uses a SHA-256 hash which creates a unique output for every input. It is almost computationally infeasible to decrypt the input by using the output of the hash which makes it very secure. -
Collision resistant means that no two inputs will hash to the same output. It does not mean that a collision will not occur but that they are very improbable.
Hi @Raphael_VON_GAL,
Thanks for the kind words in your last post! The answer @Fabrice gave is spot on. Pre-image resistance is just a property or feature of a hash function. It just means you canāt practically take any part of the resulting hash to decipher the original input.
Keep up the great work!
Hi Chris!! Maybe what you mean is that the same input always generates the same output?
And how do miners use hash functions?
Correct! but how are they used in cryptocurrencies?
- A Hash function takes a set of data of any size and turns it into a unique string of numbers of a set length.
- Hash functions contain unconfirmed transactions as well as other information like a time stamp and they are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.
- When we say that hash functions need to be collision resistant we mean that the chance of two separate inputs generating the same hash is highly unlikely.
Thank you for questioning my answers.
I meant that taking an input of any length and giving out an output of a fixed length, through hashing. So the input can be different in length and will come out in a fixed length.
However the same input should always get the same output. Otherwise itās not possible to track the input.
So the miners collect the new transactions into a block. Then they hash the block to make it the fixed length it requires to form a 256-bit block hash value in case of Bitcoin.
However, they are not successful most of the time. So they have to amend the input slightly and hash it again and againā¦