Loading CryptoViz...
Loading page content...Loading CryptoViz...
Loading page content...Data Alignment & Security
Understand and compare common cryptographic padding schemes such as PKCS#7, OAEP, PSS, and PKCS#1 v1.5 side by side.
To pad messages to a multiple of the block size for block ciphers.
| Used In | AES (CBC, ECB), DES |
|---|---|
| Compatibility | Encryption only |
| Security | Deterministic. Vulnerable to padding oracle attacks (e.g., POODLE) if used in CBC mode without proper MAC-then-Encrypt or Encrypt-then-MAC authentication. |
Appends N bytes of value N. If the message is already a multiple of the block size, a full block of padding is added (e.g., 16 bytes of 0x10).
Legacy APIs, older TLS versions, basic symmetric encryption.
Does not provide integrity. Should be avoided in modern designs in favor of authenticated encryption modes like GCM, which do not require padding.
10 bytes of padding added to reach a multiple of the 16-byte block size.