- Hash functions are special functions. The output is the unique fingerprint of the input. You can get the output by setting the input but never the other way around. You cannot go from output to input at all as this is not possible and moreover if it was possible it would break Bitcoin.
- How are hash functions used in cryptocurrencies like bitcoin?
Hashing means taking an input string of any length (a huge text or a big amount of data for example) and getting an output of a fixed length. Applying this to BTC, the transactions are the input. After running them through a hashing algorithm such as SHA-256 you receive a fixed output of 256bits. This is practical as a possibly huge input results in a relatively short output and instead of having to remember the big amount of input you can simply remember the output which is the hash. Also you can verify if any changes were made to the input by looking at the hash as the tiniest change in the input data leads to a different hash.
- What does it mean when we say that hash functions need to be collision resistant?
Collision resistant means that two different Inputs A and B will most of the times lead to two different outputs/unique hashes H(A) and H(B) where H(A) does not equal H(B).
Homework on Hash Functions - Questions
1. Describe hash functions with your own words
Hash functions takes any string of data and converts it into 256 bits. This process is impossible to reverse and provides a unique identifier for your data.
2. 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).
They are used to create digital signatures and unique fingerprints to the data inside each block.
3. 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).
Means that there canāt be no chance to have 2 different inputs generating the same output hash. When this happens it is called a collision.
- A Hash Funktion transforms a unique input into a unique output through a complicated calculation. One cannot deduct the Input based on the hashed output.
- Hash funktions are used to hash the hashed data of a previous block of the blockchain together with the new transactions added to the current block, so a change to any block in the blockchain would change completely the hash value of any following block. This would be immediately detected and stopped, making the blockchain immutable.
- It is infeasible that two different inputs have the same output. It is very improbable.
- Hash functions are one way functions. One way functions where every unique input generates a unique output.
- Hash functions are used in bitcoin by the SHA 256 hash functions. The unique inputs are the unconfirmed transactions.
- Hash functions need to be collision resistant because when you insert a unique input you have to have a unique output for the hash function to work properly.
- Describe hash functions with your own words
Hash functions are one way functions where it hashes an input (any string of data) and produces a unique output (like a fingerprint) through SHA-256 converting the data to 256 bits.
- 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 in Bitcoin are used to write new transactions on the blockchain through mining. To solve a block, miners combine all of the inputs with their own input data to produce a hash that 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).
Collision resistant means that is infeasible for different inputs to produce the same output. Though it is easier to break collision resistance than it is the pre-image resistance, the likelihood of the former happening is still very low.
A1: Hash function is a special type of functions, it gives a unique output a so called fingerprint to a unique input. The input cannot be derived from the input.
A2: With cryptographic currencies, hash functions are used to encrypt a transaction. This is done so that the current transaction is encrypted along with any previous transaction. In this way, the block chain cannot be modified unless the entire chain is modified, which makes the currency very secure.
A3: The probability to create the same hash for different inputs for the same input should be nearly zero.
- Hash functions take input data of any size and produce unique output data of a fixed size.
- They are used to write new transactions into the blockchain through mining.
- Difficult to find two inputs that produce the same unique output.
- Describe hash functions with your own words
ā The Hash function takes an input and generates a digital output which is a unique identifier and cannot be reversed to get back to the input from the 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).
ā hash functions are part of the **block hashing algorithm, SHA 256, 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).
ā collision-resistant ensures that it has to be impossible for two different inputs to produce the same output
- Hash functions are functions that take a unique input and produce a unique output.
- Hash functions are used in Bitcoin to create unique digital fingerprintes of transactions that get recorded onto a block and the block adjacent to it and they maintain a chain of unique signatures that maintain the integrity and immutability of the block chain.
- Collision resistance is a desirable property of hash functions that prevents two unique inputs to ācollideā and come up with the same output. It is not very likely with SHA256.
- Describe hash functions with your own words
Hash function is a function that puts an unique input in an unique output (fingerprint)
- 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 in cryptocurrencis are used for hashing (encrypting) the transaction data in a 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).
[/quote]
Collision resistant means that itās infeasible to find 2 inputs that give the same output.
- Describe hash functions with your own words
A hash function is an algorithm that outputs an alphanumerical sequence of digits that is unique to to the input but makes it very hard to find the input that the output is derived from.
- How are hash functions used in cryptocurrencies like bitcoin?
Hash functions in bitcoins blockchain are used to take the Unique data from each block and produce a hash that chains the next block to the previous one making it extremely hard to go back and find the input that created the previous 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 mean that two inputs may be different value by themselves but when both are combined As hash functions they can produce the same exact output. Fascinating.
But Sha256 is relatively collision resistant. 2^256 is such a huge number that it is practically almost impossible that 2 different inputs would produce the same hash
1. Describe hash functions with your own words.
Hashing means taking an input string of any length and giving out an output of a fixed length. In the context of cryptocurrencies like bitcoin, the transactions are taken as input and run through a hashing algorithm (bitcoin uses SHA-256) which gives an output of a fixed length.
2. How are hash functions used in cryptocurrencies like bitcoin?
Hashes are used to link the blocks together in the blockchain. They are also used to set the difficulty level in the mining process as the hash rate must remain constant and not dependent on processing power.
3. What does it mean when we say that hash functions need to be collision resistant?
Collision resistant means that the hash of two independent inputs should not be the same. If it is then a collision has occurred.
-
A function that takes in some data and outputs a hash value that is pretty much unique and canāt be reverse engineered.
-
Bitcoin uses the SHA-256 hashing algorithm to hash the contents of a block concatenate it with a nonce (a random string value) hash it again and then compare it with a difficult level to determine whether to add it to the blockchain if less than or to repeat the process until it is. This is the mining process.
-
Collision Resistant in terms of hash functions means that for each input the resulting hash should be unique thus it shouldnāt be possible for multiple inputs to result in the same hash value (collide). Itās not impossible (especially with the beginning of quantitative computing) but for now is infeasible.
- It is a math algorithm that maps data with an arbitrary length to data with a fixed length.
- It is used for mining blocks
- Two inputs cannot generate the same outputs
Thatās some very impressive answers.
- Itās a one-way function that produces a digital fingerprint.
- They are used for Bitcoin security, If you break SHA256, you break Bitcoin.
- Colision resitant: It is pretty close to impossble to get similar hash function to similar imputs, even if you put in two sentences the same, one with a full stop and one without, these two would almost certainly produce very different hash functions.
- Describe hash functions with your own words
A function that takes a value and turns it into a new value. It is reproducible (every time you enter a specific value you will get the same value) And any change to the input value radically changes the output 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).
They take the information given in the previous block and Hash it so that it has a specific finger print which is stored in the subsequent block. That way no one can change the previous blocks because it would change the Hash output entirely.
- 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).
That although possible, they are unlikely to have 2 distinct inputs result in the same output. It should be extremely infrequent.
- Hash functions create unique output based on the input it receives.
- Hash functions are used in bitcoin to track all transactions that enter the blockchain. In order for a transaction to be added to the blockchain, bitcoin miners use computing power to hash the function to find a match thatās confirmed with the network as verified.
- Collision resistance means itās improbable to find two different inputs that produce the same output.