Creating a k bit random string My goal is to create a random $k$ bit string. My question can be divided in two parts.


If a $n$ bit string $s$ is computationally indistinguishable from a random $n$ bit string, can we say that the string $s$ has $n$ bit min entropy?
But for some reason I can't use the string $s$ directly, I need to convert it to another $n$ bit string $s'$. During conversion something bad happens. The probability of each bit being $0$ or $1$ is not $1/2$ anymore. It is $1/2+e$. Hence the min entropy of the bit string $n$ changes. Let the min-entropy of $s'$ be $l&gt;k$. As hash functions are good randomness extractor, if I apply a hash function $H$ on the string $s'$ that produces $k$ bits, can I say the output of the hash function is a $k$ bit random string?


Thank you for your help.
Addressing the first point, then no.  Min entropy is the smallest estimate of all ways of measuring entropy.  If you consider a string for cryptographic purposes, it's traditional to take the most conservative approach of entropy estimation.  That's the safest way if you wear a tin foil hat.

Min entropy is:-



If s (or X) is random, the individual byte probabilities will be uniformly distributed.  Some Pr(x) will be higher than others.  This range may actually be quite large because randomness can be quite pesky.  Since min entropy takes the max Pr(x) of the range, min entropy will always be lower.  In practice, it may only be 1 - 2% lower for random data.  It will be much lower though for non random data like language.

As a picture, this is a histogram of 1MB of really random data:-



We can assume that this is unbiased. Yet there is significant variation in the individual byte probabilities (the random thing). Ergo there must be a max probability.  This leads to a min entropy value of 7.93 bits /byte. So for an output of 1MB, you can only count on 992000 bytes of entropy for cryptographic purposes.  That's 0.9% less than you might naively expect.  Incidentally the chi for this gives p = 0.15.

As to your second point, I don't think that there is any consensus on this site.  Some say that a hash entropy extractor can only extract half of the original entropy.  Most of this work is highly theoretical though and I am  unconvinced of it's applicability to reality.  On the other hand there are commercial devices that can extract more than half.  I personally believe now that an extractor can extract all source entropy.