Homework on Hash Functions - Questions

Homework on Hash Functions - Questions

Q1: Describe hash functions with your own words.
A1: Hash functions are algorithms that take any data inputted and outputs it as a pre-image resistant number that is immutable and collision-resistant.

Q2: How are hash functions used in cryptocurrencies like bitcoin?
A2: Hash functions are immutable and a new hash is created anytime a change is made. This creates the security and real-time auditing of all transactions which is the core of cryptocurrency.

Q3: What does it mean when we say that hash functions need to be collision resistant?
A3: With the development of SHA-256 the occurrence of a collision would take so long to happen that it’s not a factor. This collision resistance allows for the unique hashes in the blockchain so that the immutable record of transactions can be sustained.

1 Like
  1. Describe hash functions with your own words
    The result of a algorithms answer to and inputted data. Some type of data is entered and a unique sequence of numbers and letters is given as a result. That sequence of numbers is like no other, one small change to that date will give you a completely different answer.
  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).
    They are used as a type of security and verification. cryptocurrencies use this because its unchangeable. so as cryptocurrencies use them in their blockchain because it make it impossible to crack no other hash is the same unless its identical to the original
  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).
    Two hash functions will most likely never be identical collision resistant is the idea it will take a life time for someone to reverse engineer the hash function making it collision resistant. If its not collision resistant someone over a period of time would be able to figure out the data by reverse engineering it.
2 Likes
  1. Hash functions operate when you take a variable length string of data as your input which then calculates and gives you a fixed length piece of data as your output. This is one way, from input to output only. If it were possible to get the input from the output, the hashing algorithm would basically be broken!

  2. Bitcoin Transactions are taken as the input, run through the SHA-256 algorithm, in turn giving you the output from said transaction. The hash function either allows for the verifications of blocks,signatures, transactions etc.

  3. It essentially emphasises the importance of each input having it’s own unique hash, much like your own unique fingerprint. This is usually the case when using SHA-256, aside from the extremely rare occasion when the Birthday Paradox may come into play.

1 Like

Private key is a random number usually generated by a computer and to derive public keys the elliptic curve is used. :slight_smile:

1 Like

Can you give a practical example where hash functions are used? :wink:

It means that its hard for two different inputs to result in the same output. :slight_smile:

  1. Hash functions are one way functions which from input to output
  2. They are used to protect against unconfirmed transactions, transactions are confirmed by miners
    3.Hashfunctons need to be collision resistant, it is infeasible for different inputs to get the same hash.
1 Like

1. Describe hash functions with your own words
Hash functions are special functions that for each unique input, you get a unique output. And it is infeasible to go from output to input. If this happens, such hash function (e.g. MD5 which was broken) is no longer secure.

2. How are hash functions used in cryptocurrencies like bitcoin?
Blockchain is basically a linked list where each block contains data and pointer to the previous one. The pointer is a hash of the data inside the previous block. Each new block transactions are stored in a merkle tree which nodes are represented as hashes again. This whole process allows transactions to be unique, identifiable and immutable.

3. What does it mean when we say that hash functions need to be collision resistant?
It means that the hash of A must never equal the hash of B.

1 Like

1-making a code for an item that is allways the same lenght and secures the data imput
2- like a summup of all date connected to a transaction or the owner of the coin.
3 meaning no output will be the same on a different input

1 Like

A hash function is bound to have collisions its just the probability of how hard it is to find them because the number of possible inputs is larger (basically infinite) than possible outputs (about 2^256). :slight_smile:

1 Like

1)hash functions :in order to transmit a secret message to a receiver, we use the hash functions , it takes and input an gives a fixed length hashed output no matter how long the input is.

2)the hash functions are used by hashing the data inside the blocks ; instead of the standard linked lists formats , we use hashed pointers instead of normal pointers .since the slightest change in the input of the hash functions change dramatically the hashed output, the smallest change in the transactions history will change the hash of the previous block header.thus its immutability.

3)collision resistant : it means that two different input must give two different output , but no hash function is collision free , but since the possibilities are so big ,it doesn’t really matter.

