Homework on Hash Functions - Questions

  1. Hash functions are one-way functions that will produce unique outputs for every unique input.
  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. Hash functions need to be collision resistant because it makes it infeasible to find two inputs that hash to the same output.
1 Like

1)A hash function is when an input gets converted to a digital print. Plain-text -->Hash function--------->Digital print
2)The transaction are the inputs that are ran through a hashing algorithm which results in a fixed 256 bit length
3)It means two inputs can’t have the same out put. They must be all unique.

1 Like
  1. Hash functions translate an input value into an output value in a very specific way. For example it every slight change of an input must result in a completely different output, there must be no collision meaning 2 equal hashes and so on.

  2. In cryptocurrencies hash functions are use to encrypt a transaction. It happens in a way that the current transaction is encrypted together with the previous transaction. By doing so, the chain of blocks can not be altered without altering the entire chain which makes the currency very safe.

  3. It is collision resistant if it is unfeasible to find two inputs resulting in the same output.

1 Like

1)you can put in a whole contract that will be converted to one hash(fingerprint) And if you change one letter the hash(fingerprint) will change
2)Hash your(input) private key into a public key(output)

  1. two different inputs result in the same output
1 Like
  1. A hash functions takes an input and covets it to a 16 bit binary output.

  2. hash functions are used to create smaller outputs that minimize storage and increasing speed of output verification. The hash function makes it impossible for someone finding the input value if a hash value is discovered. Hash functions are a one way function from input to output (pre-image resistance).

  3. Collision resistance is necessary so that 2 input values can not end up with the same hash output. Each input has to be a unique hash output number

1 Like
  1. Hash functions convert any input, into a unique output that cannot be traced.

  2. Hash functions are used in crypto currencies in multiple ways including public and private keys, transaction verification, and block identification.

  3. The best definition I could find is this, "Collision Resistance is the property of a hash function that it is computationally infeasible to find 2 colliding inputs.’

1 Like
  1. Describe hash functions with your own words?
    Hash functions are a security feature that creates an unique finger print from an Input to an Output. By a mathematical function
    .
  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions 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?
    That the hash function is hard to find two inputs that hash to the same output.
1 Like

Public keys are not derived using hash functions but the elliptic curve, however the public key is hashed to get the address :slight_smile:

Such a tiny hash could be broken quite easily :stuck_out_tongue: its a bit larger 256 bit for sha256

1 Describe hash functions with your own words
It is an algorithm that you give an input convert into bit doing a math calculation and them you get a result as a unique fingerprint code for this 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).
The used like a data base o ledger to secure the transaction from A to B where the data is the amount and the wallets.

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 each input has their own unique hash. Too different input with the same hash is know as a collision.

1 Like
  1. Hash functions aalows you to encrypt information into a code, they are secure since you can only generate output with an in put but not the contrary.
    2.In Bitcoin hash functions are part of the block hashing algorithms which is used to write transactions into the blockchain through the mining process.
    3.It means that two different inputs give you the same output
1 Like
  1. Hash functions convert strings of any length into a 256 -bit randomly generated hash. Outputs are unique to what you input into the function. This is what creates a unique digital signature.

  2. Hashes in crypto are used for turning your private key into a public key. The public key is used for receiving funds whilst the private key is used for sending funds. Also transactions in a block are hashed and this hash is the hash of the next block. This ensure immutability as a change to the contents of a block means a change in the hash of the previous block thus disturbing the entire network.

  3. Collision resistant means that no 2 inputs should result in the same output.

2 Likes

1.Describe hash functions with your own words
hash functions are one way functions that you can not figure out the input by knowing output
and they produce unique outputs. They kind of encode the input string by a certain structure for example hexadecimal in case of SHA 256
The output format is fixed.
2.How are hash functions used in cryptocurrencies like bitcoin?
block hashing algorithm which is used to write new transactions into the blockchain through the mining process consists of hash functions. Inputs for the function are not-yet-confirmed transactions and a reference to the previous block.
3.What does it mean when we say that hash functions need to be collision resistant?
it means that two distinct inputs should not lead to same outputs which in cryptographic hash functions collision is rare so if two hashes are the same, we know that the inputs were the same.

1 Like

#1 - Each hash function has to have a unique input of any length , which
then becomes a unique output of fixed length , creating a digital finger print.
#2- It would seem that the development of any coin would have to use hash functions threw out coin process to establish who , why ,and what
they stand for or do.
#3- Collision resistance basically means " no hash alike" and that’s why
bitcoin uses SHA-256

1 Like

Hash functions are not used to derive public keys. For that the elliptic curve is used. But we do hash the public key to get the address :slight_smile:

1 Like

I’m not sure what you mean by that. Can you elaborate?

1 Like

1 - a hash function a function that generate a value from a sting or text using mathematical function
2- SAH256 is the hash function used in BTC. also all has functions that been used in cryptocurrencies
they have to meet 6 various properties.

  • same output no matter how many times you do it. Deterministic
  • capable of returning the hash of input quickly. Quick Computation
  • it is infeasible to determine the input based in the output Pre-Image Resistance
  • two Hash functions they will never give the same result - ollision Resistant
    and Hash(k/x) = y. to find Y you need to guess the hashing of k and X with K been is between 1 and Gazillion!!! never can happen!.
    3- Collision Resistanttwo Hash functions they will never give the same result
1 Like
  1. A hash encrypts information into a unique output that can’t be reverse engineered to discover the input
  2. Information can be sent as value, since it is secure. Securely storing value is a property of money. Before bitcoin, information and value were separated, as in the wire payments of SWIFT, making them corruptible.
1 Like
  1. function that gives a unique and fixed representation of input data;
  2. in bitcoin hash functions is used in mining. every block header is hashed multiple times until the miner finds value less than target difficulty;
  3. ā€œcollision resistantā€ means that brute force is only way to find inputs with the same output. If for hash function exists more efficient technique than brute force then it is not collision resistant.
1 Like
  1. each unique input leads to an unique output, slight change in input results complete output, output can not work backwards to generate exact same input;
  2. once input is done, it can not be changed. Output can not be reversed. This leads to secure transfer of value. Therefore it will significantly facilitate value transactions without two parties know or trust each other. A game changer of the old monetary and payment system;
  3. one input leads to one output, almost impossible one input generates more output, mathematically almost not possible.
1 Like