(I updated the title, as I think there was some confusion as to the question)
Here's the question:
For example, if I have a bit stream that is 64K bytes long and there is about 16 *8 bits worth of entropy randomly dispersed in that byte stream, so I have 16*8 bits worth of entropy.
However, if I SHA256 that byte stream, I will now only have 32 bytes total rather than 64K bytes.
Some information has been lost of course, but perhaps all of the entropy is retained?
Another way of looking at the question, is the entropy of SHA256(10GB with 16 bytes of entropy) equal to SHA256(16 bytes with 16 bytes of entropy) and if not, how much exactly has been lost?
I'm having a hard time finding any literature which estimates entropy loss, just a lot of hand waving by various crypto engineers that it's all good.
Here's an algorithmic way of looking at it:
#!/bin/sh HASHV=`echo <random secret> | sha256` echo $HASHV while(true) ; do HASHV=`echo "$HASHV 00000000000000000000000000000000" | sha256` echo $HASHV done
Will the entropy of HASHV decrease over time?
Anyone got anything specific? (refs to papers, books, etc are grand) Cheers