Homework on Hash Functions - Questions

  1. Hash functions is a one way function that produces a digital fingerprint.

  2. Hash functions are used in bitcoin for the transactions data. Creating addresses, private keys, public keys.

  3. Means two different inputs are not getting the same output.

1 Like
  1. Converts any data into a unique form, like a digital fingerprint. from the hash, the original data cannot be found out. but excactly the same data would produce excactly the same hash.

2.Cryptos use a certain hashing algorithm, in most cases SHA-256. the miners get a data set and produce a unique hash for it. which gets than added to the blockchain, for this and their energy consumption they get rewarded. all miners confirm the hash. Miners convert data into hash, which is not reconstructable but that gets added to the blockchain.

  1. it means, that there cannot be two inputs that give the same output. there can be only one unique input that the hash function turns into one unique output. if that is the case the hash function is collision resistant, there is no two possibilities which could collide.
1 Like
  1. They are functions that provide an unique result from an input and only go from input to output but we can not do it backward to get the input from the output.

  2. Every block of the blockchain mined uses the previous hash so every new block produce a new hash that contains the previous one so it contains all the hashes of the network.

  3. It means that is difficult on that function to find two inputs that give us the same output.

1 Like

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

A hash function is collision resistant when it is difficult to have the same output for two different inputs

1 Like
  1. Describe hash functions with your own words
    Hash functions offer the ability for each individual input to have a unique digital fingerprint that only matches that input. In addition any change to that input will yield a completely different and unique output. You can put as much data into an input for a HASH but always yields same length of data as identifier with SHA 256. Moreover, these functions are linear so unable to figure out from the output what the input originally was at least with SHA 256.

  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 give a unique identifier for each bitcoin block that is produced so every new block has a unique identifier. The randomness of the identifiers allows for the process of 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 holds if it is practically impossible to find two inputs that hash to the same output.

1 Like

Homework on Hash Functions - Answers

  1. Hash Functions are one-way computations including a unique input, resulting in a unique output.

  2. Ethereum uses KECCA-256, a hash function algorithm similar to SHA-3.

  3. Hash functions are created to not have identical inputs.

1 Like
  1. Hash functions are computer programs that take data, scramble it and present a unique result of a specified length to represent it.
  2. Hash functions are used in bitcoin and other cryptocurrencies to record transactions, organize block data when mining and for public keys used in receiving crypto
  3. Hash functions are collision resistant, meaning that they don’t use the same output for different inputs. Any change whatsoever in the input will generate a completely different random output, which makes tracing the hash back to its original data input astronomically improbable.
1 Like

1:
Hash functions are the algorithms used in blockchain to create a unique output (hash value) from any input. The conversion works only 1-way and can never be reversed. Btc uses the SHA256 function for hashing.

2:
In bitcoins blockchain hashes are used to represent the current state of a blockchain and to ensure its mutability. Hash functions are an essential part of the bitcoin protocol by their caracteristics. Hash algorithms are secure – non reversible, have a fixed size in the output (digest) and unique in that two different data sets (inputs) cannot produce the same digest (Unless there is a collision).

3:
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. Hash functions need to be collision resistant to prevent a hacker to change the history of the blockchain. Since combinations of inputs are greater than combinations of output, there might be the possibility of a collision.

1 Like
  1. Hash functions is a way to make a message into a unique key of numbers and letters.

  2. The hash function used in bitcoin helps with the mining process and creating blocks.

  3. You want there to be collision resistance, it means two inputs can have the same output if there is no resistance.

1 Like

Describe hash functions with your own words

Hash function is a special kind of function that takes arbitrary length of data as an input and
convert it to a fixed alphanumeric number which is not reversible to its original value.
It can only reference to the original value. Hash function is one directional.

How are hash functions used in cryptocurrencies like bitcoin?

Blockchains rely heavily on hash functions for generating cryptographic keys and hashing the
transaction blocks. Hash functions ensure secure transactions over the blockchain.

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

It means that for two distinct inputs, the output of the hash function should not be the same.
So, mathematically, we can say that for 2 distinct inputs X1 and X2, Hash(X1) should not be
equal to Hash(X2)

1 Like
  1. Hash functions are programs that use unique inputs to produce unique outputs. They are linear.

  2. Hash functions are critical for creating new blocks(mining) in cryptocurrency.

  3. Collision resistance in hash functions basically means it is impossible/extremely difficult to find two different inputs that result in the same output.

1 Like
  1. A hash function is a mathematical process that takes input data of any size, performs operations on its network, and returns output data of the same size.

  2. Cryptographic hash function is a modern cryptographic tool for modern cryptography.

  3. In order for ordinary hackers to only get a hash, not a password, because the hash is a password or message with a different algorithm

1 Like
  1. Describe hash functions with your own words : A Hash Function is a complex function that gives a unique output for a unique input value and it is impossible to derive the input from 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). : Hash functions are used to create a unique output transaction (block) from a unique input (previous transaction block) on the Bitcoin 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). : A hash function is collision resistant if there are no way that two different input can result in a identical output.

