Homework on Hash Functions - Questions

  1. Taking a cluster of data and through a function turn it into a string of numbers, that for now is impossible to reverse through a function. (Indexing might work, but only for very short and common inputs.)

  2. Its used to hash transaction data, and verify against the the network so the data is intact.

  3. That it won’t give the same output for two different inputs.

Question 1

1. Describe hash functions with your own words

Hash functions like sha256 are oneway functions which go from input to output but not output to input. They take a value as input, convert it to binary and then into hexadecimal. A value will always return the same output no matter how many times it is run so it is repeatable. The only way to crack it is through brute force.

Question 2

How are hash functions used in cryptocurrencies like bitcoin?

Block headers always contain the hashes of the previous blocks in a chain. Hashes are also used in mining. I believe the nonce field is hashed until its signature contains n(zeros) which is related to the mining difficulty level. when level is reached the hash of the nonce is concatanated to the hash of the input. The nonce is usually a randomly chosen string.

Question 3

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

Hash functions need to be collision resistant because if they weren’t there is a high probability of different values having the same hash. This would make the chain less secure and there would be multiple transactions with the same hash. I think anyway.

A function with more inputs than outputs would be considered collision resistant

Hello there
Homework

  1. Hash functions works the way it turns “input” to unique “output” and it’s one-way road only (you cannot reverse the hash, from output to input). Also hash is always in a fixed size no matter size of source text.
    2.Hash function in Bitcoin is use to store information of previous block on the new/next block, also it’s used in transaction every transaction that is verified will be hashed and added to blockchain.
  2. Let’s say words “banana”(input) and “bananas”(input) are hashed and outputs are totally different. But in some super unimaginable extremely rear cases there could be the same one output for different inputs and this is collision. Term collision resistant means that collisions exist but they are really hard to find.
  1. Hash functions takes a input and creats a unique number.

  2. Hash functions are used in criptocurrencies for minning. They take the different inputs and use that to solve a block.

  3. For hash functions to be collision resistant means that multiple inputs cannot ressult to the same output.

  1. A hash function is a formula which transforms input data of any size into a fixed-size string of characters. It is considered to be one-way in that while the output is derived from the input, the input cannot be derived from the output.

  2. In crypto-currencies like Bitcoin, hash functions are used in the mining process to write new transactions into the blockchain.

  3. Saying that hash functions need to be collision resistant means that it is difficult to find two inputs that produce the same output.

  1. Hash Function is a string of data and an output that is really difficult to link back to a input.

