Homework on Hash Functions - Questions

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    Creating a unique output with a standard length from a unique input where it is ‘impossible’ to determine the original input

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash function is used in cryptocurrencies to uniquely identify a block in the blockchain. Any change in the data inside a block would cause a change in the hash for the block which makes it ‘impossible’ to change the data. It would break the chain.

  3. What does it mean when we say that hash functions need to be collision resistant? it means that it should not be possible to use the same input twice for hashing as the unique input will create unique output.

1 Like

One example is to cryptographically link blocks in a chain :wink:

1 Like

What kind of property? :stuck_out_tongue:

Homework on Hash Functions - Qss

  1. Describe hash functions with your own words
    Hash functions are unique and special functions that for each unique input it will produce a unique output and the Output of the hash function can never be used to discover the 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).
    Hash functions are used to encrypt the cryptocurrency’s transactions and connect them in a chain or block. The hash of the previous block is taken and a random string (none) is added, the result is hashed. The final hash is evaluated on its difficulty level and may repeat the process if not adequate or the block is accepted and added to the chain.

  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 it is extremely unlikely that there will ever be the same output for two different inputs.

1 Like
  1. Describe hash functions with your own words
    Encrypting input giving out unique output which is infeasible to reverse.
  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).
    To protect transactions by encrypting them.
  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).
    If a hash function is not collision-resistant then an adversary can break the function. Collision resistant means to make almost impossible chance to give the same output for different input.
1 Like
  1. they’re one way functions that once inputted it gives you a unique output but cannot executed when going out to input

  2. has functions allows you to transact data

  3. there cannot be 2 identical outputs

1 Like
  1. They are special functions which give unique output to a unique input
  2. They are used to write new transactions into the blockchain.
    3.Extremely low probability to get the same output for two different inputs.
1 Like
  1. Describe hash functions with your own words
    Each unique input will give a unique output. It starts from input to give output and never vice-versa.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    The transactions are taken as input and run through a hashing algorithm using SHA-256 which gives an output

  3. What does it mean when we say that hash functions need to be collision resistant?
    Its infeasible for different inputs to have the same hash output. Each input have it’s own unique hash.

1 Like
  1. Security measure that allows for a unique output per unique input. It is one way. Meaning, the input cannot be determined by the output. Any change to the input makes it unique and thus will give a new output.

  2. Hash functions can be transactions, wallet addresses, private/public keys, and mining.

  3. It is hard to find 2 unique inputs that output the same hash. a ≠ b but H(a) = H(b) it is very unlikely this will happen

1 Like
  1. Hash functions are like ‘digital fingerprints’ (unique input generates a unique output/hash). This makes hash functions both deterministic and immutable.

  2. It’s used in e.g. writing new transactions through the mining process (block hashing algorithm) and checksums.

  3. Collision resistant means that it’s unlikely that different inputs (A and B) are the exact same hash.

1 Like

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

1 Like
  1. Hash functions are a type of function/ computation that take in a string of any length and produce an output of a fixed length.
  2. Cryptographic hash functions are used in BTC to hash blocks and transaction data so that it is possible and not all cluttered. Hash functions are also used in mining to secure the network via a decentralized distribution of mining machines across the world that are competing to solve cryptographic hash function puzzles.
  3. To be collision resistant means that it is extremely unlikely to find 2 inputs that will produce the same hash output.
1 Like
  1. Hash functions are one way conversion of input data of variable length to an out of fixed length.

  2. Hash functions is used for mining blocks, creating wallets (deriving public key from a private key)

  3. It has to be collision resistant because we don’t want two separate input data strings to give the same output.

1 Like
  1. Each input gives an exclusive output and it is impossible to figure out the input starting by the output.

  2. They are used to protect the transactions, by assigning a unique line of text for that transaction, which is impossible to hacked without the private key.

  3. For each input, the output has to be unique, being impossible for two different inputs return the same output.

1 Like

