Homework on Hash Functions - Questions

Lol your answer to question 2.“I second that” :rofl:

1. Describe hash functions with your own words

Hash functions are one way functions of a string of data (any size)
Each hashing input creates a fixed output. So-called [Digital fingerprint]
Which is a unique string of alphanumericals.

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 in Bitcoin are used to hash transaction data. Creating addresses, private & public keys. Only the intended recipient can decrypt it.

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

Collision resistant is so we are sure to not have two different inputs that generate the same hash output.

A collision is very insecure.

1 Like
  1. Describe hash functions with your own words

Hash functions are one-way functions that convert text of any length into a unique output string.

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

The Bitcoin hash method SHA-256 is required for mining Bitcoin in order to bind the transactions with immutable hash values and then store them in blocks.

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

If one is able to reverse engineer the Bitcoin hashing method SHA-256 from the output string back to what the input was, this hashing method is considered insecure. Therefore, a hashing method must be collision resistant.

1 Like

Hash Functions

  1. Describe Hash functions with your own words.

Hash functions transform unique inputs and create outputs that are unique digital fingerprints of the inputs. They’re mathematical computations are unidirectional meaning they can go from input to output but not from output to input.

  1. How are Hash functions used in cryptocurrencies like Bitcoin?

Hash functions take any size of data /transaction (input) and mathematically derive the output into a collision-free SHA 256 standard. This stabilizes the network via increased security, encryption and immutability.

  1. What does it mean when we say functions needs to be Collision resistant?

Each unique input will have its own unique Hash (output). If 2 inputs have the same hash output, there is a collision. No hash function is completely collision free, but it would take so long for it to happen that it wouldn’t matter in the long run.

1 Like
  1. Hash functions allow you to take an input and then create a unique output that is not reversable.
  2. Crypto currencies use hash functions to set the difficulty of the mining challenge and to link the blocks in the blockchain.
  3. This means it is hard to find two inputs that lead to the same output.
1 Like
  1. Hash functions are mathematical functions, i.e. a mapping x --> f(x) so that calculating f(x) is computationally feasible but calculating the inverse function f^-1(x) is not computationally feasible. The inverse function cannot be calculated analytically and it can only be attempted by brute-force, that is to say, by calculating all possible combinations from top to bottom until a solution is found. That is why hash functions are also called trap functions, because once you “get in” you cannot “get out”. Many methods have been proposed for hash function throughout history: SHA-256, MD-5, etc. If one could “break” the function and compute inverse functions very rapidly, that person would have broken Bitcoin and many of the security standards underpinning the internet, including centralized secure banking and military secrets.

  2. Hash functions are used in private/public key encrpytion. In the Bitcoin standard, each block needs to be inserted by just one node and there is a race to see who will insert it (first). Insert it involves solving the inverse function for a particular f(x) before anyone else does. That will give that node a mining reward. All nodes in the network are in a race to see who can solve it first (motivated by the mining reward). Every 10 minutes or so a new block is inserted into the blockchain, containing many transactions in it. The public/private key encryption that is powered by hash functions like SHA-256 are a way to verify that a particular person or node is in possession of the private key that generates that public key.

  3. Colission Resistance means that it is very difficult to find two different numbers x and y so that f(x)=f(y). Since the lenght in bits of the output of function f can be a lot shorter than the input x, it is necessarily the case that there are some collisions. However, if the length of the output of function f is long enough and the hash function is collision resistant, it will be very hard to find two inputs that result in the same output. Furthermore, it is generally a good property to have the hash function so that small variations in x are mapped to very different y's (by using some measure of distance).

1 Like
  1. Hash functions are functions where each input produces its own unique output known as its digital fingerprint.
  2. Hash functions in bitcoin are used to encrypt transactions and mining to generate new bitcoins.
  3. Hash functions need to be collision resistant to be secure by each input producing a unique output so that there is no way to figure out an input with an output.
1 Like
  1. Hash functions are essentially one-way functions, where each input gives a unique output and there is no way to go from output to imput.

  2. Hash functions are used for generating public keys and block hashing. Block hashing is a core concept of BTC mining. It is the process of where a block, of unconfirmed transactions, is fed to a hash function and hash digest is generated.

  3. Collision resistance, in cryptography, is a property of cryptographic hash functions: it is collision resistant if it is hard to find two inputs that has to the same output.

1 Like
  1. Hash functions are basically one-way computations in which a certain input gives you a certain output.

  2. Hash functions are used in cryptocurrencies like bitcoin in generating addresses and proof-of-work (mining)

  3. Collision resistant means that no two input can give you the same output.

1 Like
  1. Hash functions are one-way functions where each unique input produces a correspondingly unique output.

