Homework on Hash Functions - Questions

Hash functions are unique data inputs and gives unique data outputs on a one way path that produces a unique fingerprint to the data.
In Bitcoin, hash functions are used as part of the block algorithm to write new transactions into the blockchain via miners.
Hash functions need to e collision resistant because if two input hashed produce the same output hash it would be vulnerable to attackers.

1 Like

1.A cryptographic hash function is a mathematical function used to make a one way transaction.

2.A cryptographic hash function combines the message-passing capabilities of hash functions with security properties.

  1. It means that no two inputs should create the same output.
1 Like

HW Hash Functions

  1. Describe hash functions with your own words

Hash functions are one way functions where each input produces a unique output, like a fingerprint. You can go from input to output, but you can’t go backwards from output to input. Any change at all in the input will produce a completely new hash.

  1. How are hash functions used in cryptocurrencies like bitcoin?

Hash functions are used in bitcoin to record new transactions into the blockchain through the mining process. The inputs are recent transactions that haven’t been confirmed yet.

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

To be collision resistant means that it is hard to find two inputs that hash to the same output. Hash functions need to be collision resistant because it makes them cryptographically secure.

1 Like
  1. Hash functions are processes that convert any given digital input into a unique to the input output string of fixed size (for the hash) that can be used as a digital fingerprint to compare whether any given input was the same as another without needing to (or being able to) reveal those initial inputs.

  2. Hash functions are used to produce cryptocurrency addresses from public keys with which to transact, are used to compute the fingerprints of processed blockchain which can then be compared to each other from different (independent) systems to come to consensus as to the validity of the blockchain. Hash functions are also regularly used to prove the validity of wallet and other blockchain software in order to make sure it was not modified by a third party (such as inputing some sort of malware).

  3. Hash functions need to have enough options for their fixed size outputs such that no two different inputs will ever produce the same output. (no two outputs will collide, hence collision resistant).

1 Like
  1. Hash functions are very complex computations where each unique input gives a unique digital output or fingerprint. It is solved in a linear or unidirectional manner which means the hash output cannot be reversed to calculate the input.
  2. The validation process for blockchain transactions relies on data being encrypted using hash functions to protect the security of the transaction against tampering.
  3. Collision resistant means that it has to be impossible for two different inputs to produce the same output.
1 Like
  1. A hash function is like a digital fingerprint for a data object. Essentially you put a string on any length in and get a fixed length output. The output for a given string should always be the same (using the same hashing function).
  2. The inputs in to the bitcoin hash function are the most recent none confirmed transactions. The hash is run on this by miners who try to calculate the hash to add the new block to the chain.
  3. Collision resistant means it is statistically unlike to generate the same hash for a different input.
1 Like

1 - Hash function give your input a unique output using SHA256

2 - Cryptographic hash functions are mathematical operations run on digital data. In Bitcoin, all the operations use SHA256 as the underlying cryptographic hash function. SHA (Secure Hash Algorithm) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA)

3 - In cryptography, collision resistance is a property of cryptographic hash functions: a hash function H 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 ≠ b but H(a) = H(b).

1 Like
  1. A hash function is a linear, one way mechanism which creates an irreversible output or digital, cryptographic fingerprint from an input.
  2. Hash functions are used to write new transactions into the blockchain via mining.
  3. Hash functions must be collision resistant, 2 inputs hashing to 1 output would be a collision which would render the algorithm unusable.
1 Like
  1. A hash function is a digital fingerprint for a data object. When you put a string on any length in and get a fixed length output.
  2. Hash functions are used in cryptocurrencies like bitcoin to pass transaction information anonymously. Bitcoin uses the SHA-256 cryptographic hash function in its algorithm.
  3. A hash function is collision-resistant if it is hard to find two inputs that hash to the same output. The harder they are to find, the more cryptographically secure the hash function is.
1 Like
  1. Hash functions mean that for each input, there is a unique output. It’s in one direction which means you can go from input to output but not from output to input.
  2. Hash functions are used in the Bitcoin protocol to mine and create new coins while adding to each block.
  3. Collision resistant means that 2 different inputs can not equal the same output.
1 Like

1. Describe hash functions with your own words

Hashing function is like a translator that receives any kind of data (called an input) and encrypts it (hashes it) into an alphanumeric string (output/hash/cryptographic result) to keep the original input safe. Cryptographic hashing is essentially taking some information and running it through a process, a function or algorithm that turns it into encrypted information.

2. How are hash functions used in cryptocurrencies like bitcoin?

