Homework on Hash Functions - Questions

May i save this to my computer for me to study?

  1. Describe hash functions with your own words
  • any given set of data can be processed though a hash function to produce a unique Base number (usually 16-64) which is an alphanumeric number that is unique to that exact data with an exact 256bit length. Any change to the input data results in a different Hash result, thereby being reffered to as a ā€˜one way function’ It acts as a digital integrity check.
  • Deterministic
    -fast computation
  • pre image resistant
  • small cahnge in input changes whole output
  • collision resistant
    puzzle freindly
  1. How are hash functions used in cryptocurrencies like bitcoin?
    – then header or nonce of the block is hashed to create a unique identifier broadcast across the network, which should find consensus with other nodes. This unique identifier points back to the block it came from. It is rejected if it is different. Blocks are combined and hashes together in multiples of two, and the hashes are hashed again forming a cascading effect called a Merkle Tree - which can be broadcast and reworked to get the same result by miners across the network to check integrity

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

  • Collision resistance refers to the possiblilty of two identical answers being produced and causing confusion. Collision is if two are. The integrity of the networ depends on collision resistance.
1 Like
  1. Describe hash functions with your own words

I’ll use Ivan’s words, but there are a kind of ā€œfingerprintā€ , generated by a series of numbers and letters, where the input can’t be traced back from the output. There are many different kinds of hashing algorythms, that will give different output sequences accordingly, where the input length can vary and the output’s length doesn’t vary (within the same algorythm, in other words SHA-256 function will always give the same length output, no matter what’s the 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).

I feel a bit confused, haha. Hash functions are used to create a structure to store data, in blocks that are linked to each other, by following specific characteristics and protocols to make sure the chain can’t be broken or changed, to add new transactions to the block… but I realize I don’t understand how they are used in relation to bitcoin or cryptos.

It seems like if there are a certain number of parameters that need to be met in the structure, that islike trying to solve a puzzle to be able to create a new block to add to the exisiting chain, and that the hash functions are used to do that. Like trying to find new and non-existing hash functions that can then be validated and added to 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).

It means they need to produce their own unique output, that never repeat itself, so that two different input will not give the same output.

1 Like

Hash functions are used to fingerprint the block data so they can be verified independently by recalculating the block hash and comparing it.
The block is also mined using a specific difficulty which determines that the block hash has to be lower than the specified target at the time.
To do this they are changing the nonce to get a different hash until they find the right output of the function. They are not searching for a new (non-existing) hash function. :slight_smile:

1 Like
  1. Hash functions create an output based on an input and no two inputs will produce the same output. Inputs cannot be determined by output of the function, so hash functions only work linearly in that sense, (unless they are cracked). Any form of data can be hashed into a fixed length string.
  2. Bitcoin hashes transaction, block data, and wallet addresses. Hashing is also used by miners to try and guess block nonce’s in order to confirm blocks and receive rewards, (I think?).
  3. I guess I touched on this in the first answer. A hash function being collision resistant means that it is hard to find two non-identical inputs that lead to the same output of the hash function. We can think of the hash output as fingerprints, no matter how many children one couple has, no two of those children will have the same fingerprints.
1 Like
  • Describe hash functions with your own words: Hash algorithms are universal translators for computers. Functions are calculations; giving another number as 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): Any size or form of data; including, digits, letters, and/ or media files are translated into alphanumeric strings. For example, 64-bit, 128-bit, and/ or 256-bit. The output of a function is known as a hash, in other words; cryptographic result of a hash algorithm (Cryptimi, n.d.).

  • 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 highly unlikely, although theoretically possible for two individuals to independently generate the identical address. If a collision takes place, both the original address owner and the colliding address owner can spend bitcoin sent to that address. However, it is not possible for the colliding address owner to spend the original address owner’s entire wallet, or vice versa, (en.bitcoin.it, n.d.)

1 Like

Thanks Ales,

First thing I’d like to say, non-related to the homework, is thanks for your input.
Much appreciated.

