Homework on Hash Functions - Questions

Homework on Hash Functions

  1. Describe hash functions with your own words

Hash functions are one way functions where each unique input will give you a unique output (Fingerprint). This means that even if a really small part of a huge file is changed, then the fingerprint will be totally different therefore preventing fraud and providing a high level of security.

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

Bitcoin at its core is a digital ledger of hashes that use proof of work in combination with the SHA-256 algorithm to mathematically prove traceability and unbreakability of the system.

This process is what we call mining. Miners need to hash the block header so that it is always equal or less than the ā€œtarget hashā€, that is when they add their mined block to the blockchain.

Miners apply the SHA-256 hash function to the block header but in order to obtain the acceptable hash they must try with the ā€œnonceā€ repeatedly and incrementally.

The whole process is very complex and requires miners to repeat the mathematical guessing various times at a fast pace, which implies the need sophisticated hardware in a energy intensive process.

  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 we say that hash functions need to be collision resistant, we mean that it is extremely hard (not impossible) to find two inputs which would hash the same output. The harder it is to find those two inputs, the more secure we can consider the hash function.

1 Like
  1. Hash Functions are used to create a unique fixed-size identifier based on an input dataset of any size. SHA256 and SHA384 hash functions only works one way, i.e., they generate a unique set of 256 or 384 characters, respectively, but they cannot be reversed engineered to generate the original dataset. Other hash functions can be reverse engineered, and are therefore not secure.

  2. Hash functions are used in cryptocurrencies like bitcoin to generate a new hash which includes the following: the previous block’s hash header, the current timestamp, the nonce and the current transaction.

  3. Hash functions need to be collision resistant in order to prevent the chance of an entity claiming that their desired input as the legitimate input when it is in fact different from the actual original input. Collision resistance ensures the integrity of the blockchain from attacks.

1 Like
  1. Converting information which can be modified into unable to modify sentence contain letters and numbers. Coding.
  2. Hash function is used for transactions, signatures, mining… (probably much more)
  3. There are not two inputs having the same output.
1 Like

1.A function is a mathematical equation. It receives an input and based on the function it creates can output.

  1. Hash functions can be used in Bitcoin because is data set can be input and the out put can be a set sequence with a specific structure and length.

  2. A hash function needs to be collision resistant means that no two inputs should produce the same output.

1 Like
  • In cryptography, collision resistance is a property of cryptographic hash functions : a hash function H is collision - resistant if it is hard to find two inputs that hash to the same output; that is, two inputs a and b where a ≠ b but H(a) = H(b).
1 Like
  1. Describe hash functions with your own words
    Hash functions has unique output with unique input.
    Hash functions cannot be reversed.

  2. How are hash functions used in cryptocurrencies like bitcoin? .
    In the bitcoin protocol, hash functions 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. To successfully ā€˜solve’ a block, miners try to combine all of the inputs in such a way that the resulting hash which indicates a transaction is validated.

  1. What does it mean when we say that hash functions need to be collision resistant?
    it is hard to find two inputs that hash to the same output
1 Like
  1. A hash function is something that for each unique input, gives a unique output. It is not currently possible to reverse the function and find the input based on the output.
  2. It is used for addresses, private keys, public keys. It is also used for transactions that get recorded on a ledger.
  3. It means two different inputs can not have the same output making the function collision resistant and secure.
1 Like
  1. Hash functions are functions that go from an input to an output but never an output back to an input.
  2. Hash functions require three things, the hash of the previous block, the transactions and a nonce. Miners choose a special input called a nonce and input it into the hash function along with the previous block’s hash and the transactions in the current block to get a unique hash. If the hash links up with the previous hash like a page number in a book, the block is verified on the blockchain.
  3. Hash functions need to be collision resistant in order to prevent 2 different inputs produces 2 completely different outputs.
1 Like
  1. Hash functions are unique inputs that produce unique outputs.
  2. A hash function takes a data input and turns it into a data byte with a set structure and length that are not able to be solved for in the reverse.
  3. Saying a hash function needs to be collision resistant means that each set of unique data will output a unique string of data with a set structure and length unable to be duplicated.
1 Like

Hash functions are one way functions where you cannot easily get back to the original input.

Hash functions are used in cryptocurrency to secure and validate them.

Collision resistance refers to it being hard to find two inputs that hash to the same output, making for very secure transactions over public networks.

1 Like
  1. Hash functions are sophisticated functions that take unique inputs and generate unique outputs, like a fingerprint; and it is impracticable to reverse the output of a hash function in other to get the input.

  2. In bitcoin(mining) hash functions are used to create deterministic, pre-image resistant, puzzle friendly outputs, where the inputs are transaction data.

  3. Collision resistance is a property of cryptographic hash functions that ensures the uniqueness of a hash is almost certain, i.e. the probability of two inputs generating the same output hash is very low.

