Homework on Hash Functions - Questions

1. Describe hash functions with your own words
Hash functions create a unique output from a specific input. It is not possible to discover the original input based on 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).
They are used to secure the blockchain by making it impossible to alter the ledger. I still don’t understand this too clearly, hopefully it will come with time.

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 means that there must not be two different inputs that provide the same output.

1 Like
  1. A hash function is the database where it holds all the values in algorithm and numbers into cryptography.
  2. Hash functions that use cryptocurrency like bitcoin are to put as input to SHA-256 that gives the result of output to secure algorithm.
  3. What hash functions mean to be collision resistant is a property cryptography that protects any attacks when it comes to secure blockchain.
1 Like

Describe hash functions with your own words
Hash functions are very useful in computer science. One way hashes have the useful property of always producing the same output of a predetermined size for the same input, but make it impossible to recalculate that input from the output.
They are used extensively by protocols and application across the net. eg they can be used to compute the hash value of a block in bitcoin to verify the block. They can be used to verify that a text or piece of data has not been tampered with when sent from a sender to a recipient. To further enchance security they can be combined with keying algorithms eg HMAC-256 where a secret key is shared between the sender and receiver to prove the data sent has not been modified in transit (assymetric keys can also be used to enhance security).
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 extensively by miners when they mine a new block and add it to the blockchain. A block can be verified by solving a specific target value that the network adjusts every 10 minutes. The block includes a block header with ,among other things, the nonce, the difficulty (used to specify the target value) and the hash to the previous block. By hashing the block using SHA-256 twice over the hash of the current block is calculated. If the resultant hash value is less than the target value then the block is recognised as having been verified and can be added to the chain as the next block, once agreed upon by the other miners.
Each miner can inspect a block and verify it quickly by simply calculating the hash across the block using SHA-256 twice and checking it is under the target value.
Hashing is also used to calculate the Merkle root that is added to the block header.
What does it mean when we say that hash functions need to be collision resistant?
Good hash functions have a high degree of collision resistance which means the likelihood of two inputs producing the same output is extremely unlikely to the degree that is virtually an impossibility in practice.

1 Like
  1. A hash function is the unique output generated by a specific input (or variable) function. It is the basis for the security of the Blockchain. If it is “broken” or taken in reverse (output to input) the integrity of the blockchain is compromised.

  2. Hash functions are used in cryptocurrencies by way of “mining” for new coins. While the input or “string” can always vary in length the output or “Digest” will always be the same length. Miners attempt to generate a Hash that starts with a certain number of zero’s by changing the input variables. This process can take large computations, a great deal of power and many attempts.

  3. The Hash is collision resistant if their is difficulty finding an incidence where 2 inputs have 1 input or basically where the inputs outweigh the outputs.

1 Like
  1. Hash functions are a one way function with a unique code of binary to a specific input. Any slight change to the input gives a completely different output. There is no way to reverse the output.
  2. Hash functions are used in bitcoin mining to find a unique number that generates a specified hash combination thats verified by other miners.
  3. Collision resistance means its extremely hard to find two inputs that give the same output.
1 Like

1
Hash functions produce unique outputs from unique inputs by creating a unique digital fingerprint.
Hash functions are one way e.g Input -> Output (Digital Fingerprint)

2
Hash functions are used for security purposes, Hashing creates a code for the data using a hash algorithm. The code represents a string of characters, which act as a digital fingerprint of that file. Depending on the algorithm (Sha-256) no matter the size of the input, you always get a fixed-length output when hashing.

3
Collision resistant means that two different messages shouldn’t be able to produce the same hash value. From a mathematical standpoint this should be impossible.

1 Like
  1. Describe hash functions with your own words

Hash functions are mathematical formulas that take any varying length of inputs to produce a fixed length output. The formula must be designed whereas the output can never be used to find the inputs nor have any two unique inputs resulting in the same output.

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

Hash functions are used my Bitcoin miners to ‘solve’ the block in the chain. They hash all the data into the function from the previous block and the current to get a unique digital fingerprint for that block.

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

