Score:1

Can the IV be reused if the key is changed?

in flag

I am using AES-GCM-256 to encrypt data in a database, and am using a single key that I salt with a unique random value for each user to encrypt their information. I am using the same IV for all of this.

Is this secure so long as I change the key each time?

Score:4
my flag

Is this secure so long as I change the key each time?

Yes, using the same IV with different keys is perfectly safe.

However, if you encrypt some data for a user, and then the user updates his data, will you encrypt that new data with the same key? If so, well, you've just used the same (key, iv) pair for two separate sets of data

in flag
Thanks for pointing that out, I will make sure to change the key each time.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.