Homework on Hash Functions - Questions

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
  • Various types of encryption mechanisms.
  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).
  • They are used to encrypt the input data and produce an output result. They are used to make sure the data has not been changed and that the blockchain remains immutable.
  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).
  • They do not produce the same output while having differing inputs.
1 Like
  1. Describe hash functions with your own words
    -A hash is a one way function. The mathematics behind the hash function insures that there is no way to derive the original media content from it generated hash.

  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 block hashing algorithm is used to write new transactions into the blockchain through the mining process. miners needs to hash the block header in such a way that it is always equal or less than the ‘Target hash’ because only then they can add successfully add their mined block to the blockchain.
    The target changes every 2016 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).
    -By saying that hash functions need to be collision resistant we are stating that no 2 different inputs should ever create the hash (output)

1 Like
  1. hash functions are functions that take any input and give an (ideally) unique output; they also have the property that mapping the output to the input should be nearly impossible.

  2. the block header is hashed then that’s used as input for the next block… i think?! basically the transaction data is hashed and only one correct guess could produce that hash, so miners run a guess-and-check (proof-of-work) algorithm to verify the known hash of whatever the unknown most recent transactions are… pretty sure that’s right…

  3. collision resistance denotes a hash function that gives unique outputs for every input; when two inputs give the SAME output, you got problems… that’s a collision (because now when you look up the output of either of those inputs, you’ll get an ambiguous output that could represent one or the other input, i.e. you’ll “collide” in the look-up table with another potential input, i.e. that outputs “collides” two different inputs.

2 Likes
  1. Hash functions are mathematical calculations that create a digital footprint and can only go one way.

  2. Hash functions are used in cryptocurrencies like bitcoin as they are run by miners who calculate a hash to add a new block to the chain.

  3. Hash functions in Crypto need to be Collision resistant, or the output would not be unique and the system wouldn’t work as it’s meant to.

2 Likes
  1. Hash functions are when you have a special input that will produce a unique output that cannot be reversed in any way. Its a one-way mechanism.
  2. Hash functions are used in cryptocurrencies because this provides a secure way to produce input and output functions, which enables them to pass transactional information anonymously. By using hash algorithms in cryptocurrencies, these are the primary building blocks for a cryptocurrency to exist on the blockchain.
  3. Hash functions need to be collision resistant to ensure that the two inputs have two completely different outputs in a cryptocurrency hash function, which in return making the cryptocurrency secure.
2 Likes
  1. A hash function is a function in that each input will product a unique output. Each input has a unique digital footprint. Also a hash function is a one way function; meaning that you can only go in the direction of input to output, not vice versa.

  2. Hash functions are used for consensus. Miners try to solve a hash function in proof of work. They try to find the right input that will produce an output that is within the acceptable range of outputs.

  3. If a hash function is not collision resistant, then hackers can decode what inputs will produce that output, resulting in a faulty hash function, or in essence, the hash function ceases to be a hash function

2 Likes
  1. A hash function is a function that takes input and produces a unique output for that particular input
  2. The data in each block is hashed and that hash plus data on the next block is hashed therefore creating a chain of blocks where if a single digit were to be changed all the proceeding hashes would change completely
  3. A collision happens when 2 inputs produce the same hash output, a good hash function should be collision resistant meaning no 2 inputs produce the same output
1 Like
  1. A function that creates a unique digital “ID” from its given input that cannot be replicated.
  2. Due to their insane difficulty to recreate, they are used to verify whether or not values are correct. This is integral for the secure movement of Bitcoin as to make sure transactions are valid and accurate.
  3. If you can reassemble the output, you’ve compromised the security of the network. You can effectively become both parties.
1 Like

`1. hash function is a unique one way function where an input that produces an output. (Fingerprint)
2 A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. The values are usually used to index a fixed-size table called a hash table.
3 it means that it is hardly possible to get mathematically twice
The same hash function.

2 Likes

Is there a wallet like ledger or something similar that always changes the public key? Because if anyone knows your private key they can always see your transactions…?

1 - Describe hash functions with your own words
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 function is a digest of the text script that this function represents. In the case of Bitcoin, this function allows the creation of a chain of 34 characters in base 16 going from 1 to 9 and from A to F (For the numbers from 10 to 16) which will be your private key and whose derivation from this same code with the same algorithm will give you your public key (s). In reality this hash function is an algorithm or a series of mathematical operations making it possible to calculate a result which in the context of bitcoin is called a fingerprint, the latter proves, when we operate a computer process via a transaction that it is are you the recipient or the sender of this transaction. More simply, This allows to transform a character string into a shorter one serving as a digital fingerprint during the execution of a transaction.

2 - 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 hash function is called “collision resistant”, meaning that each entry must correspond to one exit and only one. In other words, it is impossible to have two different outputs for the same input. Bitcoin solves what is known as the so-called “double-spending” problem. The model is said to be deterministic because each input automatically determines a single possible output.

1 Like

Most modern wallets should generate a new keypair when you want to receive funds. Notice the address changes when you click receive.

1 Like
  1. Describe hash functions with your own words: Hash functions are unique digital fingerprints (digital ID) made up of numbers and letters. They are created from an input, for example, how are you, or a number, or a piece of code anything. The output (hash) cannot be reversed to discover the input (it is impossible). When doing transactions on a blockchain like Bitcoin unique hashes are created.
  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). When doing transactions on a blockchain like Bitcoin unique hashes are created. Each transaction in each block is unique - normally for a transaction to be approved it must be confirmed at least 3 times - in other words, each block will duplicate the transaction and if anything changes it will not be approved by the blockchain. It is impossible to hack the blockchain and change the hash or it will not be approved so there is no point.
  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). In cryptography collision resistant means that it is virtually impossible to find two inputs that will have the same output hash - outputs are thus collision resistent
2 Likes
  1. Hash function is a special number imprint that produces a fingerprint. Each unique input gives a unique output.
  2. Hash functions are the underlying framework of the Bitcoin blockchain technology. They are responsible for mining and for keeping the entire system secure.
  3. 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 ).
2 Likes
  1. hash functions scramble ” data and convert it into a numerical value. And no matter how long the input is, the output value is always of the same length. Once a hash value has been generated, it must be impossible to convert it back into the original data.
  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. Collision resistance is important when you’re relying on hash functions to always map two inputs to two different values.
1 Like
  1. Hash function turns any given input into a unique code, the output can not be turned back into it’s original form.

  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. No 2 or more different inputs can produce the same output

1 Like
  1. Hash function is an input with unique numbers that creates unique “fingerprint” which is output.
  2. In Bitcoin mining. The transactions are taken as input and run through a hashing algorithm (SHA-256) which gives an output of a fixed length.
  3. There are no two inputs that create the same output.
1 Like

Thank you for your quick reply. :slight_smile:

Hash function is a one way input of data that gives a unique output. its not possible to go from output to input.

hash functions in bitcoin is every transaction create a hash on the blockchain with previous input of the block to create next block in the chain.

It means that two different input never give the same output, if it do it has collided wish happened in SHA-1 . but in SHA256 it its not yet proven possible!

1 Like
  1. Hash functions are one-way functions that receive an input and produce a unique output that cannot be reversed to find the input. That output is then used as a digital fingerprint.

  2. Hash functions are used to write new transactions on the blockchain during mining. Unprocessed transactions containing unique data such as timestamps and a reference to the previous block are thrown in the functions, which produce a suitable hash.

  3. Collision resistant means that no two inputs can have the same output. Each input gives a unique hash.

1 Like