# Is there any standard present to measure strength of a generated key using true random number generator?

I was wondering how to measure the security strength of a generated secret key for the below protocol:

"A 128 bit random number is generated by TRNG and the random number will be used as a private key for Diffie-Hellman key exchange protocol. Two entities generate the shared secret key and that will be used as a session key for symmetric encryption."

My questions are:

1. Is there any standard way to measure how secure the generated key is?
2. What are the properties that the generated key should have to be resistant to attacks? Is there any paper/Standard document available that has the list of such properties?

Thanks.

• Note: if you just generate a random 128 bit number $x$ and use that as the Diffie-Hellman private value (so the public value would be $g^x \bmod p$), then the resulting security strength of the generated secret key would be at most 64 bits... – poncho Mar 17 at 12:18
• I have additional question. If ECDH is used here, is the security strength still half of the key length or its security strength is better? – Sami Mar 17 at 16:21
• Still the same (as the same generic attack applies) – poncho Mar 17 at 17:28

Different approaches are taken for TRNGs that are believed to produce independent, identically distributed outputs and others. One of the key measurements is the minimum entropy ($$H_\infty$$ in the Shannon-Renyi sense) that tracks the most probable output of some fixed size output. If the only information available to the attacker is the minimum entropy of the key, their guessing work should be at least on the order of $$2^{H_\infty}$$.
• dont you mean $2^{H_\infty}$? – kodlu Mar 17 at 12:14
• Plus see @poncho 's comment which negates $2^{H_\infty}$ as we're referring specifically to Diffie-Hellman. – Paul Uszak Mar 17 at 13:11