# is it efficient if blockchain uses double Hash algorithms $H_1$ and $H_2$?

I wonder is it efficient to use less Target condition and double hash algorithms with different target (or the same target with different Hash algorithms) and one nonce in a Block.

Example

Target 1 for Hash1 H1 is 3zeroes, 000F543D... Target 2 for Hash2 H2 is 4zeroes, 0000FSDF...?

• I got to understand that the value of the hash as (unsigned) integer needs to be below a certain value. That should be enough to specify how efficient mining is. With leading zeros you can only use powers of two, but that problem disappears if you compare the entire value. Jun 9 at 15:34
• @MaartenBodewes indeed, but don't forget changing the nonce means the changing of the hash result, but what about the hardness? getting for $n$ hash algorithm a specific amount of leading zeroes each, by just one nonce? instead of wanting a specific amount of zeroes, does dividing in two/or plus hashes helps to effects the hardness of the problem? Jun 9 at 15:45
• and you are comparing the hardness to a single hash with 3+4=7 zeroes? Is that the question? Jun 9 at 15:50
• ok, but you want to use the same nonce, right? Jun 9 at 15:56
• What do you mean by efficient? From which point of view? Jun 11 at 12:27

I'm supposing that both functions are enough secure (i.e the output seems random, and there is no more efficient attack to find preimage than brute-forcing).

The idea for proof of work is based on the following assumption. Find an $$x$$ such that $$H(y|x) =O^\lambda w$$, for a fixed $$y$$ takes a time $$\approx2^\lambda$$.

Then if you suppose that $$H_1$$, and $$H_2$$ are "independent" (finding a solution for one hash function doesn't help you to find a solution for the other one), then solving the two puzzle will take a time $$\approx2^{\lambda_1} + 2^{\lambda_2}$$. Notice that's much smaller than $$2^{\lambda_1 + \lambda_2}$$.

Thus : solving two independent puzzles with parameters $$\lambda_1$$ and $$\lambda_2$$ is much easier than solving one puzzle with parameter $$\lambda_1 + \lambda_2$$.

• Thanks for the explanation , what if we choose $\lambda_1$ and $\lambda_2$ such that $2 ^{\lambda_1 } + 2 ^{\lambda_2} \approx 2^{\lambda_1 + \lambda_2}$ ? Jun 11 at 15:18
• It's possible only if one of the $\lambda$'s is much smaller than the other one. Then the puzzle is quite equivalent to "invert" only one of the function. Jun 11 at 15:21
• Then the amount of time will be $k2^\lambda$, with $\lambda$ the number of zero, and $k$ the number of hash functions considered. Jun 11 at 20:32
• I don't think so, because, it's noticeable that the witness would have size $\approx k\lambda$, then it's better to use only one function with parameter $\log(k) + \lambda$, then the puzzle would have approximately the same hardness with a quite smaller witness (of size $\approx \log(k) + \lambda$). Jun 12 at 6:26
• @Nour-eddineRAHMANI I thought about your proposition, and it could have a great interest, if we choose to compute the SAME witness for both hash function, then the size of the witness is still $\lambda$, and the time of computation becomes $2^{k\lambda}$, then it becomes much more efficient (in term of size of witness). Jun 14 at 10:43