Homework on Hash Functions - Questions

[quote=“ivan, post:1, topic:8430”]

  1. Describe hash functions with your own words

-Hash functions are unique inputs that will produce unique outputs.It is a one way hash function not two ways otherwise it will compromise the information being inputted.

  1. How are hash functions used in cryptocurrencies like bitcoin?
  • Hash functions are very special for blockchains in order to have immutability.The SHA-256 hash function is relevant for bitcoin due to its secure properties such as 1)Deterministic
    2)Quick Computation
    3)Pre-Image resistant
    4)Small changes in input changes the hash
    5)Collision resistant
    6)Puzzle friendly
    In mining a block, it has to include the hash of previous block which contains 0s and random alpha-numerical to make up the hash and it also shows the difficulty of mining that particular block before it gets added to the next one. The block hashes link the block chain together forming a true timestamp server.
  1. What does it mean when we say that hash functions need to be collision resistant?

-It means that its not easily collided in terms of having the same hash through different inputs because each input will have its own unique hash.

1 Like
  1. A hash function is the process where you have a string of numbers and text in any length as input and get the output as fixed length of numbers.

  2. Hash functions are used into Bitcoin writing transactions into the blockchain.

  3. Collision resistant means that it’s very unlikely that two different inputs into a hash function gives exactly the same output.

1 Like
  1. A hash function is a mathematical process that uses any sized input, processes it and produces a fixed length output.

  2. Hash functions are used to write new transactions to the blockchain via the mining process. The inputs are the transactions to be confirmed plus a timestamp and a reference to the previous block. The successful output is a hash with a value less than a predefined target.

  3. Inputs should have their own unique hashes. A collision occurs where the hashes of two or more inputs are the same. Given an infinite number of inputs and a fixed length output, this is infeasible but not impossible using SHA-256.

1 Like

collision means that you have 2 different inputs with the same hashed output.

1 Like

Hash functions are a special class of input/output functions where the output is a unique digital code for the input. If any part of the input changes the hash output changes too. Hash functions are one-way meaning the output cannot be decoded to reveal the input.

Hash functions are used in blockchains to create a unique code that represents the contents of the block (transactions etc.) plus the hash of the prior block header. As hash function outputs change with any change to the input including the hash of the previous block as a seed to the new block makes it impossible to retrospectively change anything within a block.

