I am trying to encrypt a file using AES/CTR/NoPadding. The goal is to re-encrypt the new/changed blocks and leave the old ones unchanged then generate a new MAC.
My thinking is that when the file changes I’d identify the blocks that changed and encrypt the updated blocks while all unchanged blocks would reuse their existing nonce as to not change their encrypted result.
I understand that reusing nonce’s is not ideal, is there a better alternative to achieve what I’m trying to do?
Forgive my lack of experience in cryptography. I tried searching but couldn’t find an answer that addressed my use case.