B
Bob
I have two questions hoping someone could give me some insights.
I'm implementing an encryption solution using the RijndaelManaged class.
What I found very strange is that if I use a different IV on the decrypte
end, a binary file (such as a zip file) decrypts without any problem, but if
it's a text file, it adds some scrumbled characters at the beginning even
though the rest of the file is decrypted without problem. Why does this
happen?
Because of this issue, I need to have the same IV on both ends. I'd like to
avoid managing another piece of cryptic data (in addition to the key), I'm
thinking of using the key as the IV. I use a 256-bit key so I increased the
blocksize on my RijndaelManaged object to 256 and this actually speed up the
encryption process by about 10% when I tested with a file of 3 MB in size.
This is good. However, I just don't know if using the same byte array as
the key and the IV is a security concern, that is, whether it's easier to
figure out the IV from the encrypted data. Because if so, then my key is
also exposed.
Thanks a lot for any suggestions.
Bob
I'm implementing an encryption solution using the RijndaelManaged class.
What I found very strange is that if I use a different IV on the decrypte
end, a binary file (such as a zip file) decrypts without any problem, but if
it's a text file, it adds some scrumbled characters at the beginning even
though the rest of the file is decrypted without problem. Why does this
happen?
Because of this issue, I need to have the same IV on both ends. I'd like to
avoid managing another piece of cryptic data (in addition to the key), I'm
thinking of using the key as the IV. I use a 256-bit key so I increased the
blocksize on my RijndaelManaged object to 256 and this actually speed up the
encryption process by about 10% when I tested with a file of 3 MB in size.
This is good. However, I just don't know if using the same byte array as
the key and the IV is a security concern, that is, whether it's easier to
figure out the IV from the encrypted data. Because if so, then my key is
also exposed.
Thanks a lot for any suggestions.
Bob