I’m sure I’ll get things sorted out in my mind a bit further down, but to be quite honest, at the moment, it’s really like learning a new langage and I don’t really understand. Yet. But I’m not discouraged, and the continued feedback really really helps! So many thanks. :slightly_smiling_face:

  1. Describe hash functions with your own words.
  • A hash function is a unique digital fingerprint.

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

  • hash functions are used in all cryptocurrencies, to wallet deposit addresses,ERC20 smart contracts and bitcoin uses hash functions as part of the block hashing algorithm to write new transactions into the blockchain through the mining process.

3.What does it mean when we say that hash functions need to be collision resistant?
it means it has to be impossible to find the input in which made the hash, unlike MD-5 and SHA-1

2 Likes
  1. Hash functions are one way function where a unique input will produce a unique digital output. The hash function will take the input and convert it into 256bits.

  2. Hash functions in Bitcoin are used by creating new transactions on the blockchain for mining. To solve the block the miners has to combine all their inputs with their own random data until the output will begin with a single 0

  3. For hash function needing to be collision resistant means that two input cannot produce the same output, well its highly unlikely but maybe not impossible?

2 Likes

1)Hash functions are one way functions that produce a unique line of code. This process does not work backwards.
2)Hash functions are used in crypto for storing passwords and in mining it is used in new transactions.
3)Collison resistant- The function is collision resistant if it is hard to find 2 inputs that hash to the same output

1 Like
  1. It’s a unique algorithm that uses a one way system to process transaction. The biggest crypto uses this system.

  2. They run using their characteristics which is a consensus mechanism. Keeping them secured and encrypted so its hard to go from out-put > In-put. its a one-way system.

  3. it is very difficult to find two inputs that produce the same output in a hash function.

1 Like
  1. Hash function provides a unique output or a digital fingerprint for an input. It is a one way function where the function cannot be reversed for the input.
  2. Hash function provides a unique output to be strung into a chain of data and mapped into a fixed-size string. These set of irreversible and unique allows the bitcoin mining to secure the network.
  3. Hash functions provide a unique digital print. Two inputs do not hash to the same output hence the hash function is collision resistant or does not provide same result.
1 Like
  1. Describe hash functions with your own words

Hash functions are functions that convert a string of data to a fixed length 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).

In crypto hash functions are used to create 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 resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs.

1 Like
  1. A hash is a function that makes a unique string for every input
  2. Hash is used to generate a unique string for each transaction in Bitcoin and also used to mine, or complete the block of transactions
  3. The collision proof just means that two inputs would not generate a same hash
1 Like
  1. A hash function is a function designed to compute an output (read hash) that can not be inverse computed back into the input.

  2. SHA-256 is used to encrypt transaction data on the blockchain without hiding the proof of the fact that the transaction did in fact happen. Hashing also allows the proof of work algorithm to function.

  3. In the event two unique inputs produce the same output, it’s referred to as a cryptographic hash collision. It is most important that a hash function is collision resistant, to prevent duplicate hashes for 2 or more unique inputs.

1 Like
  1. A hash function is a function that gives a unique output to a unique input. The output is of a fixed length whereas the inputs are variable.
    It cannot be reversed and each change to the data will result in a new hash (alphanumeric code).

2 )In cryptocurrencies the functions are part of the hashing algorithm which, through mining, writes new transactions into the blockchain. Because of the complexity
of the algorithm it takes a long period of time to mine a coin such as BTC.

  1. Collision resistance - if I understand it correctly it means that we should not have two same inputs with one same output?
1 Like

Its the probability of two inputs resulting in the same output, yes :slight_smile:

1 Like

1.- In a hash function, each unique input produces a unique output, in this way you can get a unique digital finger print for that input but it is impossible to go from output to input.
2.-In cryptocurrency the successful verification of the hashes result in the addition of new blocks to the chain
3.-A hash function needs to be collision resistance because it needs to have this characteristic in which different inputs should not hash the same output

1 Like
  1. hash function takes data and converts it into bits of letters and numbers
    2)Used to verify a transaction and block signature
  2. it means that the input cant hashed the same outputs (hashed twice).

Think I got it #3

1 Like
  1. Describe hash functions with your own words
    A hash function is a one way function that takes any sized input data and produces a fixed length output. The output serves as a signature of the input 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
    The transaction itself is put through a hash function and added to the S portion of a transaction on the blockchain.

  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).
    The hash function can have multiple inputs that create the same output. The function is collision resistant if it’s relatively hard to find two inputs that produce the same output.

1 Like