0

How much sense does it make to use AES-CTR when you are encrypting local offline data? I always saw it in networking in action.

And it's not one time, so imagine you encrypt many times every day.

The performance is not an issue because the data is very small, but what security measures shall be taken?

I think the counter of the AES-CTR must be randomly generated every time and kept along the encrypted data in clear text, right?

1

How much sense does it make to use AES-CTR when you are encrypting local offline data?

Compared to CBC, it is easy to do bit flip attacks on CTR. So it makes the most sense when you are also checking a MAC when decrypting.

I think the counter of the AES-CTR must be randomly generated every time and kept along the encrypted data in clear text, right?

If you change the AES key for each file, you could start counting at 0 (or a fixed IV). If you are not changing keys between files, you need to be absolutely sure you are choosing non-overlapping counter regions for your files or you will leak the XOR of plaintexts which is fairly catastrophic. Note that if you choose the IV randomly, it will almost certainly be non-overlapping at the block size of AES.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.