wycheproof-rsa-pkcs1-sig-ber-encoded-padding
RSA PKCS#1: Ber encoded padding
The padding in a RSA PKCS#1 signature must be DER encoded. This signature uses an alternative BER encoded padding.
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.
It is unclear if accepting a small number of alternative BER encodings leads to a vulnerability. This needs to be analyzed in detail. Libraries that verify RSA signatures by using an ASN.1 parser are difficult to analyze. Demonstrated by 336 test vectors across 24 vector documents in Project Wycheproof.
Provenance
- Kind
- hardeningDefensible practice with no normative source. Judge it for yourself.
- Source
- wycheproof
- Clause
- RFC 8017 §8.2
- CVE
- CVE-2006-4339
- 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.