I don’t think so. The way these kind of forks in the chain are resolved by which of them does more PoW, since the network has a set difficulty at the time the one on more miners work on will eventually win, resulting in the other block to become stale
- Hash function is a particular function that takes whatever input as long as you want and give you a unique string of number with a fixed length, in such a way that is tamper-proof.
- Hash function used for Bitcoin is a cryptographic hash function named SHA-256. This particular hash function gives you a 256 bits output or in other words a 64-characters string. That kind of function is use to give you a unique digital fingerprint associated to the input. A slight change in input will give you a completely different output. This ensure data integrity, also in a more complex structure like the Merkle Root, that is useful to easily found if a transaction has changed in a block. The hash function also enable an efficient linked between each block into the blockchain, such that a change in a block fall back to all the other blocks.
- Collision resistant means that two different input give the same output. Of course this is something that we want to avoid, hence an hash function has to ensure this resistance. In a SHA-256 the number of results are 2^256, and we know that in the average case with brute force one can find a solution after 2^255 attempts. Collision resistance has a more strictly limit. In fact as one can understand from “Birthday paradox” to have the 50% of possibility to find two inputs that give the same result (quite unsafe result) you just need 2^128 attempts.
Thanks for the clarification.
- Hash functions take in information and output a unique digital fingerprint for this information. If you change the input even just a little it will produce a totally different output. It is not possible to deduce the input from the output (at least for now).
- In cryptocurrencies, hash functions are used when chaining the blocks together using linked lists (blockchain) and pointers. In Bitcoin for example, each block contain a hash of the header of the previous block. This information is called pointers, because it points back to the previous block. Using a hash function for this enables security since if you change the information in one block, the information of the previous block (hashed) would also have to be changed, and the information in the block before that also and so forth all the way back. Because of this, if you wanted to change one block you would have to go all the way back and change all the blocks, and it would require so much computing power that it is infeasible. This utilizes the property of hashes that they can be used to confirm that data has not been altered.
- When we say that hash functions need to be collision resistant, we mean that it needs to be very low probability of finding two inputs that give the same output (collide). Since there are infinite possibilities for inputs for hash functions, and a limited number of possibilities for outputs (2^256 outputs for SHA-256), there will be many inputs that give the same output. Collision resistance does mean that it should be hard to find corresponding inputs.
#1. getting a value from a word or words using math.
#2. they protect bitcoin
#3. it means that it is hard to find two same hashes (practecly impossible)
- Hash function takes input (in bitcoin its transaction data) and produces output that can be described as a digital fingerprint (unique output).
- its used in mining to hash the input in each block. Each output is unique and is why the blockchain is secure
- It is infeasible for 2 inputs to have the same output.
I think you turned it around if you change the block hash all newer blocks will have the wrong hash, not previous ones
My generalizations are helped by your detailed answers. It helps with my learning. Thanks for filling in my blanks.
-
A function that produces a fixed width output irrespective of the nature of the input. For example “Hello” would get the same length output as the complete works of Shakespeare. One can’t go backwards and derive the input from the output
-
Bu hashing the previous block into the next nothing can be changed generating immutability
-
It should be hard for two inputs to give the same output - though not impossible since there are more potential inputs than outputs
-
Describe hash functions with your own words…
A hash function is a one way function and determines that inputs and outtputs are different and unique in their own ways. Each input is unique and produces a unique output each and every time. -
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 essential to providing security of information. For instance, when you create a password on a website, the password runs through a hash function and then is stored on the website. Then every time you log into the website, the same hash function for the password is activated and the computer server checks to verify the password to make sure it matches with that stored in the hash.
In bitcoin, they are part of the block hashing algorithm that wrirtes new transactions into the blockchain through the mining process. As hashes for a bitcoin block are solved, they lock in new transactions into the block and these, in turn, are added to the permanent record of all previous transactions.
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).
if a hash functiton cannot find two inputs that result in the same output. it is collision resistant.
Describe hash functions with your own words:
A hash function is a “one-way” compression algorithm designed to efficiently take a larger amount of data input and produces a smaller fixed size output called a hash value.
In general, the hash is much smaller than the input data.
In order for it to be an effective cryptographic tool it must have several key properties…
- it is deterministic, meaning that the same message always results in the same hash
- it is quick to compute the hash value for any given message
- it is infeasible to generate a message that yields a given hash value
- it is infeasible to find two different messages with the same hash value
How are hash functions used in cryptocurrencies like bitcoin?
Bitcoin’s algorithm has applied hashing and blockchain by relying on the participation of autonomous networks, all of which are taking part in the production and confirmation of hash transactions. Transaction hashes are approved using the proof-of-work. Next, the hashed transactions are checked against the consensus rules of the participating networks. Approved transactions are added to the public ledger with the other extent/approved transactions -or blocks.
What does it mean when we say that hash functions need to be collision resistant?
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 out to the same output; that is, two inputs a and b such that H(a) = H(b), and a ≠ b.
*Every hash function with more inputs than outputs will necessarily have a collision. It would be very difficult to find.
- Describe hash functions with your own words
Hash is an encrypted form of finite data designed to represent an infinite amount of data.
- 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 hash functions to compile chains of blocks which contain data. These block chains prevent any data from being changed because the entire chain of block would need new hash. In this way bitcoin/blockchains created an immutable string of information using hash.
- 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).
There needs to be enough hash so that two different hash inputs don’t produce the same output, because if they do then one hash input can access another hash’s output, illegally taking the other hash’s information…like money.
-
Has Functions are a unique sequence of numbers combined with letters that represent a input. This input can be a message or something private. With a has function you can only go from input to output. It is not possible to go from output to input.
-
Has functions are used in bitcoin for transforming transactions on the blockchain, also for creating public and private keys.
-
Collision resistant is means that 2 different hash inputs should never create the same output.
Thank you for correcting me.
Homework on Hash Functions - Questions
- Describe hash functions with your own words
A. Hash functions are one way function where each unique input will always produce a unique output and if you change the slightest thing it will change the output. You cannot reverse the function and find the input from the output - How are hash functions used in cryptocurrencies like bitcoin?
A. Hash functions are used in cryptocurrencies for creating addresses, private and public keys. Transforming transactions which can be recorded as hashes in a ledger… - What does it mean when we say that hash functions need to be collision resistant?
A. Collision resistant means two inputs cannot have the same output
- Describe hash functions with your own words
A has function is a function where each unique input gives a unique output. The output is basically a digital fingerprint in hexadecimal data. A has function is a one-way function, i.e. you get from input to the output but not vice versa.
-
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 in Bitcoin are used to chain the blocks, consisting of several transactions. As the Hash function is tied to the Hash of the previous block, this leads to very high data security. -
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).
It means that two different inputs MUST not result in the same output.
You are welcome! I’m glad to make things more clear to you
1. Describe hash functions with your own words
A hash function is a function that takes an input and generates a unique, fixed length, “hash” of the input value, using an “encrypt only” algorithm (one way encryption).
In other words, the input value is a type of seed/salt to the encryption algorithm, which ensures that the hash remains the same for the specific input value every time.
2. How are hash functions used in cryptocurrencies like bitcoin?
The SHA256 hash function is used to ensure that the transactions in a block does not change, and is also used to link one block to the next, ensuring that the entire blockchain remains unchanged.
By adding the previous block’s hash to it’s next block ensures that no changes can be made anywhere in the chain, as this will render the entire blockchain invalid, which will in turn be rejected by all nodes (concession).
Making a change to any block will have a ripple effect that will “corrupt” every single block thereafter.
3. What does it mean when we say that hash functions need to be collision resistant?
It is to say that every possible input to the hash function must at all times generate its own unique hash, and that no 2 or more inputs must every generate the same hash value.
Having 2 or more inputs generating the same hash value creates a vulnerability that could potentially be exploited.
Not true private key is a random number and public keys are derived from that number using the elliptic curve
No, private key is a random number and we get the public key from it using elliptic curve cryptography. But we do hash the public key to get the address