Homework on Hash Functions - Questions

  1. They accept a variable length input and return a fixed-length hashed output. They are one-way.
  2. They are used on a given block to create the hash fingerprint for that block which is then stored in the header of the next block. This is where the chain of blockchain comes from and also the immutability.
  3. It means a unique output for each input.
1 Like
  1. Hash functions are designed so that input cannot be deduced from the output. You give the hash function an input, and it will return an output, but you cannot know the input from the output.

  2. Every block header contains the hash from the previous winning block, along with a random number called a “nonce.” The previous hash and the nonce are combined and are fed into the hash function. If the output of the hash is equal to or less than the target (the target is a very, very low number) it will “solve” the block and be awarded bitcoin. If not, it will try again, using a different nonce.

  3. A collision resistant hash function is one where one and only one input can produce a given output.

1 Like
  1. hash functions and unique fingerprints that hash raw data

  2. they are used to write new transactions through the mining process

  3. meaning hard/not able to find 2 inputs that hash to the same output

1 Like
  1. A hash function is converts strings of letters into an encrypted fixed length output.
  2. Hash functions in bitcoin are part of the block hashing algorithm used to write new transactions into the blockchain.
  3. When hash functions are said to need to be collision resistant, that means two different inputs are unable to result in the same output.
1 Like
  1. Hash functions are mathmatical functions that are able to take any input and produce a fixed (digital fingerprint) output.

  2. Hash functions are used in crypto to write new transacitons into the blockchain through mining. Miners are given a defined set of inputs and a random nonce and taked to find a value with the desired amount of zeros as its first several digits, which are varied in order to keep solving to about 10 minutes.

  3. Functions need to be collusion resistant in order to make it hard to find two inputs that hash the same output.

1 Like
  1. Describe hash functions with your own words
    A: Hash functions use inputs to create an unique output. They essentially create a digital fingerprint. Hash functions convert data.

  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).
    A: Hash functions are used in bitcoin to pass transactions without identifying the input.

  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).
    A: Hash functions are collision resistant when two inputs that hash to the same output.

1 Like

Describe hash functions with your own words.

Hash functions are one way functions where each input produces a unique output or digital fingerprint.

How are hash functions used in cryptocurrencies like bitcoin?

Hash functions in Bitcoins are used to mine new transactions on the blockchain. The inputs for the hash function are the unconfirmed transactions plus additional data related to time and the previous transaction. To solve the block, miners try to combine all of the inputs along with data of their own so the outputs start with a bunch of 0’s. It takes a lot of computing power and guessing.

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

Collision resistance means that is very difficult to find 2 inputs that produce the same output in a hash function. This is an important property in cryptographic hash functions.

1 Like
  1. Describe hash functions with your own words.
  • Hash functions are a given set of data into a bit string of fixed size, also known as the “hash value.”
  • Hash functions are used in cryptography and have variable levels of complexity and difficulty.
  • Hash functions are used for cryptocurrency, password security, and message security.
  1. How are hash functions used in cryptocurrencies like bitcoin? Cryptographic hash functions are widely used in cryptocurrencies to pass transaction information anonymously. For example, bitcoin, the original and largest cryptocurrency , uses the SHA-256 cryptographic hash function in its algorithm .

  2. What does it mean when we say that hash functions need to be collision resistant?
    Hash algorithms are often used for computing digital signatures. The signer of a message runs the original message through a hash algorithm to produce a digest value, then encrypts the digest to produce a signature. Someone verifying the signature will run the message through the same hash algorithm, and will decrypt the attached signature value to ensure the digest it contains matches the one they computed.

If collisions are easy to find, they allow an attacker to take an authentic digitally signed message, find a different message that produces the same digest (the collision), then substitute the fake message for the real one while keeping the same signature value. Someone trying to validate the signature won’t be able to tell the difference. This destroys the value of digital signatures.

2 Likes
  1. Describe hash functions with your own words: It is a mathematical equation that transform any given input with a specific binary representation into a unique output. No one can reverse the output to calculate the initial raw data.

  2. How are hash functions used in cryptocurrencies like bitcoin? The Hash function in Bitcoin is used in two areas.
    Creation of the address: The SHA256 hash function is used up to 3 times in the address generation process. Thanks to this function, the address is shorter than the public key from which it comes.
    Mining: Proof-of-Work. Hashing is a key process in block creation. What’s more, it is also used in multiple steps, since the miner must associate the transactions with the block. To do this, use the hash function to create the Merkle tree in order to resolve the mathematical problem. This is how it is possible to completely link all new and past transactions, generating total integrity and immutability.

  3. What does it mean when we say that hash functions need to be collision resistant? A hash function H is collision-resistant if it is hard to find two inputs that hash to the same output

2 Likes
  1. Describe hash functions with your own words
  • Hash functions are a mathematical way to take an input, perform an operation on it, and receive an output.
  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 in crypto’s in the mining new blocks for the blockchain. When a block is given, miners are given a unique output and validate the transaction.
  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).
  • To be collision resistant means that no two inputs will equal the same output
