-
it is a function that for each unique input it gives a unique output.
-
They are used to hash transactions after they have been completed.
-
A hash function is collision resistant when 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
a hash function is a mathematical process (algorithm) that takes input data of any size, performs an operation on it, and returns output data of a fixed size. Each unique input gives a unique output. This is a one way function.
- 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).
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.
In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).
Changing a small part of the input for a hash function results in a completely different output. This property is crucial to the āproof of workā algorithm involved in mining: to successfully āsolveā a block, miners try to combine all of the inputs with their own arbitrary piece of input data in such a way that the resulting hash starts with a certain number of zeroes.
- 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).
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
A Hash Collision Attack is an attempt to find two input strings of a hash function that produce the same hash result. If two separate inputs produce the same hash output, it is called a collision.
-
Hash functions take a document and give it a name known as a hash. A hash is a long sequence of numbers 0-9 and letters a-f.
-
Hash functions in bitcoin are the codes to send and receive bitcoin to and from transactions.
-
Hash functions need to be collision resistant so that two different inputs cannot create the same output.
1 Information cannot be understood by anyone except for those it was intended for and the information cannot be altered.
2 An important part is the mining process and the miners responsibility when they try to calculate new blocks using hash functions.
3 One unique input always leads to one unique output.
- Describe hash functions in your own words:
Hash functions are one way, irreversible functions where each input produces a Digital footprint.
- How are hash functions used in cryptocurrencies such as bitcoin?
hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process. In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions
- What does it mean when we say that hash function need to be collision resistant?
very simply put, a hash function is collision-resistant if it is hard to find two inputs that hash to the same output.
- Hash functions are very unique series of letters and numbers.
- They are used to create transactions data.
- It is very hard to find two inputs that hash to the same output.
-
a complex mathematical equation that takes an input and produces an output, based on that input. The output is in the form of a long numerical sequence called a hash.
-
a hash function is the part of the block hashing algorithm used to write new transactions into blockchain through the mining process
-
it is hard to find two inputs that hash to the same out put
-
Hash functions an encrypted unique inputs that produces a unique output. That is linear in the sense that you cannot go from Output to Input.
-
In crypto, hash functions can be the way passwords are stored.
-
It means that no attacker could duplicate an input to create the same output.
- Describe hash functions with your own words
Hash functions provide a unique, fixed-length string (hash value) that is like a āfinger printā of data [string, password, phrase, or file]. Which can be used to quickly compare and see if there was any change. Even the slightest change would produce a different hash.
This allows to confirm with a very high level confidence that there was not a change to the string if the hash is the same.
There are a variety of hashes cryptographic hash functions. They are deterministic, quick to create, unique and expected not to be reversable (or they could be vulnerable).
Or in other words the hash function is: (DUFCO)
-
Deterministic - given a input you always get the same output (hash)
-
Unique - Two similar inputs should not have similar hash outputs - āavalancheā one change significantly changes the other bits.
-
Fixed Output size - Hash functions output string (hash) should be the same size for all outputs.
-
Collision-resistant - meaning it should be large enough to avoid having any two different inputs and get the same output hash.
-
One-way - meaning you cannot reverse to get the original data. (cannot get the input from the hash value/output)
-
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).
The transactions are taken as a input and run through a hashing algorithm and results in a unique string than can be compared.
The block hashing algorithm which is used to write new transactions into the blockchain through the mining process
The inputs for the hash function are the most recent, unconfirmed transactions
And solving the hash for a bitcoin block, the hash needs to start with a given number of zeros (varies over time)
The blocks contain the hash of the previous block.
And transactions are approved through proof-of-work and consensus. -
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 can be collisions in SHA-256, but it is unlikely since it would be 2^256 + 1 and it is highly unlikely to hit this with SHA-2.
A collision would be when you have two different inputs, that the hash function puts out the same outut (hash value).
Frog ā> hash function -> hash_value1
Horse ā> hash function -> hash_value2
And hash_value1 == hash_value2, this would be a problem since the reference point (hash value/signature) would not be unique.
- There can be collisions in SHA-256, but it is unlikely since it would be 2^256 + 1 and it is highly unlikely to hit this with SHA-2.
-
1 - Function that produce a unique output or digital fingerprint. Cannot go from output to input. Unidirectional
2 - Security purpose. Easy to identify a transaction on the blockchain
3 - Impossible to produce the same output with two different inputs
Hash function is a one way function that produces a unique output. And is not reversible
Collision resistant mean that different inputs will always different outputs
Homework on Hash Functions - Questions
-
Describe hash functions with your own words - A hash function takes a string of data and converts it to the requested hash format. This is a one way process which means it is impossible to reverse it and see the inputs.
-
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). - By creating addresses, private and public keys. Transforming transactions which can be recorded as hashes in a ledger.
-
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). - They need to be collision resistant so that it is hard to find two inputs hash to the same output.
-
With functions You can have an input and an output, but you can also reverse it so you have the output and want the input. In Hash functions is that is basically a one way street. It is impossible to determine the input if you only have the output. Like a fingerprint. If you have a fingerprint you cannot produce a finger., but if you have the finger you can make as many fingerprints you like.
-
hash functions are part of the block algorithm which is used to write new transactions into the blockchain through the mining process. ā¦
-
When you say that something needs to be collision resistant it cannot have more inputs than outputs.
Sha256 is not used to derive public keys, for that the elliptic curve function is used.
There will always be more inputs (basically infinite) than possible outputs (2^256 for SHA256) therefore a hash function is bound to have collisions. Its just how probable it is to encounter a collision.
- Hash functions are mathematical functions where giving an input gives a unique output. Like a fingerprint.
- Hash function are used ( one of the pros) to keep the ledger secure because there is no way to figure out the input (data on ledger) from the output.
- Means that the hash functions need to be long enough to avoid having any two different inputs and get the same output hash.
-
Hash function is a function in which each unique input has one unique output. hash takes a string of data and converts it into another string of specified length
-
In BTC hashing is used to write new transactions into the blockchain through mining. All of the not-yet-confirmed transactions are used as inputs to the hash function. Miners combine that with their own inputs in order to achieve a hash value less than or equal the set difficulty. Once a small enough hash value is obtained the block is confirmed.
-
Collision resistant means it is hard to find to inputs that give you the same output for a hash function.
A hash functions takes a unique input and outputs a unique fingerprint. The function is one way only because you canāt go output to input . . . only input to output.
Bitcoin uses hash functions to secure the network and keep it decentralized. The nodes of the network use hash transactions on the blockchain called Proof of Work which is a energy intensive process called mining. The nodes work together to validate transactions and are rewarded in Bitcoin.
A unique fingerprint is required for each inputās output in order to keep the integrity of the ledger.
True, but collision resistance predicts there is a very small probability two inputs might result in the same output.
1 - Hash functions take an input if data and hash this data to produce an output - this output can be compared to a fingerprint as the output is totally unique. These functions are one-way in nature, meaning that an output can be determined using the input, however, it is impossible to determine the input using a hashed output.
2 - Hash functions are used in bitcoin during the process of mining blocks which are then added to the blockchain. Bitcoin uses the SHA-256 algorithm to secure the data on the blockchain. Hash functions are important as they enable the network to be uncorruptable as to be able attack the blockchain the hash of each block needs to be obtained, however, this requires exorbitant amounts of computational power, making it impossible to corrupt the network, and any changes to data on the block will change that blocks hash and the hash of every other block also.
3 - Hashing functions are collision resistant as they make it impossible to find 2 inputs that produce the same hash, and similarily it is impossible to find 2 outputs with the same input. Hashing functions are unable to be reversed, meaning an input cannot be obtained using the output. Hashing functions also randomly hash completely uncorrelated outputs should the input be changed in the slightest of ways.