I would like to encrypt certain data before logging it. Currently, I use a private key and a static IV.
Looking at generating a suitable IV I am concerned about the overhead in generating CSPRNG whilst logging. I am sure there is a different way to approach this problem but I do not have the experience to know what is safe. I currently use a Node server on AWS.
What patterns for securing certain properties of logged data are available currently? I don't want to encrypt the whole log as I need to search for properties, but the values need to be hidden.
I would like some direction as to where to find answers or even how to ask the right questions! I am at the stage where I am realising how difficult cryptography is, so thank you for your patience.