Homework on Hash Functions - Questions

1. Describe hash functions with your own words
Hash function is a mathematical formula. Every input gets a fixed output, it is one way algorithm, which makes it safe and almost irreversible.

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 ideal for creating digital signatures or digital keys. The hash outputs are used to create the chains in the blockchain. They are all linked together and based on one another and ensure integrity in the blockchain. If someone tries to meddle and makes the smallest changes in the data, the whole block will change and become invalid.

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).
When it is hard to find more than one input to hash the same output, the function is collision resistant. Every input must have its own unique output, like in SHA256, where collisions haven’t been found yet.

2 Likes
  1. Hash functions are the unique output of original data after a function has been applied
  2. Hash functions are used to keep bitcoin safe and to be easier to track. they use SHA-256 to keep the same length of the output, It helps when you are dealing with a huge amount of data. To be considered a has functions in bitcoin it needs to be:
    a) Deterministic so it has the same output when the input is the same
    b) Fast so it is practical
    c) Pre imagen resistance so it is hard to crack only if you use brut force but that would take to long if there is a 128 bit has
    d) Collision resistant it is not possible to have the same output for 2 different equations
    c) Puzzle friendly which means that the function of the nonce with the concatenation of the hash of the block equal to the difficulty target. f(nonce|hash of the block)=dificulty of the target
  3. Collision resistant means that 2 inputs won’t have the same output they will be tottaly .
2 Likes
  1. Hash functions create digital fingerprints meaning each unique input produces a unique output. They allow an input to be converted to an output but do not allow an output to be converted back into an input.
  2. They are used to create addresses for private and public keys and are are also used as part of the block hashing algorithm which writes new transactions into the blockchain through the mining process.
  3. Hash functions are collision resistant if it is extremely unlikely to find two inputs that hash to the same output.
2 Likes

Describe hash functions with your own words

A Hash function is a “one way” mathematical transformation of an input of variable size into a unique corresponding output of a fixed size.

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 digital signatures.

1.- Digital Signature:

From what I have been able to understand, the private key of my wallet is generated by a hash (SHA-256) of 24 words combined (input), then a public key is generated out of the private key by performing another hash function using the private key as input.

It also seems to me that the hardware wallet generates a different public key for each transaction.

2.- Transaction Records are also “chained” through hashing. It is like some sort of a hash from the hash and a rehash…lol.

3.- Hashing is also used to create “proof of work” at the mining side, which is like solving a puzzle from what I could understand.

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 resistance is a term from what I can understand that refers to the “difficulty” (not impossibility) of 2 different inputs producing the same output after hashing.

The importance of this difficulty is that if somebody could find a second input that produced the same output, then the hash would be broken, and there would not be any security. So while it is not mathematically impossible for two different inputs to create the same output, it can be extremely difficult to find the “collision” input. The more difficult this operation is, the more secure the hash is.

2 Likes
  1. Hash functions are like a digital fingerprint to transferring data over the blockchain using SHA-256. Each input generates a unique output by mathematics. It is one-way, it is impossible to generate the input only knowing the output.

  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. (Source Coindesk.com)

  3. A hash function is collision-resistant if it is hard to find two inputs that hash to the same output. Meaning that any hash function with more inputs than outputs will necessarily have such collisions. So, the harder collisions are to find, the more cryptographically secure the hash function is.

2 Likes
  1. A hash function is a mathematical functions where a set input of variables will yield a unique output of variables.

  2. Hash functions are used in bitcoin as part of a block hashing alogrithm to write new transactions into the blockchain through the mining process, where miners use “proof of work” to add their piece of the hashing data to the transaction hash to complete the new block.

  3. Collision resistance is where two different inputs are provided will yield two different output, so that different inputs will not lead to the same output, even in the case where if there is one single change to the input variables yields to a completely different output of variables.

1 Like

Hash functions are not used to derive public keys or create signatures, for that the elliptic curve is used. But the public key is hashed to get the address. :slight_smile:

  1. Describe hash functions with your own words

    A hash function converts an input into a unique output, a digital fingerprint.

  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 to convert transaction data into hashes and then together with the hash of the previous blocks to create a new block.

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

    This means that given two different inputs A and B and their hashes it is infeasible for hash A to be equal to hash B. So that for the most part as it should be, each input has its own unique hash.

1 Like
  • Describe hash functions with your own words
    Hash functions take in a value and return a hexadecimal value/representation/finger print of the input. It allows you to track and categorize information efficiently.

  • How are hash functions used in cryptocurrencies like bitcoin?
    Hash function are used in mining. So in order for the system to be secure we have miners validating each transaction randomly across a global network. The BTC has rate can be increased when lot’s of miners are mining reducing collision, and the difficulty can be decreased when there are less miners in the network. The hash function also allows people to transact anonymously and securely.

  • What does it mean when we say that hash functions need to be collision resistant?
    Means that two different inputs can not have the same output (hash).

