Homework on Hash Functions - Questions

  1. Hash functions are one way functions that take any digital input and creates a digital output with a fixed length that cannot be reversed engineered

  2. Hash functions are used in bitcoin in various of ways. One way is that hashing is used to create digital signatures, and also all transactions are hashed. Another way is to change the nonce and hash the block header to find a hash lower than the difficulty target

  3. Collision resistance means that a hashing function should not create the same output for two different inputs

1 Like
  1. A hash function is a one-way function. A unique input produces a unique output. An output cannot create an input.
  2. Hash functions are used to write new transactions onto the blockchain through mining.
  3. Hash functions are collision resistant when it is hard to find two inputs that hash the same output.
1 Like

A digital signature is actually created by the elliptic curve digital signature algorithm.

  1. Describe hash functions with your own words. ==> Hash functions take in an input and output a unique number as long as the input is unique. If all the input is different, then all the output is unique AND there is no way to revert back to the original input. Hash functions have at least one purpose, which is to show if any input was changed, that is if the same input suddenly shows a unique output, then the original input was changed in some way.
  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 following is one possible answer but it is still unclear to me: ā€œā€¦ if someone wanted to change the ledger or double-spend a transaction, he or she would have to change the hash in all previous blocks.ā€
  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). The two different inputs create the same output. That is, the output is not unique for two or more different inputs.
1 Like
  1. Describe hash functions with your own words
    Hashing means taking an input of any length and returning an output of fixed length

  2. How are hash functions used in cryptocurrencies like bitcoin?
    In BTC transactions are taken as an input and run through a hashing algorithm that returns an output of a fixed length. Sha256 is the hashing algorithm used in BTC, no matter how big or small your input is the output will always always have a fixed 256 bits length.

  3. What does it mean when we say that hash functions need to be collision resistant? Means that each input will have its own unique hash. Having two different inputs that result in the same hash is known as a collision. No function is completely collision free but for it to happen takes a long LONG time.

1 Like

Thank you sir, did not know that! :relaxed:

