Homework on Hash Functions - Questions

Answers to Homework on Hash Functions

  1. Describe hash functions with your own words.
    Hash functions is when an Input of data/info will be mixed together and then sent in form of fixed cryptographic text to an Output, that can’t be reversed.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    It is used to generate mathematical cryptographic value (hash) from a sting of text, which will help to protect the security of the transmission against tampering.

  3. What does it mean when we say that hash functions need to be collision resistant?
    It will mean that the hash function need to be provably secure, where a slightly change in the hash function input will give totally different cryptographic hash to the output, and it will be almost impossible to get that same output twice.

1 Like
  1. Putting data/info in and it coming out with a unique fingerprint so nobody can decipher what the input was.
  2. HF in crypto are used to memorialize transactions which cannot be altered.
  3. We don’t want the same output on 2 different transactions.
1 Like
  1. hash functions are one-way functions where a unique input produces a unique output, creates a digital footprint that cannot be reversed.

  2. hash functions in cryptocurrency - convert an arbitrary number of letters/numbers (input) into an encrypted output of a fixed length.

  3. collision resistance - a hash function is collision resistant if it is hard to find two inputs that hash to the same output. two inputs a and b where a=/ b, but H(a) = H(b)

1 Like
  • Describe hash functions with your own words
    Hash function is such a function where input cannot be deduced based on the output. It takes a numerical representation of the data and produces a fixed length string as output.

  • 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 key element of the problem for which the network users called miners attempt to find a solution. In case of bitcoin the problem is defined as producing a hash with a given number of leading "0"s, consecutive zeros present at the beginning of the string.
    Hash functions can be solved only by using a brute force approach, essentially guessing repeatedly. Using hash functions to define the problem for miners means that the problem itself can also only be solved using a brute force approach.
    Cryptocurrency network can specify the exact conditions for what qualifies as a solution to such a problem, varying the difficulty and thus controlling characteristics of the network, for example how often a new coin is mined.
    In other words hash functions are used because they make the problems reliably difficult for miners to solve.

  • 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 it is highly improbable that two different inputs will be found that result in the same output.

1 Like
  1. Describe hash functions with your own words
    Hash functions are computations that are non-reversible. Once the cryptographic fingerprint is given, it cannot be reversed to find the inputs that generated the output.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    They are used to write new transactions into the blockchain through the mining process.

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

1 Like
  1. Describe hash functions with your own words
    It is an function which introduces high level of cryptography to produce a unique output from a unique input however currently there’s no way to decipher the unique output in the reverse and retrieve the initial input.

  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).
    From what I know so far, a lot of those hash function output looks very similar to bitcoin address and the initial input of those bitcoin addresses probably are the “seed phrase” which protect your bitcoin address from theft or manipulation.

  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 the output of the hash function will always be unique and there are no two inputs which can produce the same output.

1 Like
  1. A hash function takes an input and generates a unique fingerprint as an output. It has the property of being one-way information, making it impossible to figure out the input based on the output result.

  2. Hash functions are used to validate transactions of Bitcoin value in a secure way. The blocks of information contain a copy of the previous block, making it all connected, if the information of 1 block changes, it makes the whole chain invalid, that makes it safe.

  3. Collision resistant means that 2 different inputs can’t have the same output fingerprint. This is a condition for the outputs of the hash to be unique for each different input.

1 Like
  1. Hash functions take input data and output a unique hash (think unique digital fingerprint). This hash can not be used to step back through the function and get the input data. It is a function with one way output.

  2. Bitcoin uses two hash algorithms to generate a bitcoin address. The public key is first hashed via the SHA-256 Algorithm and then is hashed again by RIPEMD160.

RIPEMD160(SHA-256(K)) where K is the public key generated via the secret key (k).

  1. A hash function is considered collision resistant when finding the same output for two unique hashed inputs is unlikely.

ex:

Hash(a) = Hash(b);
In this example the output produced by hashing ‘a’ is identical to the output produced by hashing ‘b’. This would be considered a collision.

Hashing algorithms have varying degrees of collision resistance and higher resistance (less % to produce the above ex) is better.

