Hashing the public key doesn’t really improve privacy. It is a way to get the public keys a bit shorter. In the original version of Bitcoin public keys were used as the address and this was later changed.
Regular public keys are 65 bytes long and hashes are 20 bytes
Ok thanks, think I’m getting there
2: Hash functions are used by the bitcoin network to validate the data that is being transacted has not been tampered with and is secure. edit
You are welcome glad I can make things clear
Homework on Hash Functions - Questions
Describe hash functions with your own words
Hashing is an cryptographic conversion. The input is always verf different from the output and it is impossible recreated the input from the 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).
The bitcoin blockchain is built on man different blocks. Every block has two party. The first party are new transactions. Every transaction is in fact a short of mathematical calculation. The seconde part of the block are all the previous transactions. All these older transactions are hashed to one code. If the new block is full and closed (mined) the two parts are put together and hashed again.
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).
That a hash function is collusion resistent means it is almost impossible the find two different inputs what will give the same ouput after hashing.
(1) Hash functions are mathematical functions in computer programming such that each unique input yields a unique output. You can always know the output if you know the input. But you cannot know the input if you only know the output - you cannot reverse the equation. Hash functions are one way functions. Also, the data input can be anything, an image, words, a letter, a novel, etc but the output is always the same length (but different alphanumeric string).
(2) Hash functions are used in the Bitcoin protocol as an output of the data of the transactions to be entered into the block (as well as a time stamp, and a reference to the previous block).
(3) A collision occurs when two inputs yield the same output. This would not be good, since if two different data sets yield the same output hash function then two different sets of transactions would conflict in being published on the blockchain for the same output hash.
- Hash functions are one way, each input produces and output the output being a digital fingerprint.
2.With Bitcoin Hash functions are used to hash out transaction information or data. With mining, miners have to find a number that specifically generates a targeted hash combined with data unique to the block.
- A hash function is collision resistant if it is hard to find two inputs that hash to the same output. An example would be… two inputs a and b such that H(a) = H(b), and a ≠ b. Cryptographic hash functions are usually designed to be collision resistant. There is a nearly impossible chance to get the same output from a hash function.
1. A hash function takes any arbitrary string and converts it into a unique, fixed length number. A hash function also has the property of being one-way. I can hash “I am a rabbit” to 0fb037774a70239211ebfdd0513c1b05562c7626fbf9b1ba84a3a89544ac169 , but I cannot determine “I am a rabbit” from 0fb037774a70239211ebfdd0513c1b05562c7626fbf9b1ba84a3a89544ac169 .
2. Hash functions are used to create a tamper proof series of data blocks. The header of a given block contains a hash of the previous block’s data. This “ties” each block to its preceding block. Any tampering with that previous block will cause the hash from that block to be different than the hash in the succeeding block and this breaks the link between blocks, and the changes can be detected.
3. Collision resistant means that, while not literally impossible, it is practically impossible, infeasible, to find two preimage inputs that yield the same hash output
-
a hash function is a formula that takes a variable input and creates an output with a fixed length, no matter the size of the input variable.
-
Hash functions are used to create a problem to solve in the block creation process as well as creating a way of verifying that the information in each block is consistent in an efficient way using a merkle tree.
-
When a hash function is collision resistant, it has a very low probability of producing the same hash from different inputs.
Homework on Hash Functions - Questions
- Describe hash functions with your own words
An hash function is a function where a unique input equals a unique output.
Change the input and you will change the output. Now, we can also say that hash functions can only work one way. You always start with an input and end with an output. Untill today we have not found a way to calculate it the other way around , from output to input.
- 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 in 2 ways :
Within the bitcoin protocol we can talk of hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain.
In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed 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).
Collision resistance for an hash function means that it is hard to find 2 inputs for the same output.
1. Describe hash functions with your own words
Hash functions are computational processes which pass any arbitrary set of input data through various formulas to create a unique fixed-size output string of data.
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).
Bitcoin uses SHA-256 to create a ledger of immutable data. New blocks of data contain hashes of the previous block state.
Using the previous block state makes it impossible to change the data of a previous block without also impacting the data inside the blocks that come after it, this means as more and more blocks are added on top of the block you want to manipulate, more and more work is required to redo the chain.
This makes the ledger exponentially harder to attack as it grows in size.
In summary hash functions are used to validate and secure data on the ledger. it allows for data to be easily secured, validated, verified, authenticated and maintained using simple maths.
Hashing is a key component of the blockchain.
3. What does it mean when we say that hash functions need to be collision resistant?
A collision is when multiple messages result in the same output.
Imagine someone finding another random private key that actually works with your wallet, a nightmare.
Collision resistance is defined by how hard it is to find collisions. The more complex the hash formula, the harder it should be to find a collision.
The perfect hash function would have no possible collisions. This is impossible with SHA-256 due to mathematical constraints, but SHA-256 still makes it hard enough thanks to the number of possible hashes available. So far SHA-256 is one of the hardest hash functions to break.
1.hash functions is the way to secure a transaction, the value of this process gives a unique number. The function is a mathematical formula which generate the hash.
2. Hash functions is important in the cryptographic, the properties improves the security in the mining process.
The properties deterministic, no matter how many times you utilise the hash functions always get the same number.
Quick computation, they have to be fast to return the input quickly, and resolve the puzzles in the next block.
Is not reversable .
3._ collision resistance is about a property of the hash functions where is so difficult to find two large things that have the same small thing.
- Describe hash functions with your own words
A function where you can never go from output to input and it always gives an output of a set length - How are hash functions used in cryptocurrencies like bitcoin?
Hashes are used in the blocks and help to make the chain immutable - What does it mean when we say that hash functions need to be collision resistant?
Difficult to find two inputs that produce the same output
- Hash functions generate a unique output from a unique input.
- The transaction input string is run through a Secure Hashing Algorithm (SHA-256) and outputted as a fixed length alpha numeric string.
- It means that 2 different inputs cannot have the same output.
- Describe hash functions with your own words
Hash functions are functions that will give a unique output for a unique input. If you change the input even very slightly, the output will be different. It’s a one way function. You cannot find the input from the output. - How are hash functions used in cryptocurrencies like bitcoin?
The hash functions used in cryptocurrencies need to be like the one used by bitcoin in the sense that they have to be only one way (so you can only go from input to output but not the reverse) and I suppose that they will also need to "hash transform) an input string of whatever length into an output of a certain fixed length. - What does it mean when we say that hash functions need to be collision resistant?
It’s not feasible (meaning not possible for the most part) for two different inputs to get an identical output.
- a way to encrypt data, by giving it a fingerprint,
- in order to create a block, the mining computers add a nonsense number to the end of the transaction until it achieves 17 0’s, and then when it achieves consensus from the other computers in the network, it is added as a nice little block to the block chain.
- a collision means that two different inputs have the same output. When this happens, it can lessen the integrity of the hash. if you can figure out the input based on the output, other than the method of brute-force attack, then the hash is broken.
Homework on Hash Functions - Questions
- Describe hash functions with your own words
It’s a method to create a unique fingerprint, each unique input, creates unique 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).
Hash functions are used to support things like privacy, security, confidentiality and also to be computationally efficient.
- 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 it’s hard to find two distinct inputs, that map to the same output
-
A way to encrypt a string of data (for example text of numbers or combinations) into a unique code called a hash.
-
For bitcoin there is a need to (according to the difficulty level) hash not only all the transactions but also the hash function should start with for example 17 times a zero. It is incredible hard to find that number and that is what miners try to find. The right combination will eventually lead them to create the new block which all the other miners will validate.
-
A unique input must always create a unique output. If the output will be the same for two different inputs… that would cause a collision in the hashes. So to be collision resistant means that no collision like this should be able to occur. Every unique input should create an unique output.
Yes. This is where the famous bitcoin mining comes in. You will learn more as you go on. So far, you have been doing great.
Yes. The process that uses hash functions is called mining. You will learn more about this later on.
Hash functions can’t encrypt data. They can only hash the data. Hashing is a one way function, while encryption is a two way function. Don’t worry too much about it, its okay to confuse these 2 terms if you are new. Its important to note that each input in a hash function will have a unique output, without it being possible to go from the output to the input.