I am using the javax.crypto.Cipher in Java to do AES/CBC/PKCS5Padding encryption. What I am observing is that, if you try to encrypt a Plaintext with no padding, PKCS5 adds another entire block just to padding. For example, if I got a 32bytes Plaintext, assuming that AES is using 16byte block size, the padding size should be 0. But, instead of that, PKCS5 adds another block for padding.
Is this correct or is just a matter of javax.crypto.Cipher implementation?