Hash functions should not repeat…you should not get the same hash for two different inputs, however, when the potential number of inputs is greater than the potential outputs (especially with shorter hash outputs. A hashing function like SHA 256 has 256 bit outputs making it low probability that two identical outputs are anything other than the same input.

1 Like
  1. A hash function takes an Input and produces a unique Output.
  2. In the case of bitcoin, the hash function creates a 256- bit encrypted output. The block header records the hash of the previous block to verify using the pointer, then stacks the transaction data using Merkle Root.
  3. The minimum requirement to a hash function to be collision resistant is to have at least 160 bits. If not it will be easier to find colliding inputs from hash functions that use less bits.
1 Like
  1. Mathmatical functions which produce unique “fingerprint” outputs based on unique outputs. These are exclusive to each correlating input.
  2. Public keys and all new transaction data are included in a block as the merkle root. These are hashed so that it’s encrypted, providing security.
  3. Collision resistance is the high improbability in finding an output which shares two inputs. Each unique input should have it’s own unique output. Using SHA 256 it would take sqrt (2^256) amount of instances to have a 50% chance of Collision, which is exceptionally difficult to solve for (time).
1 Like
  1. Describe hash functions with your own words
  • A Hash value converts a binary value to a hexa value, with other words encrypts the data by translating the data into another form.
  1. How are hash functions used in cryptocurrencies like bitcoin?
  • Hashing is a part of encrypting process that Bitcoin uses.
  1. What does it mean when we say that hash functions need to be collision resistant?
  • Collision resistant means that its hard to find two inputs that hash the same output
1 Like

1.Hashing is generating a value or values from a string of text using a mathematical function.
Hashing is one way to enable security during the process of message transmission when the message is intended for a particular recipient only. A formula generates the hash, which helps to protect the security of the transmission against tampering.

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

Hash functions in bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

3.What that means is that for the most part, each input will have its own unique hash.

  1. Matemathical problem where each unique input will give you a unique output
  2. Hash functions in cryptocurrencies are used to create addresses, publich and private keys
  3. It means is next to impossible to find 2 inputs that will give you the same output
1 Like
  1. A hash function is like a one way information road. The structure of the input can never be reverse engineered. A snapshot or fingerprint of the binary structure of the input creates a unique hash output.

  2. The four efficiencies in cryptographic hashing: Computationally Efficient, Deterministic, pre-image resistant, and collision resistant. This allows a cryptocurrency like Bitcoin to exist.

  3. Collision resistance means that it is nearly impossible that two different inputs will create the same output.

1 Like
  1. An input gets converted to binary-form, then pushed through a hash-function to create an unique output. If the hash-function is
    secure, you cant get the input-data from the output, like SHA-256 at this point.

  2. Hashing keeps Bitcoin secure by encrypting transactions data through SHA-256.
    The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work,
    forming a record that cannot be changed without redoing the proof-of-work

  3. It means that 2 different inputs most-unlikely cannot result in the same output.

1 Like
  1. Hash functions are primarily used to generate fixed-length output data that acts as a shortened reference to the original data. This is useful when the original data is too cumbersome to use in its entirety (from BitcoinWiki). Also the Hash function works only in one way, we put an input an get an output. But we can´t get the input if we know the 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. Hash functions in bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

  3. Given two different inputs A and B where H(A) and H(B) are their respective hashes, it is infeasible for H(A) to be equal to H(B). What that means is that for the most part, each input will have its own unique hash.
    Birthday Paradox: Suppose you have a 128-bit hash which has 2^128 different possibilities. By using the birthday paradox, you have a 50% chance to break the collision resistance at the sqrt(2^128) = 2^64th instance. As you can see, it is much easier to break collision resistance than it is to break preimage resistance. No hash function is collision free, but it usually takes so long to find a collision. So, if you are using a function like SHA-256, it is safe to assume that if H(A) = H(B) then A = B (from Blocgeeks)

1 Like

1- Mathematically Discovering and valuing a string of text.

2- By verifying accuracy of ledger entries.

3- There can be no discrepancies in the ledger chain.

  1. An input gives a unique output
  2. Secure the blockchain
  3. Collision resistant: It is hard to find two different inputs which hash to the same output
1 Like

1.Describe hash functions with your own words

A hash function consist of an unique input which produces an unique output
Hash functions are one way or at least suppose to be otherwise they are broken.
Quote:
The ideal cryptographic hash function has four properties:
it is quick to compute the hash value for any given message.
it is infeasible to generate a message from its hash value.
it is infeasible to modify a message without changing the hash value.
it is infeasible to find two different messages with the same hash value.

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

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.

In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

Changing a small part of the input for a hash function results in a completely different output. This property is crucial to the ‘proof of work’ algorithm involved in mining: to successfully ‘solve’ a block, miners try to combine all of the inputs with their own arbitrary piece of input data in such a way that the resulting hash starts with a certain number of zeroes.

3.What does it mean when we say that hash functions need to be collision resistant?
If two separate inputs produce the same hash output, it is called a collision.
If a hash function is collision resistant it’s difficult to find produce the same hash value/output from different inputs

1 Like
  1. hash function is basically string of code consisting of letters and numbers
  2. In bitcoin it is used to hash the transaction data over the blockchain as a means to record transactions.
  3. Also referring to the birthday paradox. Meaning it is virtually improbably to find same inputs that hashes same outputs
  1. A has function is one that has as an output of numbers and letters, where you cannot figure the original input from it.
  2. In BTC, has functions are used to mine and secure data.
  3. Needs to be difficult to decipher the inputs by looking at the outputs.
  1. A hash function takes any given input and outputs it as a string of hexadecimal numbers. It is almost impossible to reverse.

  2. With cryptocurrencies, all transactions use hash functions to encrypt the data. This prevents double-spending and also prevents new bitcoin from being created, because it is almost impossible to decrypt the data.

  3. Collision means two different inputs give the same output. Although it is theoretically possible to find another value that results in the same hash outputs, it is essentially impossible if a secure algorithm such as SHA-256 is used.

1 Like
  1. Hash functions are one-way functions, which produces unique outputs for specific inputs.

  2. All transactions in a block are hashed together with the hash from all the previous blocks. Thus, changing a single transaction in any previous block will completely change the hash and therefore invalidate any attempt to tamper with the ledger.

  3. Collision resistance means that it is highly unlikely to find two inputs which generates the same output.

1 Like