Author

Topic: Understanding about Hash functions (Read 149 times)

full member
Activity: 196
Merit: 174
July 21, 2018, 04:52:18 AM
#4
I do not have source but I remember to read that it is very rare scenarios but it is possible that 2 different input can have same hash.
When we compare to the SHA-2 series of hash functions(SHA-256, SHA-384, SHA 512) has strong collision resistance. so it is hard to find two inputs having the same hash. I think you're talking about MD5 hash function which is vulnerable for collision attacks and also a hacker can produce two colliding hashes in no time with higher CPU power, but not with the SHA-2 series.

With SHA-256 function, almost all the time we cannot get Hash(A)=Hash(B) if A≠B


<...snip...>

I have created a thread regarding Hash function which I believed helpful for you Smiley. This Hash calculator is a very good one for reference with different hash functions.
HCP
legendary
Activity: 2086
Merit: 4361
July 21, 2018, 04:46:48 AM
#3
I do not have source but I remember to read that it is very rare scenarios but it is possible that 2 different input can have same hash.
You are indeed correct... this is known as a "collision". Refer: https://en.wikipedia.org/wiki/Collision_(computer_science)

Basically, it depends on the size of the output space for your hash function. The larger the space, the smaller the chance of a collision.

For example, if you have a 2 bit hash function (as opposed to bitcoins 256 bit hash functions)... then the only possible outputs of your hash function are:
Quote
00
01
10
11

Given any two different inputs... there is a 1/4 chance that they'll both generate the same output. A 256 bit hash function on the other hand has 2256 possible outputs... the odds of finding a collision are so small it is generally regarded as zero.
sr. member
Activity: 742
Merit: 395
I am alive but in hibernation.
July 21, 2018, 02:32:51 AM
#2
How this relate to the blockchain? Huh
   Blockchain use hash functions everywhere : i.e In Bitcoin private key ; every public key linked to a private key , private key can generate an essentially unlimited supply of public addresses but you can not reverse it to show the secret key behind it.



I guess, this part is wrong, Private key is used to generate public key by  using elliptic curve multiplication. Bitcoin Address are generated by using Hash function on Public key.





source : https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc



  Hash function have a three basic characteristics :
  • Unique - two different data sets cannot produce the same digest


I do not have source but I remember to read that it is very rare scenarios but it is possible that 2 different input can have same hash.
member
Activity: 231
Merit: 19
July 20, 2018, 01:07:59 AM
#1
Introduction
    Hash functions are the fundamental and vital part of the Blockchain . In summarize if you understand how the Hash functions work,  you'll understand too the Blockchain.

Hash Function What is it? Huh
  In the abstract, a Hash function is a mathematical process that takes input data of any size, performs an operation on it, and returns output data of a fixed size. In summarize , a hash function takes an input of any length and creates an output of fixed length.

  Hash function have a three basic characteristics :
  • Secure - Non-reversible function
  • Fixed size - short or long data will produce fixed-size digest
  • Unique - two different data sets cannot produce the same digest

How this relate to the blockchain? Huh
   Blockchain use hash functions everywhere : i.e In Bitcoin private key ; every public key linked to a private key , private key can generate an essentially unlimited supply of public addresses but you can not reverse it to show the secret key behind it.

Jump to: