Homework on Hash Functions - Questions

  1. A hash function maps data of arbitrary size to a fixed-size output.
  2. One use of hash functions in bitcoin is each block in the blockchain contains the hash of the previous block header within its header, which means that if you wanted to tamper with any block in the block chain, you’d have to alter the whole chain from the genisis block. This in turn would be noticed by the other participants who hold a copy of the blockchain on their computers.
  3. A collision would mean that two different inputs were to produce the same output and we need the hash function to be collision resistant in order as to be able to rely on the fact that this will never happen.
1 Like
  1. Hash functions take an input and provide a unique output that is always one way, is a unique string of text and cannot be track or change back.
  2. Hash functions are used in bitcoin to provide security by creating block of unique chain of data that will be verify by miners to confirm the transactions.
  3. Collision resistant is the process of verify hash functions to be unique and not equal to any other from the same input to be secure.
1 Like

A hash function is a one way function that takes input and creates a uniquefixed length output.

With cryptocurrencies like bitcoin, hash functions are part of the block hashing algorithm. This is used to write new transactions to the blockchain during the mining process. In many cryptocurrencies, when a new transaction is created, the previous hash along with the input of the new transaction (as well as some additional inputs) are SHA-256 encrypted and added as a new block to the blockchain.

Collision resistance means that each input will have its own unique hash. If two different inputs result in the same hash this is known as a collision.

1 Like
  1. A hash function converts an input value of any length into a output value with a fixed length. you will only ever get an output from an input. you cannot go from the output back to the input.
    2.hash function are used to pass transaction information anonymously.
    3.collision resistance is one of the biggest parts of hash functions security. two completely different or very similar inputs can never give the same output. if a hash function is not collision resistant it is useless within the cryptocurrency network.
1 Like
  1. A hash function is a one way function where each unique input creates a unique output similar to a fingerprint.

  2. Hash functions are used to create transactions that create blocks which are validated by miners through consensus.

  3. Collision resistant means that it is near impossible to find two inputs that have the same output.

1 Like

Hash functions are very complex and are one way functions. There is a unique input that produces a unique output (digital fingerprint).

Hash functions in bitcoins use the SHA-256 algorithm. This algorithm is very hard to break. Hash functions are used to create POW, verify passwords and file integrity. Hashing is also a essential for bitcoin mining as it allows the POW algorithm to work and this increases the efficiency and security of bitcoin.

Hash functions need to be collision resistant which means making it hard to find 2 inputs that can hash the same output. SHA256 hashing algorithm involves harder more complex math and therefore is harder to break. If you look at the output it would be very hard to determine what the input is as the output looks completely random. Strong collision resistance is important for security as without it the algorithm would be susceptible to collision attacks.

1 Like
  1. Describe hash functions with your own words.
    Hash functions are one way functions where a specific input gives you a unique output.
    Any slight change in the input changes the output.

  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 Bitcoin Hash functions are used when a new transaction happens where it forms a new hash by collecting all the hash from the previous blocks to form a new block. This there by helps to verify the transactions are legit. Also used in proof of work/mining. ( this is my understanding of it ).

  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 where 2 inputs do not gives the same output. this is very very unlikely to happen.

1 Like
  1. Describe hash functions with your own words

A hash function is a function that gives a unique output for each unique input, basically it is like a fingerprint for each input.

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

The SHA-256 is used in bitcoin for encrypting each block with the previous one, so when you try to change anything and cheat the system, this hashes will be completily different on your ledger.
Is the function that creates the encryptation between blocks.

  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 a function is collision resistant, It means that in this function there is no way of get the output with the information on the input, and for solving it you need to solve by test & error.

1 Like

Collision-resistant meaning it is hard to find two inputs that hash to the same output. And the harder they are to find, the more cryptographically secure the hash functions are.

1 Like
  1. Describe hash functions with your own words
    Hash functions provide unique outputs for every given input. It is not possible to trace the input from the resulting output.

  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).
    Hash functions are used to keep a record of all bitcoin transactions. They record the transfer of ownership and how many bitcoins are owned.

  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).
    It is unlikely that two or more “collisions” result in the same output.

