1.For every different input a different output is generated. Every output is unique
2.Cryptocurrencies like bitcoin, the transactions are taken as an input and run through a hashing function which gives an output of a fixed length.
3.Theres a very low chance of two inputs generating the same output hash.
-
A hash function is only one way : with a private key you can read the encrypted messages, sign cryptographically a message, obtain the public key. But with the public key you cannot do that. A hash function gives a different result for any change (even minor change) in the input data. A hash function gives always the same output if you give the same input.
-
Hash function in Bitcoin is used to secure the network and the data and to slow down the creation of new blocks and new bitcoins (mining rewards).
-
Hash functions need to be collision resistant so that you don’t have two persons with the same wallet number (same key). This is achieved by having huge number of possibilities, ie. collision is highly improbable.
-
Hash functions are special formulas that take a given input of any length and reliably produce an output of fixed length. The SHA-256 algorithm used in bitcoin produces a 64-digit string of numbers and letters in base 16 which includes the digits 0-9 and the letters a-f. Using the phrase ‘I love crypto’ (with single quotes) as an input for SHA-256 produces the output: ca7ecd1ab3a2a5215f0597f3345dbeff70109f6d45fc619fdc4dd10a1f159596.
If the input was modified to I love crypto (without the quotes) the output is changed to: 5299ea5a7cb8474b5db61bd13ef1f47e81c3f255c560bfb3fb2a693f266df082.
Each time either input is hashed using SHA-256 the same output is returned (try it!), so the hashing function is reliable and deterministic. No randomness is involved as the output is determined by the input. Should the input change, or be tampered with in the slightest, the output will become drastically different. Therefore, the use of the hashing function is a kind of data integrity check and can be thought of as a fingerprint for the digital input. -
Proof of work in cryptocurrencies like bitcoin rely on hash functions to protect the integrity of data recorded on the ledger. Hash functions allow us to say that data stored on a blockchain is immutable. Hashing is used to add transactions to a block and hashes are used as the links connecting blocks in the blockchain. Other ways that hashing functions are used in bitcoin include the protection of private keys and the creation of bitcoin addresses. Probably other stuff that we don’t know the details about, yet.
-
Collision resistance refers to the capability of hash functions to produce different outputs for unequal inputs. If a hash function produced the same output for different inputs it is called a collision, which is not desirable. The best hash functions do not make it impossible to find collisions, where the hashes of different inputs are the same, but it’s extremely difficult to do so. We call these hash functions one-way functions because the input determines the output but the output cannot be used to determine the input.
Homework on Hash Functions - Questions
1. Describe hash functions with your own words
Hash functions create an unique output (O/P) which is linked to the input (I/P) function, but there’s no way to deduce the I/P from the resulting 256 character O/P.
2. How are hash functions used in cryptocurrencies like bitcoin?
BTC uses SHA-256 hashed function.
The SHA-256 hash function always creates the same 256 hashed character output for the same I/P regardless of the length of the original I/P. This unique one-way-directional record keeping of the I/P character set allows a users to quickly determine if the I/P has changed by simply tracking and recording the hashed 256 O/P character set.
The BTC blockchain network combines this SHA-256 function with the following feature sets to make the resulting blockchain unique and impossible to change by concatenating the I/P with a random number termed “nonce”, linking the SHA-256 hashed O/P to the previously mined block, including a date stamp and block sequential record number.
The resulting blockchain is basically becomes a linked list (blockchain) which cannot be changed or broken because at its base its constructed from a unique SHA-256 hashed function.
**3. What does it mean when we say that hash functions need to be collision resistant?
Collision resistance refers the probability the SHA-256 hashed I/P will be reproduced the same 256 character hashed O/P.
To improve collision resistance, ensure no two hashed I/Ps produce the same SHA-256 O/P, the blockchain network constantly adjusts the value of the required SHA-256 hashed O/P by driving the nonce to be a truly random number by prescribing the 256 hashed output to be less than an uniquely prescribed value.
The blockchain network constantly changes the value of the prescribed hashed O/P to ensure the time taken to mathematical solve the value of the “nonce” takes less than 10 minutes to compute, and further reduces the probability that two hashed I/Ps will produce the same hashed functional O/P since value of the “nonce” is truly random and constantly changing.
Hash functions are special functions that will produce a unique output for a unique input. Hash functions are a one way function so you can go from input to output, but not from output to input.
Bitcoin uses SHA-256 which gives an output of a fixed length.
Hashing means taking an input string of any length and in cryptocurrencies, such as bitcoin, the transactions are taken as input and run through a hashing algorithm.
Collision resistance is a property of cryptographic hash functions A hash function H is collision resistant if it is hard 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 collisions.
-
Hash functions are functions which create for each unique input a unique output. This process can not be reversed and the output. Changes in the input create large changes in the output therefore the output can be used as digital fingerprint for the input.
-
Hash functions are used in mining and the proof of work. The most recent transactions including timestamp, hash of the previous block and the nonce are hashed. For proof of work the resulting hash has to start with a certain number of leading zeros.
Also is a hash function used to derive the bitcoin address from the public key. -
Collision resistance does mean, it is very difficult to find two differing inputs creating the same output when run through a hashing function.
- A hash function is taking information and changing it into a string of letters and numbers to hide the original information.
- They are used to hide the value of the input so only the sender and receiver know the information being sent.
- Two inputs cannot produce the same output
- Hash functions take any input string of unequal size and create an output string of standard size that is unique. Hash functions are one way so that you cannot use the output to determine the input.
- Hash functions are used in cryptocurrencies like bitcoin by miners to secure the blockchain and used with private and public keys so you can send cryptocurrency in a transaction.
- Collision resistance means it is next to impossible to find 2 or more hash function inputs that will produce with the exact same output. Hash functions need to be collision resistant otherwise the integrity and security of cryptocurrencies like bitcoin would be at risk.
- Its an asymmetric calculation that generates an standard unique finger print of 256 bits for an output, generated from an variable unique input.
- Hash functions are used in Bitcoin to encrypt a transaction, assuring the security and immutability of an transaction. Its is, also, used to generate public key, block signatures, giving standard length to output and during the brute-force processing of mining.
- Every unique input results in an unique output, making almost impossible to have two inputs with the same output.
-
A hash function is one-way calculation whereby each input will generate a unique output, and it is not possible to reverse-engineer the equation to calculate the input on a given output.
-
In Bitcoin, the SHA-256 hash algorithm is used to generate random fixed-length hexadecimal strings of output, which are verifiable on the network.
-
Collision resistance refers to the difficulty of finding two unique inputs that will generate the same hash output.
1.Describe hash functions with your own words
A hash function is a secure hash algorithm used in cryptography when using SHA -256 it only allows a one way function meaning you can not recover inputs from outputs, the same inputs will always result in the same digital fingerprint if one digit changes then the digital fingerprint will change drastically.
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 in cryptocurrencies for the creation of address to improve security and privacy also it is used by miners for creating new blocks, writing new transactions into the blockchain and proof of work.
3.What does it mean when we say that hash functions need to be collision resistant?
It means to reduces the probability to find two inputs that hash to the same output. If you used a 128 bit hash instead of 256 bit hash you would increase the probability by 50% of break the collision resistance ( The Birthday Paradox )
Homework on Hash Functions
1. Describe hash functions with your own words
- A Hash function is a mathematic/cryptographic function to produce unique fingerprint outputs for each unique input text
- They are one way functions, so you can not get what kind of input a certain Hash output had
- The output always have the same langht of 256 Bits no matter how long the input is.
2. How are hash functions used in cryptocurrencies like bitcoin?
- The SHA256 Hash function is basicly used to secure the Bitcoin Blokchain
- Hash pointers link the Blockchain together in a way that is impossible to change content of single Transaction without changing the post hashed Blocks of the Blockchain.
3. What does it mean when we say that hash functions need to be collision resistant?
- It means that each input text has its own uinique output hash.
- There is just an unsignificant small possibility where different inputs can have the same output
- A hash function is an irreversible function in which a hashing algorithm transforms an unique input in an unique output.
- Bitcoin uses hash functions to transform transaction data. For storage, secure transport, security, tracking, speed, checking.
- Minimize the chance that two unique inputs after hashing give the same hash
1- Hash functions is a unique digital fingerprint given to an input value that can’t be reverse in terms of finding the input based on the output.
2- Hash functions are use in cryptos like bitcoin in a way to determinate the digital fingerprint of each block of transaction to ensure the security of the network by preventing the alteration of any value of the input data.
3- Collision resistant means that an input will not have two different hash outputs.
- Hash functions take an input string of any length, provide a secure way of generating a value or values from a string of text using a mathematical function, and provides an output of a fixed length.
- Bitcoin uses Hash functions like SHA 256 Encryption and a nonce from the miners.
- Means it is infeasible for 2 different inputs to have the same Hash Output. Too many possibilities.
-
A hash function is a function which will take an input parameter and convert to a unique identifier, the result should always be the same and to be secure it should be impossible to reverse.
-
In the bitcoin blockchain the SHA256 hash function is used to create a hash for transaction.
-
First each hashing function are not collision resistant but it’s just really difficult to create one. To be collision resistant the algorithm should be able to generate a different hash for every input possible. (with MD5 2 input could have the same hash because it s a poor hash function)
-
a hash function is a function that can take any digital data and convert it into a fixed size code. If anything of this original data is changed (digital data basically consisting in ones and zeros), so much as a comma or a space, the new outcoming data will be completely different.
-
information like the amount, the sender, the timestamp are converted into a hash, the mathematics behind the hashfunction makes it unique and almost impossible to find out the data that entered the hash. than the hash output of several operations are hashed again until there is only one hash left. This is called a merkle tree. This is added to the block and any future block should have this hash in it´s code.
3.collision resistant is so it is virtually impossible that 2 inputs create the same output. It should be very very hard to create the same hash output from different inputs.
-
each input produces a unique output. Like its own digital fingerprint. You cannot figure out the input by just having the output. It is like a one way street with no reversing.
-
Hash functions are used in crypto currencies by taking any length of input string and putting it through the hashing algorithm and giving you a fixed length output
-
It means you cant have two inputs giving you the same output. any alteration tothe input will give you a completely different output.
Hash functions are one way functions in which unique input produces a unique output.
The hash function is used to hash transaction data
It is hard to find 2 unique inputs that hash to the same output
-
Describe hash functions with your own words
In my own words a hash function is the conversion of digital information , to a unique string of characters that can only be used for that specific information that was converted. -
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 crptocurrencies like bitcoin to create public keys, and also are used in transaction data for blocks. -
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).
when you say hash functions need to be collision resistant, it means that each input has to have its own hash. Having 2 inputs with the same hash is a collision, which is no good for any system, network or protocol.