1. Describe hash functions with your own words
A hash function takes an input and converts it to a fixed length output. The same input will always generate the same output. It is difficult to convert the output back to 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).
In the bitcoin protocol, hash functions are part of the block hashing algorithm which is used to add 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? (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 property of cryptographic hash functions where it is hard to find two inputs that hash to the same output.

1 Like

1.hash functions are used as a unidirectional linear method of transferring inputs and converting them through a specific computational process to produce a unique output. (can’t be done the other waay around IE. Output -> Input.

  1. Hash Functions are used in cryptocurrencies like Bitcoin as it is capable of encrypting transaction data in a linear , unidirectional format, encrypting all inputs taking them and running through a hashing algorithm (such as SHA-256) to generate a very unique output that can’t be duplicated or backtracked.

  2. A collision resistant hash function means that the odds of finding two inputs that generate the same output is almost 0.
    Note that collision resistant hash functions don’t mean there are no collisions that exist however the collisions that do exist are extremely rare and hard to find.

1 Like
  • Homework - Hash Functions

  • Describe hash functions with your own words?
    A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values are usually used to index a fixed-size table called a hash table.

  • How are hash functions used in cryptocurrencies like bitcoin?
    -Deterministic
    -Quick Computation
    -Pre-image resistant
    -A small change in input changes the output
    -Collision Resistant This means that no two input hashes should map to the same output hash)
    -Puzzle friendly

  • What does it mean when we say that hash functions need to be collision resistant?
    Given two different inputs A and B where H(A) and H(B) are their respective hashes, it is infeasible for H(A) to be equal to H(B). What that means is that for the most part, each input will have its own unique hash.

1 Like
  1. Hash function is one way functions which produces ā€œfingerprint ā€œ-string out of some input : file, string, word etc.
  2. Ethereum uses the Keccak-256 cryptographic hash function in many places.

Two different hash functions are used widely in the NEO system: SHA256 and RIPEMD160.

The hashing algorithm used in Polkadot is Blake2b. Blake2 is considered to be a very fast cryptographic hash function that is also used in the cryptocurrency Zcash.

In Monero the input to hashing function is concatenation of: serialized block header (around 46 bytes; subject to varint representation) merkle tree root (32 bytes) number of transactions included in the block (around 1-2 bytes; subject to varint representation)
3. No same outputs in strings after hashing if inputs were different.

1 Like
  1. A hash function is a one-way function, that can convert a text input into a number by applying a certain
    algorytm. A hash function must be biunivoc and irreversible.

  2. Hash functions are used in cryptocurrencies like bitcoins in order to store new transactions into a
    block. The new transactions, combined together with aribitrary inputs chosen by the miners, must
    produced an hash result smaller than a certain value in order to create a new valid block to add to
    the blockchain.

  3. Hash functions are collision resistant if it is extremely improbable to find 2 different inputs that
    produce the same hash output.

1 Like
  1. Describe hash functions with your own words

A hash function takes a group of characters and maps it to a value of a certain length; the output of the function is called a hash.

  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 write new transactions on the blockchain and are part of the hash algorithm, which are vital in keeping the Bitcoin blockchain safe and secure.

  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 hash functions means that it is hard to find two inputs that hash to the same output (a hash function with more inputs than outputs will definitely have collisions)

1 Like
  1. Hash functions are one-way cryptographic functions that take any input data and convert to a fixed-length string of digits, which should be unrecognizable to the input data.

  2. Hash functions are used in cryptocurrencies to verify new transactions, prevent double spending and mining new coins.

  3. Collision resistant in hash functions means that no two inputs should result in the same hash value.

1 Like
  1. A hash function is a way to encrypt data, and to create a different output per input used, like a digital fingerprint.
  2. Hash functions are used in the mining of bitcoin. Miners put together the transaction, data from the previous transaction, and time/date stamps, along with 0’s to try and solve the block.
  3. This just means that you need to have unique hash functions creating unique answers, otherwise you would end up with multiple hash functions creating the same block, and it would all fall apart.
1 Like

1,hash functions are a one way input that produces a unique output
2,they are used to write new transactions into the blockchain through the mining process
3, Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs

1 Like
  1. Each unique input will produce a unique output.

  2. Hash functions are used to write new transactions with cryptocurrencies like bitcoin through the mining process. It’s used for security purposes and constitutes the backbone of many cryptocurrencies like bitcoin. It turns a random input of data (keys) into a string of bytes with fixed length and structure (hash value). And, the hash of the transactions is easier to identify on the blockchain.

  3. Hash function has to be collision-resistant which ensures that it has to be impossible for two different inputs to produce the same output.

1 Like
  1. Describe hash functions with your own words
    Hash function is one of the most important security things in Bitcoin.Basically is a convertor of data. It is able to receive any form and size of data and translate it into an alphanumeric string
    2.How are hash functions used in cryptocurrencies like bitcoin?
    to hash transaction data
    3.What does it mean when we say that hash functions need to be collision resistant?
    It doesn’t have to give 2 identical hash results.2 identical Outputs
1 Like
  1. Hash Functions are the lifeblood of the blockchain, somewhat of a digital fingerprint. Without them, all the benefits of blockchain disappear back into the internet. Hash functions are functions that take the text within a block and give it a numerical value outputted as various hashes.

  2. Each block has hash algorithms built into them. Whenever text is put into a box a hash is then assigned to that specific block. Once that block interacts within a transaction involving a various number of blocks, they are then sequenced together in an unbreakable chain, hence the name ā€œblockchain.ā€ This chain of blocks makes up the public ledger that sits at the foundation of all of blockchain’s benefits.

  3. In Cryptography, the term ā€˜collision resistant’ refers to the properties of a function. For example, if function h(x) is collision-resistant, then h(a) = h(b) where a ≠ b is highly improbable. This means that it is nearly impossible to plagiarize/tamper/anything dishonest within a blockchain.

1 Like
  1. Hash functions are away of creating a digital fingerprint. One specific input will create a unique output. You cannot use the output to generate the original input.
  2. Hash functions are used to write new transactions into the block chain through mining. Information can be passed anonymously.
  3. The more inputs than outputs there are, the harder they are to find and the more secure the hash function is.
1 Like
  1. hash functions are a one way data transfer where each unique input creates a unique output.
  2. hash functions serve as an incorruptible record which are impossible to alter, perfect for cryptocurrency transactions
  3. Collision resistance means you will never get the same output for two different inputs, everything is unique
1 Like