Homework on Hash Functions - Questions

  1. Each unique input produces a unique output (digital fingerprint), you can go from input to output but never from output to input, a hash function is always a one way function. SHA 256 for BTC. Base 16 includes 0-9 plus a to f to give us SHA 256 hash functions. You can hash a file to make sure no one is able to meddle with it.

  2. hash functions in BTC are used in mining and to secure wallets and provide public and private keys.

  3. Collision resistant means there is a very small chance that there will be two hashes that generate the same output.

  1. Hash functions provide secure encryption.
  2. Hash functions are used to transmit cryptocurrency data anonymously.
  3. Having a low to near virtual impossibility of having different inputs result in having the same output.
1 Like
  1. A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length but output is always of fixed length. Values returned by a hash function are called message digest or simply hash values.

  2. Blockchain addresses are derived from hashing. The hash of transactions makes it easy to keep track of transactions on the blockchain. Hashing functions are crucial in crypto mining where a valid nonce is discovered by computing several hashes. This helps to form a consensus on the blockchain. Hashing helps in defining cryptographic signatures that help to determine valid transactions. Hashing of data helps to store large amounts of data on the blockchain.

  3. Hash functions need to be collision resistant so that two different inputs don’t produce the same hash output. If they produce the same hash output they can then be exploited by an attacker.

1 Like
  1. Mappings of text to a number (could be in any base). Their inverse should be unknown. Small changes in input should lead to different outputs. Given an output and a random value from a high min-entropy distribution, it should be hard to find an input that, if concatenated with the random value, gives you the output when hashed (puzzle friendliness).
  2. A new block is only added if the hash of the content plus a random string (the nonce) is lower than a certain difficulty level. This is difficult because of the puzzle friendly aspect of hash functions. Miners try to add blocks continuously by solving these problems (they get BTC for that, and remember, everybody wants to make money :wink: ).
  3. It is infeasable to find 2 inputs that would lead to the same output (you’d need sqrt(2^256) iterations for that in the BTC framework). This is important because I wouldn’t want anybody to be able to change a transaction without actually the hash so that nobody would notice. This could lead to big fraud!
1 Like

Describe hash functions with your own words

  • Hash function is a mathematical computation process that trasforms an input in an output, the output will be written considerind a choosen system, i.e. SHA256.

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 in cryptocurrencies to let the system being safer

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 every input has an own output, moreover every changing something on the input generates an huge change on the output. This means also that it’s not feasible for an input h(a) being the same of h(b)
1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
  • A Hash function is, here, an undefined function that uses a input to generate an output value that is unlikely to be reversed and thus cryptographically secure. This function is definable but outside the scope of a high-level understanding of the concept.
  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 function like SHA256 is used in the output of a public address in order to offer an extra layer of projection for your public key.
  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).
  • Collision resistant’s means that we have a unique identifier for the specific input data set. If we have a collision we have two inputs that have the same output finger print. This is like when you see someone out in public, not wearing a mask, who looks like your evil, or good twin; you know, “your good ash, and I’m bad ash.”

  • I read somewhere that it’s unlikely that you could generate the same private key as someone else because there are so many combinations that it’s not feasible to have such a collision, but it is possible.

1 Like
  1. Hash functions can only be done one way and is impossible to reverse. Input -> output and no way to do output -> input.

  2. Miners has to approve the hash before it goes to the next block.

  3. Collision resistant means its very unlike to generate the same has for a different input.

Describe hash functions with your own words
-Hash functions take input data and convert them to an output string of numbers and letters. This hides and secures the original data as it Is extremely difficult to deduce the input from the output string.

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 secure the data in the blocks of the blockchain. Hash values are also included with pointer info to ensure that anyone attempting to change data in a block will be distrusted by the network as the other blocks with not agree to the data change.

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 should get a unique hash. While there is always the possibility of a collision (birthday paradox) the likelihood of this is extremely small.

  1. it is an ideal algorithm for cryptography, a one-way function
  2. the transactions are taken as input and run through SHA- 256 which gives an output of a fixed length.
  3. No hash function is collision free, but it usually takes so long to find a collision. It is hard to find two inputs that hash the same output.
  1. Hash functions are functions which change an input into an output (of fixed length), but not the reverse. Any slight change in the input will create a very different output.

  2. Hash functions are used in crypto-currencies like Bitcoin in the following ways;
    a) as part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.
    b) they are used to uniquely identify transactions.
    c) to enable the storing of passwords that cannot be identified by hackers.

  3. What we mean when we say that hash functions need to be “collision resistant” is that they must be highly unlikely to produce the same output from two or more different inputs.

  1. A hash function is a function that takes any input and converts it to a fixed length output. They are nearly impossible to crack.

  2. In cryptocurrencies, hash functions are used to create addresses, private keys, and public keys.

  3. Collision resistant means making sure that two or more different inputs do not end up accidentally having the same output.

  1. Hash functions are a group of properties used to blockchain to create an immutable transaction record.
  2. Hash functions are used to produce unique records for the blocks using the 6 hash function properties. They create the rules for mining.
  3. Collision resistance means it is unlikely but not impossible to get the same output from two inputs.