1 Like
  1. Every unique input results in a unique output
  2. On bitcoin, the inputs are the recent transactions, resulting in a hashed output. I believe miners are attempting to solve for this hashed output.
  3. That no two different inputs can result in the same output
1 Like

1: A hash functions are one way inputs that produce an output.

2:Hash functions are used in Cryptocurrencies to write/create new transactions in the hashing algorithm in blockchain via the mining process .

3:Collision resistant means it does not have two inputs that hash/ point/connect to the same output, in the code

1 Like
  1. Hash functions are input operations producing an output result which is non-reversible.
  2. Using the hash functions in Cryptocurrencies like Bitcoin ensure the integrity of the blockchain.
  3. The idea that the two codes very similar will always have a separate has code as not be duplicated on the one direction of the blockchain.
1 Like
  1. Describe hash functions with your own words
    A Hash function is formula where you input information and you get a output of a unique fingerprint or bit.

  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).
    Bitcoin uses SHA-256

  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’s two inputs that hash to the same output. It’s very hard to find.

2 Likes

Can you give an example how SHA256 is used in Bitcoin? :wink:

  1. Hash functions are algorithms that can receive and translate any data into an alphanumeric string of a certain size.
  2. Bitcoin miners perform proof-of-work (PoW) functions to earn newly created Bitcoin. The answer to the algorithms solved are called hashes. PoW function is used in many altcoins and based on SHA-256.
  3. The pigeonhole principle means that any hash function with more inputs than outputs will necessarily have such collisions; the harder they are to find, the more cryptographically secure the hash function is. Collision resistance is important when you’re relying on hash functions to always map two inputs to two different values.
1 Like
  1. Hash function takes input data and creates a hexadecimal output that is an irreversible digital fingerprint unique to the input

  2. Hash function algorithms are used to write new transactions into the blockchain through mining process. Inputs are most recent unconfirmed transactions

3.Collision resistant = hard to find 2 different inputs that generate the same output.

1 Like
  1. Hash functions takes inputs, which can be multimedia, anything that can be binary and converts it into an alphanumeric string, reducing data down to strings that are secure. They are useful for data integrity because they are unidirectional from input to output only.
  2. They are used in mining. They are used in bitcoin to pass data in order to reduce bytes of data passed over bitcoin clients as well as creating unique ID’s useful for a number of reasons. They are also useful for security so the blockchain remains linear and you cannot discover a past input, you can only see the output.
  3. I deduce collision resistance as the likelihood that 2 or more inputs produce the same output, causing a collision. Looking it up, that was right.
1 Like

1 It is a unique fingerprint that can not be reversed
2 It is used by creating a unique address recorded in a ledger
3 Can not be 2 inputs that produce the same output in a hash function.

1 Like
  1. Every unique input creates a unique output which is a fingerprint of that unique input only.

  2. In cryptocurrencies like bitcoin the hash function is used to hash transaction data.

  3. in order hash functions to be collision resistant they have to ensure that 2 different inputs can never give the same outputs. By this way you can’t replicate anything that happens on the blockchain.

1 Like
  1. Hash Functions transforms information one-way information into code.

  2. Hash functions help bitcoin maintain multiple security settings to maintain a decentralized system. Miners use them to write new transactions into the blockchain.

  3. If a hash function is collision resistance it means that it is hard to find two inputs that hash to the same output, meaning the harder the input is to find, the more cryptographically secure the hash is.

1 Like
  1. Describe hash functions with your own words: it’s a math function that convert a unique form of data or input (number, alphabets, media files, etc) and produce a unique output represented in alphanumeric string. This output is the digital fingerprint of the input.

  2. How are hash functions used in cryptocurrencies like bitcoin? Bitcoin is a general ledger that uses the hash SHA-256 in combination with POW to get immutability and traceability. To ensure this happens, mining has come into play. Miners use hashes generated by SHA-256 and apply it to the block header (the known partial input of the latest block) until they get right the hash target to finally add the block to the blockchain

  3. What does it mean when we say that hash functions need to be collision resistant? it means that is extremely difficult (tends to zero) to find two identical hashes (output) derived for two different inputs

1 Like