ISO 10126 padding scheme fills blocks with random bytes except for the last byte, which indicates the padding length. This approach provides some confusion to attackers but the standard has been withdrawn due to security concerns and implementation issues.
| Property | Value |
|---|---|
| Category | Padding Schemes |
| Sub-category | Random Padding |
| Security status | ⚠️ Deprecated |
| Complexity | Not specified |
| Inventor | ISO/IEC |
| Year | 1991 |
| Origin | Not specified |
| Source | algorithms/padding/iso10126.js |
| Flag | Value |
|---|---|
IsLengthIncluded |
No |
Status: ⚠️ Deprecated
| Issue | Description | Mitigation |
|---|---|---|
| Standard Withdrawn | ISO 10126 has been withdrawn due to security and implementation concerns. Modern systems should use PKCS#7 or other standardized padding. | — |
| Padding Oracle Attacks | Random padding can be vulnerable to timing attacks and padding oracle attacks if error handling reveals padding validity. | — |
| Implementation Complexity | Random padding requires secure random number generation and careful implementation to avoid weaknesses. | — |
1 vector ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — ISO 10126 padding example (random bytes vary)
Source: ISO/IEC 10126 (Withdrawn)
| Field | Value |
|---|---|
blockSize |
32 |
testMode |
Yes |
input |
6bc1bee22e409f96e93d7e11739317 |
expected |
6bc1bee22e409f96e93d7e117393170000000000000000000000000000000011 |