3 ms·
The default mode is CBC [1]. Still the fact alone that the mode is not set explicitly and makes it look like the author did not know or think about it gives me
by danbruc 13y ago
The default mode is CBC [1]. Still the fact alone that the mode is not set explicitly and makes it look like the author did not know or think about it gives me a bad enough feeling that I would never use it.
[1] http://msdn.microsoft.com/en-us/library/system.security.cryptography.symmetricalgorithm.mode.aspx http://msdn.microsoft.com/en-us/library/system.security.cryp...
- lucb1e 13y agoOkay that would solve a lot. I hope he passes the entire text into his EncryptBlock method instead of just a block. I'm not sure, but even if it uses CBC internally, the encryptions might still be broken by comparing the first block of each encrypted message, if messages are encrypted with the same password (which is very likely). I've always heard that the IV may never be static.
- danbruc 13y agoHe uses a unique initialization vector obtained from a cryptographically secure random number generator for each message, so there is no obvious issue with the first block, too. UPDATE: Not entirely correct, see https://news.ycombinator.com/item?id=7400183 https://news.ycombinator.com/item?id=7400183.