1
$\begingroup$

I have a unique 6 digit number that I am generating a IV from. I am trying to make it as unique as possible. From my programming, I am able to get it down to only have 100 duplicate IVs per unique 6 digit number.

Now I have read that reusing IV's is a big no no because it leaks information. My question now, assuming I am only using 1 key and if someone has gained access to my database of 1 billion records and has the encrypted string as well as the IVs. If each IV is only reused 100 times, would they be able decrypt the encrypted string based off only that information?

If so, how would they be able to?

$\endgroup$
1
  • 2
    $\begingroup$ Your concern shouldn't be "safety of 100-time IV reuse", your concern should be hiring an educated security professional for your team! $\endgroup$
    – DannyNiu
    Feb 24 at 1:08
2
$\begingroup$

Given sufficient resources - maybe. If an attacker knows text that was encrypted and can associate that plaintext with an encrypted string then they can potentially work on figuring out what the other strings encrypted with the same IV are. Can they simply derive the plaintext using some formula though? No. If you're encrypting textual data it's easier to determine than binary data.

You have another problem in that it's generally recommended to limit the total amount of data encrypted with a single key (no matter how many IVs get used). In the book Cryptography Engineering Ferguson and Schneier recommend a limit of around 64 GB for CBC mode (assuming you're using AES). So, if your billion records are more than 64 bytes each you'll start bumping into that. This is a recommendation based on what they believe to be an acceptable risk of leaking data. You could potentially encrypt 128 GB or 256 GB and be fine. Or if you want the data to be safe for a number of years in the future without having to re-encrypt the data you might want to take it down to 8 GB or even 4 GB per key. It just depends on the level of risk you're willing to take.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.