wycheproof-rsa-pkcs1-decrypt-invalid-pkcs1-padding
RSA PKCS#1: Invalid pkcs1 padding
This is a test vector with an invalid PKCS #1 padding. Implementations must ensure that test vectors with different modifications cannot be distinguished from each other. For example it is a mistake if invalid paddings lead to distinguishable exceptions (RFC 8017 Section 7.2.2). A recommended test is to collect the exceptions thrown by all test vectors with the InvalidPkcs1Padding flag and check that these exceptions are all exactly identical.
REJECT
Your service should reject this one.
Stated as the outcome to assert against, so a suite compares with this rather than hardcoding a result and getting it backwards.
An implementation that has a distinguishable reaction to different types of invalid PKCS #1 paddings frequently makes it easier to perform padding oracle attacks. Demonstrated by 59 test vectors across 3 vector documents in Project Wycheproof.
Provenance
- Kind
- vulnerabilityA published weakness exists for this. Failing it is a known exploit path.
- Source
- wycheproof
- Clause
- RFC 8017 §7.2
- CVE
- none
- Weakness
- none
Test keys only. Nothing here is a statement about any particular service: the expected outcome above is what an application ought to do, not evidence that yours does.