2 Likes
  1. Describe hash functions with your own words

A hash function produces a unique output for each unique input, it is a one way, repeatable function. I imagine it as a potato masher which makes different mash for each potato :slight_smile:

  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 create a unique value from the payload and metadata of the block, this is stored as a pointer that links each block like a linked list. The hash of each block is combined with the hash of the previous block providing further security as a change to any block on the chain would have a cascading effect on the hash of each block, invalidating the chain

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

Collision resistance refers to the possibility of a ‘hash clash’ where two unique values produce the same hash which would mean that those two blocks would be interchangeable and the integrity of the blocks data in question.

2 Likes

1- Hash Function: Is a one way function that gives a unique output for each input.

2- Bitcoin transactions are hashed using SHA-256 and when a new block is need to be added, then the hashing of the old block is added to the new blocked and all hashed together

3- There must be no two different inputs that give the same output

3 Likes
  • Describe hash functions with your own words

one way function taking an input and creating an 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).

A cryptographic hash function is used for security purposes and constitutes the backbone of crypto security. A hash function turns a random input of data (keys) into a string of bytes with a fixed length and structure (hash value)

  • 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 is almost impossible for two different inputs to hash to the same output.

1 Like
  1. A hash function will convert an input of data of any length and output a fixed length string representing that data
  2. In Bitcoin, all historical transaction data is included in creating the hash of newly added data. Historical transaction data cannot be changed because of this. He hash will not match. This is the key to Bitcoin’s immutability.
  3. For every input, the output should be unique. There will be some cases of two different inputs that create the same output but this should be extremely rare.
1 Like

Thanks for the correct information Alko89

  1. A hash function is a method of describing any information, no matter how big or small in a finite 256 hexadecimal description (SHA-256). Furthermore, once the hash is found, having only the hash, it would be infeasible to find the origin of that hash.

  2. Hash functions are used in bitcoin and other cryptocurrencies to describe the transaction data of the previous block. As well as in mining when used with a nonce miners look for a compatible hash to ‘solve’ the block.

  3. For a hash function to be collision resistant it must have a high min-entropy. This drastically reduces the chance of the birthday paradox occurring where by an attacker would be able to generate the same hash value from a different set of data (a collision). This is the foundation of bitcoin and one of its biggest cryptographic strengths.

  1. A Hash function is a string of letters and numbers(Data) that are unique to its own function to create an output that is unique to itself. It creates a message that can not be reversed.

  2. Hash functions are used in cryptocurrencies as a string of data that creates security for in itself. The hash algorithm allows transaction to be identified easier on the blockchain. Hash functions are basically a storage of passwords within the blockchain.

  3. Hash functions need to be collision resistant to enable stronger and better security. Without it, hackers could easily break the hash code and steal all the cryptocurrency or any information within.

1 Like

1.Hash function is a way , function where input text is changed to a unique digital fingerprint, where the data can not be reverse engineered from the output back to the input.

2.Hash functions are used in Bitcoin to write in new transactions into the blockchain through the mining processes that resolve, solve bitcoins block hash. To solve the hash for bitcoin requires extremely large amount of computation, it takes a long time and a huge computing power to mine new bitcoins.

3.Cryptographic hash function’s property where two inputs hash into the same output. H(a)=H(b) and such collisions are hard to find are called Collision Resistance.
Every hash function with more inputs than outputs will have collisions.
Collision resistance doesn’t mean that no collision exist, it only means that the collisions are hard to find.

2 Likes
  1. Hash converts input into a complex code of numbers, those numbers are impossible so far to decipher and figure what the input was. Should it become decipherable, bitcoin will be broken.
  2. In bitcoin, hash functions are used to write new transactions into the block chain through the mining process. The inputs for the function are all of the most recent, not-yet-confirmed transactions.
  3. A hash collision attack is an attempt to find two input strings of a hash function that produce the same hash result. Networks need to be resistant to separate inputs producing the same hash output.
  1. It’s a function which can convert any input data data into 256 bits. The process of Hashing is impossible to reverse
  2. In Hashing, the same input will always give the same output so Hashing is used in the bitcoin blockchain to verify and validate the transaction in the previous block and the hash function can also be used to generate the next block.
  3. The improbability for a Hash function to give the same output from different inputs
1 Like

A hash function is an operation takes data input and converts it to an alphanumeric figure of specified length and does not allow input to be easily determined based on the output. Bitcoin uses hash functions to name transactions, name blocks, generate addresses and probably at least a few other things. The hashes need to be collision resistant because finding an identical hash with different input would allow a block to be altered.

1 Like