Padding adds extra data so input fits a required cryptographic format. AES accepts exactly 16-byte blocks, so shorter input needs padding before encryption; longer input is divided into blocks. section 5.1 section 5.2
A final partial block
A 1,605-byte message becomes 1,001 AES blocks: 1,000 complete blocks and a final 5-byte block containing 11 bytes of padding. A mode of operation then specifies how those blocks are encrypted. section 5.2
Padding also protects an RSA encryption scheme when it adds random data before encryption. OAEP is recommended because it provides stronger security guarantees than the older PKCS#1 v1.5 scheme; applications should reject the older scheme rather than preserve insecure compatibility. section 6.3.1
Figure 5.2 AES is a block cipher because it requires its input to be a fixed size: 128 bits. AES is a symmetric cipher because the key used for encryption is the same one used for decryption.
Use the fixed-size AES diagram to connect padding with block-cipher input requirements. section 5.1


















