When encrypting data using a counter (CTR) derived block cipher mode of operation, it is essential not to reuse the same initialization vector (IV)
for a given key. An IV that complies with this requirement is called a "nonce" (number used once). Galois/Counter
(GCM) and Counter with Cipher Block Chaining-Message Authentication Code (CCM) are both derived from counter mode.
When using AES-GCM or AES-CCM, a given key and IV pair will create a "keystream" that is used to encrypt a plaintext (original content) into a
ciphertext (encrypted content.) For any key and IV pair, this keystream is always deterministic. Because of this property, encrypting several
plaintexts with one key and IV pair can be catastrophic. If an attacker has access to one plaintext and its associated ciphertext, they are able to
decrypt everything that was created using the same pair.
Additionally, IV reuse also drastically decreases the key recovery computational complexity by downgrading it to a simpler polynomial root-finding
problem. This means that even without access to a plaintext/ciphertext pair, an attacker may still be able to decrypt all the sensitive data.
What is the potential impact?
If the encryption that is being used is flawed, attackers might be able to exploit it in several ways. They might be able to decrypt existing
sensitive data or bypass key protections.
Below are some real-world scenarios that illustrate some impacts of an attacker exploiting the vulnerability.
Theft of sensitive data
The encrypted message might contain data that is considered sensitive and should not be known to third parties.
By not using the encryption algorithm correctly, the likelihood that an attacker might be able to recover the original sensitive data drastically
increases.
Additional attack surface
Encrypted values are often considered trusted, since under normal circumstances it would not be possible for a third party to modify them. If an
attacker is able to modify the cleartext of the encrypted message, it might be possible to trigger other vulnerabilities in the code.