The hash function must be designed to avoid the weaknes of any two unique inputs resulting in the same output.

1 Like
  1. hash functions is putting in a series of data, and being given an output that is irreversible .
  2. Hash functions is bitcoin, generates unique transactional keys.
  3. collision resistant means something that is highly unlikely to produce the same output
1 Like
  1. Describe hash functions with your own words
    Hash functional is a one-way function that does not allow you to go from output to input. Each input will always produce the same unique output.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    A block is bundled and contains information from the previous block. In order for the block to be added to the blockchain, miners will need to find a hash that meets the target difficulty through the mining process. It’s not possible to alter the data unless the hash is changed in all the previous blocks

  3. What does it mean when we say that hash functions need to be collision resistant?
    It means that two different inputs can not produce the same unique output to be collision-resistant

1 Like
  1. it is mathematical tech that gets any input and gives output that you can never find input from the output

2.as far as i know already , there is public key and private key for any wallet,
private key is with wallet public key and some value for transition get hash and put in blockchain

  1. collision resistant mean there is default way to find two string have same hash value this is called
    collision resistant
1 Like

Hash functions are not used to derive public keys. For that the elliptic curve function is used. Hash functions are heavily used in the block mining process. :slight_smile:

Hash function takes a binary representation and translates it to a unique x number of bit hash translation. The binary input will be given a irreversible finger print which is very useful for identification and verification.

As such, Hash is very useful for Bitcoin since this is a way to verify and identify payments. Furthermore, the pre-image resistance nature of hashing make it secure, since brute force, or random guessing, would take a long time to complete on such huge data sets such as bitcoin.

Collision resistance is when two different inputs are prevented from resulting in the same output.

2 Likes
  1. Hash functions take a unique input of any length and create a fixed length output using a Hash function algorithm. BTC uses SHA-256.

  2. Hash functions in BTC such as sha-256 are used to write transactions into the blockchain through the process of mining. This takes a lot of computing power and guesswork.

  3. Collision resistance means it’s extremely difficult (not impossible) to have two unique inputs that hash to the same output

2 Likes
  1. Hash functions are functions where each input produces an unique output or digital fingerprint. The function can not be reversed.

  2. Hash functions in Bitcoins are used to write new transactions into the Blockchain through mining.

  3. Collision resistance means that is hard to find 2 inputs that produce the same output in a hash function.

2 Likes
  1. Describe hash functions with your own words
    Hash functions are unique inputs that produce unique outputs (digital fingerprint) and are irreversible.
  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 unique private and public keys to enable transactions within Bitcoin.
  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 means it needs to be impossible to find 2 of the same inputs to achieve the same output. If this is achieved it is considered a flaw in the hash function.
2 Likes

Hash function is the unique output, or fingerprint, that comes from the data that was the input

A measure of security that involve an input and an output that remains the same but requires extensive work to solve

2 Likes
  1. An action that for any size unique input gives you unique fixed size output. You can find output from input but can’t find input from output.
  2. Hash function is a part of the block hashing algorithm that used for verifying and adding transaction into the blockchain through the mining.
  3. it means it is hard to find two inputs that hash to the same output.
2 Likes

2.Hash functions are not used to create private and public key, they are used to to verify and store data in hash form. Hash Functions play big role in cryptocurrencies, hash function has been a fundamental to blockchain technology. for instance in bitcoin, the blockchain is a linked list that contains data and a hash pointer that points to its previous block. The hash pointer contains the address of the previous block and not only points to the previous block it also contain the hash of the data of the previous block. imagine if you try to make some change in a single block and this small change will affect the whole chain, which is impossible. That is how a blockchain attain the immutability.

2 Likes

You got right for hash function meaning. Try to answer 2 questions too.

1 Like

1 Hash function is function which can’t be reversed (we can get output from input but we can’t do the same other way around) and each input gives unique output

2 In the bitcoin protocol hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process

3 It’s mean that is very hard or impossible to find 2 inputs which would give the same output

1 Like