Class NamedCurvesTest

    • Field Detail

      • log

        private org.slf4j.Logger log
    • Constructor Detail

      • NamedCurvesTest

        public NamedCurvesTest()
    • Method Detail

      • sanityCheckOIDAndNameAndParams

        public void sanityCheckOIDAndNameAndParams()
                                            throws Exception
        Use Bouncy Castle's curve table to sanity check all registered curves that OID and name match, i.e. resolve to equivalent instances of ECParameterSpec, and that curve matches the NamedCurve's params.

        This test assumes that all curves we'd ever register and ship with the library will be supported by Bouncy Castle. If this ever becomes untrue, we can always disable the test, or remove the curves if there is a security or other reason to stop supporting it.

        Throws:
        Exception
      • mapBCCurveName

        private String mapBCCurveName​(String standardName)
        BC sometimes has slightly different curve simple names from SunEC, so translate here...
        Parameters:
        standardName -
        Returns:
        the corresponding BC curve name