1 Like

1.A hash functions takes an input and outputs a unique fingerprint. The hash function is not reversible, because you can’t go from output to input, only input to output.

2.Hash functions are used to counter the fabrication of false transactions. The use-case for hashes is that it helps to uniquely identify things in the digital space. Blocks in the blockchain for example have a header containing the hashes of both the previous as well as the hash of their predecessor.

  1. it means that it is difficult to find two similar inputs that provide similar outputs.
1 Like
  1. Describe hash functions with your own words
    Hash function is algoritam we use to map data of any size into data of a fixed size, for bitcoin that is 256-bit. SHA 256 works one way: input to output and each unique input always gives unique output, or fingerprint. Hash function perform well if input can’t be calculate beck from known output to input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    In Bitcoin hash function is used in the process of generating the Bitcoin address.
    Hashing is key proces in mining and block creation

3.Collision resistance : you can’t find any two inputs to map to the same output

1 Like
  1. A hash function takes an input and uses complex calculations to produce a unique output. The same input always produces the same output. But two different inputs can never produce the same output.

  2. Miners calculate the hash for the header of the block in order to try to win the lottery that gives them a reward in bitcoin. In order to win the lottery the hash needs to be equal or smaller than the target hash and in order to get it right you need to keep incrementing the nonce.

  3. If a hash function is collision resistant it is very hard to find two inputs that produce the same output.

1 Like
  1. Describe hash functions with your own word:
    Unique input produces a unique output in a linear and irreversible fashion to generate a 256bit alphanumeric fingerprint

  2. How are hash functions used in cryptocurrencies like bitcoin? Allows a public key to be generated from a private key so that in spite of a visible public key, the private key from which it came cannot be derived and is protected. Hash signatures of a previous mined block are included in a current block to produce a new hash signature, thus ensuring the integrity of the blockchain. It is also used in mining where a hash is generated and the mining challenge is to guess the starting string of zeros of the hash

  3. What does it mean when we say that hash functions need to be collision resistant?
    That two identical hash outputs must not come from two different inputs. A unique output can only come from a single unique input.

1 Like
  1. Hash functions take data and make a unique fingerprint based on this which cannot be fed back to reverse the function.

  2. With Bitcoin the hash function is used to encrypt the transaction data which is what makes the network so secure.

  3. Collision resistance means that 2 inputs shouldn’t create the same output when put through a hash function. This is an extremely important feature as the value of the hash it outputs depends upon it’s uniqueness.

1 Like
  1. A hash function is a one-way function that takes any form or size of data and translates them to an alphanumeric string of a set size … such as 64-bit, 128-bit, 256-bit.

  2. Hash functions in bitcoin/crypto are used to uniquely identify every record on the Bitcoin digital ledger such as blocks and transactions, addresses, public and private keys. Proof of work mining combined with SHA-256 hashing algorithm is used to obtain mathematical traceability and unbreakability of the network, where miners compete to achieve equal or less than the ā€˜target hash’ by computational guessing. The winner gets to add their mined block to the ledger and is paid a reward in bitcoin.

  3. A hash function is collision-resistant if it is extremely hard to find two inputs that hash the same output. This not an absolute impossibility, but resistant enough to be considered ā€˜provably secure’. This prevents many attacks and tampering of the blockchain involving duplicated hashes.

1 Like

1 - Creates a unique digital signature of the input. This output signature (hash) cannot be used to determine the input. That is the hash function is 1 to 1 and irreversabile.

2 - hash functions are used in 2 ways with bitcoin:
#1 to add a unique hash to each bitcoin block that is determined by the previous hash and the transactions in the block. This connects each block with all previous blocks, making the bitcoin blockchain secure and difficult to hack.
#2 in order to win the mining reward minors must solve a complex math problem that invovles the hash function (by trial and error).

3 - Because if the hash function is not collisions resistant that it’s output is no longer unique. if it’s not unique its no longer secure and can cause serious problems.

1 Like
  1. Hash functions are one way functions (you can only go from input to output and not the other way). We can use SHA 256 hash function to verify transactions, files and other data.
  2. A cryptographic hash function is used for security purposes and constitutes the backbone of crypto security. Hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.
  3. A hash function is collision resistant if it is hard to find two inputs that hash to the same output.
1 Like
  1. Describe hash functions with your own words.
    Hash functions are one unique input that equal one unique output.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash Functions are a way to secure the network through the PROOF OF WORK consensus. The hash function verifies the placement of each pervious and future block on the blockchain.

  3. What does it mean when we say that hash functions need to be collision resistant? Collision resistant means that the hash function have a very low probability of being broken by ā€œbrute forceā€ attacks, different inputs will equal the same output, or that outputs can be used to derive the inputs.

1 Like