Homework on Hash Functions - Questions

[quote=“ivan, post:1, topic:8430”]
Describe hash functions with your own words In simple terms, hashing means taking an Input string of any lenght and giving out an ouput of a fixed lenght
How are hash functions used in cryptocurrencies like bitcoin? In the context of cryptocurrencies like Bitcoin, the transaction are taken as Input and run through a hashing algorithm ( Bitcoin use SHA-256) which gives an Output of a fized lenght.
What does it mean when we say that hash functions need to be collision resistant? Reducing the chance of having two different Input that will result of as same Output, Nearly infeasible.

1 Like
  1. Describe hash functions with your own words

It is a one way function that gets an input, and in line with its own logic, converts it to a unique output (which cannot be reversed).

  1. 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).

When a new block is added, the hashing of the old block is added to the new block and then this is hashed together.

  1. 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 must be very hard, not impossible, to find two inputs that produce the same output.

1 Like

1.When there is a file,text,information etc. given at the entrance of a hash function, the properties of the output must be:

-always the same everytime we put in the same input;
-it must be calculated very fast;
-the output can not lead to the input in any kind of way;
-a small change in the input makes a huge difference for the output.

In the blockchain of Bitcoin we can find different structured blocks of information. The hash functions make it possible to make the data from the previous block related to the next block. if something changes in the previous block the hash of the next block won’t be the same as it was before.We only can accomplish this if the hash function creats a unique fingerprint of the input.

It must be possible in the hash function to asume that the output of 2 different inputs won’t deliver the same output. For the most part we can assume that they will be different, it is infeasible that they are the same. It would take so much time to find an input with the same output as the first input, that it is delivering the perpous it has to serve.

1 Like
  1. Describe hash functions with your own words

2 You take an input and run it through a ‘hash generator, e.g. sha-256 and it will create a unique fingerprint which cannot be reversed. That is why it is called a one-way function.

How are hash functions used in crypto-currencies like bitcoin?
Hash functions work creating addresses, private and public keys. Transforming transactions which can be recorded as hashes in a ledger. Popularly used in Bitcoin mining.

3 What does it mean when we say that hash functions need to be collision resistant?
Each input is transformed to unique output and probability of two different inputs transforming to same output is infeasible if not impossible.

1 Like

1 Describe hash functions with your own words
A: a hash function is when an unique input get’s a unique output (like a fingerprint for that input)

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).
A: the hash functions in Bitcoin and similar cryptocurrencies are used to create the blocks in the blockchain. Each block gets its unique output.

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).
A: collision resistant means that the probability of two outputs being the same is extremely low (but not impossible). With SHA-256 the chance that two outputs are the same is nearly non-existant.

1 Like

Q1A. Hash functions are one way digital functions that an input will give a repeatable output but the input cannot be determined from the output.
Q2A. In simple terms, 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. Taken from Google search.
Q3A. A hash function H is collision resistant if it is hard to find two inputs that hash to the same output; that is, two inputs a and b such that H = H, and a ≠ b. Every hash function with more inputs than outputs will necessarily have collisions. Also taken from Google search.

1 Like

Yeah, I know you know :wink:

  1. Describe hash functions with your own words

A special type of functions that create unique output from an input provided - like an unique fingerprint

  1. 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).

Using hash function SHA-256 the unique set of string input is transmuted into unique output on a block creating set of block - blockchain

  1. 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 would be nearly impossible to find two inputs that hash to the same output

1 Like

1.Describe hash functions with your own words.
Each unique input gives a unique output. Each unique input has digital fingerprint that cannot be reversed. The slightest change to the input will change the hash fingerprint.

  1. 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. Hash function used in Bitcoin can take a sequence of letters of any length, whether a single letter, word, phrase, or entire file and produce an output, always the same length. Any change to the input will change the output.

  2. 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. It means that there is only one output for an input. It is collision resistant if it is hard to find two inputs that hash to the same output.

1 Like
  • Describe hash functions with your own words. A hash funtion is used to create a single fingerprint to a piece of data - there´s an input ( data) and when you hash it, it creates an output that is unique. Any slight modification to the data will create a totally different output. It´s a way to secure and protect the data.

  • How are hash functions used in cryptocurrencies like bitcoin? 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. The input consists of a series of transactions and references to the previous block, and so, the miners, to solve a block combine all the input data with their own trying to obtain an output with certain characteristics.

  • What does it mean when we say that hash functions need to be collision resistant? Collision occurs when there are two identical outputs as a result of different hashing algorithms, this hugely compromises data security No hash function is completely collission resistant, but the possibilities of collision or breaking it with the SHA256 are almost impossible.

