Hey there!! A SHA256 is 256 bits long
Hi there! I will add to get the same output hashing two different inputs
1.- Hash functions are a computational way to produce a unique output from a unique input.
There is no possibility to have the same output for different inputs.
2.- Mining, Creating and validating transactions, creating addresses.
3.- This means that the only way you will have the same output from different inputs it will be only if the inputs are the same. H( a) = H( b) only if a = b
Yes it is. Thank you
Everything you said is correct except that we donât encrypt the blocks, we hash them. Hash functions can only hash. Encryption is a two way function, and hashing is a one way function. Its okay to mix these terms up when you start learning, so donât worry too much about it. Your answers are pretty good.
It wouldnât only be bad for the bitcoin network to use a hash function that isnât collision resistant, but for every other application that uses it. If a hash function has often collisions, its purpose is no where to be seen. A hash function must give a unique fingerprint for every different input, if it is to be used in any serious application.
This is somehow applied in the bitcoin network. Can you find out how?
It not about finding the 2 same hashes at the same time. If I produce a hash with a string âbitcoinâ, you shouldnât be able to find a different string/data that will produce the same hash. At least not in the millions years. if you can find one in minutes, hours, days or even years, that hash function wouldnât be considered collision resistant and it shouldnât be used in applications where security is critical.
The question asks about the hash function itself. How can we know if SHA256 is collision resistant? Even before bitcoin was created, it was known that SHA256 is a collision resistant hash function.
You kinda answered the question. Because if we had 2 different blocks creating the same hash, we would now that the hash function is not collision resitant.
SHA-256 produces a 256-bit hash value. This means, 256
consecutive zeros and ones (Random of course). The size measured by your computer would be 32bytes. 256/8 = 32 This is because 1 byte = 8 bits.
âThe byte was originally the smallest number of bits that could hold a single character (I assume standard ASCII). We still use ASCII standard, so 8 bits per character is still relevant. The byte was originally the smallest number of bits that could hold a single character (I assume standard ASCII). We still use ASCII standard, so 8 bits per character is still relevant.â
All in all, your answers are very good. Keep up the great work.
-
hash function is a mathematical scrambled puzzle that cannot be put together.
-
hash functions are used to keep cryptocurrency secure
-
collision resistant is property of cryptographic hash functions that is computationally infeasible to find two colliding inputs
see above for the answer
1. Describe hash functions with your own words
A hash function is a function that takes some data in input and output a unique value of fixed length. It is one way function and It is useful to send data with associated hash to prevent tampering.
2. How are hash functions used in cryptocurrencies like bitcoin?
In bitcoin hash function are used to create a unique fingerprint of a bunch of transactions (block contents). Furthermore it is used to create a blockchain in which every new block contains the hash of the previous block so in order to change this blockchain you have to change all the blocks following the one you change.
3. What does it mean when we say that hash functions need to be collision resistant?
This means that the probability of having the same output for two different inputs is so low that is neglectable.
Hi Mauro,
Thanks for the reply. I was thinking to say the number of characters of the output length is 64. So on top of that idea the bit size is 256? Just wanting to understand that there is the character length and the bit size length? When I count the hash, it is 64 characters in length, mixed up of letters and numbers.
Ensuring that the smallest change in the input produces a significant difference in the output makes the mining algorithm more difficult when working towards creating new blocks.
1.Hash functions are each a unique unrevocable signature.
2.Gives you the unique signature of your transaction,
3. A hash function H is collision resistant if it is hard to find two inputs that hash to the same output.
Hash function transforms a string into an cryptographic code of digits and letters.
2.
In Bitcoin hash is used to encrypt transaction. In this way every transaction is uniquely identifiable.
3.
For example:
Given that there are finite values for a possible output. It can be possible that two different inputs can create the same output. the chances are astronomical low, but it is possible.
1: a function that based on an input (a line of text for example) gives you an output. Like this f12958816a49adfa2c6c8de8dd2144c163e92c5e375de964d533187c7d236c36
but there is no way of telling what this input is, by looking at the output.
Itâs a secure way to hide data, in the case above I used the word âpizzaâ with the sha-256
2: Miners have to solve hash functions to get block rewards, and make money
3: meaning that we donât want to have two different inputs giving out the same output.
It wouldnât be safe
- Describe hash functions with your own words
Hash functions are mathematical computations that derive an input from an output, whereby (unlike standard functions) you cannot derive the input from knowing the output. By hashing an input they will produce a standardised format of output in terms of how many bits of information will be generated.
- 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 Bitcoin, a cryptographic hash function is used which is deterministic (a specific input will always give the same output), small changes in the input will cause large differences in the output, the output itself is determined by quick computation (in relative terms), it is pre-image resistant (in that it is infeasible to guess the output from the input), collision resistant (see answer to the question below) and also âpuzzle friendlyâ, meaning that there is sufficient computational power required for the challenge to derive the output hash Y when H(k|x) = Y, to make the task suitable for miningâŚ
Bitcoin uses SHA-256 meaning that the output is 256 bits of data and combined with an adjustment of the difficulty level whereby the nonce (âkâ I.e. the variability is prefixed concatenated zeros), there is a high min-entropy of data which is useful for both the puzzle solving elements and the security elements; lastly the data structure uses linked lists that include hashing pointers (that point to the address and exact hashing data of each previous block going immutability and security from attack)
- 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â in relation to cryptographic hashing functions highlights that the likelihood of two identical outputs being derived from different inputs is negligible. In terms of the timeline for this to happen (such as using the brute force method to break Pre-Image Resistance) it would take too long for it to be a meaningful problem resulting in identical outputs from different inputs.
What do you mean with this statement? What can you say about the input relate to output?
Why do you think it makes them secure?