Homework on Hash Functions - Questions

#1 hash function is a mathematical process that takes input data of any size and returns output data of a fixed size.

#2 Hash Functions used to write new transactions into the blockchain through the mining process in Bitcoin and other cryptocurrencies.

#3 Collision resistant is the property of a hash function that it is computationally infeasible to find two colliding inputs.

1 Like

A hash function is a function whereby a unique input produces a unique output in the form of an encrypted code which in the case of Bitcoin, serves as a unique digital fingerprint of the original input data.

Hash functions in Bitcoin are essentially hashes stringed together in a special sequence called blocks which form a block chain.

A hash function is collision resistant if it’s hard to find 2 inputs that hash to the same output.

1 Like

1.)Hash Functions are equations that give you an irreversible unique outputted the you put a unique input.

2.) Addresses, Private keys, Verification, Mining

3.)Only 1 specific input can get that specific output.

1 Like

Hash functions like SHA256 are not used to derive public keys, for that the elliptic curve function is used. :slight_smile:

@Alko89 thank you for the correction :+1:

1 Hash functions it a set of data in an input that will always have the same output.
2. Hash function are used in cryptocurrencies, by taking a message from an input and
tranforming that input to produce a single output witch is also know as digest.
3. Hash functions need to be collision resistant so no one can brake encryption, so the output has to be large or has to have a large set of bits.

1 Like

1.Hash functions are a mathematical function that converts any input entered into a unique output of letters and numbers.

2.Cryptocurriencies like bitcoin use hash functions to properly secure transactions.

3.They need to be able to prevent an attacker from producing the same hash but are using a different input.

1 Like
  1. A hash function is a unique alphanumerical value where the output is uni-directional. A unqiue input will give a unique output but the data cannot be reversed.
  2. Miners use hash functions to verify transactions and add blocks in the block chain.
  3. Two different inputs should not have the same output
1 Like
1. Describe hash functions with your own words --> They are uni-directional functions that produce a consistent length output (eg: SHA 356 creates 256 bit output all the time). 

2. How are hash functions used in cryptocurrencies like bitcoin?  --> The hash of the ledger till the latest block is added into the header of the block. This ensures no one can change data in this history of the chain as it would invalidate the hash output.
  1. What does it mean when we say that hash functions need to be collision resistant? --> Need to ensure that we cannot have 2 inputs creating the same output. Also need to ensure that the output cannot be reverse engineered.
1 Like
  1. Describe hash functions with your own words.

Hash function (algorithm) is a universal translator for computers. It is able to receive any form and size of data, including digits, letters, files, and translates them into an alphanumeric string of a certain size unique digital fingerprint. Each unique input gives a unique output, you can just go from input to output but you can never go from output to input. It is one way function.

  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 in cryptocurrencies, for example as a locking mechanism to secure the public key (Hash 160) used in bitcoin transactions.

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

That’s mean, they must be irreversible, resistant to hacking attempts of the unique digital fingerprint. When a hash function is broken down it’s mean that someone has found a way to go from output to input original data that can be hacked.

1 Like
  1. Describe hash functions with your own words
    Hash functions are a unidirectional cryptographic output that is generated from a specific input. These hashes will replicate themselves if given the identical input; however, if one character is altered, added, or deleted, a completely new hash will be generated.

  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 hold their value in their ability to be replicated IF and only if, an identical input is used. This helps encrypt sensitive information because its unidirectional nature prevents people from being able to determine the input. You’d have to guess the input and run it through to see if what you think the input is, is correct (which requires an incredible amount of computation. also I think this is what ā€˜brute-force’ attacks are when people guess passwords to attempt to get in). Through mining (the process of trying to ā€˜solve’ the hash), hash functions are generated and added to each other to create the block chain.

  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).
    Collision resistance is a cryptographic property of hash functions that articulates the necessity of it being difficult to find two inputs that are similar enough to generate the same output. If, it is hard to do this, it is said that the function is ā€˜collision resistant’. (I’m guessing that if it is easy to do this, the function is not collision resistant (?) ). A problem with ā€˜non-collision resistant’ functions is that they are easily hacked. This can be demonstrated in why the MD5 algorithmic hash functions are no longer used- the inputs were starting to be able to be figured out.

Essentially the properties of hash functions are imperative for the functioning of bitcoin in that you need to be able to create an unalterable string of data; as it is understood as a function of chronological time. Hash functions have properties that lend themselves to be able to create this.

1 Like
  1. it gives the input a unique fingerprint
    ( If anything changed in the input example a file has been edited even by small change it will give a completely different hash number)

2)Solving the hash starts with the data available in the block header and is essentially solving a complex mathematical problem. Each block header contains a version number, a timestamp, the hash used in the previous block, the hash of the Merkle Root, the nonce, and the target hash.

