I checked a piece of library code intended for encryption/decryption with AES, CBC, 256 Bit Key length.
To check the results I consulted the following website: https://www.devglan.com/online-tools/aes-encryption-decryption
Since AES uses a block size of 16 Bytes, it is clear to me that input data longer than 16 Bytes will be padded to 32 Byte and also produce an output of length 32 Bytes.
What I don´t understand (and what is also the problem in my code under test) is that for an input length of 16 Bytes (exactly one block length), it seems that the output (encrypted text) is already padded to 32 Bytes.
I read that padding in this case is more of a convention and not a necessity of the algorithm. Is that correct? If so:
-> What is the benefit of use padding if the input is perfectly in the right size
-> How do I decrypt a 16 Byte encrypted text?