They are one way (not invertible) functions that can take a number - or text converted to binary representation - and and generate a quasi unique 256 bit output. It is only quasi unique because collisions between inputs are possible, but very unlikely. They can be used to check the validity of their source. Even one bit of change in the original will dramatically alter the resulting hash. Bitcoin relies on SHA-256 to verify the transactions in each block.

They are used to aggregate all Transactions in a block into a single hash and then to validate the block by requiring miners to find a nonce, which if concatenated with the Trx root hash hashes to a number smaller than the current difficulty (starts with a given number of zeros.) Furthermore they are used to validate the transactions themselves from both the senders and the receivers part (somehow, I don’t get the public/private key thing yet).

It means there is vanishingly small but non-zero probability of two different inputs generating the same hash. If the hash checks out it can be relied upon to verify the content it was generated from.

1 Like
  1. Input data is processed by an algorithm, which acts as a cryptographic cypher and produces an output. This output is displayed in hexidecimal language. It is possible to derive the output if you have the input (because as it is deterministic, the same input will always produce the same output), however, the reverse (i.e. determining the input if in possession of the output) is almost impossible and for practical purposes may as well be impossible (it is unfeasible), due to the time and the computational power that would be required.

  2. In the case of BTC, miners use hash functions in order to mine blocks. Hash function is also used in order to encrypt transactions and to connect each newly mined block to its predecessor(s).

  3. Collision resistance means that no 2 different inputs will result in the same output. However, I must admit that when reading about why there is an unrealistically low probability that theoretically this might be remotely possible, my brain turned to liquid until I gave up trying to understand it. If anyone here can explain simply, please do! :grin:

1 Like
  1. Hash functions are an algorithm that create a defined number of output characters so as to provide a unique identification that will allow a transaction to be securely performed.

  2. Hash functions are used in cryptocurrencies to allow for secure and verifiable transactions.

  3. To be collision resistant means that the algorithm won’t create an identical hash from two or more transactions at the same time.

1 Like
  1. Hashing is a conversion of a given value into a different value via a mathematical algorithm.
  2. In bitcoin you are trying to do a ‘reverse hashing’, ergo getting a value from the hashed result using pretty much ‘brute force’ method. but once you resolve that hashed value - it becomes easy to verify by hashing it. In bitcoin it is used for mining - finding new blocks.
  3. In bitcoin Collision resistance is used for example in signature security, so other party cannot sign anything with your signature. Basically lowers probability of two inputs generating the same output hash.
1 Like
  • Hash functions are functions that can produce one unique fixed-length output for one given input. A hash function is deterministic in the sense that the same input will always give the same output. A hash function produces a unique output: two different inputs, even though they are very slightly different, will always give a totally different output. A hash function is a one-way function in the sense that there is no way to figure out what is the input of a given output.

  • Hash functions are used in Bitcoin in different areas with especially: references generation for blocks and transactions, private/public key cryptography mechanisms and mining.

  • Hash functions are collision resistant, meaning that it is very very extremely impossible that 2 different inputs will give the same output/fingerprint.

1 Like
  1. Hash function enables us to take 1 or more input and convert it to a unique result that is only linked with our input. There are many types of Hash functions and the length of our output depends on the type of Hash function used. A proper hash function like SHA-256 (Used in BTC) will not allow one to reverse the process and get the Input by using the output. So this is a one way road where you can’t go back.

  2. Hash functions helps in the validation of the chain by comparing the hashes with the hash of the previous block in the chain. This combined with the fact that any changes in the input will make a significant change in the hash generated, makes it impossible to change data in the Blockchain effectively eradicating the possibility of making new BTC by altering data. SHA-256 is the Hash function used by BTC, it is used for mining of BTC by getting the Input hash to match with difficulty level at that time (Which is extremely difficult to match and requires a lot of computing power - This makes sure that BTC isn’t easy and over mined and avoid Collision Resistance).

  3. Collision Resistance is basically talking about the chance of 2 different inputs giving the same output hash. This could happen in BTC if it is over mined and this is prevented by raising the difficulty levels of the “Puzzle”. It is not impossible, but it is extremely difficult/rare to get to such a situation in BTC