My Requirement:
I have a Azure Storage Account with 2 containers named Normal and Encrypted.
Now a zip file will be uploaded into "Normal" container which I need to encrypt and place it into "Encrypted" Container.
File can be anywhere between 3GB to 5GB.
Currently, I have used AES CBC with padding PKCS7 (I have not used HMAC). and this works fine. But based on some security concerns, we have found that AES CBC does not provide integrity.
Challenges:
As AES GCM is more secure, I am exploring on how can be the bigger files can be encrypted using AES GCM. If we encrypt in chunks, then for each Chunk different Auth Tag is generating. How can this be addressed? as I need to give Key, IV and Auth Tag for decryption team to decrypt it.
Is it good and is it possible to encrypted 5GB files using AES GCM? If so, can anyone help me out with some example code in C# or link to refer?
If AES GCM is not good for this, then how can I implement HMAC to my AES CBC code. As I am working on Azure Blobs, I am using CryptoStream to encrypt and write the content into "Encrypted" container.