1 Like
  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
    3.Collision resistance means that there is not identical input that can generate the same output
1 Like

Homework - Hash Functions

  1. Describe hash functions with your own words

Is a unique identifier for any given piece of content - it can take receive any form and size of data including digits, letters or even larger media files and convert it into unique alphanumeric code of a specific length.

  1. How are hash functions used in CC’s like BTC?

Hash functions are computationally efficient, deterministic, pre-image resistant (the output of the hash function must not reveal any information about the input), collision resistant, and impossible to reverse engineer, making it vital for the utmost security and safety on cryptocurrency platforms

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

No two different input data should generate the same hash value, if they do match, its known as a ‘collision’. At this point, the algorithm isn’t safe to use and is vulnerable to attacks.

Hash functions being ‘collision resistant’ improves the strength of your hash and helps keep the data more secure

cheers :beers:

1 Like
  1. Hash functions are complex mathematical calculations where a unique input generates a unique output. And you can go from input to output, but never from an output to an input.

  2. Hash functions are used to hash the most recent, not-yet-confirmed transactions in the blockchain.

  3. a hash function H is collision-resistant if it is hard to find two inputs that hash to the same output

2 Likes
  1. Hash functions are one-way functions therefore they take in an unique input and return an output that is practically unique that corresponding to that input was inputted. In other words, it is virtually impossible to find 2 different inputs that produces the exactly same output! Even if the two different inputs are slightly; they produce two extremely different outputs. A hash function takes in an input of any size and produces an output of a fixed size. If you are only given an output of a hash function aka a hash without having the input that produced the hash then it would be virtually impossible for you to guess what input produced the output that you were given. On the other hand, if you are given a hash function, the input that put into the hash function, and the resulting hash then you can easily verify the hash by putting the given input into the given hash function and see if the hash was produced by putting the given input into the given hash function matches the hash that you were given. That’s why a hash function is considered to be a one-way function.
  2. Hash functions are used in crytpocurrencies like Bitcoin in a couple ways. Hash functions are used in creating digital signatures and in the verification of them. To digitally sign a transaction , you first hash the transaction then encrypt the hash that you got from the transaction with the private key that use to prove the ownership of asset. To verify a signature from a transaction, you need to decrypt the signature with the public key that corresponds to the private key that encrypted the hash and hash the transaction in order to verify the digital signature. If the hash that you got from the transaction equals the hash that you from the digital signature then the transaction wasn’t modified after it was signed and the public key that was used to verify the digital signature corresponds with the private key that was used to sign the the transaction. Another way that hash functions are used in crytpocurrencies like Bitcoin is in hashing blocks of transactions… Each block has the hash from the previous block included in its data. Each block in the Bitcoin Blockchain has a random number called a nounce that it has part of its data. Bitcoin miners try to guess the golden nounce; the random number with the rest of the block’s data that produces a hash below a certain target. A Bitcoin node randomly generates a nounce for a block of unconfirmed transactions then it puts the block through the SHA-256 hash function to see if it has the golden nounce. Every Bitcoin node keeps generating nounces until a node comes up with winning hash, a hash that is below the target.
  3. Collision resistance in terms of hash functions; even though, it’s possible for 2 inputs of a hash function to have the same hash but it’s computationally infeasible to find 2 inputs that produce the same hash. Hash functions need to be collision resistant because they’re used for verifying data integrity.
1 Like

1.A hash function is an algorithm that a transform a data input from any length to a fixed-size output which is enciphered text called a hash value, or just “hash.”

2.Cryptocurrencies like bitcoin uses hash functions for generating public keys and block hashing by miners. A block hashing mining is a reference number for a block in the blockchain. A block of unconfirmed transactions is fed to a hash function to get an hash value to get a complete block of transactions.

3.A hash function is collision resistant if it is practically impossible to find two inputs that hash to the same output.

1 Like
  1. Describe hash functions with your own words
  • A set of instructions that takes an input then correspondingly produces a unique output. And, these functions are intended to function one way, anyone should impossibly know exactly how to convert back a given output to its equivalent input.
  1. How are hash functions used in cryptocurrencies like bitcoin?
  • Hash functions in cryptocurrencies are used to write new transactions into the blockchain to successfully ‘solve’ a block which requires an extremely large amount of computation from the network.
  1. What does it mean when we say that hash functions need to be collision resistant?
  • The difficulty of finding two different inputs that results to the same hash output.
1 Like

1.Hash function will translate data into a unique 256bit and this become a very unique fingerprint for that piece of data.

  1. Bitcoin uses hash function to generate a hash digest and every miners (Proof of work) will then input the hash digest with a set of leading zero.

  2. It need to be collision resistant mean to rminimize the chances of getting the same output.

1 Like