1 Like
  1. Describe hash functions with your own words
    A hash function is a mathematical equation used to process given input data of any size and returns that output data to a specific or set size.

  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).

In regards to Bitcoin,hash functions are a part of the block hashing algorithm, which is used to write new transaction into the blockchain through the mining process.

  1. 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 is when two separate inputs produce the same hash output. If a hash function is to be collision resistant, it is to say that a collision between two separate inputs in a hash function should not occur or so difficult to find that it doesn’t matter, thus being resistant.

[

1 Like

1.Describe hash functions with your own words
Every unique input has a unique output

  1. How are hash functions used in cryptocurrencies like bitcoin?
    POW

  2. 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 we don’t have two same hashfunctions, that wil lead to more collision. And therefore unreliable and devastating to the chain.

  1. Getting a value from an input using a function.
  2. It’s used to write new transactions into the blockchain through mining.
  3. Hard to find 2 inputs that has to the same output.
1 Like
  1. Hash functions have a unique input that will produce a unique output.

  2. Hash functions are used for hash data. Mining, block signatures, verifying transactions (spent and unspent), and encrypting data are ways hash functions are used in Bitcoin.

  3. no two inputs will equal the same output

1 Like

Hi,
1, It takes an input of any length and gives back it to an output of fixed length using math function.
2, Hash function is used in blockchain technology and together they make bitcoin possible. There is a block created every avg. 10 minutes, then we add transactions + hash of the previous block and hash it> which will create a new hash. Because we know that if we change literally anything in input we want to hash it will result in a completely new hash ( and subsequently changes all hashes afterward)
3, Collision resistance- every original input should have its own original output. Chance to have 2 inputs share the same output should be as small as possible. If its resistant than a chance for this to happen is very unlikely.

1 Like

The Hash function is a mathematical function that converts to an absolute mathematical unique digital fingerprint.
Hash functions are used in the mining process when new transactions are written to the blockchain.
it is almost impossible to create an output the same without knowing the input thus creating a collision resistent cryptography

  1. a hash function creates an output/result from some input. From the output, its not possible to reverse-calculate the input. Its a one-way function/calculation. Technically input and output are numbers, but as all digital content can be represetented as numbers (one and zeros), it works for any input

  2. Its used to verify the integrity of a message and it’s sender/creator by signing the message content. This is done by (very secret and very long) private key and public keys, that are derived from the private keys.

  3. It means, that different input should create different (unique) output. So, no 2 input values shall create the same output value. If 2 input values create the same output, this is a collision.

  1. Hash functions are functions that take an input and return a random fixed length output. Hash functions are pretty unique in that the function cannot be reversed, that is you cannot get an output of a hash function and be able to determine the input.

  2. Hash functions are used in bitcoin for mining, primarily, but has other uses in the bitcoin blockchain as well.

  3. Collision resistant hash functions are hash functions that give a unique answer for each input.

1 Like
  1. Hash functions are mathematical functions that work on a their given input and turn it in an output produced by using a specific procedure in the process. The output produced will have a fixed length. It is almost impossible to obtain the input used starting from the output, but if someone managed to crack the hash procedure and find out how it works, then the hash function would no longer be safe.
  2. Bitcoin’s Hash function, specifically SHA-256, works by taking transactions that have not yet been validated and hashing them before registering them on blocks. Then, once the block has reached maximum capacity they take the entire block and hash it too, so that the hash obtained will be inserted in the following block. This way, every new block contains all the hashed transactions that are under validation and the hash of the previously completed block, which is thus connected to the current one. This is why we refer to it as Block-chain, because every block is linked to its previous ones and to the one that will follow it.
  3. Hash functions are collision resistant because it is very hard (almost impossible) to find two inputs that once hashed produce the same output. It is a feature that is crucial in Blockchain because it prevents problems such as that explained in the so-called “Birthday Paradox”, which refers to the chance of finding more than one input for a given output. If Blockchains were not collision resistant it would be easier to try to “break” them by using brute-force, as the likelyhood of finding inputs from a same output would increase due to the possibility of having more than one input per output.
1 Like
  1. Describe hash functions with your own words
    hash function is a input of data where the out put is a fixed number of bits, and a non reversible digital fingerprint.

  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).
    it allows data to be encrypted and hidden from public view and cannot be reversed to find original information, it also converts data to fixed length.

  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).
    by increasing the output of a hash function to an astronomical amount of answers it prevents the possibility of two functions coming back with the same answer.

1 Like