I have found myself in a position where I need to encrypt multiple objects (vCards) with AES Counter mode or Galois/Counter Mode using the same key. Now here is the problem the structure of the vCard always starts with predefined values i.e. here is an example from wikipedia
basically, we always have the following data that is in the beginning of the object i.e.
and in the end, we always have
Now the problem is that the attacker will also know this information. That means he will definitely be able to partially decrypt those vCards. Imagine I need to encrypt hundreds of thousands of such vCards with one key. How to do this at all? Since it is assumed that the attacker will have access to the encrypted version but also he will also be able to know the type of the object i.e. that the ciphertext represents vCard.
My question is will the attacker be able to.
- decrypt the full cipher text to plain/clear text
- reverse engineer the encryption key
assuming the attacker has access to hundreds of thousands of such encrypted records(vCards) each one of them is encrypted with separate Nonce and counter and assuming that entropy used during the process was correct.
What are the risks in such a situation and what can be done here in order to protect the data. Does encryption makes sense in such a situation at all or is this idea doomed from the beginning?
I have done some research here in regard to what people are writing i.e
But those examples are referring only to one instance of the ciphertext. what happens when the attacker has access to hundred thousands of such instances all encrypted with separate Nonce/Coutners. The information about
- a) what block cipher has been used
- b) mode of information of that block cipher
- c) nonce
- d) counter
is public that means that the attacker has access to it. the only thing that is private in this situation is the key.
Addition 1 (27.04.23) , after the answer of Kodlu which answer i consider correct. It is not possible to do what Kodlu suggested since we have many more objects types i.e. messages, todos, calendar, etc. etc and doing that for each one of them is not feasible.