Which elliptic curves does jarsigner support?

209 views Asked by At

I will be signing JARs with an ECDSA key, and I can choose now which elliptic curve I will use. I at least need to be able to generate the signature with jarsigner. Where can I see, what elliptic curves jarsigner supports?

I tested that out of 65 elliptic curves supported by my OpenSSL installation, my jarsigner supports 46. Oracle documentation on jarsigner does not say anything about what is supported. Is it documented anywhere at all?

2

There are 2 answers

0
Konstantin Shemyak On BEST ANSWER

Here is an answer: "Support for elliptic curves by jarsigner". To quote the conclusion:

Support of elliptic curves by jarsigner depends on jarsigner itself and on the JRE configuration. There is no command-line option to list all supported curves.

0
Emmanuel Bourg On

I've tested 82 curves supported by OpenSSL 1.1.1f with the script Konstantin linked to in his answer. Many curves have been deprecated in OpenJDK 14 and disabled in OpenJDK 15, and only these worked from OpenJDK 8 to 15:

  • secp384r1
  • secp521r1
  • prime256v1