So, the blockchain is made of bundle of blocks that are chained together to make up the blockchain. Each block is linked/chained together, and they are linked by hashes. Each block has a hash and each block is composed by a bundle of transactions made up of hashes. So essentially blocks have hashes and transactions have hashes as well. It’s all the data that’s associated with the transaction…where it came from, where its going to, the amount of cryptocurrency in it the type of transaction, if it’s called a smart contract function. All that is run through this cryptographic hashing function to create a hashing representation of it and I can store it and access the data really quickly that way on the blockchain. Also, I can see the same thing is true, I can take all data from the block, which contains the transactions and a lot of other data like the miner that mined the block, the block number, the parent hash which is really important, and lots of other stuff like the state root, total difficulty…All that information is also taken and run through a hashing function to produce this parent hash. The parentHash is the hash of the previous block that came before this block on the blockchain.

The way it goes is there’s some block data that gets run through a hashing functions and it gets hashed and turned into an actual block on the blockchain. This is how the blockchain is so secure, because it used this cryptographic hashing algorithms, and it does that for the first block and then this process gets repeated over and over and over again. Blocks from blocks from blocks. So a block gets hashed and the parentHash gets included in the next block. So each block has data that is based on the previous block and the previous block and the previous block and so on….That’s why it is impossible to change anything in the blockchain because each block contains the hash of the previous block. It gets harder the further back we go in time.

3. What does it mean when we say that hash functions need to be collision resistant?
So a collision is when two distinct pieces of data have the same hash value. So for a hash function to be collision resistant means that it’s hard to find two inputs that hash to the same output.

1 Like

Hash functions-Homework
1- Hash functions are algorithms that deliver a unique output for each particular input. The output cannot be reversed in any way to get the original input data. That is an assurance of the intergity of the data. ANy slight change in the data will deliver a complete different and unique output hash
2- The HASH function for Bitcoin is a cryptographic hash function called SHA 256, that delivers a 256 bit unique hash for each input.
3- There is a collision when two different imputs produce the same output hash. This is theoretically impossible in cryptographic hash functions, but it is actually unfeasible more than impossible, there is however a ultra small probability, near zero but not zero, of this happening.

1 Like
  1. Describe hash functions with your own words
    A unique input will produce a unique outcome.
  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 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.
  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: 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 such that H(a) = H(b).
1 Like
  1. Hash functions are outputs of a function that are similar to a digital fingerprint, which are intended to be worked through one way only. The same input will give the same output, but every changed in the input creates a dramatically different output.

  2. Through the creation of private keys and public keys, in addition to the use of addresses, transactions can be recorded through these hash functions into the ledger.

  3. Collision resistant means that different inputs don’t generate the same output of a hash.

1 Like
  1. Hash functions translate raw input of digits, letters, and/or larger media files by repackaging them into a unique, alphanumeric string of a certain size. The resulting Hash cannot be reversed to calculate the initial raw data, and it is used to index and retrieve items in a database.

  2. Hash functions give Blockchain its property of immutability. In crypto currencies like bitcoin, transactions are the input of a Hash function. A bitcoin public key is hashed to generate the public address.

  3. Collision resistance means that it is computationally infeasible to find two colliding inputs in a hash function. In other words, if inputs a and b are not equal, then hash outputs H(a) and H(b) should also not be equal.

1 Like
  1. Hash function create a digital fingerprint that is unidirectional Input cannot be changed
  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.
  3. 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.
1 Like

The Hashing Algorithm is called SHA-256 (Secure Hash Algorithm)

The Hash output the is produce by the SHA-256 algorithm is solved linearly and cannot be reversed. As is is impossible to unbake a cake so is a Hash. That would make it extremely robust.

1 Like

A hash function is a mathematical process that takes an input data of any size or length, performs an operation on it and returns a unique output data of a fixed size.

Hash functions are used in cryptocurrencies as part of the block hashing algorithm to write new transactions into the blockchain through the mining process.

Collision resistant means that the given to different inputs, A and B going through the hash function and returning an output of H(A) and H(B), it is not feasible for H(A) to be equal to H(B)

1 Like
  1. Hash functions are a row of digits that where produced by a specific input of information. They are used to build unique outputs from unique inputs.

  2. It is part of the Block and helps to secure it against hackers.

  3. it means that it is difficult ( or better impossible) to find two different hash functions with the same output.

1 Like
  1. Hash functions are like a barcode number on a product for entire files. They contain codes a (Long number) of what’s actually in that file. It can never work backwards meaning if the Hash is changed it will give you a completely different one. At the moment SHA 256 is used for Bitcoin and to crack it you would have to guess 256 bits. The only method would be to randomly guess. Almost impossible!

  2. The Hash functions are used in Crypto currencies on the blockchain which the backbone of Crypto. Bitcoin for examples uses the Hash function to make transfers on the blockchain using the Hash function it makes an input of any length and making an output of a fixed length, making it secure. Hashing is one way to enable security during the process of message transmission when the message is intended for a particular recipient only. A formula generates the hash, which helps to protect the security of the transmission against tampering.

  3. Has collisions occur when 2 pieces of distinct value have the same Hash value. If an attacker can find a hash that is the same as another Hash function, they could use that to replace the original file this destroys the value of digital signatures.

1 Like