We have an entropy source called “Entropy”. We encode this entropy with HMAC-SHA512 using a “Key”. The Key is public, but the Entropy is secret. We are then testing for the HMAC-SHA512 output in order to start with 1
.
So, how much entropy is lost in the process, by encoding the secret Entropy with a public Key, and making sure that the output starts with 1
?
For example:
Entropy = random 132 bit integer
Public Key = Test
HMAC-SHA512 = 1f042a41f2a940c38e64146823abd7926acb9d26cf02ee50f637dd5fb37c60c4d582603abe789138fa51a0496a6840b6e03e9b38d886e6bc6fd337f284a1052f
In our case we would search for a random integer until the HMAC-SHA512 output of it encoded with Test
will start with 1
like 1f042a41f…
So in our case the final "not so random number" is:
467315884026680443925332907127019473008
How much entropy is lost in this process?