by zhuzhuor · 13y ago · 0 comments
I don't know how do you integrate AES-GCM with TLS, but I have to say
1. The secure AES-GCM supports 96-bit nonces. It's 12 bytes, not 8 bytes mentioned in the article.
2. Nonce is nonce. It shouldn't be chosen at random (as random IVs). As long as nonces are not reused, GCM should be secure.
3. I don't believe implementing a secure random number generator is more efficient than maintaining an incremental counter.
Edited for typos
That's correct. However, TLS takes four bytes from the handshake key material and uses them as the first four bytes of the nonce. The remaining 8 bytes are all that vary over the lifetime of the connection.
But even without the 4 bytes, 64-bit nonce seems enough for me, as long as it's not chosen at random.
For comparison, if the nonce is chosen randomly, the security level is only 2^32 (supposing the 4 bytes based on the key materials remain unchanged).
I agree that a counter is perfectly safe.