Please comment on data size of cipher block chaining (CBC) in symmetric encryption
I am开发者_高级运维 considering to use CBC to encrypt a block of data. Dose it make a sense to use CBC if the data to be encrypted is smaller than 2 blocks ? For example data block size for AES is 128 bits, and total data to be encrypted is less than 256 bits.
I appreciate your inputs.
Yes, even if it is 1 block in size it makes sense. This is because the IV is XOR'ed with the first block. This means that even if you encrypt 2 identical plain text segments the resulting cipher text will be distinct.
Don't forget about CWE-329.
精彩评论