wycheproof-ecdh-wrong-curve
ECDH: Wrong curve
The public key and private key use distinct curves. Implementations are expected to reject such parameters.
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.
Computing an ECDH key exchange with public and private keys can in the worst case lead to an invalid curve attack. Hence, it is important that ECDH implementations check the input parameters. The severity of such bugs is typically smaller if an implementation ensures that the point is on the curve and that the ECDH computation is performed on the curve of the private key. Some of the test vectors with modified public key contain shared ECDH secrets, that were computed over the curve of the private key. Demonstrated by 345 test vectors across 20 vector documents in Project Wycheproof.
Provenance
- Kind
- vulnerabilityA published weakness exists for this. Failing it is a known exploit path.
- Source
- wycheproof
- Clause
- SEC 1 §3.3
- 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.