2.Hash Function use in cryptocurrencies can be use in transaction data, and that gives a output length when given an input .

  1. Collision resistance is a two different things that are not getting the same hash code.
  1. Hash functions are functions regarding encryption. A string of text is taken as an input and a long set of numbers (varying by bit length) ends up as the output. Unlike regular functions, it is impossible to find out the input from having the output (irreversible).
  2. Hash functions are used for the encryption of transaction data when dealing with cryptocurrencies like bitcoin.
  3. Collision resistant means that it should be infeasible for the hash of a variable “a” to be equal to the hash of a variable “b”.
    two inputs: a,b ; h(a), h(b) ; a ≠ b
  1. Describe hash functions with your own words
    It is a function that takes any input (independent from length) and calculates a unique output value. Independent how often you run it, it will return the same value for the same input value. It is impossible to recalculate the input value from a given output value.
  2. How are hash functions used in cryptocurrencies like bitcoin?
    in BC you use hash funtions to hash the block information (which also holds the hash of the former block)
  3. What does it mean when we say that hash functions need to be collision resistant?
    It means that it should be nearly impossible to find 2 input values, generating the same output. Mathematically it could, depending of the length of the output and the resulting number of output values
  1. Hash function is a one way, very complex function. Each unique input gives a unique output.
  2. The hash function SHA 256 is used for the bitcoin network to generate public and private keys by the process of mining.
  3. Collision resistant means that it is impossible for two different inputs to get the same output.
  1. Hash functions are mathematical algorithms that transform in one direction an input of data into a fixed bit string. In cryptography they are considered secure way of encrypting information. By using such an algorithm you can easily get a hashed version of the input you inserted on the function.

  2. In Bitcoin’s blockchain, hash functions are used to protect the transactions data, and to enable the security of the network through the inherent difficulty added to mining new blocks.

  3. A function that is collision resistant has only a “brute force” method as a way of tricking it, which makes it “resistant” to finding 2 inputs that produce the same output, but not completely unbreakable. When a collision attack is discovered and is found to be faster than a birthday attack, a hash function is often denounced as “broken” ( like MD5 and SHA-1).

  1. Hash functions operate on a binary string in deterministic fashion, ideally to map each unique operand to one unique compact identifier similar to a finger print, providing a uniform-length binary string output called a “hash”. The output of a hash function is a highly manageable correlated abstraction for the operand. The ideal hash can also be compared to a mathematical bijection (one-to-one and onto the image projected by the function) but in practice, any implementation can technically map two different operands to the same identifier, although highly improbably. In practice hash functions do not fully correspond to a bijection, but they are very close.

  2. Hash functions are used in cryptocurrencies to weave and chain transactions. Their compact format allows a summary of all history to be embedded into new content for point-in-time context.

  3. Hash function collision resistance means that each unique binary input expression is faithfully mapped to one unique correlated output expression. Otherwise, inputs “collide” when represented by the same output.

  1. A hash function takes an input and gives a unique output, the output can be thought of as a signature/fingerprint of the input. The hash functions is a one ways mechanism, it should not be possible to obtain the input from the hash.

  2. Each block in the block chain is given a hash signature. When a block is created the bitcoin miner solves a hashing problem, the inputs to the hash are a combination of the hashed transactions, the previous block hash and a number of other parameters that are related to the block, this process of hashing ensures that the chain cannot be tampered with without other nodes on the network finding out.

  3. Collision resistance - Given a large enough input samples their should be limited potential for the different inputs to produce the same signature.

  1. Describe hash functions with your own words
  • Is a mathematical process that for a given input of any length it will produce a unique output of a fixed length, this output is the signature or fingerprint of the input. The hash functions are one way functions, we can not know the input based on the output.
  1. How are hash functions used in cryptocurrencies like bitcoin?
  • Hash functions are used to write new transactions in the blockchain thru the mining process, the blocks must contain hashes from previous blocks. The BTC protocol uses the hashing algorithm SHA-256
  1. What does it mean when we say that hash functions need to be collision resistant?
  • Collision resistant is a property of cryptographic hash functions and It means that “for the most part” each input will have its own unique hash. In other words, it is hard to find 2 inputs that hash the same output.
    So, if we are use a function like SHA-256, it would require 2^128 iterations to have a 50% chance of running into a collision.

Describe hash functions with your own words

A hash function is a method where I take an input, ( can be a file, numbers, words, etc) and hash it into an output. The output is the fingerprint for the input file. Hash functions are one way functions, meaning you can go from input to output but not from output to input. Changing the smallest increment in the input will result in a completely different output.

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

Bitcoin uses the SHA 256 hash function to hash transactions. This function is there to create security around the value transactions.

Taken from the Bitcoin White Paper abstract proposal

“We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work”.

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. It means that 2 inputs cannot result in the same output.

  1. Hash functions are a Digital imprint from a unique input which gives you a unique output at a fixed length.

  2. Hash functions are used in bitcoin by taking the input string of any length running it through the SHA-256 and getting an output of a fixed length.

  3. It means that it can’t have 2 different inputs in order to get the same output or it will cause a collision.

1. Describe hash functions with your own words

A hash function takes the data you input and converts it into bits (Bitcoin SHA 256 ) 256 bit hash function, Hash function is a digital fingerprint of a transactions, each unique input as a unique output.

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 write new transactions into the Bitcoin blockchain, each block as the hash of the block, the data and the hash of the previous block.

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 that it is highly unlikely but not mathematically impossible to get the same output from a hash function input. Every hash function with more inputs than outputs will necessarily have collisions.

  1. Describe hash functions with your own words

    A hash function takes inputs and creates a cryptographic key of a fixed length, a one way output which although is not impossible to reverse, is extremely improbable it could be reversed.

  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 cryptographically write new transactions into the blockchain. These blocks are encoded and require the hash key to unscramble the data.

  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 a duplicate hash key is minimally possible to be solved because of the vast amount of the data set, so arriving at the same target-hash at the same time is nearly impossible.

  1. One way function where you can not determine the input via the output.
  2. Hashing functions are the way the miners “run” the network by trying to combine their inputs with the extra identifier string to solve for the output.
  3. Collision Resistant means that the odds of finding 2 inputs that both produce the same output are insignificant at best.
  1. A data (X) transforms to a different data (Y) in a way that always X becomes Y. But if someone wants to untransform from Y to X it is apparently impossible.

  2. This is why the keys are safe

  3. A case which it is hard to find 2 inputs that have the same output.