Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecdsa_secp256r1_sha384_test.json, ecdsa_secp256r1_sha512_test.json, and ecdsa_secp384r1_sha256_test.json are missing #53

Open
briansmith opened this issue May 31, 2018 · 4 comments

Comments

@briansmith
Copy link

These unusual combinations of P-256 + {SHA-384, SHA-512} and P-384 + SHA-256 are supported in some crypto libraries, for backward compatibility with some TLS implementations. However, there are no test vectors for these combinations. It would be great to include the test vectors for these in the open source release. (P-256 + SHA-512 is arguably even a useful combination since SHA-512 is faster than SHA-256 on many platforms, and probably stronger, even/especially when truncated in half.)

@thaidn
Copy link
Contributor

thaidn commented Jun 2, 2018

@bleichen

@bleichen
Copy link
Contributor

bleichen commented Jun 7, 2018

I'm adding more files for more curve/hash combination.
I'm however not sure about ecdsa_secp384r1_sha256.
This combination makes little sense since the security of the hash is
weaker than the curve. There are a few test vectors in ecdsa_test.json,
though these are marked as legacy cases. I.e. the result is "acceptable",
which means that I expect that some libraries reject such keys and signatures.

@briansmith
Copy link
Author

I'm however not sure about ecdsa_secp384r1_sha256.
This combination makes little sense since the security of the hash is
weaker than the curve.

I agree it doesn't make sense. Unfortunately, before TLS 1.3, TLS clients can advertise "ECDSA + SHA-384" and "ECDSA + SHA-256" but they can't advertise which curves they support for each digest algorithm, since the supported curves are negotiated in a separate parameter. (In TLS 1.3 there is a fixed mapping: SHA-256 with P-256, SHA-384 with P-384.) A web-compatible TLS implementation either has to decide to reject signatures for which it technically advertised support or support this weird combination. I believe many implementations have chosen to support this weird combination.

@thaidn
Copy link
Contributor

thaidn commented Nov 26, 2019

ecdsa_secp256r1_sha512_test.json was added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants