Is it normal that when I use Double DES secret key to encrypt a string in DES3 CBC mode then I always get the same cipher text? For testing I'm using IVC=0.
|
|
If you encrypt the same thing it is normal, if you encrypt something different it is not normal. In that case you have probably an error in your implementation. A common error is to translate the encrypted result to string for transport, all non-readable bytes are then changed to "?" by .net. |
|||||||||
|
|
Yes, if the IV is the same and the message is the same, then you should expect the ciphertext to be the same. I hope you are aware that using a fixed IV (like IV=0) is insecure. (The reference to double DES is also puzzling. Double DES is insecure. Of course, you also mention DES3, so if you meant triple DES, then this comment can be ignored.) In addition, if you are using encryption without authentication, that is also likely to be insecure. Instead of putting together your own encryption, I suggest you use a standard scheme, such as the OpenPGP data encryption format (for data at rest) or SSL/TLS (for communication channels). |
|||
|
|