Let me explain using the word “happy” as an example. The words “happy” and “Happy” and “happY” all have the same meaning, definition and spelling but are slightly altered. That slight alteration is what makes each of these words UNIQUE from one another. If you were to use “happy” as your first input, you will get a unique output. In fact, EVERYTIME you use “happy” as an input you will get THE SAME output. However, if you were to use an input with a slight change such as “Happy”, the output will ALWAYS BE DIFFERENT compared to the output created by the first word “happy”. The unique outputs that are created even with slight alterations can be likened to unique digital fingerprints.

  1. Hash functions are used in cryptocurrencies like Bitcoin in order to enhance and maintain security. In particular, since it is dangerous to store passwords on a computer or server, we can use hash functions to generate cryptographic keys. By hashing a password, hash functions help verify passwords instead of actually using the original password and since hash functions are one-way operations they help protect the original password.

3.Hash functions need to be collision resistant. What this means is that no two unique inputs should ever produce the same identical output. If it does then we have a “collision” whereby two different inputs have resulted in the SAME OUTPUT. This is a sign cryptography that is not secure.

1 Like

A hash function is an encryption function at the essence. It takes an input and produces a non-decipherable output.

In cryptocurrencies like bitcoin they are used as trackers of previous transactions, if the hash of one block is stored in the next, and the next also has it’s own hash which is generated taking into account the previous hash then a change to a single hash anywhere in the chain would be incredibly clear evidence of tampering.

Collision resistance just means that it must not produce the same output for any 2 inputs, obviously, this isn’t possible with a limited number of digits but as long as it is mathematically unfeasible then it is fine. in the case of SHA256 there are more outputs than if everyone in the world hashed 1 billion messages EACH.

1 Like
  1. A hash function basically creates a fingerprint and is a function that works in one direction. The slightest change in input will create a totally different output, which makes it ideal to detect changes in blocks as the fingerprint will not match.
  2. The hash of the previous block is included in the next block creating a chain of hashes. This prevents the hash inputs from being altered, and if it does the transaction will get validated.
  3. It’s nearly impossible two find two inputs that generate the same output, making it extremely difficult to cheat.
1 Like
  1. Hash function is a function where the output is a hash(based on some complicated functions/algorithms) and based on it you can’t get input value back.
  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. If a hash function is not collision-resistant (there is no such thing as collision-free in hash functions because their output has a fixed length) then an adversary can break the function with little effort. More formally (but still quite informally).
1 Like
  1. A hash function is a function where a unique input(any form of data) produces a fixed-length output.

2.Hash function is for Bitcoin mining. In Bitcoin mining the miners need to hash the block in a way that is equal to the target hash and the computer who does that its hash would be added to the chain.

  1. A hash function is collision resistant if its hard to find two inputs that hash to the same output.
1 Like
  1. Describe hash functions with your own words
    A hash function derives a unique output that is derived from a unique input. With a hash function you cannot derive the input given 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).

Bitcoin uses the SHA256 hash function to pass transaction information anonymously. Hash functions are primarily used for generating public keys and block hashing.

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

A hash function is collision resistant if its hard to find two inputs that has to the same output. A collision occurs when more than one value to be hashed by a particular hash function hash to the same slot in the hash table being generated by the hash function.

1 Like
  1. Hash functions enable the encryption of data into an indecipherable, hexadecimal code which cannot be restructured in a way to determine the original data set, submitted.

  2. During the bitcoin mining process, hash functions are utilized through the block hashing algorithm. All pending transactions, as well as the incidental timestamp and reference to the block which has preceded the block to be processed, are numbered among the inputs.
    As part of the mining process, computational power is expended to thresh all input data, plus the arbitrary piece of input data contributed by the miner, for the purpose of generating, by hash function, the required number of zeros at the beginning of an output “digest”.
    Multiple trials and errors are performed by the miner to achieve these desired outputs.

  3. It is necessary for hash functions to be collision-resistant for security. Without collision resistance, an adversary with malicious intent could break the function without much effort.
    Because the output of hash functions are of a fixed length, they are not “collision-free”.

1 Like
  1. hash functions are functions that create a digital fingerprint of data and are one way only, you can get a fingerprint from the input but you cannot get the input from the fingerprint
  2. they are used to keep data safe and store it on the blockchain, making it at the same time transparent and accessible without leaking details of the transactions
  3. It means that is impossible to find two inputs that hashed give the same output
1 Like
  1. Hash functions are a secure algorithm to mask data to give that data a different output that what was put in.

  2. Hash functions are used in crypto like bitcoin as part of the block hashing algorithm, which is used to write new transactions into the Blockchain through the mining process.

  3. Collision Resistance when it relates to hashing and crypto are to always map two inputs to two different values.

1 Like
  • functions that each input produces an unique output and it’s only one way (input -> output); the reverse cannot be done.

  • It’s used to hash the header of the block trying to reach the target (or bellow) - in the mining process -.

  • We want to say that it must be really difficult - almost impossible - that two different messages (inputs) produces the same output

1 Like
  1. Describe hash functions with your own words
    Hash function is a unique digital fingerprint for an input, each input became a diferent output. It’s a one way system, you can pass from an imput to an output but you can not pass from an output to an imput.

  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 function is used in each transaction, in each block. The hash function is used to add transaction on the blockchain. Hash is also used for public and private keys.

  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).
    That it’s impossible to look random and to be random, that it’s impossible that 2 imputs give the same output.
1 Like