Why does symmetric encryption require padding? Why does symmetric encryption require padding? Is it to avoid the attacker to learn the size of the plaintext?
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.