Skip to content

Instantly share code, notes, and snippets.

@ensingerphilipp
Created September 24, 2019 11:24
Show Gist options
  • Save ensingerphilipp/54a362963d59f889edd39ebb6cf7ab58 to your computer and use it in GitHub Desktop.
Save ensingerphilipp/54a362963d59f889edd39ebb6cf7ab58 to your computer and use it in GitHub Desktop.
Show available Elliptic Curve - Curves in Java
package ecdsaSignature;
import java.security.Security;
import java.util.Arrays;
//Helper Class to print all supported Epileptic Curves for use in ECDSA
//Refer to http://safecurves.cr.yp.to for a list of save epileptic curves
public class ShowSupportedCurves
{
public static void main(String[] args)
throws Exception{
String[] curves = Security.getProvider("SunEC").getProperty("AlgorithmParameters.EC SupportedCurves").split("\\|");
System.out.println(Arrays.toString(curves));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment