I've heard about using a hash approach to create random numbers based on two independent entropy sources A, B:
$h_{i} = H(a_i+b_i)$
$H$ could be for instance SHA-1, or SHA-256.
My questions are:
1)
I read that hashing an input of s Bits to an output of n bits will reduce entropy because of truncation. The accepted answer in
How much entropy is lost via hashing when you add known or low entropy data?
sounds totally reasonable for me. But what does it mean in terms of quality of randomness? When an input of, lets say, 1024 bits is hashed to 256 bits, of course entropy gets lost. But can't I say, that the "remaining" 256 bits are still good random numbers and not comromised by the truncation of length? Isn't it just the rate of available random bits which is reduced, not the quality of randomness?
2)
Why is a hash function $y=f(x)$ like SHA-1 a random oracle at all? So far I know, it means, that the set of arguments x is mapped to a set of results y, distributed equally over $2^{256}$ values in the case of SHA-256. Why is this the case? Is there a rigorous proof for that or is it only a working assumption? It would mean for my feeled understanding:
- An s-bit value $x_1$ feed into Hash results in n bits $y_1$,
- An s-bit value $x_2$ feed into Hash results in n bits $y_2$,
- When $x_2$ differs from $x_1$ in only one bit position, all bits of $y_1$ are totally "uncorrelated" to the bits of $y_2$, regardlesss of the changed bit position.
Is that right?
Although I feel that this should be the case for a good hash of course, I wonder if the goal is only approximately achieved or really accurate? (Even the word "uncorrelated" is difficult to grasp for me, since, in fact, there is some kind of correlation over the hash-algorithm)