Adding the source and length actually collects more entropy. Consider the case of using system counters as entropy sources. If at some timestamp
CounterY=123, we actually retain at least one bit more entropy by stirring in a source identifier ("
CounterX=123CounterY=123") instead of simply "
123123". The source of the value is additional entropy, it adds
log2(total number of sources) bits of entropy to the pool when combined with a value. The length is similar; it adds more entropic information about the values being added to the pool (we stir in "
len=4val=1231len=2val=23" versus "
Ideally, we can collect a stream of values of the form:
timestamp,source,length,data and periodically hash them into the pool. Use of a a good cryptographic hash in theory ensures we exctract all the entropy available from the source data (up to the hash length).