I have sensitive logs that needs to be encrypted using AES-256 and RSA. Due to the nature of the logging system, the entries (rows) need to be encrypted one-by-one.
My approach was to reuse the same AES-256 key and IV (and also the same RSA pubkey) per run of the application. I would save the unencrypted IV and the RSA encrypted AES key together with each log entry. I figured out that this is not secure as two identical log entries in the same application run would yield the same cipher text, making inference possible (please correct me if this is not true).
What I'm thinking of now is encrypting each log entry using the same AES key but with different IVs . This will remove the need to perform the expensive RSA encryption for each log entry, while not allowing inference weakness. Is this approach secure?