Homework on Hash Functions - Questions

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

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

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

73 Likes

69 Likes
  1. Hash functions are one way functions where each input produces an output or digital fingerprint.
  2. Hash functions in Bitcoins are using in mining for new transactions on the blockchain. The inputs for the hash function are the unconfirmed transactions plus additional data related to time and the previous transaction. To solve the block miners try to combine all of the inputs along with data of their own so the outputs start with a bunch of 0’s. It takes a lot of computing power and guessing
    3.Collision resistance means that is very difficult to find 2 inputs that produce the same output in a hash function. This is an important property in cryptographic hash functions.
59 Likes
  1. A hash function 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. In Bitcoin the Hash function is used to hash transaction data. Also mining and finding a nonce requires finding a number that generates a specified hash in combination with data unique to that block.

  3. Collision resistant means two different things not getting the same hash.

23 Likes
  1. A hash function is a one way conversion of a string of data (of any size) to a fixed length output.
  2. no time at 1.30 am!
  3. Collision resistant in this instence means that it is highly unlikely (but not mathematically imposible) to get the same output from a hash function.
4 Likes

Hash function is a one way of hashing input data to a digital fingerprint with no reverse. it means you can not reverse it to get the data back.
Hash function is used to hash the transaction data in Bitcoin.

3 Likes
  1. Special functions which output is really, really hard to link back to its output.

  2. Many things from deriving public keys to block signatures, verifying if an unspent transaction can be spent by a specific key and much more.

  3. Most hash functions are not really collision resistant. But it basically means that you get the same output for two or more different inputs (which is also really, really hard to achieve).

27 Likes

1 Describe hash functions with your own words
A cryptographic blockbox, when you put something in the box a string of numbers and letters comes out which will never be able you to define the input. The same input gives always the same output even when you change one little thing.

  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).
  • By creating addresses, private and public keys. Transforming transactions which can be recorded as hashes in a ledger.
  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).

if it is hard to find two inputs that hash to the same output; that is, two inputs a and b such that H ( a ) = H ( b ), and ab

3 Likes
  1. Hash Functions are one way functions which transform input text to unique output.
  2. Hash functions are used to encrypt the transaction data so its secure and only the intended recipient can decrypt it.
  3. Each input is transformed to unique output and probability of two different inputs transforming to same output is infeasible if not impossible.
9 Likes
  1. Describe hash functions with your own words:

Hash functions are one-way functions, follow certain mathematical algorithm, with any input, get fixed size output.

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

Cryptocurrencies like bitcoin, the transactions are taken as an input and run through a hashing function which gives an output of a fixed length.

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

Collision resistant means: given two different inputs A and B where H (A) and H (B) are their respective hashes, it is infeasible for H (A) to be equal to H (B).

For cryptocurrencies, hash functions have to follow this property. Otherwise the output can’t be unique.

2 Likes
  1. A hash function can create a unique string of alphanumerical values based on any data that will change drastically if it recognizes any changes in the original data set. Hash functions are a special type of function that have certain properties making it ideal for cryptography. The properties described in our reading that cryptographic hash functions contain were deterministic, the original data will always result in the same output hash, quick computation, it’s real fast, pre-image resistant, it’s infeasible to determine the inputt given the output, the hash changes completely with small changes in the input, it’s collision resistant, each input will have its own unique hash for the most part, and it’s puzzle friendly, it’s infeasible to determine the input hash (before concatenation) such that its result is equal or less than the difficulty level (in mining.)

  2. Hash functions are used to prevent new Bitcoin from being minted except through mining. This is because the data inputted in a hash cannot be altered or erased after enough on-chain confirmations, meaning the work required to secure that block cannot be copied, erased, or reversed. Hashing also keeps Bitcoin secure by encrypting transactions data through SHA-256. This data is kept secure by adding more data that has been hashed on top of it in a connected block. In order to compromise the data in the first block, you would need to first compromise the second, appended block. The difficulty to do this makes it highly infeasible after six or more blocks have been confirmed.

  3. We mean that two different inputs should not equal the same hash output. If this is the case, the inputs are presumed to be equal. However, while we need hash functions to be collision resistant, they are not always. Hence the use of the word “resistant” over “proof.” But the number of times collisions do occur is so infinitesimally small that they are negligible in real-world use cases. This is why there is a much higher likelihood that two inputs with the same hash output are equal than it being a case of collision resistance.

