Homework on Hash Functions - Questions

I first read about Bitcoin 10 years ago this month. But not until tonight did I fully understand how Bitcoin uses the hash function. :smiley:

2 Likes
  1. Describe hash functions with your own words
    Each unique input always gives the same unique output. The output is always of a fixed length. It is a one way function - input will give the output, but the output will never give the input.
  2. How are hash functions used in cryptocurrencies like bitcoin?
    They create unique private and public keys and by converting large amounts of transaction data into easy to store encrypted hashes in the ledger.
  3. What does it mean when we say that hash functions need to be collision resistant?
    Collision resistant means two different inputs should not give the same output hash.
1 Like

Private key is just a random number and public keys are derived using the elliptic curve function, not SHA256. The most important usecase for SHA256 in Bitcoin is its use in PoW. :slight_smile:

1 Like
  1. Hash functions take inputs of digital data and create outputs of digital data which cannot be used to re-create their inputs.
  2. Hash functions are used in Bitcoin to ensure the data integrity of the Bitcoin blockchain.
  3. Collision resistance is the likelihood of two different inputs generating the same outputs.
1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    the security protocol for computing, each digit either number or letter is represented by a secure unique hash code

  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 and send information via two parties that may have sensitive content. Enabling security protocols on the internet is vitally important to keep prying eyes out.

  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).
    In cryptography, collision resistance is used to keep two separate hash functions from colliding or outputting the same thing.

1 Like

|-|1.- The hashing algorithm is a universal translator that can translate any form or size of data, letters or media into a hash which is an alphanumeric sequence. Each unique input delivers a unique output. So if e.g. I just change one number in the input I get a totally different output that before.|

|-|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.- collision-resistant means that it is hard to find two inputs that hash to the same output|

1 Like

I think you are describing public key cryptography. Hash functions like SHA256 are more commonly used on the internet to securely store user passwords in a database.
Do you know how are the used on the Blockchain particularly? :slight_smile:

  1. They are a unique code designed to show data has not been tampered with
  2. They ā€˜hash’ all the data of a block to give the block a unique identifier
  3. It is hard to find two inputs that produce the same ā€˜hash’ output
1 Like
  1. Hash functions are a mathematical equation that creates a unique output from a unique input of letters and or numbers.

  2. Hash functions are used in Bitcoin mining. The miners need to generate the correct hash in order to create the next block.

  3. It’s important to be collision resistant so that attackers can’t brute force and break bitcoin. What makes SHA 256 Collision resistant is that it’s nearly impossible that two inputs that produce the same outputs.

1 Like
  1. Functions are mathematical formulas to solve for x. there are different types.
  2. Hash functions are used in cryptocurrencies to obtain a unique digital fingerprint output to safely encrypt transactions in the blockchain. they are used to unite blocks. they cannot be changed without providing the exact input that created it.
  3. Collision resistance: is a property of cryptographic hash functions: a hash function is collision resistant if it is hard to find two inputs that hash to the same output;
1 Like

1, Has functions take any value and output a unique value of fixed length as an output. This output can be considered to be a unique fingerprint of the input value.

2, Hash functions are used to give each block a unique fingerprint. This makes it possible to verify that a block has not been changed, by applying the same hashing function to the block and ensuring the fingerprint has not changed.

3, Hashing functions should have a high collision resistance making as close to impossible as possible to to generate the same output from two different inputs.

1 Like
  1. A hash function is a function which outputs a hash that represents the given input. Same input always produces the same hash.

  2. Hash functions are used in cryptocurrencies in order to validate that the block has not been messed with. If a node tries to meddle with a transaction the hash of the block would change and the other nodes wouldn’t allow the block since the hash is different.

  3. A collision resistant hash function is one where there low chance that two inputs give the same output. A hash function with low resitance for collision would be one with a significantly smaller size of the output hence fewer possible combinations. Without collision resistance there would be less integrity of the system using the function.

1 Like

they are a line of numbers and letters that spell out a set of words

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

if we find out how to read it then we would be able to find out how to read anything in bitcoin and basically steal it

1 Like
  1. Hash functions take input information and change it into an alphanumeric code output that can’t be reversed. It increases the security of the input data.

  2. it used to increase security so that inputs of an action on the blockchain cannot be manipulated.

  3. So that no two output codes are the same we need collision resistance

1 Like
  1. Describe hash functions with your own words.

Hash Functions convert an input into a unique output version, called a hash. The length of the hash is depending on the amount of bits a hash function is working with.

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

Bitcoin uses hash functions to save transaction data. It saves the 2 partners of the transaction and the BTC amount that was moved.

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

A collision occurs when 2 different inputs get the same hash as an output. The blockchain can’t store that second hash converted input. What happens is unknown because it has not occurred yet and in case there are a few safety protocols that can be integrated for preventation.
So a high collision resistants is to have as many different hashing outcomes as possible. The current standard is SHA-256 with 2^256 possible outcomes

1 Like
  1. Describe hash functions with your own words

    Hash functions take a line of data ( Input ) and convert it into an alphanumeric code (output). This
    output can not be converted back to the input… oneway, only.

  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 increase security so that inputs of an action on the blockchain cannot
    be changed.

  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 means that it is hard to find two inputs that hash to the same output.

1 Like

1: takes the information given and gives a random output based on the data given

2: hash is used for mining to create blocks based on information input to give an output that is like a unique fingerprint for the block

3: collision resistant mean that its impossible that two inputs produce the same output. Because any little thing that’s changed ,changes the whole output

1 Like
  1. Hash function take an set of input and generates a unique output. Changing anything to the input will yield you a different output. Hash function is a one way transaction. You can’t take the hashed output to generated the original input.

  2. Hash function in Bitcoin, takes all the data (transaction on the bitcoin network) and hashes it. That unique hash output then get recorded on the bitcoin blockchain. Because of the size of the data, it require large amount of computational power to solve. And when a block is solved, that miner is then rewarded with newly minted Bitcoin.

  3. Collision resistant mean that each input will get it’s own unique hashed output. It’s rare for for 2 different input to get the same output.

1 Like

Homework on Hash Functions

  • Describe Hash Functions

    • Hash Functions are mathematical functions that converts a unique input into a unique output also know as a hash value.
    • Hash Functions are a one-way function, because the input is used to calculate the output, but the calculation cannot be reversed, for instance, you cannot use the output to calculate the input.
  • How are Hash Functions used in cryptocurrencies like bitcoin?

    • Hash Functions are part of the block hashing algorithm, that are used to write new transactions into the blockchain through the mining process
    • Hash Functions are also used for security purposes and to identify transactions.
  • What does it mean when we say that hash functions need to be collision resistant?

    • It should be extremely difficult for 2 different inputs to hash to the same output. (almost unable to be done)
1 Like
  1. Hash functioning converts any form of data (wether it be digits, letters or even media files) into an alphanumeric string (a unique sequence of digits and letters)

  2. Mining softwares use hashing to create a series of unique alphanumeric sequences, which is then transcribed into the blockchain (I’m not sure if this is accurate…)

  3. Hash functions that are collision resistant make it very challenging for hackers/programmers to revert the output back to it’s input. ā€œIf you figure out how to do it, then you have broken Bitcoin.ā€ - Ivan

Any feedback (especially for question 2) is greatly appreciated! :grin:

1 Like