Imagine my Turing Stoned game again. We each give our stones names eg “The Big Red One” or “The Thin Blue Line”. Each time a stone hits Turing’s ugly face he sinks deeper. We are all hackers with our own botnets so everybody is cheating. More players mean that there is a chance that more than one of our stones hit him at the same time. But the game only moves him to where one of those stones knocked his ugly face. He took damage and its easy to know which stones hit him because our stone names are embossed and they get branded to his face. I’m sure somebody got “666” square in that bastards forehead once and never again. But we don’t know the location of the shooter as they are playing from somewhere else on the Internet. I could have the most Sharp’s graphical calculators that money can buy in order to predict where Turing has shifted next. But I can’t locate the other clowns doing the shooting and the game cheats and Turing can shift based on their location. Meaning the more players we have and the more cheating that is going on then its harder to shoot him again. But the hope is that the bigger the pool of shots the more likely to hit him again so some players team up eg “Bit Pools”.

1 Like
  1. Describe hash functions with your own words?
    Hasing is the process of converting an input of any lenght, in to a fixed sezied string of text. Using an mathematical function. That means it could take any text no matter how long it is, can be converted into an array of numbers and letters through an algorythm.

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 blockchain hashes are used to represent current state of a blockchain and to ensure its immutability. Every transaction information from amount to adress, timestamp, hashs are adddes in blocks of the 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).

Collision resistance is a property of cryptographic hash functions: a hash function 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(a) = H(b).
Every hash function with more inputs than outputs will necessarily have collisions. Informally, these properties mean that a malicious adversary cannot replace or modify the input data without changing its digest. Thus, if two strings have the same digest, one can be very confident that they are identical. Second pre-image resistance prevents an attacker from crafting a document with the same hash as a document the attacker can not control. Collision resistance prevents an attacker from creating two distinct documents with the same hash.

1 Like
  1. Describe hash functions with your own words

Hash functions can be described providing a digital finger print to data by calculating a unique output to every input. This equation can not be reverse from output to input.

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

Bitcoin in particular uses SHA-256 hash function as part of the block hashing algorithm. This is required for mining.

  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 resistance means that it is very difficult or impossible for a hash function to calculate the same output from two different inputs.

1 Like
  1. Hash functions act as a digital fingerprint that has a unique input equelling a unique output.

  2. Each hash is unique so its vital in the blockchain data as if there are discreppencies in the chain, the action will not be varified. That is perfect for bitcoin transactions.

  3. collision resitant means that shiiiiiit stays legit!!!

1 Like
  1. Describe hash functions with your own words
  • hash functions work by translating an input of data into a coded output that is a fingerprint for the original input
  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).
  • hash functions are used as proof of work for mining
  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 it is very difficult to find 2 inputs that will have the same output
1 Like
  1. Describe hash functions with your own words
    Hash functions are a way to enter an input and get a unique output.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used in proof-of-work mining to give outputs to complex maths problems which cannot be reversed and so help to secure the blockchain network and cannot be undone or hacked.

  3. What does it mean when we say that hash functions need to be collision resistant?
    It means the functions need to operate in a way that 2 different input can never produce the same output otherwise the cryptographic security would be compromised,

1 Like
  1. Hash functions are a way where inputs produces a an output or digital fingerprint.
  2. In bitcoin the hash function os used to hash the transaction data.
  3. Collision resistant means that two different things can’t get the same hash.
1 Like

which shiiiiiit🤔
Anyways collision-resistant meaning it is hard to find two inputs that hash to the same output. And the harder they are to find, the more cryptographically secure the hash functions are.

1 Like
  1. Describe hash functions in your own words.

Hash functions encrypt data; they are non-reversible. No two non-identical data inputs produce the same hash output.

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

For wallet passwords, for public keys, for private keys, and for transactions that are recorded in the blockchain.

  1. What does it mean when we say that hash functions need to be collision resistant?

Collision resistance is security; it means that no two inputs can produce the same output. A collision occurs when you input two non-identical data and the hash output is identical; this cannot happen using the hash function.

Hash functions are never collision resistant, but the larger the range is for the output, the less likely you can have a collision. The output of a Sha256 hash is 256bits long or 64 hexadecimal characters. This is a very large range of possible outcomes that finding a collision is very unlikely, but not impossible

1 Like

Hmmm. I read that smaller hash functions (Sha-1) have had collisions, but I thought that in Sha-256, a collision was impossible. I will keep on researching. Thank you!