23 Likes
  1. A hash function is like a digital fingerprint for a data object. Essentially you put a string on any length in and get a fixed length output. The output for a given string should always be the same (using the same hashing function).
  2. The inputs in to the bitcoin hash function are the most recent none confirmed transactions. The hash is run on this by miners who try to calculate the hash to add the new block to the chain.
  3. Collision resistant means it is statistically unlike to generate the same hash for a different input.
1 Like
  1. Hash functions take an input and produce a fixed-length output (digital fingerprint) that is different for every input. They are used as a means of data integrity since even the slight change in the input produces a really different output.

  2. Hash functions used in mining blocks and eventually verify new transactions in bitcoin.

  3. Collision resistant property of a hash function means that there is no two inputs that result in the same output in a hash function.

1 Like
  1. Describe hash functions with your own words

You have an input and run it thru a ‘hash generator’ (e.g. sha-256) and it will create a unique fingerprint wich 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).

Every transaction (ledger) will be hashed together with the hash of the previous block to create a new block. And so on. This way, when a previous block has been altered, the chain will be invalid.

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

You need to be sure there is no chance to have 2 different inputs generating the same output hash. When this happens it is called a collision.

2 Likes
  1. An Hash function processes strings of any size and return an output string of a fixed size. its needs to be infeasible to discover the input based on the output. For the hashing algorithm to be considered secure.
  2. Hash function are used to create digital signature, the id of the block, based on the hash of all transaction and data contain in this block and also with a nonce. Hash merkle trees more lighter and easier to navigate then have a giant transaction database and having to parce trough it every time you need to refer to it.
  3. That It must never or almost never produce the same output from 2 different input. this would mean that the hash function is less reliable. Hence judged insecure.
  1. Hash function is a mathematical function which takes an input of variable length and gives an output of a fixed lanegth. It has important properties of being cillision resistant and the pre-image resistance is negligible.

  2. Hash functions are used in bitcoin to perform chaining. Once the transactions in the block are stored, the hash is calculated using the hash function. This hash will be stored in the upcoming block, which results in chaining. This also will provide data integrity because if someone tries to manipulate the data, the hash of that block will change and this will breake the chain making the block invalid.

  3. It means that if two different input are provided, the Y must be different. No two different input will lead to same output.

  • Describe hash functions with your own words

Hash function is a set of data. For every input that is given, it will give an unique output for it (digital 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 function is used for every transaction and the output data is stored in a blockchain

  • 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

Each input will have it’s own unique hash output so 2 inputs should never have the same output

1. Describe hash functions with your own words
It is a function that gets an input, does some calculations and gives you a fixed lenght output (that is allways the same for the same input) that you cannot reverse to get the input again. But you still can verify if the input has been changed or not by hashing the input again and check if the output is still the same.

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).
The info in the blocks are hashed and the hash is used to link the blocks together. So the hash of the previous block is inside the current block. So if you want to change some info in a certain block, you must recalculate all hashed of all previous blocks too.

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).
when a collision happens it means that you suddenly have 2 different inputs with the same hashed output. This makes the algorithm unusable.

3 Likes
  1. Hash functions are unique digital imprints that are produced from input to output. And always one way - input to output.

  2. Hash functions are used in cryptocurrencies like bitcoin by being part of the block hashing algorithms. To successfully ‘solve’ a block, miners try to combine all of the inputs with their own input data in a way where the resulting hash starts with a certain number of zeroes.

  3. Collision resistant means that for the most part each input will have its own unique hash.

1 Like
  1. Hash functions work by taking an input no matter how big or small into the hash and getting a fixed 256bit output.

  2. A hash function in Bitcoin is used to hash transactions in each block. Since each transaction has a unique output the blockchain now becomes very secure.

  3. Collision resistant means not 2 different inputs cant have the same output.

2 Likes