There is a risk of an IV collision using the awskms or aesgcm provider.
As per NIST SP 800-38D section 8.3, it is unsafe to encrypt more than 2^32 plaintexts under the same key when using a random IV.
This limit could easily be reached given the use case of database column encryption, worse still, ciphertexts are likely to be persisted and stored together.
IV collision could enable an attacker with access to the ciphertexts the ability to decrypt all messages encrypted with the affected key.
It is not possible to fix aesgcm provider without a breaking change. It should be documented that users must not encrypt more than 2^32 values with any key.
It is possible to fix the awskms package without introducing a breaking change by switching to a counter-based IV.
There is a risk of an IV collision using the
awskms
oraesgcm
provider. As per NIST SP 800-38D section 8.3, it is unsafe to encrypt more than 2^32 plaintexts under the same key when using a random IV. This limit could easily be reached given the use case of database column encryption, worse still, ciphertexts are likely to be persisted and stored together. IV collision could enable an attacker with access to the ciphertexts the ability to decrypt all messages encrypted with the affected key.It is not possible to fix
aesgcm
provider without a breaking change. It should be documented that users must not encrypt more than 2^32 values with any key.It is possible to fix the
awskms
package without introducing a breaking change by switching to a counter-based IV.