Initialization vector size

514 views Asked by At


(Image of code I couldn’t type it due to limited site access)

I have an encrypted file that i encrypted using XILINX SDK. The key file used contains a 256 bit key and a 96 bit iv.

I am attempting to decrypt the file using AesCrytopServiceProvider from .net framework,however the CreateDecryptor(key, iv) method is causing an exception because the iv is 12 bytes instead of 16. What is a possible work around? I cant change the size of the iv bc the Xilinx sdk uses a set size (12 bytes)

1

There are 1 answers

2
Aznarepse On

I guess you already have the solution but I just saw this post. Just in case... 16 bytes is the standard IV length, your 12 bytes IV most likely comes from an AES GCM mode. Try using the latter in your decryption method.