Supposed that a client has AES-128 bit randomly generated static key
The client is using a PBKDF2 in order to to generate a vector(list) of keys i.e. target keys to leverage will be located between the range of index’s i.e. 20 000 till 80 000. basically that means that the client has around different 60 000 keys that could be possibly used.
I would like to understand if there is any specific reason why NOT to do the following in two different scenarios:
A) The client is using AES CTR mode with randomly generated 16 Bytes IV on the client side using the browser RNG. Basically only the first 8 byte the nounce i.e. the first 64 bits most significant bits are random the rest is the counter. Unfortunately this is a restriction on the client side that can not be changed. The concern here is that different browsers are providing different types of RNG and in case for some reason the IV's repeat, this will not end good. Since the client is not expected to have more then 60 000 data chunks that will need to processed, will it be a an acceptable idea to circle trough the the space of keys between 20 000 and 80 000 and used one of the following keys i.e. from the range PBKDF run 20 000 till PBKDF run 80 000 during the encryption process. That would also mean that the key index that will be used will also need to be saved and send together with the Counter(IV), ciphertext and MAC as a public information.
B) Is the security completely broken in case for some reason the number of data chunks overflow the 60 000 counter and in this case at least two IVs(counters) repeat but their keys are hopefully different.
Many thanks in advanced.