1 Like
  1. Hash functions are where a specific input will generate a specific, unique finger print output. It is impossible to reverse or crack the cryptography which has created the input thus it is a one way unique function giving a one way unique output.

  2. Hash functions are used in crypto currencies to input key data which will store on the blockchain a key output. This could be by way of recognising data inputs precisely as if one single data input is changed, the hash function will also be changed. Hash functions are an important part of information security as a whole as the input known more commonly as a string will return a sequence of of letters of a fixed length. That means that the digest - will always be the same length. A common use of thie Hash function for cryptocurrencies is to store passwords.

In the Bitcoin protocol, hash functions are part of the block hashing algorithm which is used to write new transactions. In bitcoin mining, the inputs for the function are all of the most recent, not - yet - confirmed transactions along with some additional inputs relating to the timestamp and a reference to the previous block. The Hash function is crucial to the ‘proof of work’ algorithm involved in mining, to successfully ‘solve’ a block, miners try to combine all of the inputs with their own arbitrary piece of input data in such a way that the resulting hash start with a certain number of zeroes.

  1. When we use the term “Hash functions need to be collision resistant”, it implies that a hash function is collision - resistant if it is hard to find two inputs that hash to the same output; that is, two inputs (a) and (b) where a ± but H(a) = H(b). The pigeon hole principle means that any hash function with more inputs than outputs will necessarily have such collisions, the harder they are to find, the more cryptographically secure the function is.
1 Like
  1. Hash functions are very secure for two reasons. One, each unique input gives a unique output. In other words, if you make a single slight change to your input, the hash function will produce a completely different output. Two, the Hash function is a one way function. It is impossible to reverse back from output to input.

  2. A hash function is a mathematical process that takes input data of any size, performs an operation on it, and returns output data of a fixed size.
    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 that means hash functions make it hard to find same output result from different input.

1 Like
  1. Hash functions are functions where every unique input gives a unique output and it can only be solved by going from input to output.

  2. Hash functions are used in bitcoin for mining. They are solved using all the transaction data of a new unconfirmed transaction.

  3. Collision resistant hash functions are ones where no two inputs give the same output. The collision resistance of the hash is what provides security.

1 Like

1.) Hash Functions are essentially a digital fingerprint. Each input generates a unique output and it is not possible to determine the initial input from the output.

2.) Hash functions are used when creating a transactions and act as a digital signature.

3.) A hash is collision resistant if it is hard to find two inputs that generate the same output.

1 Like
  1. Describe hash functions with your own words

A Hash function is a method of encryption that takes an input of data and performs operations on it to produce a 256 character hexidecimal hash value that identifies the raw data but cannot be used to reproduce that raw data.

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

Transactions are recorded as new blocks in the Bitcoin blockchain. MIners attempt to hash the header of the block using the SHA256 algorithm and are rewarded in Bitcoin. The Hash of the previous block is included in the header to link each block to the previous and prevent an incorrect block from pretending to be legitimate.

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

Collisions would occur if different inputs produced the same outputs, making it difficult to ensure that the hash relates to the correct transaction. Being Collision Resistant means that this is very uncommon that different inputs could produce the same hash.

1 Like

1.- Has functions are one-way functions that transform a binary chain of input values to a fixed-length binary output (and then it is converted to a proper base).

2.- Hashes are used to chain the blocks in the blockchain, and to transform transactions to hashes, so you only share the output of the SHA256 and nobody can discover your key.

3.- It is almost impossible to obtain the same output number from two different inputs.

1 Like

1/ It’s a one wqy function. Each unique input will produce a unique output
2/ is a mathematical algorithm that transforms any arbitrary block of data into a new character string with a fixed length. There is no single hash function, but rather we find a plurality of them. SHA-2 is made up of 4 functions: SHA-224; SHA-256, SHA-384 and SHA_512
3/ A hash function is said to have collision resistance when it is difficult to find two entries that have the same summary value

1 Like
  1. Special functions which output is really, really hard to link back to its output.
  2. Many things from deriving public keys to block signatures, verifying if an unspent transaction can be spent by a specific key and much more.
  3. Most hash functions are not really collision resistant. But it basically means that you get the same output for two or more different inputs (which is also really, really hard to achieve).
1 Like
  1. Describe hash functions with your own words
    Hash function is a mathematical operation that creates a unique output
    out of unique input.

  2. Hash functions enable the security of the blockchain network. Miners are “mining” bitcoin through finding a certain Output by searching for a right Input which is run through the hash function. Hash function secures the network because its very hard to find an input for the output.

  3. Collision ressistant means it is very hard to find two inputs that match the same output.

1 Like
  1. Hash functions are special functions with fixed outputs that act as a fingerprint of the input data.
  2. Hash functions are used in many ways in cryptocurrency, from verifying transactions to deriving public keys to block signatures.
  3. What we mean by hash functions being collision-resistant is that we can’t get the same output for two or more different inputs.
1 Like