Why does symmetric encryption require padding? Is it to avoid the attacker to learn the size of the plaintext?
Asked
Active
Viewed 1,025 times
1 Answers
6
Symmetric crypto does not always have padding. Stream ciphers often will not require padding. Padding is necessary when using a cipher that requires plaintexts to be a multiple of a particular size. For example, AES in CBC mode requires plaintexts that are a multiple of 128 bits. So if your plaintext is not, you must pad to make it the right size.
mikeazo
- 39,117
- 9
- 118
- 183