I would like to know how much padding OpenSSL algorithms expect.
The documentation says:
All the block ciphers normally use PKCS#5 padding also known as standard block padding
which is both informative, and slightly misleading. OpenSSL supports, by default, one stream cipher (RC4) and a variety of block ciphers (Blowfish, 3DES, AES...). The
enc command (from the command-line tool) encrypts an input file into an OpenSSL-specific format, with a custom header (of length 16 bytes), and then the encrypted data as processed through the selected algorithm. For RC4, there is no padding: the encrypted data will have the same length as the source file (but there will be the extra 16-byte header). For block ciphers, it depends on the mode of operation:
CBC and ECB modes require that the input consists in an integral number of blocks, so padding must be applied to ensure that. PKCS#5 padding (identical to PKCS#7 padding) adds at least one byte, at most 255 bytes; OpenSSL will add the minimal number of bytes needed to reach the next multiple of the block size, so if blocks have size n, then padding will involve between 1 and n extra bytes (including). Block size depends on the algorithm: Blowfish and 3DES use 8-byte blocks, AES uses 16-byte blocks.
CFB and OFB modes don't require padding, so there is none applied.