Bitcoin Forum
May 07, 2024, 04:18:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Is the output of hash function evenly distributed?  (Read 2221 times)
btc_enigma
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
December 09, 2016, 06:20:30 AM
 #21

I rephrase my question:

1) given arbitrary inputs, does the SHA-256 function really generate outputs that are evenly distributed?

2) given block headers** as inputs, does the SHA-256 function really generate outputs that are evenly distributed?


Yes, yes. If not, it would not be a good hash function and it would be open to attacks.


Good point. Collision resistance comes from the fact that its uniformly distributed. 

Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715098682
Hero Member
*
Offline Offline

Posts: 1715098682

View Profile Personal Message (Offline)

Ignore
1715098682
Reply with quote  #2

1715098682
Report to moderator
1715098682
Hero Member
*
Offline Offline

Posts: 1715098682

View Profile Personal Message (Offline)

Ignore
1715098682
Reply with quote  #2

1715098682
Report to moderator
1715098682
Hero Member
*
Offline Offline

Posts: 1715098682

View Profile Personal Message (Offline)

Ignore
1715098682
Reply with quote  #2

1715098682
Report to moderator
arulbero (OP)
Legendary
*
Offline Offline

Activity: 1915
Merit: 2074


View Profile
December 09, 2016, 07:56:33 AM
 #22

Good point. Collision resistance comes from the fact that its uniformly distributed.  

good distribution --> collision resistance ? No, example: SuperFastHash

http://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed
Quote
I think the more important takeaway is that there are two classes of algorithms when it comes to collisions:

    collisions rare: FNV-1, FNV-1a, DJB2, DJB2a, SDBM
    collisions common: SuperFastHash, Loselose

And then there's the how evenly distributed the hashes are:

    outstanding distribution: Murmur2, FNV-1a, SuperFastHash
    excellent distribution: FNV-1
    good distribution: SDBM, DJB2, DJB2a
    horrible distribution: Loselose


collision resistance --> uniformity    but uniformity != random uniformity  

https://research.neustar.biz/2012/02/02/choosing-a-good-hash-function-part-3/
Quote
A hash function ought to distribute its keys uniformly across its output range.
Now, uniformity is different from random uniformity.
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!