1 Like
  1. Hash functions are a one way process when you start with a unique input and receive a unique output like a digital finger print.
  2. In a blockchain, the hash of a previous block in a sequence is a tamper-proof sequence. Because as a function of the design, a hash is very sensitive. So, to change any variable of any one of the hashes in a given block would cause a domino effect. Subsequently, it would alter all of the previous transactions in the block. Blockchain hashes are deterministic because the input data will produce the same result each time.Bitcoin and other crypto currency wallet addresses creation would use a hash to produce them.Other blockchain applications would include password verification,Signature generation and verification, and verifying file and message integrity are possibilites.
    3.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 function is a function that coverts a string to an arbitrary value . it turns its unique input to a unique output and cannot be reversible.
  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).
    So hash functions are used to give every block in the block chain a specific address and every piece of data and specific fingerprint that can’t
    be changed . It is used to help track transactions and their location and timestamp of that specific currency.

  2. 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 need to be hard to find multiple inputs that lead to the same output.

1 Like
  1. Hash functions are complex equations which takes any unique input and produces a unique output. The hash that’s produced is a digital fingerprint. Hash functions are a one-way street, used to go from input to output only. It’s impossible to work backwards, to use an output to work out the original input.

  2. Hash functions are used in cryptocurrencies like Bitcoin as part of the mining algorithm to write new transactions into the blockchain.

  3. When hash functions are said to be collision resistant, it means it is extremely unlikely that two different inputs can produce the same hash result. While not completely impossible, the chances of a collision are negligible.

1 Like
  1. A hash function turns a unique input into a unique output, almost like a fingerprint.

  2. Hash functions are used in Cryptocurrencies by making it impossible to edit or change a transaction or payment. Since it is very difficult to Brute Force a hash function, the time consuming nature of that combined with the fact that each decentralized validator will update ALL of the hashes makes it near impossible to cheat or double spend.

  3. Given two different inputs, 2 hashes cannot be the same.

1 Like

1)A hash function takes the binary from a set of characters, puts them through the hash function, and gives a unique output that is one way.

2)In bitcoin hash functions are used in mining. It is solving the hash function that is the “work” in proof of work.

  1. Collision resistant means that it is hard to find 2 inputs that would have the same output after going through the hash function.
1 Like
  1. Describe hash functions with your own words

Each unique input gives an unique output. Calculating the input from the output is not possible.

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

Hash functions are used to hash all tx in one block. This allows to perform a data integrity check in the next block and so on.

  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 that is so secure that one can assume with a high certainty that is is super difficult to get the same hash as an output by inserting to 2 different inputs.
It is much easier to find two random inputs that have the same hash than to find a second input to an other already given input that bot have the same hash.

1 Like
  1. Its a way of scrambling input data into lines of code all the same length, it is near impossible to decipher the data without a key ,and any changes made to the input will completely alter the hash sequence.
  2. It makes it impossible to alter the data during transmission between two parties, all blocks are rendered into a single hash and are included in the following blocks ,making it impossible to hack into and alter the blockchain.
  3. Collission resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs, That is the chances of two different parties creating input that would result in the same hash being generated.
1 Like
  1. Hash functions is a process by which input is given, a hashing algorithm process this input first in binary and then gives you a unique output in alpha and numeric characters. The result gives you an output that cannot be traced back to the input.
  2. Hash functions are used in bitcoin to process input using the hashing algorithm to produce a unique secure output to add to the blockchain using mining.
  3. Hash functions need to be collision resistant in that when two different inputs it is impossible to produce the same output. This validates integrity and provides security.
1 Like
  • Hash Functions are one way functions which transform input text to unique output.
  • Hash functions are used to encrypt the transaction data to make it secure
  • Each input is transformed to unique output and should not collide with each other (unique output from hash function)
1 Like
  1. Has functions are a computation to transform an input (text) into a unique output, an out that cannot be traced back to the original input.

  2. One way this is used is for each transaction a new hash is created, creating a confirmation hash which is stored on the chain.

  3. A collision is when 2 outputs are the same, and so collision resistant is to ensure that this is not possible. This is one of the reasons why bitcoin uses SHA-256.

1 Like