I'm writing a software that will be encrypting & authenticating segments of data, each 4096 bytes long. These segments are saved to disk in a sequential order that will never change. So I was thinking to encrypt each one of them using
AES256-GCM, but before I code it I need to confirm a couple of points:
- To conserve space for saving an
AES-GCMencryption/decryption, I was thinking to use each of my segments' sequential number as an
IV. Would that pose an issue (in cryptographic sense)?
- I decided to go with a 16-byte
TAG(that is used by
AES-GCMfor authentication.) Is that an overkill for an encrypted 4096 byte segment?