+1 vote

There are three properties of hash functions

Collision-resistance: A hash function H is said to be collision resistant if it is infeasible to find two values, x and y , such that x != y , yet H(x)= H(y).

Hiding: A hash function H is hiding if: when a secret value r is chosen from a probability distribution that has high entropy, then given H(r ‖ x) it is infeasible to find x. ‖ means concatenation of two strings.

Puzzle friendliness. A hash function H is said to be puzzle-friendly if for every possible n-bit output value y , if k is chosen from a distribution with high entropy, then it is infeasible to find x such that H(k ‖ x) = y in time significantly less than 2^n.

puzzle friendliness seems similar to hiding property. Is there any significant differences between them?

Mar 27, 2018 4,279 views

## 1 answer to this question.

+1 vote

The difference is indeed subtle. I understood it like this:

Suppose you had a hash and a BadHash. You pick x' and a random nonce r', compute y' = BadHash(r'|x'), and give me y'. It turns out that if x' is UTF8-encoded English text, I am able to tell you what x' was, and (though not strictly necessary), I can even tell you r'. If x' happened to be just a random bit-string, I'd be out of luck. But no matter, this is clearly not a hiding hash.

Now the puzzle: I give you a value Y', and a randomly chosen value R' (say "11110011...100"), and ask you to find an x such that BadHash(R'|x) = Y'. Good news: it turns out that Y'= BadHash(00101...0001 | UTF8("Bitcoin is deflationary")). So because BadHash is non-hiding (plus), you can determine an R (namely 00101...0001), and and x (namely UTF8("Bitcoin is deflationary")), such that BadHash(R|x) = Y' But this doesn't help you, because the puzzle specified that you need an x that works with a different R, namely "11110011...100". So you haven't solved the puzzle.

You see, then, that the two properties aren't equivalent.

• 9,090 points

selected Aug 3, 2018 by Omkar

## Why do the resultant hash after mining has a leading no. of zeroes in Blockchain verification?

This is chosen by the DIFFICULTY EQUATION. In ...READ MORE

## How to access member functions of smart contract using web3?

I have implemented a similar feature and ...READ MORE

## What are the functions of the Fabric CA Server and Fabric CA Client?

You need to setup the Fabric CA ...READ MORE

## Hyperledger: How to retrieve properties of relationship through query?

I dont think its possible using query. ...READ MORE

+1 vote

## Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

## Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

## Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

+1 vote