The miner focuses on the nonce, a string of numbers. This number is appended to the hashed contents of the previous block, which is then hashed. If this new hash is less than or equal to the target hash, then it is accepted as the solution, the miner is given the reward, and the block is added to the blockchain.

CRYPTO WIKI

We have rolled out a new mobile experience to you. For more information, click here.
CRYPTO WIKI
Collision resistance
EDIT

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. Consider a hash function such as SHA-256 that produces 256 bits of output from an arbitrarily large input. Since it must generate one of 2256 outputs for each member of a much larger set of inputs, the pigeonhole principle guarantees that some inputs will hash to the same output. Collision resistance doesn’t mean that no collisions exist; simply that they are hard to find.

2 Likes

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    It’s an algorithm that takes some input such a piece of text or a inmutable file then transforms to a unique number… usually a hexadecimal one. This number is like a fingerpint of the source. It it has a slight change, a comma for example, then the outcome is completely different. One key element of the hash function is that is only one way. It takes a fraction of a second to transform the source into a hash number, but is virtually impossible from the hash number determine the source.

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

For the mining process… a challenge is given to all miners in the world. Since there’s no algorithm to reverse the process, every ten minutes the system provides to miners a hash number and they have to determine the header. Miners only can rely on brute force, therefore they must dedicate special equipment for the task. The miner who solves the puzzle gets rewarded with a bloc of Bitcoins, and by doing so, the whole networkk of miners supports the bitcoin system.

The other way how Bitcoin is related to hash numbers, I think it has to do with addresses. They are implemented from a source (the private key) and the corresponding hash number (the public key). The only way to make a transaction is by demonstrating I am the owner of the private key. Algorithmically, it can be proven to miners without sharing the private key.

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

When a hash function can have two or more inputs it’s said is collision vulnerable. For a good cryptographic system we need collision resitance hash functions. Therefore we can trust that any hash function must have only one source.

1 Like
  1. Each have a unique input and output that is call digital fingerprint.
  2. In the bitcoin protocol, hash functions are part of the hashing algorithm which is used to write transactions into Blockchain through the mining process… It’s the need for this large amount of processing power that means new bitcoins get mined over a long period of time, not all at once.
    3.Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs. This property is related to second preimage resistance, which is also know as weak collision resistance.
1 Like

1, Hash Function translates inputted information into a hash algorithm that computer can understand. If ant letter/number/punctuation etc. changes = the algorithm will completely change too.

2.Hash functions ensure data integrity during transactions. All data is made out of blocks and blocks make up a transaction. Each block is connected through hashing. Hash function has information about current transaction and all previous blocks that led to this transaction. Changing one block in previous transactions will change current transaction too. Let’s say my mom sent me 2 BTC and I’m sending 3 BTC to my uncle, if my mom’s transaction changes somehow (to 3 BTC for example) then my transaction to my uncle will change too, so hash function will be different.

  1. Any 2 inputs in the hash function should be unpredictable to ensure that output is also unpredictable.
1 Like

Hash functions are not used to derive public keys. For that the elliptic curve function is used, but the public key is hashed to get the address. :slight_smile:

1 Like
  1. The hash function is a function that will give you the digital signature, with a fixed output length and you are unable to determine the original input that would create the output.
  1. It is used in cryptocurrency as a digital signature for each of the block of bitcoin transactions. its used in the current block to produce the signature and also has the input of the previous block so that there is a link new block with the older blocks.
  2. what is means is given different inputs, it will not be possible to produce the same output.
1 Like
  1. Hash functions are one-way functions. Any input, get fixed size output.
  2. Every transaction will be hashed together with the hash of the previous block to create the next block.
  3. Collision resistant means it is statistically unlike to generate the same hash for a different input.
1 Like
  1. A hash function is a one-way function that takes an input and generates a unique encoded (hashed) output which is irreversible.
    This output is generated with a complex hashing algorithm. Hash function are deterministic functions, meaning that a given input always creates the same output.

  2. Hash functions are used to hash a block in the blockchain that contains a hash based on all the transactions, the hash of the previous block and some more data.
    The hash algorithm bitcoin uses is called SHA-256 or Secrure Hashing Algorithm 256.

  3. it is very important that a hash function is collision-resistant to make it (almost) impossible for two different inputs to produce the same output.

1 Like

1.Describe hash functions with your own words
It is a mathematical process that takes input data of any size, performs an operation on them and returns the output data of a fixed size, one-way function.
2.How are hash functions used in cryptocurrencies like bitcoin?.
Hash functions used in mining blocks and eventually verify new transactions in bitcoin.
3. What mean when we say that hash functions need to be collision resistant?
It means that the hash functions must be resistant since if they collision they would obtain the same output for 2 different inputs,the algorithm would not work.

1 Like