wycheproof-x25519-missing-octet-string
X25519: Missing octet string
The correct ASN encoding of a private key contains an octet string of an octet string. The reason is that the key material itself is an octet string and the ASN encoding of the private key contains an octet string of the ASN encoded key material. This test vector contains a test vector where the ASN encoding of the private key contains just an octet string and hence is malformed. Implementations that accept the private key as valid may contain fallback code for the openjdk bug.
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.
The correct ASN encoding of a private key contains an octet string of an octet string. The reason is that the key material itself is an octet string and the ASN encoding of the private key contains an octet string of the ASN encoded key material. This test vector contains a test vector where the ASN encoding of the private key contains just an octet string and hence is malformed. Implementations that accept the private key as valid may contain fallback code for the openjdk bug. Demonstrated by 1 test vector in Project Wycheproof.
Provenance
- Kind
- hardeningDefensible practice with no normative source. Judge it for yourself.
- Source
- wycheproof
- Clause
- RFC 7748 §5
- 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.