I've read some articles and tutorials about AES GCM and was using this cipher for one of my java-projects, so let's say I know some basics.
I read that you should use an IV-length of 12 bytes which means that there should be more than enough unique IV's availble because you should never use the same IV again in combination with the same key. For creating a random IV I was using the SecureRandom class in java, so not very surprising.
Now please consider the following: I have to encrypt data which is being sent out through an unsafe network and every packet has to be independent. In numbers: I'm sending 120 packets per second, which are 432000 packets per hour, all using the same key. So this number is not that impressive but if we suppose that this serivce is running the whole day then we will see 10.3 Mio. independent packets and therefore 10.3 Mio IV's which should be unique. Since nobody can guarantee that SecureRandom does not deliver duplicates, it could be that my service is using identical IV's which should be unique.
Now my questions:
How likely is a collision using SecureRandom and how could I avoid it? I mean I could keep track of all used IV's but that wouldn't be efficient as time goes on.
Is it true that someone could reconstruct the key if IV's are not being unique? How could this be done, how much effort would be neccesary to achieve this? Are there any numbers which could demonstrate this? e.g. if a "correct" implementation would need a calculation of 2^128, a wrong one would only need 2^30.
I know that some answers are probably difficult or impossible but I'd like to get a feeling about how much security is being impacted if IV's are not unique, how "easily" AES GCM could be broken under the mentioned circumstances.
Thanks a lot!