Hash functions are 1 way functions. The purpose is that you can’t decypher the input. But you can for example proof that a certain file you want to download isn’t modified. Because if you would manipulate some data, the hash would be totally different.

On your second question about mining & the nonce etcetera, you will learn in future lessons.

1 Like
  1. Each input has unique properties that generates a unique output. Hash functions generate a unique, complex digital fingerprint that is immutable.

2.A complex hash function SHA256 is used for Bitcoin. It is more secure for Bitcoin compared to MD5 which can be tampered with from output to input. With a base 16. it is impossible to hack. This is fundamental for proof-of-work algorithm in mining.

  1. It means each input has its own hash. They can never collide.
  1. one way functions that you can have any input and have a fixed output
    2.hash in bitcoin are used to encrypt transaction data so that it is secure
  2. two different inputs cant have the same output
  1. Hash functions are algorithms that will take a unique piece of input data and produce a unique output fingerprint. The process only works one way, input to output and cannot be reversed engineered to find the input data from the output data.
  2. Hash functions are used in Bitcoin by linking the transactional data in the blocks together. They are also used in the mining process, keeping the network in tact and efficient by changing the difficulty of mining. Also they serve as the confirmation the nodes need to complete a transaction by validating the digital fingerprint used by the sender.
  3. A hash function is collision resistant when the hash is the right speed, and wont produce two hashes that are identical but are from two different data inputs. This is not impossible using SHA256, but it is infeasible.
1 Like

Glenn_CostaRica

1.Describe hash functions with your own words
A hash function is a mathematical function that takes an input, in the form of any string of letters or numbers, and by applying a certain set of rules, transforms it into a hexadecimal number (base-16 number). The function has the property of being unhackable in the sense that it works only as a one way function: there is no way to reverse-engineer the results it generates. You can give any input to the function and it will return to you a unique identifier or “finger print” of the original data you have provided to the function. The finger print will always be the same for the very same input. However, the slightest change in one input, even if the change is only one single letter in a long string of characters, will cause massive chaotic changes in the results.

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 encrypt private keys: they use the private key as input and generate public keys as the output. Hashes are also used to link blocks in Proof of Work blockchains.

3. What does it mean when we say that hash functions need to be collision resistant?
When we say that a hash function F is “collision resistant”, we mean it is highly improbable – or near to impossible – to find two different inputs that would generate the same output through the function; therefore, a case like the following would be almost impossible: F(a) = F(b).

1 Like

1.hash is taking an input and giving an output of set value that can not be converted back into the input
2.Bitcoin uses hash functions to take your private key and generate a public key which is what another person can use to send you btc
3.hash functions need to be collision resistant becuase we need one output for each unique input otherwise two inputs having the same output will cause problems

Q1: a hash function is a function that for each unique input you give it , it will produce a unique output , also you can solve the output value with the given input but not vice versa which helps with security and immutability

Q2: in BTC protocol hash functions are used to add new transactions to the blockchain thru the mining process

Q3: collision resistant in my understanding means where the probability of a hash function outputting the same hash for two different inputs is extremely unlikely.

  1. Hash functions are mathematical functions that use hashing algorithms to encrypt input data. The input data, such as a message of any given length, can be run through an algorithm like SHA-256 that uses Base 64 (0-9 and a-f) so that there is a unique and fixed output (256 bits using SHA-256) for any given input. Even if 1 bit is changed or altered, the output changes, thus making it Deterministic. A specific input will always have the same output when out through the hashing algorithm no matter what. There is no feasible way to go from an output to an input. It is a one way street.
  2. In Bitcoin, hash functions make up part of the blockchain hashing algorithm used to write new transactions in the blockchain through the mining process. During mining (proof of work), the inputs are the not-yet-processed transactions along with a timestamp and reference to the previous block. For a miner to solve a block, they take all the computational inputs along with their own input so that the hash/tag/digest starts with a specified number of zeroes (18). The computational power needed to solve such a math function in the blockchain is immense and only occurs once per 10 minutes in the entire global network.
  3. If a hash function has more inputs than outputs, collisions will occur. In hash functions, there needs to be resistance or very few times in which this occurs. Because if there is a feasible way to discover these collisions, then the encryptions could be discovered and bad actors could cheat the system. In Bitcoin, this could result in financial theft. Luckily in the case of SHA-256, th only attack method is by brute force and that would take several lifetimes to complete without a quantum computer.