I have written a BlackBerry app that uses AES encryption. I am trying to decrypt this using the AesCryptoServiceProvider in C#.
The BlackBerry code doesn’t seem to use an IV which means I have nothing to pass to the AesCryptoServiceProvider.
Is it possible for me to decrypt AES without an IV, if so, how?
Reading the blackberry java crypto documentation, it appears you are not supposed to directly use AESEncryptionEngine. If you use it straight, you end up with ( I assume) ECB mode which results in the following encryption of an image of a penguin. don’t do it.
Rather it appears that to use some secure mode of operation, you need to actually use a wrapper around the basic AESEncrypt / Decrypt Engine. You want to use the CBCEncryptionEngine to do this. Here is some sample code from here. Note that the IV is randomized on creation, so you don’t need to set it or worry about reuse. Just replace DES with AES here.